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 C89, 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++.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.