Floating Point Imprecision
Audience: Beginning programming students
- Students will understand that floating point arithmetic differs from mathematics because it is imprecise
- Students will know how to find limits of floating point arithmetic
- Students will understand the difference between floating point and multiple precision types
Compute the largest number ε such that adding ε to 1 produces 1:
1.0 + ε == 1.0
- Why is ε not 0?
- Does the value of ε change depending on the number of bits of precision in the floating point arithmetic?
- How do you test for equality when floating point numbers are involved?
- Does the value of ε vary among different machines?