home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
dev
/
gcc
/
libnix.lha
/
gnu
/
lib
/
libnix
/
sources.lha
/
math
/
trans
/
fmod.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1994-07-03
|
304 b
|
18 lines
#ifdef __GNUC__
#include <inline/mathieeedoubbas.h>
#endif
static inline double floor(double x)
{ return IEEEDPFloor(x); }
static inline double ceil(double x)
{ return IEEEDPCeil(x); }
double fmod(double x,double y)
{ double a=x/y;
if(a>=0)
return x-y*floor(a);
else
return x-y*ceil(a);
}