bug-gsl
[Top][All Lists]
Advanced

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

Re: [Bug-gsl] [bug #42502] wrong results of the function gsl_cdf_ugaussi


From: Peter Johansson
Subject: Re: [Bug-gsl] [bug #42502] wrong results of the function gsl_cdf_ugaussian_Pinv
Date: Wed, 04 Jun 2014 09:51:12 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130108 Thunderbird/10.0.12

On 06/04/2014 04:51 AM, Patrick Alken wrote:
URL:
   <http://savannah.gnu.org/bugs/?42502>

                  Summary: wrong results of the function gsl_cdf_ugaussian_Pinv
                  Project: GNU Scientific Library
             Submitted by: psa
             Submitted on: Tue 03 Jun 2014 06:51:52 PM GMT
                 Category: Runtime error
                 Severity: 3 - Normal
         Operating System:
                   Status: None
              Assigned to: None
              Open/Closed: Open
                  Release:
          Discussion Lock: Any

     _______________________________________________________

Details:

#include<gsl/gsl_math.h>
#include<stdio.h>

int main(){
     double x= 0.5;
     double res = gsl_cdf_ugaussian_Pinv(x);
     printf("icdf(%f)=%f\n",x,res);
     return 0;
}

This code does not compile because gsl_cdf.h is not #included.

For some reason the output is: *icdf(0.500000)=1.000000*

Which is wrong, it should be: *icdf(0.500000)=0.000000 (because P(X<0)=0.5)*

gsl_cdf_ugaussian_Pinv(0.5) returns 0.0 with gsl 1.15.

Cheers,


--
Peter Johansson
http://dev.thep.lu.se/yat




reply via email to

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