How to Validate a Calculator
A guide to verifying the calculations behind engineering's new tools
Validation Process
1. Review the Source Math
// Example Calculator Code
Calculate_R_Sub_Y(r_factor, x_factor, channelGap)
{
return Math.Sqrt(Math.Pow(r_factor, 2) + Math.Pow((channelGap / 2) + x_factor, 2));
}
Examine the code for:
- Accuracy: If the function is named "Calculate_R_Sub_Y", then the formula or variable in the return line should be the final result in that calculation.
- The words in the parentheses are the variables passed into the function (here: r_factor, x_factor, channelGap)
- If a variable isn't passed in via the parentheses, assume it's valid user inputed values
- Math.___ is calling a common math function on the values inside (Here, we are using the Square Root and Power. Math.Pow(r_factor, 2) == r_factor^2)
- Watch for: Unit conversions, Edge case handling ect.
- Sometimes, function names (Calculate_R_Sub_Y here) may be named in an unhelpful fashion. Suggesting better naming conventions is valuable feedback!
2. Verify Mathematical Principles
While the format may be somewhat unfamiliar, at its heart the calculations are just math using more descriptive words instead of letter variables- don't let it throw you off.
- Cross-reference the formulas used with existing, proven references
- Check against industry standards
- Verify assumptions (material types, safety factor ect.) and limitations
Pro Tip: Be sure to mention any references you used
3. Test with Sample Calculations
- Use test data sets where you already know what the result should be in the new calculator form
- Test boundary conditions
- Verify with hand calculations
4. Document Your Findings
As you review the calculations, be sure to fill out the questions as you work through it. If the digital format is difficult to work with, you can print the page and submit that filled out instead. Here's the information that the form will ask for.
Validation Feedback Form
- Your name and E-mail
- A series of questions asking if a block of math is correct
- Test Cases Used
- Discrepancies Found (if any)
- Recommendations
- Would you approve this calculator for Caldwell's daily use?
- How confident are you in your results?
- Other feedback