Given an function F that performs a numerical computation on 32-bit IEEE-754 floating point numbers, what would be the (best) way to test if F is numerically stable? Is there a black-box test that does not need to know more about the function other than its argument types?
Asked
Active
Viewed 871 times
1
-
1In the words of Bill Kahan: " Can the effects of roundoff upon a floating-point computation be assessed without submitting it to a mathematically rigorous and (if feasible at all) time-consuming error-analysis? In general, No." See http://people.eecs.berkeley.edu/~wkahan/Mindless.pdf. – Mark Dickinson Dec 16 '16 at 18:53
-
See particularly section 4, "Five Plausible Schemes". – Mark Dickinson Dec 16 '16 at 18:54
1 Answers
3
Well, you could cycle through all the floating point numbers, do higher-order forward differencing, and look for regions where the resultant derivative approximation gets really big. Ultimately, though, it would be impossible to prove that the roughness was the result of instability, as opposed to actual features of the function being modeled. After all, every black box is a perfect model of some function.
If you had 32-bit and 64-bit versions of the same black box, you could specifically look for areas where the 64-bit version's forward differences were smoother than the 32-bit version's.

Sneftel
- 40,271
- 12
- 71
- 104