[PATCH] Fix ceill() for ldbl-96

Andreas Jaeger aj@suse.de
Thu Nov 13 09:02:00 GMT 2003


Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> writes:

> On Thu, 13 Nov 2003, Andreas Jaeger wrote:
>
>> But that test passes even without the patch for me on amd64, so why
>> does it fail for you Gwenore?
>
> Hmm checking, but one reason may be that your compiler used a builtin. 
> e.g. ceill(0.25) is optimized into ceilf(0.25) which yields a valid 
> result. Do we run the math testsuite with -fno-builtin?

No - I just send a patch.

> Please try the following:
>
> extern long double ceill(long double x);
> extern void abort(void);
>
> int main()
> {
>   if ((int)ceill(0.25) != 1)
> 	abort();
>   return 0;
> }

Fails for me - you're right.

With your patch applied, the testsuite passes (but did not pass
without your patch after using -fno-builtin).

Andreas
-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20031113/3a2adc93/attachment.sig>


More information about the Libc-alpha mailing list