Printf problem with big numbers....
- From: "pasukaru@xxxxxxxxx" <pasukaru@xxxxxxxxx>
- Date: 23 Jan 2006 18:48:27 -0800
I need to work with big integers ( around 2.^64), and I know it is not
possible to have integer that big.
So I use "double" instead, and it is ok with calculations.
But when I want to print them on screen or in a file, there is a
problem...
For example, if I write this :
printf("result: %lf\n",1234567890987654321.012345678);
What I get on cmd is:
result: 1234567890987654400.000000
Can anybody tell me WHY ?
.
- Follow-Ups:
- Re: Printf problem with big numbers....
- From: Jordan Abel
- Re: Printf problem with big numbers....
- From: Joe Wright
- Re: Printf problem with big numbers....
- From: slebetman@xxxxxxxxx
- Re: Printf problem with big numbers....
- From: David Sampson
- Re: Printf problem with big numbers....
- From: P.J. Plauger
- Re: Printf problem with big numbers....
- Prev by Date: Re: C programme
- Next by Date: Re: c.l.c wiki update
- Previous by thread: is there any site which can provide any help on advanced C topics
- Next by thread: Re: Printf problem with big numbers....
- Index(es):