From d27d78d21666f845babd72431397e91ae77fe551 Mon Sep 17 00:00:00 2001 From: Martynas Venckus Date: Sun, 24 Jul 2011 19:25:51 +0000 Subject: Document fma, fmaf, fmal, nexttoward, nexttowardf, nexttowardl. --- lib/libm/man/fma.3 | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 lib/libm/man/fma.3 (limited to 'lib/libm/man/fma.3') diff --git a/lib/libm/man/fma.3 b/lib/libm/man/fma.3 new file mode 100644 index 00000000000..f8238d033a8 --- /dev/null +++ b/lib/libm/man/fma.3 @@ -0,0 +1,58 @@ +.\" $OpenBSD: fma.3,v 1.1 2011/07/24 19:25:50 martynas Exp $ +.\" +.\" Copyright (c) 2011 Martynas Venckus +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 24 2011 $ +.Dt FMA 3 +.Os +.Sh NAME +.Nm fma , +.Nm fmaf , +.Nm fmal +.Nd floating multiply-add +.Sh SYNOPSIS +.Fd #include +.Ft double +.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 fmaf +and +.Fn fmal +functions compute (x * y) + z, rounded as one ternary operation. +The result is rounded according to the current rounding mode. +.Sh RETURN VALUES +The +.Fn fma , +.Fn fmaf +and +.Fn fmal +functions return (x * y) + z, rounded as one ternary operation. +.Sh SEE ALSO +.Xr remainder 3 , +.Xr fegetround 3 +.Sh STANDARDS +The +.Fn fma , +.Fn fmaf +and +.Fn fmal +functions conform to +.St -isoC-99 . -- cgit v1.2.3