PML | fdlibm | |||||||
---|---|---|---|---|---|---|---|---|
Name | Double | Float | Long Double | Double | Float | Long Double | Description | Comments |
Trigonometric functions. | ||||||||
acos | Arc cosine of X. | |||||||
asin | Arc sine of X. | |||||||
atan | Arc tangent of X. | |||||||
atan2 | Arc tangent of Y/X. | |||||||
cos | Cosine of X. | |||||||
sin | Sine of X. | |||||||
tan | Tangent of X. | |||||||
sincos | Cosine and sine of X. | |||||||
Hyperbolic functions. | ||||||||
cosh | Hyperbolic cosine of X. | |||||||
sinh | Hyperbolic sine of X. | |||||||
tanh | Hyperbolic tangent of X. | |||||||
acosh | Hyperbolic arc cosine of X. | |||||||
asinh | Hyperbolic arc sine of X. | |||||||
atanh | Hyperbolic arc tangent of X. | |||||||
Exponential and logarithmic functions. | ||||||||
exp | Exponential function of X. | when using PML, you may get unresolved externals when using the softfloat function, because ldexp and frexp are not implemented | ||||||
exp2 | Compute base-2 exponential of X. | |||||||
exp10 | Compute exponent to base ten. | Same as pow10() | ||||||
log | Natural logarithm of X. | |||||||
log2 | Compute base-2 logarithm of X. | |||||||
log10 | Base-ten logarithm of X. | |||||||
frexp | Break VALUE into a normalized fraction and an integral power of 2. | double version also implemented in mintlib | ||||||
ldexp | X times (two to the EXP power). | double version also implemented in mintlib | ||||||
modf | Break VALUE into integral and fractional parts. | |||||||
expm1 | Return exp(X) - 1. | |||||||
log1p | Return log(1 + X). | |||||||
logb | Return the base 2 signed integral exponent of X. | |||||||
Power functions. | ||||||||
pow | Return X to the Y power. | |||||||
pow2 | Compute base-2 exponential of X. | Same as exp2() | ||||||
pow10 | Return the value of 10 raised to the power x | Same as exp10() | ||||||
sqrt | Return the square root of X. | when using PML, you may get unresolved externals when using the softfloat function, because frexp is not implemented | ||||||
hypot | Return sqrt(X*X + Y*Y). | |||||||
cbrt | Return the cube root of X. | |||||||
Nearest integer, absolute value, and remainder functions. | ||||||||
ceil | Smallest integral value not less than X. | when using PML, you may get unresolved externals when using the softfloat function, because modf is not implemented | ||||||
fabs | Absolute value of X. | |||||||
floor | Largest integer not greater than X. | when using PML, you may get unresolved externals when using the softfloat function, because modf is not implemented | ||||||
fmod | Floating-point modulo remainder of X/Y. | |||||||
finite | Return nonzero if VALUE is finite and not NaN. | double version also implemented in mintlib | ||||||
drem | Return the remainder of X/Y. | Obsolete synonym for remainder | ||||||
significand | Return the fractional part of X after dividing out `ilogb (X)'. | |||||||
copysign | Return X with its signed changed to Y's. | |||||||
nan | Return representation of qNaN for double type. | Implemented using GCC builtin | ||||||
Bessel functions. | ||||||||
j0 | Bessel function of the first kind of order 0 | |||||||
j1 | Bessel function of the first kind of order 1 | |||||||
jn | Bessel function of the first kind of order n | |||||||
y0 | Bessel function of the second kind of order 0 | |||||||
y1 | Bessel function of the second kind of order 1 | |||||||
yn | Bessel function of the second kind of order n | |||||||
Error and gamma functions. | ||||||||
erf | error function | |||||||
erfc | complementary error function | |||||||
lgamma | log gamma function | |||||||
tgamma | true gamma function | |||||||
gamma | (logarithm of the) gamma function | |||||||
lgamma_r | reentrant version of lgamma | |||||||
ISO C99 rounding functions. | ||||||||
rint | Return the integer nearest X in the direction of the prevailing rounding mode. | when using PML, you may get unresolved externals when using the softfloat function, because modf is not implemented | ||||||
nextafter | Return X + epsilon if X < Y, X - epsilon if X > Y. | |||||||
nexttoward | Return X + epsilon if X < Y, X - epsilon if X > Y. | |||||||
nextdown | return next floating-point number toward negative infinity | |||||||
nextup | return next floating-point number toward positive infinity | |||||||
remainder | Return the remainder of integer divison X / Y with infinite precision. | |||||||
scalb | Return X times (2 to the Nth power). | |||||||
scalbn | Return X times (2 to the Nth power). | |||||||
scalbln | Return X times (2 to the Nth power). | Overkill for m68k. The int argument to scalbn() will never exceed the maximum possible range. | ||||||
ilogb | Return the binary exponent of X, which must be nonzero. | |||||||
llogb | Like ilogb, but returning long int. | |||||||
nearbyint | Round X to integral value in floating-point format using current rounding direction, but do not raise inexact exception. | Same as rint | ||||||
round | Round X to nearest integral value, rounding halfway cases away from zero. | |||||||
trunc | Round X to the integral value in floating-point format nearest but not larger in magnitude. | |||||||
remquo | Compute remainder of X and Y and put in *QUO a value with sign of x/y and magnitude congruent `mod 2^n' to the magnitude of the integral quotient x/y, with n >= 3. | |||||||
Conversion functions. | ||||||||
lrint | Round X to nearest integral value according to current rounding direction. | |||||||
llrint | Like lrint, but returning long long int. | |||||||
lround | Round X to nearest integral value, rounding halfway cases away from zero. | |||||||
llround | Like lround, but returning long long int. | |||||||
fdim | Return positive difference between X and Y. | |||||||
fmax | Return maximum numeric value from X and Y. | |||||||
fmin | Return minimum numeric value from X and Y. | |||||||
fma | Multiply-add function computed as a ternary operation. | |||||||
roundeven | Round X to nearest integer value, rounding halfway cases to even. | |||||||
fromfp | Round X to nearest signed integer value, not raising inexact, with control of rounding direction and width of result. | |||||||
ufromfp | Round X to nearest unsigned integer value, not raising inexact, with control of rounding direction and width of result. | |||||||
fromfpx | Round X to nearest signed integer value, raising inexact for non-integers, with control of rounding direction and width of result. | |||||||
ufromfpx | Round X to nearest unsigned integer value, raising inexact for non-integers, with control of rounding direction and width of result. | |||||||
Classification functions. | ||||||||
fpclassify | Return number of classification appropriate for X. | |||||||
signbit | Return nonzero value if sign of X is negative. | double version also implemented in mintlib | ||||||
isfinite | Return nonzero value if X is not +-Inf or NaN. | double version also implemented in mintlib | ||||||
isnormal | Return nonzero value if X is neither zero, subnormal, Inf, nor NaN. | Implemented as macro | ||||||
isnan | Return nonzero if VALUE is not a number. | double version also implemented in mintlib | ||||||
isinf | Return 0 if VALUE is finite or NaN, +1 if it is +Infinity, -1 if it is -Infinity. | double version also implemented in mintlib | ||||||
issignaling | Return nonzero value if X is a signaling NaN. | |||||||
issubnormal | Return nonzero value if X is subnormal. | Implemented as macro | ||||||
iszero | Return nonzero value if X is zero. | |||||||
iscanonical | Return nonzero value if X is canonical. | |||||||
relational tests without exception for NaN. | ||||||||
isgreater | determines (x) > (y) without an exception if x or y is NaN. | Implemented using GCC builtin | ||||||
isgreaterequal | determines (x) >= (y) without an exception if x or y is NaN. | Implemented using GCC builtin | ||||||
isless | determines (x) < (y) without an exception if x or y is NaN. | Implemented using GCC builtin | ||||||
islessequal | determines (x) <= (y) without an exception if x or y is NaN. | Implemented using GCC builtin | ||||||
islessgreater | determines (x) < (y) || (x) > (y) without an exception if x or y is NaN. This macro is not equivalent to x != y because that expression is true if x or y is NaN. | Implemented using GCC builtin | ||||||
isunordered | determines whether its arguments are unordered, that is, whether at least one of the arguments is a NaN. | Implemented using GCC builtin | ||||||
iseqsig | Return X == Y but raising "invalid" and setting errno if X or Y is a NaN. | Implemented using GCC builtin | ||||||
Miscellaneous functions. | ||||||||
fmaxmag | Return value with maximum magnitude. | |||||||
fminmag | Return value with minimum magnitude. | |||||||
totalorder | Total order operation. | |||||||
totalordermag | Total order operation on absolute values. | |||||||
canonicalize | Canonicalize floating-point representation. | |||||||
getpayload | Get NaN payload. | |||||||
setpayload | Set quiet NaN payload. | |||||||
setpayloadsig | Set signaling NaN payload. | |||||||
matherr | SVID math library exception handling | Deprecated in favour of math_error | ||||||
math_error | detecting errors from mathematical functions | Partly implemented in fdlibm. Since most of the functions are derived from glibc, see the linux manpage for notes | ||||||
Exception handling. | ||||||||
feclearexcept | Clear the supported exceptions represented by EXCEPTS. | |||||||
fegetexceptflag | Store implementation-defined representation of the exception flags indicated by EXCEPTS in the object pointed to by FLAGP. | |||||||
feraiseexcept | Raise the supported exceptions represented by EXCEPTS. | |||||||
fesetexceptflag | Set the supported exception flags represented by EXCEPTS, without causing enabled traps to be taken. | |||||||
fetestexcept | Determine which of subset of the exceptions specified by EXCEPTS are currently set. | |||||||
fetestexceptflag | Determine which of subset of the exceptions specified by EXCEPTS are set in *FLAGP. | |||||||
feenableexcept | Enable individual exceptions. Will not enable more exceptions than EXCEPTS specifies. Returns the previous enabled exceptions if all exceptions are successfully set, otherwise returns -1. | |||||||
fedisableexcept | Disable individual exceptions. Will not disable more exceptions than EXCEPTS specifies. Returns the previous enabled exceptions if all exceptions are successfully disabled, otherwise returns -1. | |||||||
fegetexcept | Return enabled exceptions. | |||||||
Rounding control. | ||||||||
fegetround | Get current rounding direction. | |||||||
fesetround | Establish the rounding direction represented by ROUND. | |||||||
Floating-point environment. | ||||||||
fegetenv | Store the current floating-point environment in the object pointed to by ENVP. | |||||||
feholdexcept | Save the current environment in the object pointed to by ENVP, clear exception flags and install a non-stop mode (if available) for all exceptions. | |||||||
fesetenv | Establish the floating-point environment represented by the object pointed to by ENVP. | |||||||
feupdateenv | Save current exceptions in temporary storage, install environment represented by object pointed to by ENVP and raise exceptions according to saved exceptions. | |||||||
Control modes. | ||||||||
fegetmode | Store the current floating-point control modes in the object pointed to by MODEP. | |||||||
fesetmode | Establish the floating-point control modes represented by the object pointed to by MODEP. | |||||||
Complex Trigonometric functions. | ||||||||
cacos | Arc cosine of X. | |||||||
casin | Arc sine of X. | |||||||
catan | Arc tangent of X. | |||||||
ccos | Cosine of X. | |||||||
csin | Sine of X. | |||||||
ctan | Tangent of X. | |||||||
Complex Hyperbolic functions. | ||||||||
ccosh | Hyperbolic cosine of X. | |||||||
csinh | Hyperbolic sine of X. | |||||||
ctanh | Hyperbolic tangent of X. | |||||||
cacosh | Hyperbolic arc cosine of X. | |||||||
casinh | Hyperbolic arc sine of X. | |||||||
catanh | Hyperbolic arc tangent of X. | |||||||
Complex Exponential and logarithmic functions. | ||||||||
cexp | Exponential function of X. | |||||||
clog | Natural logarithm of X. | |||||||
clog10 | Base-ten logarithm of X. | |||||||
Complex Power functions. | ||||||||
cpow | Return X to the Y power. | |||||||
csqrt | Return the square root of X. | |||||||
crcp | complex reciprocal of z | Non-standard function | ||||||
Absolute value, conjugates, and projection. | ||||||||
cabs | Absolute value of Z. | |||||||
carg | Argument value of Z. | |||||||
conj | Complex conjugate of Z. | |||||||
cproj | Projection of Z onto the Riemann sphere. | |||||||
cimag | Imaginary part of Z. | |||||||
creal | Real part of Z. |