mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Cc: Damian McGuckin <damianm@esi.com.au>
Subject: Re: Possible Mistype in exp.c
Date: Tue, 29 Jan 2019 12:43:08 +0100	[thread overview]
Message-ID: <20190129114308.GD21289@port70.net> (raw)
In-Reply-To: <alpine.LRH.2.02.1901292203340.799@key0.esi.com.au>

* Damian McGuckin <damianm@esi.com.au> [2019-01-29 22:26:23 +1100]:
> On Tue, 29 Jan 2019, Szabolcs Nagy wrote:
> 
> > it's not the division that's supposed to raise the exception,
> > but the cast (although the division might in case of an x with
> > sufficiently large magnitude).
> 
> I did not think about that. An interesting approach.
> 
> > in any case i plan to completely rewrite exp and other
> > important math functions:
> > 
> > https://www.openwall.com/lists/musl/2018/12/08/1
> 
> Thanks for the pointer.
> 
> > that implementation is >2x faster in general than the old fdlibm code as
> > well as more precise.
> 
> It is hard to argue to 2x faster. Mind you, I certainly found the ARM code
> much harder to read. Interesting none the less.

i did some cleanups compared to the arm repository:

https://www.openwall.com/lists/musl/2018/12/08/3/7

so e.g. some of the ifdef config variants got removed,

if you have some particular idea what could be improved
then let us know.

(the special case handling is more complicated because
it tries to avoid double rounding in the subnormal range,
the old code had >0.75 ulp error in this case, the new
code is always < 0.6 ulp error, it is probably not worth
the trouble, but i tried to guarantee "almost always
correctly rounded and only near half-way results may get
incorrectly rounded" for the new implementations)


  reply	other threads:[~2019-01-29 11:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-28  6:59 Damian McGuckin
2019-01-29 11:01 ` Szabolcs Nagy
2019-01-29 11:26   ` Damian McGuckin
2019-01-29 11:43     ` Szabolcs Nagy [this message]
2019-01-30  1:18       ` Damian McGuckin
2019-01-30  9:37         ` Szabolcs Nagy
2019-01-30 11:14           ` Damian McGuckin
2019-01-30 12:19             ` Szabolcs Nagy
2019-01-30 12:44               ` Alexander Monakov
2019-01-30 14:10                 ` Szabolcs Nagy
2019-02-01 23:26                   ` Morten Welinder
2019-02-02  3:39                     ` Szabolcs Nagy
2019-02-03  2:05                       ` Morten Welinder
2019-02-03  3:07                         ` Damian McGuckin
2019-04-03  1:13                       ` Floating Point Accuracy Damian McGuckin
2019-01-30 12:56           ` Possible Mistype in exp.c Damian McGuckin
2019-01-31  0:04             ` Szabolcs Nagy
2019-01-31  0:39               ` Damian McGuckin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190129114308.GD21289@port70.net \
    --to=nsz@port70.net \
    --cc=damianm@esi.com.au \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).