public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "liubov.dmitrieva at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug math/14470] Inaccurate j1f function on x86_32 and x86_64
Date: Thu, 16 Aug 2012 08:12:00 -0000	[thread overview]
Message-ID: <bug-14470-131-tztcnZsB2a@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-14470-131@http.sourceware.org/bugzilla/>

http://sourceware.org/bugzilla/show_bug.cgi?id=14470

--- Comment #2 from Liubov Dmitrieva <liubov.dmitrieva at gmail dot com> 2012-08-16 08:11:45 UTC ---
represent the test argument using a hex float value, test case update:

#include <stdio.h>
#include <math.h>
#include <fenv.h>

extern float j1f(float);
extern double j1(double);

int main() {
    float a,r1;
    double r2;

    a=0x1.458d14p3;    //argument

    fesetround(FE_TONEAREST);

    r1 = j1f(a);  //actual result
    r2 = j1(a);   //actual result 2

    printf("inputs: a = %.6a\n", a);
    printf("actual    = %.6a\n", r1);
    printf("expected  = %.6a\n", r2);
    printf("error     = %f ulp\n", fabs(r1 - r2) * exp2(23.0-logbf(r1)));
    return 0;
}

Result x86:
inputs: a = 0x1.458d14p+3
actual    = -0x1.bc9adap-21
expected  = -0x1.bc818dp-21
error     = 3238.561446 ulp

Result x86_64:
inputs: a = 0x1.458d14p+3
actual    = -0x1.bc55a6p-21
expected  = -0x1.bc818dp-21
error     = 5619.438563 ulp

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


  parent reply	other threads:[~2012-08-16  8:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-15 14:10 [Bug math/14470] New: Inaccurate j1f function on x86_32 liubov.dmitrieva at gmail dot com
2012-08-15 14:39 ` [Bug math/14470] Inaccurate j1f function on x86_32 and x86_64 liubov.dmitrieva at gmail dot com
2012-08-16  8:12 ` liubov.dmitrieva at gmail dot com [this message]
2014-02-06 18:31 ` [Bug math/14470] Inaccurate j1f function jsm28 at gcc dot gnu.org
2014-06-17 18:39 ` fweimer at redhat dot com
2020-08-06 10:45 ` zimmerma+gcc at loria dot fr
2021-04-02  4:24 ` zimmerma+gcc at loria dot fr

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=bug-14470-131-tztcnZsB2a@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sources.redhat.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.
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).