Contact: aviboots(AT)netvision.net.il
38,570 questions
50,249 answers
573 users
#include <iostream> #include <cmath> using namespace std; int main() { double x = 0.97; int exp = 5; double result = ldexp(x, exp); cout << x << " * 2^" << exp << " = " << result << endl; return 0; } /* run: 0.97 * 2^5 = 31.04 */