update for ANSI C from Alex Zliu and John Gilmore
[unix-history] / usr / src / lib / libm / common_source / sqrt.3
CommitLineData
f9628029
KM
1.\" Copyright (c) 1985 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
8220ec5a 5.\" @(#)sqrt.3 6.2 (Berkeley) %G%
f9628029
KM
6.\"
7.TH SQRT 3M ""
8.UC 6
cd30a7d2 9.ds up \fIulp\fR
44887795
MAN
10.SH NAME
11cbrt, sqrt \- cube root, square root
12.SH SYNOPSIS
13.nf
14.B #include <math.h>
15.PP
16.B double cbrt(x)
17.B double x;
18.PP
19.B double sqrt(x)
20.B double x;
21.fi
22.SH DESCRIPTION
cd30a7d2 23Cbrt(x) returns the cube root of x.
44887795 24.PP
cd30a7d2 25Sqrt(x) returns the square root of x.
44887795 26.SH DIAGNOSTICS
cd30a7d2
MAN
27On a VAX, sqrt(negative)
28returns the reserved operand and sets \fIerrno\fR to EDOM .
29.SH ERROR (due to Roundoff etc.)
30Cbrt is accurate to within 0.7 \*(ups.
31.br
32Sqrt on a VAX is accurate to within 0.501 \*(ups.
33.br
34Sqrt on a machine that conforms to IEEE 754 is correctly rounded
35in accordance with the rounding mode in force; the error is less than
36half an \*(up in the default mode (round\-to\-nearest).
37An \*(up is one \fIU\fRnit in the \fIL\fRast \fIP\fRlace carried.
8220ec5a
MK
38.SH SEE ALSO
39math(3M), infnan(3M)
44887795
MAN
40.SH AUTHOR
41W. Kahan