Mail Archives: djgpp-workers/2003/09/01/15:57:19
--part1_1d0.1025156e.2c84fe96_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
There is a version of modfl() in libc that produces incorrect results when
the argument is infinity:
Test using modfl in libc.a
------------TEST 1------------
modfl(+Inf, &IntPart) : Func = -NaN, IntPart = +Inf
modfl(-Inf, &IntPart) : Func = -NaN, IntPart = -Inf
C99 calls for the integer output to be infinity and the function value to be
a zero with the same sign as the argument, as in:
Test using modfl in libongdbl.a
------------TEST 2------------
modfl(+Inf, &IntPart) : Func = +0, IntPart = +Inf
modfl(-Inf, &IntPart) : Func = -0, IntPart = -Inf
KB Williams
--part1_1d0.1025156e.2c84fe96_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">There is a version of modfl() in libc that produces inco=
rrect results when the argument is infinity:<BR>
<BR>
Test using modfl in libc.a<BR>
------------TEST 1------------<BR>
modfl(+Inf, &IntPart) : Func =3D -NaN, IntPart =3D +Inf  =
; <B=
R>
modfl(-Inf, &IntPart) : Func =3D -NaN, IntPart =3D -Inf  =
; <B=
R>
<BR>
C99 calls for the integer output to be infinity and the function value to be=
a zero with the same sign as the argument, as in:<BR>
<BR>
Test using modfl in libongdbl.a<BR>
------------TEST 2------------<BR>
modfl(+Inf, &IntPart) : Func =3D +0, IntPart =3D +Inf &=
nbsp; <BR>
modfl(-Inf, &IntPart) : Func =3D -0, IntPart =3D -Inf &=
nbsp;  =
; <BR>
<BR>
<BR>
KB Williams<BR>
</FONT></HTML>
--part1_1d0.1025156e.2c84fe96_boundary--
- Raw text -