bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gsl] [bug #25320] Import fresnel, bugs on GSL Extension Fresnel


From: Brian Gough
Subject: [Bug-gsl] [bug #25320] Import fresnel, bugs on GSL Extension Fresnel
Date: Wed, 14 Jan 2009 17:41:31 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.17) Gecko/20080925 Fedora/false StumbleUpon/1.73 SeaMonkey/1.1.12

URL:
  <http://savannah.gnu.org/bugs/?25320>

                 Summary: Import fresnel, bugs on GSL Extension Fresnel
                 Project: GNU Scientific Library
            Submitted by: bjg
            Submitted on: Wed 14 Jan 2009 05:41:30 PM GMT
                Category: Accuracy problem
                Severity: 3 - Normal
  Уеб-?траница: 
                  Status: None
             Assigned to: None
             Open/Closed: Open
                 Release: 1.12
         Discussion Lock: Any

    _______________________________________________________

Details:

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

From: "Toshiro Ohsaki" <address@hidden>
To: <address@hidden>
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 = x*x*pi_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 = x*x*pi_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
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-gsl






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?25320>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]