23 Mar
2003
23 Mar
'03
6 p.m.
I've often heard that you should never trust your system implementation of functions like sqrt, exp, sin, cos, rand, etc. Instead, most mathematicians say that one should use an implementation that is known to be accurate up to some order. Unfortunately, using third-party code for these functions hinders portability. I know that boost has a formidable random number generation library that uses the cmath versions of basic math functions. Does the stl standard, or various implementations of stl, make any gaurantees about the accuracy of these basic math functions? Are they safe to use for mathematical applications in practice? Thanks, Adam