1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\" <mtk.manpages@gmail.com>
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
7 .\" References consulted:
8 .\" Linux libc source code
9 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
11 .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
12 .\" Modified 2004-10-31 by aeb
14 .TH LDEXP 3 2021-03-22 "Linux man-pages (unreleased)"
16 ldexp, ldexpf, ldexpl \- multiply floating-point number by integral power of 2
19 .RI ( libm ", " \-lm )
24 .BI "double ldexp(double " x ", int " exp );
25 .BI "float ldexpf(float " x ", int " exp );
26 .BI "long double ldexpl(long double " x ", int " exp );
30 Feature Test Macro Requirements for glibc (see
31 .BR feature_test_macros (7)):
37 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
38 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
39 || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
42 These functions return the result of multiplying the floating-point number
44 by 2 raised to the power
47 On success, these functions return
63 is positive infinity (negative infinity),
64 positive infinity (negative infinity) is returned.
66 If the result underflows,
70 If the result overflows,
72 and the functions return
77 respectively, with a sign the same as
82 for information on how to determine whether an error has occurred
83 when calling these functions.
85 The following errors can occur:
91 An overflow floating-point exception
95 Range error, underflow
99 An underflow floating-point exception
103 For an explanation of the terms used in this section, see
111 Interface Attribute Value
116 T} Thread safety MT-Safe
122 C99, POSIX.1-2001, POSIX.1-2008.
124 The variant returning