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?

C17/C11/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 C17; the older versions (ANSI C89, ISO C90, ISO C95, ISO C99, ISO C11) are no longer standards. FPCE (Floating-Point C Extensions) was one of the 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. There are tests for both real and complex. C11 and C17 added a few numeric related items. The C language is now in the process of being updated and is known as C2X. More floating-point functions have been added by the CFP (C Floating Point) sub-group.

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 or via the command line "ftp ftp.tybor.com" with the userid of "anonymous@tybor.com" and any password.

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. That has been updated for IEEE-754 (2018 edition) as the proposal, which is a Technical Specification. 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), Marvell (ARM vfp) and Altera; 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