08-13-2012 05:59 AM
I have noticed something peculiar in TS 4.1.
When I have a small number, like 1e-14, the following comparisons hold in an expression:
I might have understood the (0 == ...) bit as some implicit C-style data type conversion as the statements in general have C operator syntax, but 0.0 in C would be a double literal and therefore should compare False at that precision level. But apparently it depends on sequence?
See the attached sequence file
Best regards,
Peter
Solved! Go to Solution.
08-13-2012 11:58 AM
Floating point comparisons in TestStand are performed at approximately 14 decimal digits of precision.
However, there is a known inconsistency that applies only to comparisons between a number that is EXACTLY zero and a very small number that is approximately 1e-14 or less. In this case, whether TestStand considers the numbers to be equals depends on which side of the comparison the exact zero is on.
This will be fixed in a future version of TestStand.
08-13-2012 01:56 PM
Thank you for the clarification.
Peter