```{index} single: fma; POSIX function ``` ```{index} single: POSIX::fma; Perl function ``` # fma Fused multiply-add: `$x * $y + $z` with a single rounding. ## Synopsis ```perl my $r = POSIX::fma($x, $y, $z); ``` ## What you get back A double. Because there is only one rounding step, the result can be more accurate than the naive two-step expression, especially for catastrophic-cancellation patterns like `$a * $b - $c * $d` rewritten as `fma($a, $b, -($c * $d))`. ## Differences from upstream Fully compatible with upstream POSIX.