Average Error: 0.0 → 0.0
Time: 18.8s
Precision: 64
\[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i\]
\[\mathsf{fma}\left(c, i, \mathsf{fma}\left(t, z, \mathsf{fma}\left(a, b, x \cdot y\right)\right)\right)\]
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\mathsf{fma}\left(c, i, \mathsf{fma}\left(t, z, \mathsf{fma}\left(a, b, x \cdot y\right)\right)\right)
double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r75607 = x;
        double r75608 = y;
        double r75609 = r75607 * r75608;
        double r75610 = z;
        double r75611 = t;
        double r75612 = r75610 * r75611;
        double r75613 = r75609 + r75612;
        double r75614 = a;
        double r75615 = b;
        double r75616 = r75614 * r75615;
        double r75617 = r75613 + r75616;
        double r75618 = c;
        double r75619 = i;
        double r75620 = r75618 * r75619;
        double r75621 = r75617 + r75620;
        return r75621;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r75622 = c;
        double r75623 = i;
        double r75624 = t;
        double r75625 = z;
        double r75626 = a;
        double r75627 = b;
        double r75628 = x;
        double r75629 = y;
        double r75630 = r75628 * r75629;
        double r75631 = fma(r75626, r75627, r75630);
        double r75632 = fma(r75624, r75625, r75631);
        double r75633 = fma(r75622, r75623, r75632);
        return r75633;
}

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(c, i, \mathsf{fma}\left(a, b, \mathsf{fma}\left(x, y, z \cdot t\right)\right)\right)}\]
  3. Taylor expanded around inf 0.0

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

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

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

Reproduce

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