xref: /csrg-svn/lib/libc/gen/ldexp.3 (revision 50307)
148901Scael.\" Copyright (c) 1991 The Regents of the University of California.
248901Scael.\" All rights reserved.
348901Scael.\"
4*50307Sbostic.\" This code is derived from software contributed to Berkeley by
5*50307Sbostic.\" the American National Standards Committee X3, on Information
6*50307Sbostic.\" Processing Systems.
7*50307Sbostic.\"
848901Scael.\" %sccs.include.redist.man%
948901Scael.\"
10*50307Sbostic.\"     @(#)ldexp.3	5.2 (Berkeley) 06/29/91
1148901Scael.\"
1248901Scael.Dd
1348901Scael.Dt LDEXP 3
1448901Scael.Os
1548901Scael.Sh NAME
1648901Scael.Nm ldexp
1748901Scael.Nd mutliply floating-point number by integral power of 2
1848901Scael.Sh SYNOPSIS
1948901Scael.Fd #include <math.h>
2048901Scael.Ft double
2148901Scael.Fn ldexp "double x" "int exp"
2248901Scael.Sh DESCRIPTION
2348901ScaelThe
2448901Scael.Fn ldexp
2548901Scaelfunction multiplies a floating-point number by an integral
2648901Scaelpower of 2.
2748901Scael.Sh RETURN VALUES
2848901ScaelThe
2948901Scael.Fn ldexp
3048901Scaelfunction returns the value of
3148901Scael.Fa x
3248901Scaeltimes 2 raised to the power
3348901Scael.Fa exp .
3448901Scael.Pp
3548901ScaelIf the resultant value would cause an overflow,
3648901Scaelthe global variable
3748901Scael.Va errno
3848901Scaelis set to
3948901Scael.Er ERANGE
4048901Scaeland the value
4148901Scael.Dv HUGE
4248901Scaelis returned.
4348901Scael.Sh SEE ALSO
4448901Scael.Xr frexp 3 ,
4548901Scael.Xr modf 3 ,
4648901Scael.Xr math 3
4748901Scael.Sh STANDARDS
4848901ScaelThe
4948901Scael.Fn ldexp
5048901Scaelfunction conforms
5148901Scael.St -ansiC .
52