add ANSI contribution notice
[unix-history] / usr / src / lib / libc / gen / ldexp.3
.\" Copyright (c) 1991 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 5.2 (Berkeley) %G%
.\"
.Dd
.Dt LDEXP 3
.Os
.Sh NAME
.Nm ldexp
.Nd mutliply floating-point number by integral power of 2
.Sh SYNOPSIS
.Fd #include <math.h>
.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 .