Commit | Line | Data |
---|---|---|
642198dc CL |
1 | .\" Copyright (c) 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
043368e6 KB |
4 | .\" This code is derived from software contributed to Berkeley by |
5 | .\" the American National Standards Committee X3, on Information | |
6 | .\" Processing Systems. | |
7 | .\" | |
642198dc CL |
8 | .\" %sccs.include.redist.man% |
9 | .\" | |
043368e6 | 10 | .\" @(#)ldexp.3 5.2 (Berkeley) %G% |
642198dc CL |
11 | .\" |
12 | .Dd | |
13 | .Dt LDEXP 3 | |
14 | .Os | |
15 | .Sh NAME | |
16 | .Nm ldexp | |
17 | .Nd mutliply floating-point number by integral power of 2 | |
18 | .Sh SYNOPSIS | |
19 | .Fd #include <math.h> | |
20 | .Ft double | |
21 | .Fn ldexp "double x" "int exp" | |
22 | .Sh DESCRIPTION | |
23 | The | |
24 | .Fn ldexp | |
25 | function multiplies a floating-point number by an integral | |
26 | power of 2. | |
27 | .Sh RETURN VALUES | |
28 | The | |
29 | .Fn ldexp | |
30 | function returns the value of | |
31 | .Fa x | |
32 | times 2 raised to the power | |
33 | .Fa exp . | |
34 | .Pp | |
35 | If the resultant value would cause an overflow, | |
36 | the global variable | |
37 | .Va errno | |
38 | is set to | |
39 | .Er ERANGE | |
40 | and the value | |
41 | .Dv HUGE | |
42 | is returned. | |
43 | .Sh SEE ALSO | |
44 | .Xr frexp 3 , | |
45 | .Xr modf 3 , | |
46 | .Xr math 3 | |
47 | .Sh STANDARDS | |
48 | The | |
49 | .Fn ldexp | |
50 | function conforms | |
51 | .St -ansiC . |