From: Jeff Johnston <jjohnstn@redhat.com>
To: Paul Zimmermann <Paul.Zimmermann@inria.fr>
Cc: Newlib <newlib@sourceware.org>
Subject: Re: regression in tgamma?
Date: Tue, 15 Dec 2020 12:11:25 -0500 [thread overview]
Message-ID: <CAOox84sB0dP7RL1wZs_VF2gwUXdikeDJEAmMOw+kCT2SC5vDPQ@mail.gmail.com> (raw)
In-Reply-To: <mwk0tjur8c.fsf@tomate.loria.fr>
Hi Paul,
I copied the newlib/libm/common directory and header files from master to a
separate directory and called __ieee754_tgamma directly in your test (adding
a declaration of __ieee754_tgamma as well). I then built as follows:
gcc -g -O0 -I. -DNEWLIB testtgamma.c e_tgamma.c e_exp.c k_sin.c math_err.c
er_lgamma.c k_cos.c s_floor.c e_log.c w_log.c
I get the same result as you get for 3.3.0.
Can you possibly recheck to see if your 4.0.0 library has been built
correctly? Perhaps I have somehow by-passed the cause of the problem by
compiling directly.
-- Jeff J.
On Tue, Dec 15, 2020 at 8:36 AM Paul Zimmermann <Paul.Zimmermann@inria.fr>
wrote:
> Hi,
>
> while updating my comparison from Newlib 3.3.0 to Newlib 4.0.0, I found a
> regression in tgamma on x86_64/Linux:
>
> $ cat test3.c
> #include <stdio.h>
> #include <math.h>
>
> #ifdef NEWLIB
> int errno;
> int* __errno () { return &errno; }
> #endif
>
> int main()
> {
> double x = -0x1.53f198fe3b278p+7, y;
> y = tgamma (x);
> printf ("x=%a y=%a\n", x, y);
> }
>
> Newlib 3.3.0:
> $ gcc -DNEWLIB -no-pie test3.c /localdisk/zimmerma/newlib-3.3.0/libm.a;
> ./a.out
> x=-0x1.53f198fe3b278p+7 y=0x1.fd6d312572d9cp-1015
>
> Newlib 4.0.0:
> $ gcc -DNEWLIB -no-pie test3.c /localdisk/zimmerma/newlib-4.0.0/libm.a;
> ./a.out
> x=-0x1.53f198fe3b278p+7 y=0x1p+0
>
> Please can someone confirm?
>
> Best regards,
> Paul
>
>
next prev parent reply other threads:[~2020-12-15 17:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-15 13:35 Paul Zimmermann
2020-12-15 17:11 ` Jeff Johnston [this message]
2020-12-16 6:36 ` Paul Zimmermann
2020-12-16 13:48 Paul Zimmermann
2020-12-16 20:31 ` Jeff Johnston
2020-12-17 7:29 ` Paul Zimmermann
2020-12-17 16:13 ` Keith Packard
2020-12-17 18:27 ` Jeff Johnston
2020-12-17 19:16 ` Keith Packard
2020-12-17 21:28 ` Jeff Johnston
2020-12-18 6:36 ` Paul Zimmermann
2020-12-18 8:42 ` Corinna Vinschen
2020-12-18 8:54 ` Paul Zimmermann
2020-12-18 9:07 ` Corinna Vinschen
2020-12-18 17:42 ` Jeff Johnston
2020-12-18 8:37 ` Paul Zimmermann
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=CAOox84sB0dP7RL1wZs_VF2gwUXdikeDJEAmMOw+kCT2SC5vDPQ@mail.gmail.com \
--to=jjohnstn@redhat.com \
--cc=Paul.Zimmermann@inria.fr \
--cc=newlib@sourceware.org \
/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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).