Average Error: 0.0 → 0.0
Time: 17.8s
Precision: 64
\[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i\]
\[\mathsf{fma}\left(z, t, \mathsf{fma}\left(x, y, \mathsf{fma}\left(c, i, a \cdot b\right)\right)\right)\]
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\mathsf{fma}\left(z, t, \mathsf{fma}\left(x, y, \mathsf{fma}\left(c, i, a \cdot b\right)\right)\right)
double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r3521610 = x;
        double r3521611 = y;
        double r3521612 = r3521610 * r3521611;
        double r3521613 = z;
        double r3521614 = t;
        double r3521615 = r3521613 * r3521614;
        double r3521616 = r3521612 + r3521615;
        double r3521617 = a;
        double r3521618 = b;
        double r3521619 = r3521617 * r3521618;
        double r3521620 = r3521616 + r3521619;
        double r3521621 = c;
        double r3521622 = i;
        double r3521623 = r3521621 * r3521622;
        double r3521624 = r3521620 + r3521623;
        return r3521624;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r3521625 = z;
        double r3521626 = t;
        double r3521627 = x;
        double r3521628 = y;
        double r3521629 = c;
        double r3521630 = i;
        double r3521631 = a;
        double r3521632 = b;
        double r3521633 = r3521631 * r3521632;
        double r3521634 = fma(r3521629, r3521630, r3521633);
        double r3521635 = fma(r3521627, r3521628, r3521634);
        double r3521636 = fma(r3521625, r3521626, r3521635);
        return r3521636;
}

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(z, t, \mathsf{fma}\left(x, y, \mathsf{fma}\left(c, i, a \cdot b\right)\right)\right)}\]
  3. Using strategy rm
  4. Applied *-un-lft-identity0.0

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

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

Reproduce

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