bugGNU Scientific Library - Bugs: bug #22041, Bug in gsl_sf_exp_mult_e10_e error...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #22041: Bug in gsl_sf_exp_mult_e10_e error estimation

Submitted by:  -Deleted Account- <bjg>
Submitted on:  Thu 17 Jan 2008 07:50:25 PM UTC  
 
Category: Accuracy problemSeverity: 3 - Normal
Operating System: Status: Fixed
Assigned to: NoneOpen/Closed: Closed
Release: 1.10

Thu 17 Jan 2008 07:53:39 PM UTC, comment #1:

error from mult function is wrong
e10 functions should also scale mantissa to [0,1) if possible

-Deleted Account- <bjg>
Thu 17 Jan 2008 07:50:25 PM UTC, original submission:

From: Szymon Jaroszewicz <sj@cs.umb.edu>
To: -unavailable-
Subject: [Bug-gsl] Bug in gsl_sf_exp_mult_e10_e error estimation
Date: Mon, 14 Jan 2008 12:16:10 +0100

[1 <text/plain (7bit)>]
There is a bug in error estimation for gsl_sf_exp_mult_e10_e:

gsl_sf_exp_e10_e(10000) gives error estimate 3.911404048e-11

but

gsl_sf_exp_mult_e10_e(10000, 1) gives 3.911012947e-15

so it looks like just multiplying by 1 gives us 4 more digits of
precision. True error is about 1.6884e-11 (using MPFR
http://ex-cs.sist.ac.jp/~tkouya/try_mpfr.html), so the error is
clearly underestimated. Changing line:

const double arg_err = 2.0 * GSL_DBL_EPSILON * fabs(ly);

to

const double arg_err = 2.0 * GSL_DBL_EPSILON * fabs(x);

seems to fix the problem, but I'm not sure this is correct.

Also, there is a discrepancy in result format between exp_e10 and
exp_mult_e10 for x = 100 and y = 1.
The former returns 2.688 with e10=43, the latter 2.688e43 with e10=0.
It would be nicer to return the first result in both cases, but since
both are correct it might not be worth fixing.

Attached is a file reproducing both cases.

Szymon Jaroszewicz

-Deleted Account- <bjg>

 

Attached Files
file #14823:  gsl_exp_err.c added by bjg (539B - text/x-csrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 09 Feb 2008 04:11:57 PM UTCbjgStatusConfirmed=>Fixed
  Open/ClosedOpen=>Closed
Thu 17 Jan 2008 07:50:25 PM UTCbjgAttached File-=>Added gsl_exp_err.c, #14823

Back to the top


Powered by Savane 3.1-cleanup1