summaryrefslogtreecommitdiffstats
path: root/lib/msun/man
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2008-03-30 20:03:29 +0000
committerdas <das@FreeBSD.org>2008-03-30 20:03:29 +0000
commitfed973ef18871061e03edd02a39296d2a30420d2 (patch)
tree971ef4f8e366c7824c55fb14ee94c21979dcf2b5 /lib/msun/man
parentca69e4f334b0df27038c3c874e1a60fac5050b43 (diff)
downloadFreeBSD-src-fed973ef18871061e03edd02a39296d2a30420d2.zip
FreeBSD-src-fed973ef18871061e03edd02a39296d2a30420d2.tar.gz
Document hypotl().
Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu>
Diffstat (limited to 'lib/msun/man')
-rw-r--r--lib/msun/man/hypot.329
1 files changed, 17 insertions, 12 deletions
diff --git a/lib/msun/man/hypot.3 b/lib/msun/man/hypot.3
index 083e138..8f90f0d 100644
--- a/lib/msun/man/hypot.3
+++ b/lib/msun/man/hypot.3
@@ -28,14 +28,16 @@
.\" from: @(#)hypot.3 6.7 (Berkeley) 5/6/91
.\" $FreeBSD$
.\"
-.Dd December 12, 2007
+.Dd March 30, 2008
.Dt HYPOT 3
.Os
.Sh NAME
.Nm hypot ,
.Nm hypotf ,
+.Nm hypotl ,
.Nm cabs ,
-.Nm cabsf
+.Nm cabsf ,
+.Nm cabsl
.Nd Euclidean distance and complex absolute value functions
.Sh LIBRARY
.Lb libm
@@ -45,25 +47,31 @@
.Fn hypot "double x" "double y"
.Ft float
.Fn hypotf "float x" "float y"
+.Ft "long double"
+.Fn hypotl "long double x" "long double y"
.In complex.h
.Ft double
.Fn cabs "double complex z"
.Ft float
.Fn cabsf "float complex z"
+.Ft "long double"
+.Fn cabsl "long double complex z"
.Sh DESCRIPTION
The
-.Fn hypot
-and
+.Fn hypot ,
.Fn hypotf
+and
+.Fn hypotl
functions
compute the
sqrt(x*x+y*y)
in such a way that underflow will not happen, and overflow
occurs only if the final result deserves it.
The
-.Fn cabs
-and
+.Fn cabs ,
.Fn cabsf
+and
+.Fn cabsl
functions compute the complex absolute value of
.Fa z .
.Pp
@@ -82,11 +90,6 @@ Consequently
exactly;
in general, hypot and cabs return an integer whenever an
integer might be expected.
-.Pp
-The same cannot be said for the shorter and faster version of hypot
-and cabs that is provided in the comments in cabs.c; its error can
-exceed 1.2
-.Em ulps .
.Sh NOTES
As might be expected,
.Fn hypot "v" "\*(Na"
@@ -133,8 +136,10 @@ appeared in
The
.Fn hypot ,
.Fn hypotf ,
+.Fn hypotl ,
.Fn cabs ,
+.Fn cabsf ,
and
-.Fn cabsf
+.Fn cabsl
functions conform to
.St -isoC-99 .
OpenPOWER on IntegriCloud