This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] PowerPC: remove wrong truncl implementation for PowerPC64
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Date: Fri, 14 Mar 2014 10:49:18 -0300
- Subject: Re: [PATCH] PowerPC: remove wrong truncl implementation for PowerPC64
- Authentication-results: sourceware.org; auth=none
- References: <52CC7A2A dot 3070006 at linux dot vnet dot ibm dot com> <52CC7A8F dot 6030707 at linux dot vnet dot ibm dot com> <Pine dot LNX dot 4 dot 64 dot 1403061417330 dot 14498 at digraph dot polyomino dot org dot uk> <531DC88B dot 5050809 at linux dot vnet dot ibm dot com>
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),