Name
copysign,
fmax,
fmin,
fdim,
remainder,
nextafter,
ldexp,
scalbn,
fma
— IEEE 754 floating-point manipulation functions
Synopsis
copysign(
|
in x double precision, |
| |
in y double precision); |
fmax(
|
in x double precision, |
| |
in y double precision); |
fmin(
|
in x double precision, |
| |
in y double precision); |
fdim(
|
in x double precision, |
| |
in y double precision); |
remainder(
|
in x double precision, |
| |
in y double precision); |
nextafter(
|
in x double precision, |
| |
in y double precision); |
ldexp(
|
in x double precision, |
| |
in exp integer); |
scalbn(
|
in x double precision, |
| |
in exp integer); |
fma(
|
in x double precision, |
| |
in y double precision, |
| |
in z double precision); |
Description
These functions implement the IEEE 754 floating-point manipulation
operations defined by the C99 standard math library. They all work with
double precision floating point numbers and return a result of that type.
: copysign returns a value with the magnitude of x and the sign of y.
: fmax returns the larger of x and y; if one argument is NaN, the other is returned.
: fmin returns the smaller of x and y; if one argument is NaN, the other is returned.
: fdim returns the positive difference max(x - y, 0).
: remainder IEEE 754 remainder of x / y, rounded to nearest (sign may differ from fmod).
: nextafter returns the next representable double after x in the direction of y.
: ldexp returns x * 2^exp, computed efficiently without an explicit multiplication.
: scalbn equivalent to ldexp on systems where FLT_RADIX is 2 (efficient 2^exp scaling).
: fma fused multiply-add: returns (x * y) + z with a single rounding.
See also fmod for the
truncated-division remainder.