scalbln, scalbn


scalbln, scalbn

Multiplies a floating-point number by a power of the floating-point radix

 #include <math.h> double scalbn ( double x , int n  ); float scalbnf ( float x , int n  ); long double scalbnl ( long double x , int n  ); double scalbln ( double x , long int n  ); float scalblnf ( float x , long int n  ); long double scalblnl ( long double x , long int n  ); 

The scalbn( ) and scalbln( ) functions multiply a floating-point number x by an integer power of FLT_RADIX, providing a more efficient calculation than the arithmetic operators. The symbolic constant FLT_RADIX, defined in float.h, indicates the base of the floating-point environment's exponent representation; this is usually 2, for binary exponent representation. In this case, the return value of the scalbn( ) and scalbln( ) functions is x x 2n.

Example

See the example for feholdexcept( ) in this chapter.

See Also

frexp( ), ldexp( )



C(c) In a Nutshell
C in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596006977
EAN: 2147483647
Year: 2006
Pages: 473

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net