Programming Reference/Librarys
Question & Answer
Q&A is closed
#include <iostream> /* including standard library */ #include <cmath> /* including math library */ using namespace std; int main ( void ) { double x; int n; x = 42.0; //cout.setf(ios::fixed, ios::floatfield); cout.precision(8); cout << frexp (x, &n) << " * 2^" << n << " = " << x << endl; return 0; }
0.65625 * 2^0 = 42