[CRT:MATH] Import nextafter, nextafterf and nexttowardf from musl

Note: On Windows, where a long double is the same as a double, nextafterl is the same as nextafter, nexttowardl is the same as nexttoward.
Also nexttoward is the same as nextafter.
This commit is contained in:
Timo Kreuzer 2024-11-20 16:23:22 +02:00
parent 5c26ccdb29
commit a9ee20cb9a
12 changed files with 210 additions and 39 deletions

View file

@ -6,7 +6,6 @@ list(APPEND CRT_FLOAT_SOURCE
float/copysign.c
float/fpclass.c
float/fpecode.c
float/nafter.c
float/scalb.c
)

View file

@ -1,26 +0,0 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/sdk/crt/float/nafter.c
* PURPOSE: Unknown
* PROGRAMER: Unknown
* UPDATE HISTORY:
* 25/11/05: Added license header
*/
#include <precomp.h>
/*
* @implemented
*/
double _nextafter( double x, double y )
{
WARN("This function is not implemented correctly\n");
if ( x == y)
return x;
if ( _isnan(x) || _isnan(y) )
return x;
return x;
}