math: add (obsolete) bsd drem and finite functions

This commit is contained in:
Szabolcs Nagy 2013-11-21 01:16:49 +00:00
parent ebbaf2180e
commit 5d01ab4ac6
5 changed files with 26 additions and 0 deletions

View File

@ -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
View 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
View File

@ -0,0 +1,7 @@
#define _GNU_SOURCE
#include <math.h>
int finitef(float x)
{
return isfinite(x);
}

View File

@ -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);

View File

@ -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);