Mail Archives: djgpp-workers/2003/08/11/15:41:07
--part1_1cd.f004ee0.2c694063_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
In a message dated 8/11/2003 2:12:53 PM Eastern Standard Time,
eliz AT elta DOT co DOT il writes:
> . The closest long double to (unsigned long long)(-1) is
> 18446744073709551613.75;
>
>
But, (unsigned long long)(-1) prints out correctly based on my original demo
program:
#include <stdio.h>
int
main(void)
{
long double Demo = (unsigned long long)(-1);
printf("Demo = %.3Lf\n", Demo);
printf("Demo - 1 = %.3Lf\n", Demo-1.0L);
exit(0);
}
--part1_1cd.f004ee0.2c694063_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">In a message dated 8/11/2003 2:12:53 PM Eastern Standard=
Time, eliz AT elta DOT co DOT il writes:<BR>
<BR>
<BLOCKQUOTE TYPE=3DCITE style=3D"BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT=
: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px"></FONT><FONT COLOR=3D"#000000"=
style=3D"BACKGROUND-COLOR: #ffffff" SIZE=3D2 FAMILY=3D"SANSSERIF" FACE=3D"A=
rial" LANG=3D"0"> . The closest long double to (unsigned long long)(-1) is<B=
R>
18446744073709551613.75;<BR>
<BR>
</BLOCKQUOTE><BR>
</FONT><FONT COLOR=3D"#000000" style=3D"BACKGROUND-COLOR: #ffffff" SIZE=3D3=
FAMILY=3D"SERIF" FACE=3D"Georgia" LANG=3D"0"><BR>
But, (unsigned long long)(-1) prints out correctly based on my original demo=
program:<BR>
<BR>
</FONT><FONT COLOR=3D"#000000" style=3D"BACKGROUND-COLOR: #ffffff" SIZE=3D2=
FAMILY=3D"SERIF" FACE=3D"Georgia" LANG=3D"0">#include <stdio.h><BR>
<BR>
int<BR>
main(void)<BR>
{<BR>
long double Demo =3D (unsigned long long)(-1);<BR>
<BR>
printf("Demo =3D %.3Lf\n", Demo);=
<BR>
printf("Demo - 1 =3D %.3Lf\n", Demo-1.0L);<BR>
exit(0);<BR>
}<BR>
</FONT></HTML>
--part1_1cd.f004ee0.2c694063_boundary--
- Raw text -