.\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" the American National Standards Committee X3, on Information .\" Processing Systems. .\" .\" %sccs.include.redist.man% .\" .\" @(#)ldexp.3 8.2 (Berkeley) 04/19/94 .\" .Dd .Dt LDEXP 3 .Os .Sh NAME .Nm ldexp .Nd multiply floating-point number by integral power of 2 .Sh SYNOPSIS .Fd #include .Ft double .Fn ldexp "double x" "int exp" .Sh DESCRIPTION The .Fn ldexp function multiplies a floating-point number by an integral power of 2. .Sh RETURN VALUES The .Fn ldexp function returns the value of .Fa x times 2 raised to the power .Fa exp . .Pp If the resultant value would cause an overflow, the global variable .Va errno is set to .Er ERANGE and the value .Dv HUGE is returned. .Sh SEE ALSO .Xr frexp 3 , .Xr modf 3 , .Xr math 3 .Sh STANDARDS The .Fn ldexp function conforms .St -ansiC .