bugGNU Scientific Library - Bugs: bug #28500, overflow in gsl_ran_fdist_pdf

 
 

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

bug #28500: overflow in gsl_ran_fdist_pdf

Submitter:  -Deleted Account- <bjg>
Submitted:  Wed 06 Jan 2010 05:55:17 PM UTC
   
 
Category:  Runtime error Severity:  3 - Normal
Operating System:  Status:  Fixed
Assigned to:  None Open/Closed:  Closed
Release:  1.13

Wed 24 Feb 2010 07:52:38 PM UTC, comment #2: 

fixed by commit 87c4d916076889709158ff189db1ec0d80211e78

compute logarithm of pdf to avoid underflow/overflow
fixes bug #28500: overflow in gsl_ran_fdist_pdf
added test case

-Deleted Account- <bjg>
Wed 06 Jan 2010 05:55:56 PM UTC, comment #1: 

There is a product of terms exp(A)*B*C where the exponential overflows.  It needs to be rewritten as exp(A+log(B)+log(C)) when there is a danger of overflow.

-Deleted Account- <bjg>
Wed 06 Jan 2010 05:55:17 PM UTC, original submission:  

From: Gunjan Verma <gunjan.verma@gmail.com>
To: -email is unavailable-
Subject: [Bug-gsl] possible bug in F distribution computation function gsl_ran_fdist_pdf
Date: Tue, 5 Jan 2010 14:55:19 -0500

Dear GSL Community,
    Ran into a mysterious problem.

When I run gsl_ran_fdist_pdf(.012, 8, 249) I get infinity.
But when I run

gsl_ran_fdist_pdf(.012, 8, 248) I get .000074, which is correct (checked
against MATLAB and R)

one d.f. change makes this difference - but I don't see why it should from
the formula for F pdf.

i am running a Dell Latitude E6500 machine with ubuntu 9 linux , 64 bit and
gcc 4.4.1   . I built the gsl library from source for my system.


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

int main ()
{
  double x = gsl_ran_fdist_pdf(.012,8,249);
  printf("%g\n", x);
}

=>

inf

-Deleted Account- <bjg>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bjg (submitter)
  •  

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-02-24 bjg StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2010-01-06 bjg Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code