SQRT
Section: C Library Functions (3)
Index
Return to Main Contents
BSD mandoc
NAME
cbrt
sqrt
- cube root and square root functions
SYNOPSIS
Fd #include <math.h>
Ft double
Fn cbrt double x
Ft double
Fn sqrt double x
DESCRIPTION
The
Fn cbrt
function computes
the cube root of
x
The
Fn sqrt
computes the
non-negative square root of x.
RETURN VALUES
The
Fn cbrt
function returns the requested cube root.
The
Fn sqrt
function returns the requested square root
unless an error occurs.
On the
VAX
or
Tahoe
processor an attempt to take the
Fn sqrt
of negative
Fa x
causes an error; in this event,
the global variable
errno
is set to
EDOM
and a reserved operand fault is generated.
ERROR (due to Roundoff etc.)
The
Fn cbrt
function
is accurate to within 0.7
ulps
The
Fn sqrt
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
U nit
in the
L ast
P lace
carried.
SEE ALSO
math(3),
infnan(3)
STANDARDS
The
sqrt
function conforms to
St -ansiC .
HISTORY
The
cbrt
function appeared in
BSD 4.3
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUES
-
- ERROR (due to Roundoff etc.)
-
- SEE ALSO
-
- STANDARDS
-
- HISTORY
-
This document was created by
man2html,
using the manual pages.
Time: 16:10:48 GMT, January 15, 2023