delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/09/28/09:18:40

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
From: Kbwms AT aol DOT com
Message-ID: <d0.3f496250.2ca8398e@aol.com>
Date: Sun, 28 Sep 2003 09:18:06 EDT
Subject: Fwd: Bug in modfl() in libc.a
To: rich AT phekda DOT freeserve DOT co DOT uk (Rich Dawe)
CC: djgpp-workers AT delorie DOT com
MIME-Version: 1.0
X-Mailer: 8.0 for Windows sub 6015
Reply-To: djgpp-workers AT delorie DOT com

--part1_d0.3f496250.2ca8398e_boundary
Content-Type: multipart/alternative;
	boundary="part1_d0.3f496250.2ca8398e_alt_boundary"


--part1_d0.3f496250.2ca8398e_alt_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

In a message dated 9/28/2003 8:01:27 AM Eastern Standard Time, 
rich AT phekda DOT freeserve DOT co DOT uk writes:

> * modfl not integrated.
> - DJGPP already has modfl.
> 

Please install the patch that fixes the problem already reported in the 
forwarded report.  As it stands, the current version fails the test in the math 
test suite.


KB Williams

--part1_d0.3f496250.2ca8398e_alt_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 9/28/2003 8:01:27 AM Eastern Standard=
 Time, rich AT phekda DOT freeserve DOT co DOT uk 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">* modfl not integrated.<BR>
- DJGPP already has modfl.<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>
Please install the patch that fixes the problem already reported in the forw=
arded report.&nbsp; As it stands, the current version fails the test in the=20=
math test suite.<BR>
<BR>
<BR>
KB Williams</FONT></HTML>

--part1_d0.3f496250.2ca8398e_alt_boundary--

--part1_d0.3f496250.2ca8398e_boundary
Content-Type: message/rfc822
Content-Disposition: inline

Return-path: <Kbwms AT aol DOT com>
From: Kbwms AT aol DOT com
Full-name: Kbwms
Message-ID: <163 DOT 2566e055 DOT 2c8f7691 AT aol DOT com>
Date: Tue, 9 Sep 2003 14:31:45 EDT
Subject: Bug in modfl() in libc.a 
To: djgpp-workers AT delorie DOT com
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="part2_d0.3f496250.2c8f7691_boundary"
X-Mailer: 8.0 for Windows sub 6015


--part2_d0.3f496250.2c8f7691_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

As results from the demo program below show, there is a bug in the version of 
function modfl() that resides in libc.a.  Results from libc and our new long 
double math library are displayed.


#include <stdio.h>
long double modfl(long double, long double *);
int
main(void)
{
    const long double Infinity = (1.0L/0.0L);
    long double Argument, FracPart, IntPart;

    FracPart = modfl(+Infinity, &IntPart);
    printf("modfl(%+Lg, &IntPart): FracPart = %+Lg, IntPart = %+Lg\n",
            +Infinity, FracPart, IntPart); 

    FracPart = modfl(-Infinity, &IntPart);
    printf("modfl(%+Lg, &IntPart): FracPart = %+Lg, IntPart = %+Lg\n",
            -Infinity, FracPart, IntPart); 
    exit(0);
}

According to paragraph F.9.3.12 of ISO/IEC 9899:1999 (E),

-- modfl(+-Infinity, iptr) returns +-0 and stores +-Infinity in the
               in the object pointed to by iptr

modfl in libc.a:
---------------
modfl(+Inf, &IntPart): FracPart = -NaN, IntPart = +Inf
modfl(-Inf, &IntPart): FracPart = -NaN, IntPart = -Inf

========================================

modfl in new long double math library:
---------------------------------------
modfl(+Inf, &IntPart): FracPart = +0, IntPart = +Inf
modfl(-Inf, &IntPart): FracPart = -0, IntPart = -Inf


KB Williams

--part2_d0.3f496250.2c8f7691_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">As results from the demo program below show, there is a=20=
bug in the version of function modfl() that resides in libc.a.&nbsp; Results=
 from libc and our new long double math library are displayed.<BR>
<BR>
<BR>
#include &lt;stdio.h&gt;<BR>
long double modfl(long double, long double *);<BR>
int<BR>
main(void)<BR>
{<BR>
&nbsp;&nbsp;&nbsp; const long double Infinity =3D (1.0L/0.0L);<BR>
&nbsp;&nbsp;&nbsp; long double Argument, FracPart, IntPart;<BR>
<BR>
&nbsp;&nbsp;&nbsp; FracPart =3D modfl(+Infinity, &amp;IntPart);<BR>
&nbsp;&nbsp;&nbsp; printf("modfl(%+Lg, &amp;IntPart): FracPart =3D %+Lg, Int=
Part =3D %+Lg\n",<BR>
&nbsp;&nbsp;&nbsp;         +Infinity, FracPart, IntPart); <BR>
<BR>
&nbsp;&nbsp;&nbsp; FracPart =3D modfl(-Infinity, &amp;IntPart);<BR>
&nbsp;&nbsp;&nbsp; printf("modfl(%+Lg, &amp;IntPart): FracPart =3D %+Lg, Int=
Part =3D %+Lg\n",<BR>
&nbsp;&nbsp;&nbsp;         -Infinity, FracPart, IntPart); <BR>
&nbsp;&nbsp;&nbsp; exit(0);<BR>
}<BR>
<BR>
According to paragraph F.9.3.12 of ISO/IEC 9899:1999 (E),<BR>
<BR>
-- modfl(+-Infinity, iptr) returns +-0 and stores +-Infinity in the<BR>
&nbsp;&nbsp;          &nbsp;&nbsp; in the object pointed to by iptr<BR>
<BR>
modfl in libc.a:<BR>
---------------<BR>
modfl(+Inf, &amp;IntPart): FracPart =3D -NaN, IntPart =3D +Inf<BR>
modfl(-Inf, &amp;IntPart): FracPart =3D -NaN, IntPart =3D -Inf<BR>
<BR>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR>
<BR>
modfl in new long double math library:<BR>
---------------------------------------<BR>
modfl(+Inf, &amp;IntPart): FracPart =3D +0, IntPart =3D +Inf<BR>
modfl(-Inf, &amp;IntPart): FracPart =3D -0, IntPart =3D -Inf<BR>
<BR>
<BR>
KB Williams<BR>
</FONT></HTML>
--part2_d0.3f496250.2c8f7691_boundary--

--part1_d0.3f496250.2ca8398e_boundary--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019