04-06-2010 11:48 AM - edited 04-06-2010 11:51 AM
The values came from (string to number) pattern match and were misbehaving.
After tinkering with type casting and formats (didn't spend much time though), there was no change in wrong evaluation:
Solved! Go to Solution.
04-06-2010 11:54 AM
Sneaky. X is 4.4999999999999998
04-06-2010 11:55 AM
We have our weekly (at least) winner in the mysteries of floating point values contest.
See this thread to start.
http://forums.ni.com/ni/board/message?board.id=170&message.id=41383&query.id=2902191#M41383
04-06-2010 11:58 AM
04-06-2010 12:01 PM
smercurio_fc wrote:
And another nickel to my retirement fund!
Better re-check your statement. They are only depositing 4.99999999982 cents.
04-06-2010 12:06 PM
No it works. And this is common problem then working with floating point numbers :smileyvery-happy: The problem are caused by small rounding errors. The number format is the source of the trouble. It has been a lot of postings about this
Use the in range check instead.
04-06-2010 12:07 PM
Yes, correct.
but least expected this. as it was initialised as fig.1 and incremented as fig.2
04-06-2010 12:09 PM
Better re-check your statement. They are only depositing 4.99999999982 cents.
Hey, don't be stealing my salami! (wikipedia: Salami slicing)
04-06-2010 12:33 PM
labview-programmer wrote:Yes, correct.
but least expected this. as it was initialised as fig.1 and incremented as fig.2
![]()
Aniket, change 'em to DBL's.