From: Igor Schein <igor@txc.com>
To: axp-list@redhat.com
Subject: Re: RH 7.0 notes
Date: Fri, 26 Jan 2001 14:37:04 -0500 [thread overview]
Message-ID: <20010126143704.D26188@neptune.txc.com> (raw)
In-Reply-To: <3A68C783.F48144E8@paralleldata.com>; from wsb@paralleldata.com on Fri, Jan 19, 2001 at 05:02:27PM -0600
On Fri, Jan 19, 2001 at 05:02:27PM -0600, W Bauske wrote:
> Rich Payne wrote:
> >
> > On Thu, 18 Jan 2001, Igor Schein wrote:
> > > 4) RH-7.0 came with glibc-2.1.x, which has a ridiciluous math library
> > > bug, where sqrt((double)(8388609*8388609)) is NOT equal to 8388609.
> > > glibc-2.2 fixes this issue. Imagine potential consequences of this
> > > bug in production environment.
> >
> > There's a glibc update to 7.0. If that doesn't fix it, be sure to report
> > it.
Yes, glibc-2.2 does fix it, as I mention above.
> >
>
> Just a comment. I wouldn't cast the numbers that way. Does it give
> the correct answer with sqrt((double)8388609*(double)8388609) ?
No, behavior was the same with your cast or mine.
>
> Actually, just casting one of the numbers or directly using a double
> constant should make it work. It looks like if that multiply is done
> in single precision or as an integer, there is insufficient precision
> to correctly convert it back.
>
> Exactly how wrong is the result as coded? If that multiply is done
> as integer, it should be really wrong I think. Or, is this not the
> real code fragment you're having trouble with?
The answer was 8388610, off by one compared to the original.
Igor
prev parent reply other threads:[~2001-01-26 19:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-19 4:03 RH 7.0 notes Igor Schein
2001-01-19 4:23 ` Peter Petrakis
2001-01-19 4:50 ` Michal Jaegermann
2001-01-19 13:18 ` Rich Payne
2001-01-19 23:02 ` W Bauske
2001-01-26 19:37 ` Igor Schein [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox