2 ms·
I used to write my own numerical routines to analyze airplane part designs. Sure, modeling errors were a constant problem, as were floating point approximation
by WalterBright 15y ago
I used to write my own numerical routines to analyze airplane part designs. Sure, modeling errors were a constant problem, as were floating point approximation errors. I've seen the latter cause result errors that were off by more than an order of magnitude.
The solution to detecting and dealing with these kinds of errors was to:
1. Use common sense. The analysis was usually done to tune a design that "good engineering judgment" had already given a first approximation to. If your analysis was significantly off, you made a mistake somewhere. Good engineers always check the numbers to see if they look "wrong".
2. Compare the results with the output of using an alternate method (I was doing this at the time Boeing was just starting the transition to computer aided engineering, so it was easy to compare the results with the old ways).
3. Plug the outputs into the inverse algorithm, and you should be able to reproduce the inputs.
4. Compare the outputs against known boundary conditions. For example, you know that the sin(pi)=0, so your algorithm for sin() should reproduce that.
5. And lastly, build a prototype in the machine shop and test it.