LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Discrete Random Poisson Variable Bug

In the Probability VIs palette (whose Help page needs to be updated as the icons do not match the actual VI icons), there are some numerical bugs, as shown on the example below:

 

Discrete Random Poisson Variable Bug.png

 

Try sample = 128 (the default) and lambda = 0.1 (or any other small value, so that it should mostly return 0's or 1's) and you will eventually get the loop to stop and the data array (I32) to display one (or more) value = 2147483647

That's 2^31-1, which suggests some kind of numerical bug within the algorithm.

It may be that other instances of this VI have the same bug. I did not check.

 

HIGH PRIORITY Bug, as this makes this VI quite useless...

0 Kudos
Message 1 of 4
(3,092 Views)

Not only is it buggy but it is programmed in the worst manner possible, so that the time to generate random variables is proportional to lambda.

Try generating, say, 10,000 random variable with lambda = 1. Time the job.

Try generating the same number of variables with lambda = 1E7. Go get some coffee. Come back. Not done yet?

 

Luckily it does return correct statistics, once you have skimmed the bogus values.

 

NI, please read this to understand where your mistake is and please update the whole series of VI using the proper algorithm.

This, most likely, affects all instances of the Discrete Random variable VIs and supersedes the CAR you were about to open for the previous bug.

 

0 Kudos
Message 2 of 4
(3,086 Views)

X., 

 

Thank you for bringing that to our attention.  I have replicated the behavior, and it does appear at first glance to be unexpected behavior.  I did not see any problems initially with the other VIs in the set, at least after a cursory examination.  

 

I have forwarded this request with some additional notes, your VI, and your suggestions to our development team, and they will evaluate the situation.  It is filed as Corrective Action Request number 381107.  If you wish to follow up on it in the future, this will help you reference this possible bug.

 

In the meanwhile I am glad you discovered that it does return valid results, given that the bad values are scrubbed.  

Message 3 of 4
(3,064 Views)

CAR 381107 discussed in this thread has been fixed in LabVIEW 2013. For a more complete list of bugs fixed in LabVIEW 2013, check the LabVIEW 2013 Bug Fixes. You can download an evaluation copy of LabVIEW 2013 at http://www.ni.com/trylabview/ or if you have an earlier version of LabVIEW installed and an active SSP subscription, you will be able to download the latest version of LabVIEW through NI Update Service.

 

Jeff Peacock

 

Product Support Engineer | LabVIEW R&D | National Instruments

Message 4 of 4
(2,950 Views)