Average Error: 0.0 → 0.0
Time: 23.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 r2857238 = x;
        double r2857239 = y;
        double r2857240 = r2857238 * r2857239;
        double r2857241 = z;
        double r2857242 = t;
        double r2857243 = r2857241 * r2857242;
        double r2857244 = r2857240 + r2857243;
        double r2857245 = a;
        double r2857246 = b;
        double r2857247 = r2857245 * r2857246;
        double r2857248 = r2857244 + r2857247;
        double r2857249 = c;
        double r2857250 = i;
        double r2857251 = r2857249 * r2857250;
        double r2857252 = r2857248 + r2857251;
        return r2857252;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r2857253 = i;
        double r2857254 = c;
        double r2857255 = a;
        double r2857256 = b;
        double r2857257 = x;
        double r2857258 = y;
        double r2857259 = t;
        double r2857260 = z;
        double r2857261 = r2857259 * r2857260;
        double r2857262 = fma(r2857257, r2857258, r2857261);
        double r2857263 = fma(r2857255, r2857256, r2857262);
        double r2857264 = fma(r2857253, r2857254, r2857263);
        return r2857264;
}

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 2019130 +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)))