ldexp [C++ Reference]
Keywords: c,math,ldexp
Date: 2009-12-11T04:55:09-0800

[[ldexp]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- cz
- de
- es
- fr
- it
- jp
- nl
- pl
- ro
- ru
- sk
- tr
- tw

## ldexp

Syntax:

        #include <cmath>
        double ldexp( double num, int exp );

The ldexp() function returns num * (2 ^ exp). And get this: if an overflow occurs, HUGE_VAL is returned.

C++ also provides the following overloaded forms:

        #include <cmath>
        float ldexp( float num, int exp ); // same as ldexpf() in C99
        long double ldexp( long double num, int exp ); // same as ldexpl() in C99

Related Topics: frexp, modf

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •