alphalinux.org high-perf list (1998-2001)
 help / color / mirror / Atom feed
From: Joachim Wesner <Joachim.Wesner@frankfurt.netsurf.de>
Subject: Re: sqrt performance, further comment.
Date: Thu, 04 Mar 1999 20:51:37 +0100	[thread overview]
Message-ID: <36DEE449.79A9A469@frankfurt.netsurf.de> (raw)
In-Reply-To: <199903041941.MAA20283@ellpspace.math.ualberta.ca>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1530 bytes --]

Michal Jaegermann wrote:

>

> 

> I would have to revisit my old files; this was quite a while ago.

> Maybe this was a rational approximation (it should not not be too costly

> on Alpha) but I had in the past pretty decent approximation for a sqrt on

> [0,2) interval.  I do not remember max absolute errors, though.

> Details are fuzzy now.  You may be right that with one Newton iteration

> one will be still not precise enough in the whole required range.

> 

> [0,2) was used as this allowed not to worry about even and odd

> exponents.

> 

>   Michal

Yes, you are right, rational is known to be MUCH better, but you need

pretty SLOW div !!

I checked several combinations (with div) considering full range, full

*REL* precision and decided it would very likely be slower than the

Mosberger sqrt.

However, what I suggest for 1e-10 precision (including 1 Newton step)

might probably work (mean, be a bit faster, but compared to libcpml ???)

And yes we probably could replace the rather small table in the

libffm sqrt by another (nonrational) polynomial, but for .25 to 1 we

need at least 8th to better 9th order for 1e-5 (here my software is

pretty dependable) to be on the sure side after 3 Newton steps, and it

will be DEFINITELY slower than the actual version. You see, sqrt is

"§$%&/@ as long as you don't go for rational approx.

YES, in case cache misses occur, this would be different, but I'm still

waiting for the results what the real-world impact on that seems to be. 

Greetings

 

Joachim

  reply	other threads:[~1999-03-04 19:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-03 20:53 sqrt performance esci
1999-03-03 21:40 ` Andrei A. Dergatchev
1999-03-04  5:15 ` Michal Jaegermann
1999-03-04 18:30   ` Joachim Wesner
1999-03-04 18:48   ` sqrt performance, further comment Joachim Wesner
1999-03-04 19:41     ` Michal Jaegermann
1999-03-04 19:51       ` Joachim Wesner [this message]
1999-03-05 17:55   ` Joachim Wesner
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