summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Schultz <das@FreeBSD.org>2005-03-07 04:59:43 +0000
committerDavid Schultz <das@FreeBSD.org>2005-03-07 04:59:43 +0000
commit66d672d8cb91e15209768619628e0999e14ff31c (patch)
treeb53d3ec6e3013820ccc3859aac7f711fd2aef724 /lib
parent94e03502dcf451be8495442bbe73b32dd083d0e4 (diff)
Notes
Diffstat (limited to 'lib')
-rw-r--r--lib/msun/man/fma.343
1 files changed, 27 insertions, 16 deletions
diff --git a/lib/msun/man/fma.3 b/lib/msun/man/fma.3
index 1eb5b604df66..d4cb32cb93a1 100644
--- a/lib/msun/man/fma.3
+++ b/lib/msun/man/fma.3
@@ -29,7 +29,8 @@
.Os
.Sh NAME
.Nm fma ,
-.Nm fmaf
+.Nm fmaf ,
+.Nm fmal
.Nd fused multiply-add
.Sh LIBRARY
.Lb libm
@@ -39,11 +40,14 @@
.Fn fma "double x" "double y" "double z"
.Ft float
.Fn fmaf "float x" "float y" "float z"
+.Ft long double
+.Fn fmal "long double x" "long double y" "long double z"
.Sh DESCRIPTION
The
-.Fn fma
+.Fn fma ,
+.Fn fmaf ,
and
-.Fn fmaf
+.Fn fmal
functions return
.No "(x * y) + z" ,
computed with only one rounding error.
@@ -62,23 +66,21 @@ accuracy of calculations such as dot products.
It may also be used to improve performance on machines that implement
it natively.
The macros
-.Dv FP_FAST_FMA
-and
+.Dv FP_FAST_FMA ,
.Dv FP_FAST_FMAF
+and
+.Dv FP_FAST_FMAL
may be defined in
.In math.h
to indicate that
-.Fn fma
+.Fn fma ,
+.Fn fmaf ,
and
-.Fn fmaf
+.Fn fmal
(respectively) have comparable or faster speed than a multiply
operation followed by an add operation.
.Sh IMPLEMENTATION NOTES
-In general,
-.Fn fma
-and
-.Fn fmaf
-will behave as one would expect if
+In general, these routines will behave as one would expect if
.No "x * y + z"
were computed with unbounded precision and range,
then rounded to the precision of the return type.
@@ -93,13 +95,22 @@ would have otherwise generated an invalid exception.
.Xr math 3
.Sh STANDARDS
The
-.Fn fma
+.Fn fma ,
+.Fn fmaf ,
and
-.Fn fmaf
+.Fn fmal
functions conform to
.St -isoC-99 .
A fused multiply-add operation with virtually identical
characteristics appears in IEEE draft standard 754R.
.Sh HISTORY
-These routines first appeared in
-.Fx 5.4 .
+The
+.Fn fma
+and
+.Fn fmaf
+routines first appeared in
+.Fx 5.4 ,
+and
+.Fn fmal
+appeared in
+.Fx 5.5 .