07-14-2012 08:08 PM
Hello,
I had a bug in my VI and narrowed it down to the following snippet of code. The values in the output array should be 10 for all of the values in the input array. However, for only 1E-11 through 1E-14, LabVIEW appears to evaluate less than 1 instruction incorrectly, which results in an output of 100. In highlight execution, a T is given for is 1 less than 1, which of course is false. If I replace the instruction with a greater than or equal to 1 and change to loop command to Stop instead of loop, I get the same result for the range of 1E-11 through 1E-14. What am I missing? Is this simply a bug in LabVIEW?
Thanks,
Steve
Solved! Go to Solution.
07-14-2012 08:23 PM - edited 07-14-2012 08:24 PM
You are running agains the inherent limitation of comparing floating point numbers. There is nothing wrong.
(see also)