[PATCH] Fix nextafterf

Jie Zhang jie.zhang at analog.com
Wed Jan 14 15:28:17 UTC 2009


Currently nextafterf in uClibc is just a wrapper of nextafter, which is 
a double version. But this is not correct. Below is a test case:

#include <stdio.h>
#include <math.h>
int main ()
{
float a = 75563.570, b;
b = nextafterf (a, -0.0);
printf ("a = %f, b = %f\n", a, b);
return 0;
}

Run it on AMD64 with glibc:
a = 75563.570312, b = 75563.562500

Run it on Blackfin with uClibc:
a = 75563.570313, b = 75563.570313

A patch is attached. This patch copies nextafterf from glibc. Tested on 
Blackfin with the above test case. If it's OK, please apply. Thanks.


Jie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uclibc-nextafterf.diff
Type: text/x-patch
Size: 5250 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20090114/0b9626a7/attachment.bin 


More information about the uClibc mailing list