This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Reg: gcc option for printing large number (large double)
- From: Tim Prince <n8tm at aol dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Sun, 15 Sep 2013 20:37:51 -0400
- Subject: Re: Reg: gcc option for printing large number (large double)
- Authentication-results: sourceware.org; auth=none
- References: <1379046979926-968019 dot post at n5 dot nabble dot com> <BLU177-DS12C419B38FFC924F3C90E2BA250 at phx dot gbl>
- Reply-to: tprince at computer dot org
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