mirror of
https://github.com/reactos/reactos.git
synced 2025-07-04 06:51:22 +00:00

- Convert to spec, based on wine. Tons of stuff missing but compiles, links and runs abiword and firefox. - Export floating point functions. [CRT] - Implement acosf, asinf, atanf, atan2f, copysign, copysignf, exp, expf, fabs, fmod, fmodf, hypotf, ceil, ceilf, cos, cosf, floor, floorf, log, log10, sin, sinf, tan, tanf, ldexp, log10f, logb, logbf, logf, modff, nextafter, nextafterf, powf, sinhf, sqrt, sqrtf, tanf, tanhf in amd64 compatible way. Made possible by mingw-w64. svn path=/branches/ros-amd64-bringup/; revision=45245
32 lines
629 B
C
32 lines
629 B
C
/**
|
|
* This file has no copyright assigned and is placed in the Public Domain.
|
|
* This file is part of the w64 mingw-runtime package.
|
|
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
|
*/
|
|
#include <math.h>
|
|
|
|
float
|
|
nextafterf (float x, float y)
|
|
{
|
|
union
|
|
{
|
|
float f;
|
|
unsigned int i;
|
|
} u;
|
|
if (isnan (y) || isnan (x))
|
|
return x + y;
|
|
if (x == y )
|
|
/* nextafter (0.0, -O.0) should return -0.0. */
|
|
return y;
|
|
u.f = x;
|
|
if (x == 0.0F)
|
|
{
|
|
u.i = 1;
|
|
return y > 0.0F ? u.f : -u.f;
|
|
}
|
|
if (((x > 0.0F) ^ (y > x)) == 0)
|
|
u.i++;
|
|
else
|
|
u.i--;
|
|
return u.f;
|
|
}
|