1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE book PUBLIC
"-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>fma
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>fma
</refname>
17 <refpurpose>perform a fused multiply-add operation
</refpurpose>
19 <refsynopsisdiv><title>Declaration
</title>
22 <funcdef>genType
<function>fma
</function></funcdef>
23 <paramdef>genType
<parameter>a
</parameter></paramdef>
24 <paramdef>genType
<parameter>b
</parameter></paramdef>
25 <paramdef>genType
<parameter>c
</parameter></paramdef>
28 <funcdef>genDType
<function>fma
</function></funcdef>
29 <paramdef>genDType
<parameter>a
</parameter></paramdef>
30 <paramdef>genDType
<parameter>b
</parameter></paramdef>
31 <paramdef>genDType
<parameter>c
</parameter></paramdef>
35 <refsect1 id=
"parameters"><title>Parameters
</title>
38 <term><parameter>a
</parameter></term>
41 Specifies the first multiplicand.
46 <term><parameter>b
</parameter></term>
49 Specifies the second multiplicand.
54 <term><parameter>c
</parameter></term>
57 Specifies the value to be added to the result.
63 <refsect1 id=
"description"><title>Description
</title>
65 <function>fma
</function> performs, where possible, a fused multiply-add operation,
66 returning
<code>a * b + c
</code>.
67 In use cases where the return value is eventually consumed by a variable declared as
70 <listitem><function>fma
</function>() is considered a single operation, whereas the
71 expression
<code>a * b + c
</code> consumed by a variable declared as
<code>precise
</code>
72 is considered two operations.
</listitem>
73 <listitem>The precision of
<function>fma
</function>() can differ from the precision
74 of the expression
<code>a * b + c
</code>.
</listitem>
75 <listitem><function>fma
</function>() will be computed with the same precision as any
76 other
<function>fma
</function>() consumed by a
<code>precise
</code> variable,
77 giving invariant results for the same input values of
<parameter>a
</parameter>,
78 <parameter>b
</parameter> and
<parameter>c
</parameter>.
</listitem>
80 Otherwise, in the absense of
<code>precise
</code> consumption, there are no
81 special constraints on the number of operations or difference in precision between
82 <function>fma
</function>() and the expression
<code>a * b + c
</code>.
85 <refsect1 id=
"versions"><title>Version Support
</title>
86 <informaltable frame=
"topbot">
91 <entry>fma (genType)
</entry>#newin40#
94 <entry>fma (genDType)
</entry>#newin40#
100 <refsect1 id=
"Copyright"><title>Copyright
</title>
102 Copyright
<trademark class=
"copyright"></trademark> 2011-
2013 Khronos Group.
103 This material may be distributed subject to the terms and conditions set forth in
104 the Open Publication License, v
1.0,
8 June
1999.
105 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.