PowerPC: remove wrong truncl implementation for PowerPC64
diff mbox

Message ID 532308DE.6050304@linux.vnet.ibm.com
State New
Headers show

Commit Message

Adhemerval Zanella March 14, 2014, 1:49 p.m. UTC
On 10-03-2014 11:13, Adhemerval Zanella wrote:
> On 06-03-2014 11:18, Joseph S. Myers wrote:
>> On Tue, 7 Jan 2014, Adhemerval Zanella wrote:
>>
>>> I forgot to add that I'll create a bugzilla for the truncl on PPC64 and
>>> send a patch to add some test inputs for 2.20.
>> What's the status on adding these test inputs?
>>
> Thanks for remind me, I'll find which was the original one that 
> triggered this issue.
>
Here they are and I checked on both PPC64 and X86_64. If no one opposes I will commit
it along a set of bugfixes for round implementations for PPC64.

--

2014-03-14  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
 
	* math/libm-test.inc (trunc_test_data): Add more tests related to
	BZ#16414.

---

Comments

Adhemerval Zanella March 14, 2014, 6:02 p.m. UTC | #1
On 14-03-2014 10:49, Adhemerval Zanella wrote:
> On 10-03-2014 11:13, Adhemerval Zanella wrote:
>> On 06-03-2014 11:18, Joseph S. Myers wrote:
>>> On Tue, 7 Jan 2014, Adhemerval Zanella wrote:
>>>
>>>> I forgot to add that I'll create a bugzilla for the truncl on PPC64 and
>>>> send a patch to add some test inputs for 2.20.
>>> What's the status on adding these test inputs?
>>>
>> Thanks for remind me, I'll find which was the original one that 
>> triggered this issue.
>>
> Here they are and I checked on both PPC64 and X86_64. If no one opposes I will commit
> it along a set of bugfixes for round implementations for PPC64.
>
> --
>
> 2014-03-14  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
>
> 	* math/libm-test.inc (trunc_test_data): Add more tests related to
> 	BZ#16414.
>
> ---
>
> diff --git a/math/libm-test.inc b/math/libm-test.inc
> index 574654e..556d000 100644
> --- a/math/libm-test.inc
> +++ b/math/libm-test.inc
> @@ -11283,6 +11283,13 @@ static const struct test_f_f_data trunc_test_data[] =
>      TEST_f_f (trunc, -72057594037927936.75L, -72057594037927936.0L),
>      TEST_f_f (trunc, -72057594037927937.5L, -72057594037927937.0L),
>
> +    /* Check cases where first double is a exact integer higher than 2^52 and
> +       the precision is determined by second long double for IBM long double.  */
> +    TEST_f_f (trunc,  34503599627370498.515625L, 34503599627370498.0L),
> +    TEST_f_f (trunc,  1192568192774434123539907640624.484375L, 1192568192774434123539907640624.0L),
> +    TEST_f_f (trunc, -34503599627370498.515625L, -34503599627370498.0L),
> +    TEST_f_f (trunc, -1192568192774434123539907640624.484375L, -1192568192774434123539907640624.0L),
> +
>      TEST_f_f (trunc, 10141204801825835211973625643007.5L, 10141204801825835211973625643007.0L),
>      TEST_f_f (trunc, 10141204801825835211973625643008.25L, 10141204801825835211973625643008.0L),
>      TEST_f_f (trunc, 10141204801825835211973625643008.5L, 10141204801825835211973625643008.0L),
>
Pushed as 4655c291d1808c35b7c54236ae62be7a3aaa0a2d with the LDBL_MANT_DIG guards.

Patch
diff mbox

diff --git a/math/libm-test.inc b/math/libm-test.inc
index 574654e..556d000 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -11283,6 +11283,13 @@  static const struct test_f_f_data trunc_test_data[] =
     TEST_f_f (trunc, -72057594037927936.75L, -72057594037927936.0L),
     TEST_f_f (trunc, -72057594037927937.5L, -72057594037927937.0L),
 
+    /* Check cases where first double is a exact integer higher than 2^52 and
+       the precision is determined by second long double for IBM long double.  */
+    TEST_f_f (trunc,  34503599627370498.515625L, 34503599627370498.0L),
+    TEST_f_f (trunc,  1192568192774434123539907640624.484375L, 1192568192774434123539907640624.0L),
+    TEST_f_f (trunc, -34503599627370498.515625L, -34503599627370498.0L),
+    TEST_f_f (trunc, -1192568192774434123539907640624.484375L, -1192568192774434123539907640624.0L),
+
     TEST_f_f (trunc, 10141204801825835211973625643007.5L, 10141204801825835211973625643007.0L),
     TEST_f_f (trunc, 10141204801825835211973625643008.25L, 10141204801825835211973625643008.0L),
     TEST_f_f (trunc, 10141204801825835211973625643008.5L, 10141204801825835211973625643008.0L),