Download Amiga C Compiler User`s Reference Guide

Transcript
NAME
ceil/fabs/floor/fmod/frexp/ldexp/modf
-- float conversions
SYNOPSIS
#include "lattice/math. h
X
ceil(y);
get ceiling integer
x fabs(y);
get absolute value
x floor(y);
get floor integer
x fmod(y,z);
get mod value
x frexp (y,p);
split into mantissa and exponent
x ldexp(y,i);
load exponent
x
modf(Y,p);
split into integer and fraction
II
=
=
=
=
=
=
=
double x;
double y,z;
int i;
double *p;
result
operands
binary exponent value
for return of additional value
DESCRIPTION
These functions convert floating point numbers into various other
forms.
The floor and ceil functions return the integer values that are just
below and just above the specified value, respectively.
The fmod function returns y if z is zero. Otherwise, it returns a value
that has the same sign as y, is less than z, and satisfies the
relationship
y=i*z+x
where i is an integer.
Standard Library Functions
3-91