From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [musl] Q: dealing with missing removal of excess precision
Date: Thu, 6 Feb 2020 15:02:58 -0500 [thread overview]
Message-ID: <20200206200258.GI1663@brightrain.aerifal.cx> (raw)
In-Reply-To: <20200206190344.GH1663@brightrain.aerifal.cx>
[-- Attachment #1: Type: text/plain, Size: 2549 bytes --]
On Thu, Feb 06, 2020 at 02:03:44PM -0500, Rich Felker wrote:
> On Thu, Feb 06, 2020 at 12:46:08PM -0500, Rich Felker wrote:
> > On Thu, Feb 06, 2020 at 08:15:30PM +0300, Alexander Monakov wrote:
> > > On Thu, 6 Feb 2020, Rich Felker wrote:
> > >
> > > > I think I might like to go ahead and apply these patches now, or at
> > > > least some of them -- the ones fixing excess precision -- rather
> > > > waiting, because I got a report of a nasty bug stemming from excess
> > > > precision of the inverse trig functions:
> > >
> > > That might be exactly the empty set of patches, as I did not yet post
> > > any for functions that might return with excess precision.
> >
> > Indeed, I just discovered that...
> >
> > > Be advised that I found bugs in my patches, so given that no one so far
> > > has pointed them out on the mailing list indicates that either nobody
> > > bothered to review, or people are keeping the findings to themselves.
> >
> > I think it's just that I was planning to do further review after
> > release rather than before since I'm trying to get the release out..
> >
> > > > If writing and testing the remaining i386 functions before release is
> > > > not practical, I wonder if just removing the asm for now, and adding
> > > > back the new code in next release cycle would be a good idea. Or I
> > > > could just leave it, but I don't like making a release with "known
> > > > bugs of consequence" like this.
> > >
> > > I think fixing excess precision in inverse trig functions might be
> > > easier than removing the asm entirely.
> >
> > Yes, what I'm looking at right now is fixing inverse trig and log
> > functions and removing the exp asm (since the exp logic is way too
> > messy for me to feel comfortable modifying right now) and possibly
> > re-adding it later as inline asm with the flow control in C.
>
> FWIW nsz's new C exp seems considerably faster than the existing 386
> asm on my box (Atom S1260) (6.7s vs >8s for summing exp(x) from
> x=-2..2 stepping 0x1p-24). Test program attached in case anyone else
> wants to try it.
>
> So I think just removing exp*.s is the right approach for now. The
> long double ones should actually be left, and that raises the issue
> that expm1l is wrongly using the exp code rather than expl code nsz
> added long ago in a8f73bb1a685dd7d67669c6f6ceb255cfa967790. I won't
> try to fix this yet but will just move the files around so we can rm
> the float/double ones and use the C for them without getting rid of
> the ld asm.
Attachment was missing.
Rich
[-- Attachment #2: exptime.c --]
[-- Type: text/plain, Size: 116 bytes --]
#include <math.h>
int main()
{
double x, a=0;
for (x=-2; x<2; x+=0x1p-24)
a += exp(x);
return (long long)a;
}
next prev parent reply other threads:[~2020-02-06 20:03 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-05 16:35 math patches for moving bare asm to C inline asm Alexander Monakov
2020-01-05 16:36 ` [PATCH] math: move x86_64 fabs, fabsf to C with " Alexander Monakov
2020-01-05 20:05 ` Rich Felker
2020-01-05 21:32 ` Alexander Monakov
2020-01-05 22:43 ` Rich Felker
2020-01-06 8:17 ` Alexander Monakov
2020-01-06 8:40 ` [PATCH] math: move more x86-family fabs functions to C Alexander Monakov
2020-03-21 17:06 ` [musl] " Rich Felker
2020-01-06 16:50 ` [PATCH] math: move trivial x86-family sqrt " Alexander Monakov
2020-01-06 17:43 ` [PATCH] math: move i386 sqrtf " Alexander Monakov
2020-01-06 18:32 ` Pascal Cuoq
2020-01-09 15:55 ` Alexander Monakov
2020-01-09 17:00 ` Rich Felker
2020-01-09 21:00 ` Szabolcs Nagy
2020-01-09 22:00 ` Rich Felker
2020-01-09 23:18 ` Szabolcs Nagy
2020-01-10 2:07 ` Rich Felker
2020-01-10 9:17 ` Szabolcs Nagy
2020-01-14 17:59 ` [musl] " Alexander Monakov
2020-01-14 18:47 ` Szabolcs Nagy
2020-01-07 13:06 ` [PATCH] math: move i386 sqrt " Alexander Monakov
2020-01-08 7:26 ` Rich Felker
2020-03-21 17:53 ` [musl] " Rich Felker
2020-03-21 17:57 ` Rich Felker
2020-03-21 20:30 ` Alexander Monakov
2020-01-11 15:06 ` [PATCH] math: move x86_64 (l)lrint(f) functions " Alexander Monakov
2020-01-11 15:23 ` [PATCH] math: move more x86-family lrint " Alexander Monakov
2020-01-11 16:07 ` Rich Felker
2020-01-11 16:22 ` Rich Felker
2020-01-14 11:54 ` [musl] [PATCH] math: move x86-family rint " Alexander Monakov
2020-01-14 18:17 ` [musl] Q: dealing with missing removal of excess precision Alexander Monakov
2020-01-14 18:50 ` Szabolcs Nagy
2020-01-14 18:58 ` Rich Felker
2020-01-14 19:53 ` Alexander Monakov
2020-02-06 14:51 ` Rich Felker
2020-02-06 17:15 ` Alexander Monakov
2020-02-06 17:46 ` Rich Felker
2020-02-06 19:03 ` Rich Felker
2020-02-06 20:02 ` Rich Felker [this message]
2020-02-06 22:08 ` Szabolcs Nagy
2020-02-22 19:59 ` Rich Felker
2020-02-22 20:21 ` Alexander Monakov
2020-02-23 0:19 ` Rich Felker
2020-02-23 16:14 ` Alexander Monakov
2020-03-20 18:12 ` Rich Felker
2020-03-22 1:19 ` Rich Felker
2020-03-22 17:40 ` Alexander Monakov
2020-03-22 17:53 ` Rich Felker
2020-03-22 18:51 ` Alexander Monakov
2020-03-22 19:10 ` Rich Felker
2020-03-22 19:46 ` Alexander Monakov
2020-01-14 20:41 ` [musl] [PATCH] math: move x86-family remainder functions to C Alexander Monakov
2020-01-15 6:54 ` Szabolcs Nagy
2020-01-15 15:44 ` [musl] [PATCH] math: move x86-family fmod " Alexander Monakov
2020-01-16 21:00 ` [musl] [PATCH] math: add x86_64 remquol Alexander Monakov
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=20200206200258.GI1663@brightrain.aerifal.cx \
--to=dalias@libc.org \
--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).