Chapter 12. Numeric Functions

Fast is good. Accurate is better.

— ATTRIBUTED TO WYATT EARP

The C standard was revised in 1999 to improve support for fast, robust floating-point computations.[1] This revision came a year after the C++ standard was approved, so these changes are not part of the C++ standard.[2] The C99 changes to the C library are, however, included in the TR1 library, along with two dozen new math functions that are now being considered for addition to C.

The C99 changes add three headers to the standard C library: <fenv.h>, which describes an interface for examining and modifying a program’s floating-point environment; <tgmath.h>, which defines several type-generic macros that provide Fortran-like promotion rules for arguments ...

Get The C++ Standard Library Extensions A Tutorial and Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.