Object Oriented Software Engineering   View all facts   Glossary   Help
subject > problem > defect > defect in a numerical algorithm
Next defectdefect in an ordinary algorithm    Updefect    Previous defecttiming and co-ordination defect   

defect in a numerical algorithm comparison table
Subject have testing strategy occur force
assuming a floating point value will be exactly equal to some other valuestandard boundary testing  
not using enough bits or digits to store maximum valuestest using very large numbers to ensure the system has a wide enough margin of error  
not using enough places after the decimal pointperform calculations that involve many significant figures, and large differences in magnitude the system to round excessively, which can mean that data is stored inaccurately and can also lead to a build-up of errors
not using enough significant figuresperform calculations that involve many significant figures, and large differences in magnitude the system to round excessively, which can mean that data is stored inaccurately and can also lead to a build-up of errors
ordering operations poorly so errors build up
  • if a numerical application is designed to work with floating-point numbers, then make sure it works with inputs that vary widely in magnitude, including both large positive and large negative exponents
  • pay particular attention to the accuracy of the result when a floating point value is being repeatedly decremented or incremented by small amounts
when you do small operations on large floating point numbers, and excessive rounding or truncation errors build up 

Next defectdefect in an ordinary algorithm    Updefect    Previous defecttiming and co-ordination defect