bugGNU Scientific Library - Bugs: bug #25320, Import fresnel, bugs on GSL...

 
 

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

bug #25320: Import fresnel, bugs on GSL Extension Fresnel

Submitted by:  Brian Gough <bjg>
Submitted on:  Wed 14 Jan 2009 05:41:30 PM UTC  
 
Category: Accuracy problemSeverity: 3 - Normal
Operating System: Status: None
Assigned to: NoneOpen/Closed: Open
Release: 1.12

Wed 14 Jan 2009 05:41:30 PM UTC, original submission:

The fresnel extension should be imported for the next release, with the following bug report checked.

From: "Toshiro Ohsaki" <t.ohsaki@ipb.co.jp>
To: <bug-gsl@gnu.org>
Subject: [Bug-gsl] Bugs on GSL Extension Fresnel
Date: Wed, 26 Nov 2008 21:07:02 +0900

Dear staff of GNU

I found bugs on GSL Extensions/Applications Fresnel by Andrew Steiner.
This program does not return a correct value, if x is negative.

The original function fresnel_c is coded as,

double fresnel_c(double x)
{
double xx = xxpi_2;
double ret_val;
if(xx<=8.0)
ret_val = fresnel_cos_0_8(xx);
else
ret_val = fresnel_cos_8_inf(xx);
return (x<0.0) ? -ret_val : ret_val;
}
.

I think it should be coded as,

double fresnel_c(double x)
{
double xx = xxpi_2;
double ret_val;
double sign;

if(xx < 0.0){
xx*=-1.0;
sign=-1.0;
}
else{
sign=1.0;
}

if(xx<=8.0)
ret_val = fresnel_cos_0_8(xx);
else
ret_val = fresnel_cos_8_inf(xx);

ret_val*=sign;

return(ret_val);
}
.

The same correction should be done on the function fresnel_s.

Sincerely yours,
Toshiro Ohsaki
from Tokyo Japan.
_____________________________________________
Bug-gsl mailing list
-unavailable-
http://lists.gnu.org/mailman/listinfo/bug-gsl

Brian Gough <bjg>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bjg (Submitted the item)
  •  

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

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup