C++ Programming/Code/Standard C Library/Functions/frexp
< C++ Programming < Code < Standard C Library < Functionsfrexp
Syntax |
#include <cmath>
double frexp( double num, int* exp );
|
The function frexp() is used to decompose num into two parts: a mantissa between 0.5 and 1 (returned by the function) and an exponent returned as exp. Scientific notation works like this:
num = mantissa * (2 ^ exp)
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.