Average Error: 0.0 → 0.0
Time: 18.6s
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, z \cdot t\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, z \cdot t\right)\right)\right)
double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r76596 = x;
        double r76597 = y;
        double r76598 = r76596 * r76597;
        double r76599 = z;
        double r76600 = t;
        double r76601 = r76599 * r76600;
        double r76602 = r76598 + r76601;
        double r76603 = a;
        double r76604 = b;
        double r76605 = r76603 * r76604;
        double r76606 = r76602 + r76605;
        double r76607 = c;
        double r76608 = i;
        double r76609 = r76607 * r76608;
        double r76610 = r76606 + r76609;
        return r76610;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r76611 = i;
        double r76612 = c;
        double r76613 = a;
        double r76614 = b;
        double r76615 = x;
        double r76616 = y;
        double r76617 = z;
        double r76618 = t;
        double r76619 = r76617 * r76618;
        double r76620 = fma(r76615, r76616, r76619);
        double r76621 = fma(r76613, r76614, r76620);
        double r76622 = fma(r76611, r76612, r76621);
        return r76622;
}

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, z \cdot t\right)\right)\right)\]

Reproduce

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