Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 1 Oct 2016 10:52:14 +0200
From: Markus Wichmann <nullplan@....net>
To: musl@...ts.openwall.com
Subject: Re: Model specific optimizations?

On Sat, Oct 01, 2016 at 01:50:23AM -0400, Rich Felker wrote:
> I don't think this works at all. sqrt() is required to be
> correctly-rounded; that's the whole reason sqrt.c is costly.

It's an approximation, at least, which was rather my point.

As I've come to realize over the course of this discussion, the fsqrt
instruction is useless here and pretty much everywhere out there:

- If you are looking for accuracy over speed, the standard C library has
  got you covered.
- If you are looking for speed over accuracy, you can code up the
  Babylonian method inside five minutes. You can even tune it to suit
your needs to an extent (mainly, number of rounds and method of first
approximation). This method is also portable to other architectures, and
can be done entirely in C (requiring IEEE floating point, but then, most
serious FP code does that).

Also, at least according to Apple, which were the only ones actually
looking at the thing, such as I could find, it was only ever supported
by the 970 and the 970FX cores, released in 2002 and 2004, respectively.
I highly doubt they'll have much relevance. Chalk up my suspicions from
the OP to not having researched enough.

In closing: Nice discussion, but I'm sorry for the noise.

Ciao,
Markus

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.