On this page
  1. math.fma
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

math.fma

Prev: math.floor | Up: math | Next: math.fmod
Rel: math.acos, math.acosh, math.asin, math.asinh
Ref: docs.python.org — math.fma
Tags: #public #python3 #stdlib #math


Import

import math
from math import fma

Signature & Overview

math.fma(x, y, z, /)

Fused multiply-add operation.

Usage

import math

# Single-rounding fused multiply-add: (x * y) + z
assert math.fma(2.0, 3.0, 4.0) == 10.0

Gotchas

REPL Inspect

from math import fma
help(fma)

Linked from

Related notes