Main index | Section 3 | Options |
#include <math.h>
For instance, the expression 1.2e100 * 2.0e208 - 1.4e308 produces ∞ due to overflow in the intermediate product, whereas fma(1.2e100, 2.0e208, -1.4e308) returns approximately 1.0e308.
The fused multiply-add operation is often used to improve the accuracy of calculations such as dot products. It may also be used to improve performance on machines that implement it natively. The macros FP_FAST_FMA, FP_FAST_FMAF and FP_FAST_FMAL may be defined in <math.h> to indicate that fma(), fmaf(), and fmal() (respectively) have comparable or faster speed than a multiply operation followed by an add operation.
FMA (3) | January 22, 2005 |
Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.