3.5 mathlib double and single-precision floating-point functions

The math library, mathlib, provides double and single-precision functions for mathematical calculations.

For example, to calculate a cube root, you can use cbrt() (double-precision) or cbrtf() (single-precision).

ISO/IEC 14882 specifies that in addition to the double versions of the math functions in <cmath>, C++ adds float (and long double) overloaded versions of these functions. The ARM® implementation extends this in scope to include the additional math functions that do not exist in C90, but that do exist in C99.

In C++, std::cbrt() on a float argument selects the single-precision version of the function, and the same type of selection applies to other floating-point functions in C++.

Non-ConfidentialPDF file icon PDF versionARM DUI0475M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.