NAME | SYNOPSIS | API RESTRICTIONS | DESCRIPTION | RETURN VALUES | ERRORS (due to roundoff) | ATTRIBUTES | SEE ALSO | STANDARDS
$(NUCLEUS_DIR)/lib/libm.a #include <math.h>double sqrt(double x);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
The sqrt() function computes the non-negative square root of x .
The cbrt() function computes the cube root of x .
The sqrt() function returns the requested square root unless an error occurs. An error occurs if an attempt to get the sqrt() of a negative value of x is made. In this event, errno is set to EDOM and a system-dependent notification is performed.
The cbrt() function returns the requested cube root.
The cbrt() function is accurate to within 0.7 ulp . A ulp is one Unit in the Last Place carried.
On a machine that conforms to IEEE 754, sqrt() is correctly rounded according to the rounding mode in force. In the default mode (round-to-nearest), the error is less than half a ulp .
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
The sqrt() function conforms to ANSI-C .
NAME | SYNOPSIS | API RESTRICTIONS | DESCRIPTION | RETURN VALUES | ERRORS (due to roundoff) | ATTRIBUTES | SEE ALSO | STANDARDS