Re: Reg: gcc option for printing large number (large double)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/15/2013 3:42 PM, Arbol One wrote:
Use a 'long long' value instead of a 'double'.

#include <iostream>
#include <math.h>

using namespace std;
int main() {
        long long temp = 0.0;
        temp = pow(2, 2000);
        cout << "The value of tmp is: " << temp << endl;

        return 0;
}

:s/pow/powl/
but not all math libraries invoked by some gcc implementations will work.

--
Tim Prince





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux