Average Error: 0.0 → 0.0
Time: 1.8s
Precision: 64
\[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i\]
\[\left(\mathsf{fma}\left(t, z, x \cdot y\right) + a \cdot b\right) + c \cdot i\]
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\left(\mathsf{fma}\left(t, z, x \cdot y\right) + a \cdot b\right) + c \cdot i
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((((x * y) + (z * t)) + (a * b)) + (c * i));
}
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((fma(t, z, (x * y)) + (a * b)) + (c * i));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus i

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i\]
  2. Taylor expanded around inf 0.0

    \[\leadsto \left(\color{blue}{\left(t \cdot z + x \cdot y\right)} + a \cdot b\right) + c \cdot i\]
  3. Simplified0.0

    \[\leadsto \left(\color{blue}{\mathsf{fma}\left(t, z, x \cdot y\right)} + a \cdot b\right) + c \cdot i\]
  4. Final simplification0.0

    \[\leadsto \left(\mathsf{fma}\left(t, z, x \cdot y\right) + a \cdot b\right) + c \cdot i\]

Reproduce

herbie shell --seed 2020057 +o rules:numerics
(FPCore (x y z t a b c i)
  :name "Linear.V4:$cdot from linear-1.19.1.3"
  :precision binary64
  (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))