Trust the Numeric Answer?

Until a tool (such as a speedometer, thermometer, clock, or math software) is calibrated, it may be of little use, in that the values it has may be wildly wrong. Have the tools that you use been tested to see if they are accurate?

C99 FPCE Test Suite

Do you use a computer to compute numeric values, that is, numbers? Should you trust the answer produced by a computer program that does numeric computations? If that program uses the mathematical function (sine, cosine, square root, logarithm, ...) library, how much faith should you put in the answer? If the compiler does a poor job of converting decimal numbers to/from internal binary floating-point, should you trust the result? If the compiler "optimizes" the code and changes the semantics (meaning or results computed) of the code, should you trust the answer from the program?

Have you asked your C compiler vendor what the accuracy of their math library functions are? What the accuracy of the decimal to/from binary conversions are? If they use independent testing of their math library?

The C computer language was recently revised and is now known as C99; the older versions (ANSI C89, ISO C90, ISO C95) are no longer standards. FPCE (Floating-Point C Extensions) is one of the new large features added to C99 by the NCEG (Numerical C Extensions Group). I have written a FPCE Test Suite to check C and C++ compilers, headers and math libraries for compliance to the FPCE part of C99, to check the accuracy of the math library, as well as the accuracy of decimal to/from binary conversions of the I/O library. It also checks compilers for improper code generation "optimizations" that change the meaning of code and the numeric values computed.

Here are some free sample tests that you may try (to download, try Shift along with Left mouse button):

An alternative way to get those (and more) sample files is here Windows zip format or Linux tar+gzip format or FTP via ftp://ftp.tybor.com with the userid of "anonymous"

Decimal Floating-Point (DFP) Test Suite

A proposal, via a Technical Report, is the basis of adding support for IEEE-754 (2008 edition) decimal floating-point to the C language. I have written a test suite to check a C compiler's conformance to that proposal.

Here is a free sample test that you may try (to download, try Shift along with Left mouse button):

Customer downloads

Validation / Verification of FPUs to IEEE-754 floating point standard

In addition, Fred J. Tydeman tests the floating-point units (FPUs) of computer chips for conformance / compliance to the IEEE-754 floating-point standard (this is called validation or verification). His testing has found 100s of flaws in chips from Intel (x87), AMD (x87), Motorola (MCORE), Equator Technologies (MAP 1000), THS (x87), and Marvell (ARM vfp); most before production, thus saving countless expense for the associated companies.

Math puzzles

Since 1975, I have been a co-author of the Brain Ticklers math puzzles column in The Bent of Tau Beta Pi (all engineering honor society). Back issues can be found here

You may contact him at Tydeman Consulting