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

Submitted by:  -Deleted Account- <bjg>
Submitted on:  Wed 06 Jan 2010 05:55:17 PM UTC  
 
Category: Runtime errorSeverity: 3 - Normal
Operating System: Status: Fixed
Assigned to: NoneOpen/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)BC 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: -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>

 

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 (submitter)
  •  

    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
    Wed 24 Feb 2010 07:52:38 PM UTCbjgStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Wed 06 Jan 2010 05:57:35 PM UTCbjgCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1