ldexp(3) - NetBSD Manual Pages

Command: Section: Arch: Collection:  
LDEXP(3)                NetBSD Library Functions Manual               LDEXP(3)

ldexp, ldexpf -- multiply floating-point number by integral power of 2
Math Library (libm, -lm)
#include <math.h> double ldexp(double x, int exp); float ldexpf(float x, int exp);
The ldexp() family of functions compute x * 2^exp for a real floating-point number x.
The functions return the value of x times 2 raised to the power exp. Otherwise the following may occur: 1. If x is NaN, a NaN is returned. 2. If exp is zero or x is either ħ 0 or ħoo, x is returned. 3. If the call would cause an overflow, a range error occurs and either ħHUGE_VAL, ħHUGE_VALF, or ħHUGE_VALL is returned, depending on the sign of x and the type of the return value. 4. If an underflow would be caused by the correct value, and the value is not representable, either 0.0 or an implementation- defined value is returned.
frexp(3), math(3), modf(3)
The described functions conform to ISO/IEC 9899:1999 (``ISO C99''). NetBSD 7.0 September 18, 2011 NetBSD 7.0
Powered by man-cgi (2024-03-20). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.