delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/09/01/15:16:31

From: Kbwms AT aol DOT com
Message-ID: <4d.3426682d.2c84f4ee@aol.com>
Date: Mon, 1 Sep 2003 15:15:58 EDT
Subject: Bug in log10l in libstdcxx.a
To: 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_4d.3426682d.2c84f4ee_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

I discovered this during checkout of my long double stuff via the test-vector 
suite.  There is a library called libstdcxx.a in ../lib that gets linked with 
my C++ code.  It is producing erroneous results as shown below:

Tests using log10l in libstdcxx.a
------------TEST   1------------
log10l(LDBL_MIN) = log10l(+3.3621031431120935063e-4932) = -Inf
log10l(LDBL_MAX) = log10l(+1.189731495357231765e+4932) = +Inf
------------TEST   2------------
log10l(LDBL_MIN/2) = log10l(+1.6810515715560467531e-4932) = -Inf
log10l(LDBL_MAX/2) = log10l(+5.948657476786158825e+4931) = +Inf
------------------------------------------------------------------------------
-

The corrects results are:


Tests using log10l in libongdbl.a
------------TEST   1------------
log10l(LDBL_MIN) = 
log10l(+3.3621031431120935063e-4932) = -4931.4733889673399401

log10l(LDBL_MAX) = 
log10l(+1.189731495357231765e+4932) = +4932.0754489586679026
------------TEST   2------------
log10l(LDBL_MIN/2) = 
log10l(+1.6810515715560467531e-4932) = -4931.7744189630039213

log10l(LDBL_MAX/2) = 
         log10l(+5.948657476786158825e+4931) = +4931.7744189630039213


KB Williams

--part1_4d.3426682d.2c84f4ee_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">I discovered this during checkout of my long double stuf=
f via the test-vector suite.&nbsp; There is a library called libstdcxx.a in=20=
../lib that gets linked with my C++ code.&nbsp; It is producing erroneous re=
sults as shown below:<BR>
<BR>
Tests using log10l in libstdcxx.a<BR>
------------TEST&nbsp;&nbsp; 1------------<BR>
log10l(LDBL_MIN) =3D log10l(+3.3621031431120935063e-4932) =3D -Inf<BR>
log10l(LDBL_MAX) =3D log10l(+1.189731495357231765e+4932) =3D +Inf<BR>
------------TEST&nbsp;&nbsp; 2------------<BR>
log10l(LDBL_MIN/2) =3D log10l(+1.6810515715560467531e-4932) =3D -Inf<BR>
log10l(LDBL_MAX/2) =3D log10l(+5.948657476786158825e+4931) =3D +Inf<BR>
----------------------------------------------------------------------------=
---<BR>
<BR>
The corrects results are:<BR>
<BR>
<BR>
Tests using log10l in libongdbl.a<BR>
------------TEST&nbsp;&nbsp; 1------------<BR>
log10l(LDBL_MIN) =3D <BR>
log10l(+3.3621031431120935063e-4932) =3D -4931.4733889673399401<BR>
<BR>
log10l(LDBL_MAX) =3D <BR>
log10l(+1.189731495357231765e+4932) =3D +4932.0754489586679026<BR>
------------TEST&nbsp;&nbsp; 2------------<BR>
log10l(LDBL_MIN/2) =3D <BR>
log10l(+1.6810515715560467531e-4932) =3D -4931.7744189630039213<BR>
<BR>
log10l(LDBL_MAX/2) =3D <BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; log10l(+5.94865747678615882=
5e+4931) =3D +4931.7744189630039213<BR>
<BR>
<BR>
KB Williams</FONT></HTML>

--part1_4d.3426682d.2c84f4ee_boundary--

- Raw text -


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