Average Error: 0.0 → 0.0
Time: 14.8s
Precision: 64
\[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i\]
\[\mathsf{fma}\left(i, c, \mathsf{fma}\left(a, b, \mathsf{fma}\left(x, y, t \cdot z\right)\right)\right)\]
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\mathsf{fma}\left(i, c, \mathsf{fma}\left(a, b, \mathsf{fma}\left(x, y, t \cdot z\right)\right)\right)
double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r3829578 = x;
        double r3829579 = y;
        double r3829580 = r3829578 * r3829579;
        double r3829581 = z;
        double r3829582 = t;
        double r3829583 = r3829581 * r3829582;
        double r3829584 = r3829580 + r3829583;
        double r3829585 = a;
        double r3829586 = b;
        double r3829587 = r3829585 * r3829586;
        double r3829588 = r3829584 + r3829587;
        double r3829589 = c;
        double r3829590 = i;
        double r3829591 = r3829589 * r3829590;
        double r3829592 = r3829588 + r3829591;
        return r3829592;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r3829593 = i;
        double r3829594 = c;
        double r3829595 = a;
        double r3829596 = b;
        double r3829597 = x;
        double r3829598 = y;
        double r3829599 = t;
        double r3829600 = z;
        double r3829601 = r3829599 * r3829600;
        double r3829602 = fma(r3829597, r3829598, r3829601);
        double r3829603 = fma(r3829595, r3829596, r3829602);
        double r3829604 = fma(r3829593, r3829594, r3829603);
        return r3829604;
}

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, \mathsf{fma}\left(a, b, \mathsf{fma}\left(x, y, z \cdot t\right)\right)\right)}\]
  3. Final simplification0.0

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

Reproduce

herbie shell --seed 2019192 +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)))