From: Kbwms AT aol DOT com Message-ID: <1d0.1025156e.2c84fe96@aol.com> Date: Mon, 1 Sep 2003 15:57:10 EDT Subject: Bug in modfl() in libc.a To: djgpp-workers AT delorie DOT com MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="part1_1d0.1025156e.2c84fe96_boundary" X-Mailer: 8.0 for Windows sub 6015 Reply-To: djgpp-workers AT delorie DOT com --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 There is a version of modfl() in libc that produces inco= rrect results when the argument is infinity:

Test using modfl in libc.a
------------TEST   1------------
modfl(+Inf, &IntPart) : Func =3D -NaN, IntPart =3D +Inf   = ;             modfl(-Inf, &IntPart) : Func =3D -NaN, IntPart =3D -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 =3D +0, IntPart =3D +Inf   &= nbsp;           
modfl(-Inf, &IntPart)  : Func =3D -0, IntPart =3D -Inf  &= nbsp;            = ;


KB Williams
--part1_1d0.1025156e.2c84fe96_boundary--