[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] [bug #24510] Negative chi squared value in vegas
From: |
Brian Gough |
Subject: |
[Bug-gsl] [bug #24510] Negative chi squared value in vegas |
Date: |
Thu, 09 Oct 2008 19:25:42 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16) Gecko/20080716 Fedora/false StumbleUpon/1.73 SeaMonkey/1.1.11 |
URL:
<http://savannah.gnu.org/bugs/?24510>
Summary: Negative chi squared value in vegas
Project: GNU Scientific Library
Submitted by: bjg
Submitted on: Thu 09 Oct 2008 08:25:40 PM BST
Category: Runtime error
Severity: 3 - Normal
Operating System:
Status: Confirmed
Assigned to: None
Open/Closed: Open
Release: 1.11
Discussion Lock: Any
_______________________________________________________
Details:
Reply-To: address@hidden
From: "L. A. Pritchett-Sheats" <address@hidden>
To: address@hidden
Subject: [Help-gsl] Negative chi squared value in MC Vegas
Date: Tue, 7 Oct 2008 09:55:06 -0600 (MDT)
[1 <text/plain; iso-8859-1 (8bit)>]
Thought I would post this on the help list before reporting this as a bug.
I'm writing an integration package which calculates N dimensional
integrals on infinite intervals using the GSL Monte Carlo functions. I'm
using tan(pi/2 x) to transform the integral to the (0,1) domain. For
different functions, I've seen negative values for the chi/dof values.
This is a reproducer integrating a gaussian on (0,+inf) that follows the
sample code found in the GSL manual where I've seen this problem on both a
Mac ( 10.4.11, Intel ) and a Linux machine (AMD Operton 86x_64). Although
the values differ on the two machines, at least 2-3 calls in the loop will
return a negative value for chi/dof.
I searched through the bug list archives and I didn't see this reported.
Is this a bug or am I doing something wrong here?
Compile: gcc -o vegas.x gaussian_vegas.c -lgsl -lgslcblas -lm
Output from the Mac
After warm up ====================
result = 5.000000214E-01
est error = 3.714575544E-08
answer = 5.000000000E-01
true error = 2.136549626E-08
sigma = 0.575
chisq/dof = 0.648
result = 4.999999999E-01 sigma = 3.757398332E-10 chisq/dof = 0.000
result = 4.999999995E-01 sigma = 3.830138812E-10 chisq/dof = -64.000
result = 5.000000006E-01 sigma = 3.842008411E-10 chisq/dof = -64.000
result = 5.000000003E-01 sigma = 3.900425646E-10 chisq/dof = 64.000
result = 5.000000000E-01 sigma = 3.869444558E-10 chisq/dof = 64.000
result = 4.999999998E-01 sigma = 3.927335539E-10 chisq/dof = -64.000
result = 4.999999994E-01 sigma = 3.912789134E-10 chisq/dof = 0.000
result = 5.000000002E-01 sigma = 3.898697784E-10 chisq/dof = 0.000
result = 5.000000000E-01 sigma = 3.983946547E-10 chisq/dof = -64.000
result = 5.000000001E-01 sigma = 3.881925195E-10 chisq/dof = -64.000
Final results ====================
result = 5.000000001E-01
est error = 3.881925195E-10
answer = 5.000000000E-01
true error = 1.362355784E-10
sigma = 0.351
--
Lori A. Pritchett-Sheats, PhD.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 09 Oct 2008 08:25:40 PM BST Name: gaussian_vegas.c Size: 4kB
By: bjg
<http://savannah.gnu.org/bugs/download.php?file_id=16641>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?24510>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-gsl] [bug #24510] Negative chi squared value in vegas,
Brian Gough <=