bugGNU Scientific Library - Bugs: bug #67301, Bug: Test for existence of uniform...

 
 

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

bug #67301: Bug: Test for existence of uniform random variate in histogram

Submitter:  Fermé le Lundi <fermelelundi>
Submitted:  Thu 10 Jul 2025 09:49:25 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Operating System: 
Status:  None Assigned to:  None
Open/Closed:  Open Release: 

Discussion

Thu 10 Jul 2025 09:49:25 AM UTC, original submission:  

In histogram/pdf2d.c the function gsl_histogram2d_pdf_sample() create a sample from a bivariate histogram. It contains a test for the existence of the random variate r1 in this distribution:

  status = find (p->nx * p->ny, p->sum, r1, &k);

  if (status)
    {
      GSL_ERROR ("cannot find r1 in cumulative pdf", GSL_EDOM);
    }

The code then proceeds with finding the sample value. However, shouldn't the same test be performed for r2? That would mean the test would look something like the following:

  status = find (p->nx * p->ny, p->sum, r1, &k);
  if (status)
    GSL_ERROR ("Cannot find r1 in cumulative distribution function p", GSL_EDOM);

  status = find (p->nx * p->ny, p->sum, r2, &k);
  if (status)
    GSL_ERROR ("Cannot find r2 in cumulative distribution function p", GSL_EDOM);

Fermé le Lundi <fermelelundi>

 

Attached Files

This item currently has no attached files.

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by fermelelundi (Submitted the item)
  •  

    History

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.16-598c.
    Corresponding source code