Average Error: 0.0 → 0.0
Time: 3.6s
Precision: 64
\[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i\]
\[\mathsf{fma}\left(i, c, \left(\mathsf{fma}\left(a, b, \left(\mathsf{fma}\left(x, y, \left(t \cdot z\right)\right)\right)\right)\right)\right)\]
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\mathsf{fma}\left(i, c, \left(\mathsf{fma}\left(a, b, \left(\mathsf{fma}\left(x, y, \left(t \cdot z\right)\right)\right)\right)\right)\right)
double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r1643527 = x;
        double r1643528 = y;
        double r1643529 = r1643527 * r1643528;
        double r1643530 = z;
        double r1643531 = t;
        double r1643532 = r1643530 * r1643531;
        double r1643533 = r1643529 + r1643532;
        double r1643534 = a;
        double r1643535 = b;
        double r1643536 = r1643534 * r1643535;
        double r1643537 = r1643533 + r1643536;
        double r1643538 = c;
        double r1643539 = i;
        double r1643540 = r1643538 * r1643539;
        double r1643541 = r1643537 + r1643540;
        return r1643541;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r1643542 = i;
        double r1643543 = c;
        double r1643544 = a;
        double r1643545 = b;
        double r1643546 = x;
        double r1643547 = y;
        double r1643548 = t;
        double r1643549 = z;
        double r1643550 = r1643548 * r1643549;
        double r1643551 = fma(r1643546, r1643547, r1643550);
        double r1643552 = fma(r1643544, r1643545, r1643551);
        double r1643553 = fma(r1643542, r1643543, r1643552);
        return r1643553;
}

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

Derivation

  1. Initial program 0.0

    \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i\]
  2. Simplified0.0

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

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

Reproduce

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