User | Kudos |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |
In the real world, machine epsilon is a function of the binary representation of a floating point number.
The labview help describes it as:
"Represents the round-off error for a floating-point number with a given precision. Use the machine epsilon constant to compare whether two floating-point numbers are equivalent."
From the term "given precision", we would assume that epsilon depends on the representation. In fact, we can right-click on the machine epsilon and select between SGL, DBL, and EXT.
However, if we look at the actual value, we can see that machine epsilon has the identical decimal value for SGL, DBL, and EXT. No matter what representation we chose, we get the value for DBL.
This is not right!
Suggestion: the machine epsilon must depend on the representation. Since the exact representation of EXT depends on the architecture (64, 80, 96, 128 bits total), machine epsilon for EXT needs to adapt accordingly.
Here's one possible way to calculate machine epsilon explicitly. Note the discrepancy for SGL and EXT.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.