Mail Archives: djgpp-workers/2003/08/10/13:02:21
--part1_50.20b0edc5.2c67d494_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
The following program:
#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);
exit(0);
}
produces the following (erroneous second line of) output:
Demo = 18446744073709551615
Demo - 1 = 18446744073709551613
Is this a known problem?
--part1_50.20b0edc5.2c67d494_boundary
Content-Type: text/html; charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
<HTML><FONT FACE=3Darial,helvetica><FONT SIZE=3D3 FAMILY=3D"SERIF" FACE=3D"=
Georgia" LANG=3D"0">The following program:<BR>
<BR>
#include <stdio.h><BR>
int<BR>
main(void)<BR>
{<BR>
long double Demo =3D (unsigned long long)(-1);<BR>
<BR>
printf("Demo =3D %.0Lf\n", Demo);=
<BR>
printf("Demo - 1 =3D %.0Lf\n", Demo-1.0L);<BR>
exit(0);<BR>
}<BR>
<BR>
produces the following (erroneous second line of) output:<BR>
<BR>
Demo =3D 18446744073709551615<BR>
Demo - 1 =3D 18446744073709551613<BR>
<BR>
<BR>
Is this a known problem?</FONT></HTML>
--part1_50.20b0edc5.2c67d494_boundary--
- Raw text -