Mail Archives: djgpp-workers/2003/09/09/17:10:37
Hello.
Kbwms AT aol DOT com wrote:
> Esa Peuha, student of mathematics at the University of Helsinki:
You might be wondering what K. B. Williams is talking about. Esa: I sent him
the patch you made to _doprnt to fix the problems in the accuracy of its
output. It looks like it worked. ;)
Bye, Rich =]
> Nice going, as the examples below show:
>
> #include <stdio.h>
> int
> main(void)
> {
> long double Demo = (unsigned long long)(-1);
>
> printf("Demo = %.0Lf\n", Demo);
> printf("Demo - 1 = %.0Lf\n", Demo-1.0L);
> printf("Demo - 2 = %.0Lf\n", Demo-2.0L);
> exit(0);
> }
>
> Current _doprnt.o:
>
> Demo = 18446744073709551615
> Demo - 1 = 18446744073709551613
> Demo - 2 = 18446744073709551613
>
> Improved _doprnt.o:
>
> Demo = 18446744073709551615
> Demo - 1 = 18446744073709551614
> Demo - 2 = 18446744073709551613
>
> KB Williams
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -