Main index | Section 3 | 日本語 | 한국인 | Deutsch | Options |

Math Library (libm, -lm)

#include <math.h>

The
`cbrt()`,
`cbrtf()`,
and
`cbrtl()`
functions compute
the cube root of
*x*.

The
`sqrt()`,
`sqrtf()`,
and
`sqrtl()`
functions compute the
non-negative square root of
*x*.

The
`cbrt()`,
`cbrtf()`,
and
`cbrtl()`
functions return the requested cube root.
The
`sqrt()`,
`sqrtf()`,
and
`sqrtl()`
functions return the requested square root
unless an error occurs.
An attempt to take the
`sqrt()`
of negative
x
raises an invalid exception and causes an NaN to be returned
(except that the square root of -0 is valid and equal to -0.)

The
`cbrt()`,
`cbrtf()`,
`cbrtl()`,
`sqrt()`,
`sqrtf()`,
and
`sqrtl()`
functions conform to
ISO/IEC 9899:1999 ("ISO C99").

The
`cbrt()`
function appeared in
*BSD 4.3 .*
The
`sqrtl()`
function appeared in
FreeBSD 8.0 .
The
`cbrtl()`
function appeared in
FreeBSD 9.0 .

SQRT (3) | March 5, 2011 |

Main index | Section 3 | 日本語 | 한국인 | Deutsch | Options |

Please direct any comments about this manual page service to Ben Bullock. Privacy policy.

“ | Do you laugh when the waiter drops a tray full of dishes? Unix weenies do. They're the first ones to laugh at hapless users, trying to figure out an error message that doesn't have anything to do with what they just typed. | ” |

— The Unix Haters' handbook |