Terence Kelly wrote:
>
> A friend of mine reported that when he ran a battery of
> straightforward random tests on the GNU package, it failed on simple
> inputs (things like "4 + 4"). It takes very little effort to set up
> random tests and run them, and this kind of testing reveals bugs in
> several multi-precision arithmetic packages.
>
> You might check out the very well-documented arithmetic packages in
> Dave Hanson's book _C Interfaces and Implementations_. Source code
> is available at http://www.cs.princeton.edu/software/cii/
>
> If tests (random or otherwise) convince you that none of the packages
> available in source form are correct, Knuth Vol. 3 contains a
> reasonable discussion of multiple-precision arithmetic, as do the
> _Numerical Recipes_ books.
OpenSSL's tests include random tests, which are verified both internally
(by doing the same sum a different way, or otherwise checking the
answer) and externally (by checking them with bc). They do occasionally
reveal weird compiler bugs.
Cheers,
Ben.
--
http://www.apache-ssl.org/ben.html
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi