summaryrefslogtreecommitdiffstats
path: root/lib/msun/man
diff options
context:
space:
mode:
authorkargl <kargl@FreeBSD.org>2011-03-12 16:50:39 +0000
committerkargl <kargl@FreeBSD.org>2011-03-12 16:50:39 +0000
commitc519d48b44c3e020735f0ea6ba8990884471b5b2 (patch)
treeeae7ea576c279208da253a26e583fbc1bb847849 /lib/msun/man
parent5d37412b23a8bef61f5bd22635be9554076ef5ed (diff)
downloadFreeBSD-src-c519d48b44c3e020735f0ea6ba8990884471b5b2.zip
FreeBSD-src-c519d48b44c3e020735f0ea6ba8990884471b5b2.tar.gz
Implement the long double version for the cube root function, cbrtl.
The algorithm uses Newton's iterations with a crude estimate of the cube root to converge to a result. Reviewed by: bde Approved by: das
Diffstat (limited to 'lib/msun/man')
-rw-r--r--lib/msun/man/math.39
-rw-r--r--lib/msun/man/sqrt.327
2 files changed, 23 insertions, 13 deletions
diff --git a/lib/msun/man/math.3 b/lib/msun/man/math.3
index 39aa8ab..9ffe080 100644
--- a/lib/msun/man/math.3
+++ b/lib/msun/man/math.3
@@ -220,12 +220,11 @@ and
.Vt long double
values, were written for or imported into subsequent versions of FreeBSD.
.Sh BUGS
-The
-.Fn cbrt
-function and many of the transcendental functions
-are not available in their
+Some of the
.Vt "long double"
-variants.
+math functions in
+.St -isoC-99
+are not available.
.Pp
Many of the routines to compute transcendental functions produce
inaccurate results in other than the default rounding mode.
diff --git a/lib/msun/man/sqrt.3 b/lib/msun/man/sqrt.3
index 71460fa..e48f98b 100644
--- a/lib/msun/man/sqrt.3
+++ b/lib/msun/man/sqrt.3
@@ -28,12 +28,13 @@
.\" from: @(#)sqrt.3 6.4 (Berkeley) 5/6/91
.\" $FreeBSD$
.\"
-.Dd March 1, 2008
+.Dd March 5, 2011
.Dt SQRT 3
.Os
.Sh NAME
.Nm cbrt ,
.Nm cbrtf ,
+.Nm cbrtl ,
.Nm sqrt ,
.Nm sqrtf ,
.Nm sqrtl
@@ -46,6 +47,8 @@
.Fn cbrt "double x"
.Ft float
.Fn cbrtf "float x"
+.Ft long double
+.Fn cbrtl "long double x"
.Ft double
.Fn sqrt "double x"
.Ft float
@@ -54,9 +57,10 @@
.Fn sqrtl "long double x"
.Sh DESCRIPTION
The
-.Fn cbrt
-and the
-.Fn cbrtf
+.Fn cbrt ,
+.Fn cbrtf ,
+and
+.Fn cbrtl
functions compute
the cube root of
.Ar x .
@@ -67,12 +71,14 @@ The
and
.Fn sqrtl
functions compute the
-non-negative square root of x.
+non-negative square root of
+.Ar x .
.Sh RETURN VALUES
The
-.Fn cbrt
-and the
-.Fn cbrtf
+.Fn cbrt ,
+.Fn cbrtf ,
+and
+.Fn cbrtl
functions return the requested cube root.
The
.Fn sqrt ,
@@ -94,6 +100,7 @@ raises an invalid exception and causes an \*(Na to be returned
The
.Fn cbrt ,
.Fn cbrtf ,
+.Fn cbrtl ,
.Fn sqrt ,
.Fn sqrtf ,
and
@@ -109,3 +116,7 @@ The
.Fn sqrtl
function appeared in
.Fx 8.0 .
+The
+.Fn cbrtl
+function appeared in
+.Fx 9.0 .
OpenPOWER on IntegriCloud