1FREXP(P) POSIX Programmer's Manual FREXP(P)
2
3
4
6 frexp, frexpf, frexpl - extract mantissa and exponent from a double
7 precision number
8
10 #include <math.h>
11
12 double frexp(double num, int *exp);
13 float frexpf(float num, int *exp);
14 long double frexpl(long double num, int *exp);
15
16
18 These functions shall break a floating-point number num into a normal‐
19 ized fraction and an integral power of 2. The integer exponent shall be
20 stored in the int object pointed to by exp.
21
23 For finite arguments, these functions shall return the value x, such
24 that x has a magnitude in the interval [0.5,1) or 0, and num equals x
25 times 2 raised to the power *exp.
26
27 If num is NaN, a NaN shall be returned, and the value of *exp is
28 unspecified.
29
30 If num is ±0, ±0 shall be returned, and the value of *exp shall be 0.
31
32 If num is ±Inf, num shall be returned, and the value of *exp is unspec‐
33 ified.
34
36 No errors are defined.
37
38 The following sections are informative.
39
41 None.
42
44 None.
45
47 None.
48
50 None.
51
53 isnan() , ldexp() , modf() , the Base Definitions volume of
54 IEEE Std 1003.1-2001, <math.h>
55
57 Portions of this text are reprinted and reproduced in electronic form
58 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
59 -- Portable Operating System Interface (POSIX), The Open Group Base
60 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
61 Electrical and Electronics Engineers, Inc and The Open Group. In the
62 event of any discrepancy between this version and the original IEEE and
63 The Open Group Standard, the original IEEE and The Open Group Standard
64 is the referee document. The original Standard can be obtained online
65 at http://www.opengroup.org/unix/online.html .
66
67
68
69IEEE/The Open Group 2003 FREXP(P)