sqrt()

NAME

cbrt(), sqrt(), sqrtf() - cube root and square root functions

SYNOPSIS

#include <math.h>

double cbrt (double x) double sqrt (double x) float sqrt (float x)

DESCRIPTION

The cbrt(3) function computes the cube root of x.

The sqrt(3) and sqrtf(3) compute the non-negative square root of x.

RETURN VALUES

The cbrt(3) function returns the requested cube root. The sqrt(3) and sqrtf(3) functions return the requested square root unless an error occurs.

ERRORS

The cbrt(3) function can fail for the following reasons:

[EDOM]
The argument x was NaN.
sqrt(3) and sqrtf(3) functions can fail for the following reasons:
[EDOM]
The argument x was a negative number, or is NaN.

ERROR (due to Roundoff etc.)

The cbrt(3) function is accurate to within 0.7 ulps Sqrt(3) on a machine that conforms to IEEE 754 is correctly rounded in accordance with the rounding mode in force; the error is less than half an ulp in the default mode (round-to-nearest). An ulp is one Unit in the Last Place carried.

SEE ALSO

math(3)