SCALBN(3) NetBSD Library Functions Manual SCALBN(3)NAME

scalbn,scalbnf,scalbnl-- exponent using FLT_RADIXLIBRARY

Math Library (libm, -lm)SYNOPSIS

#include <math.h>doublescalbn(double x,int n);floatscalbnf(float x,int n);long doublescalbnl(long double x,int n);DESCRIPTION

Thescalbn(),scalbnf(), andscalbnl() functions computex*r^n, whereris the radix of the machine's floating point arithmetic, defined by the FLT_RADIX constant in <float.h>. The rationale is efficiency;r^nis not computed explicitly.RETURN VALUES

As described above, upon successful completion, the described functions return the exponent computed using FLT_RADIX. Otherwise the following may occur: 1. When the result would cause an overflow, a range error occurs and ħHUGE_VAL, ħHUGE_VALF, or ħHUGE_VALL is returned according to the sign ofxand the return type of the corresponding function. 2. When the correct value would cause an underflow and it is not representable, a range error occurs and either 0.0 or an implementation-defined value is returned. When an underflow occurs but the correct value is representable, a range error occurs but the correct value is returned. 3. Ifxis ħ0 or ħInf,xis returned. Likewise, ifnis zero,xis returned. IfxisNaN,NaNis returned.SEE ALSO

exp(3), frexp(3), ldexp(3), math(3)STANDARDS

The described functions conform to ISO/IEC 9899:1999 (``ISO C99''). NetBSD 10.0 September 18, 2011 NetBSD 10.0

Powered by man-cgi (2024-08-26). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.