mirror of
git://git.musl-libc.org/musl
synced 2024-11-27 12:04:14 +08:00
math: add (obsolete) bsd drem and finite functions
This commit is contained in:
parent
ebbaf2180e
commit
5d01ab4ac6
@ -381,6 +381,12 @@ double yn(int, double);
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define HUGE 3.40282346638528859812e+38F
|
||||
|
||||
double drem(double, double);
|
||||
float dremf(float, float);
|
||||
|
||||
int finite(double);
|
||||
int finitef(float);
|
||||
|
||||
double scalb(double, double);
|
||||
float scalbf(float, float);
|
||||
|
||||
|
7
src/math/finite.c
Normal file
7
src/math/finite.c
Normal file
@ -0,0 +1,7 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <math.h>
|
||||
|
||||
int finite(double x)
|
||||
{
|
||||
return isfinite(x);
|
||||
}
|
7
src/math/finitef.c
Normal file
7
src/math/finitef.c
Normal file
@ -0,0 +1,7 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <math.h>
|
||||
|
||||
int finitef(float x)
|
||||
{
|
||||
return isfinite(x);
|
||||
}
|
@ -1,7 +1,10 @@
|
||||
#include <math.h>
|
||||
#include "libc.h"
|
||||
|
||||
double remainder(double x, double y)
|
||||
{
|
||||
int q;
|
||||
return remquo(x, y, &q);
|
||||
}
|
||||
|
||||
weak_alias(remainder, drem);
|
||||
|
@ -1,7 +1,10 @@
|
||||
#include <math.h>
|
||||
#include "libc.h"
|
||||
|
||||
float remainderf(float x, float y)
|
||||
{
|
||||
int q;
|
||||
return remquof(x, y, &q);
|
||||
}
|
||||
|
||||
weak_alias(remainderf, dremf);
|
||||
|
Loading…
Reference in New Issue
Block a user