man.bsd.lv manual page server

Manual Page Search Parameters

SQRT(3) Library Functions Manual SQRT(3)

cbrt, sqrtcube root and square root functions

#include <math.h>

double
cbrt(double x);

double
sqrt(double x);

The () function computes the cube root of x.

The () computes the non-negative square root of x.

The cbrt() function returns the requested cube root. The sqrt() function returns the requested square root unless an error occurs. On the VAX or Tahoe processor an attempt to take the sqrt() of negative x causes an error; in this event, the global variable errno is set to EDOM and a reserved operand fault is generated.

The cbrt() function is accurate to within 0.7 ulps.

The () function on a VAX is accurate to within 0.501 ulps. Sqrt 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 nit in the ast lace carried.

math(3), infnan(3)

The sqrt function conforms to ANSI X3.159-1989 (“ANSI C89”).

The cbrt function appeared in 4.3BSD.

4.4BSD-Lite2 June 4, 1993 SQRT(3)