Average Error: 0.0 → 0.0
Time: 6.4s
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(b, a, \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(b, a, \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 r80359 = x;
        double r80360 = y;
        double r80361 = r80359 * r80360;
        double r80362 = z;
        double r80363 = t;
        double r80364 = r80362 * r80363;
        double r80365 = r80361 + r80364;
        double r80366 = a;
        double r80367 = b;
        double r80368 = r80366 * r80367;
        double r80369 = r80365 + r80368;
        double r80370 = c;
        double r80371 = i;
        double r80372 = r80370 * r80371;
        double r80373 = r80369 + r80372;
        return r80373;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r80374 = i;
        double r80375 = c;
        double r80376 = b;
        double r80377 = a;
        double r80378 = x;
        double r80379 = y;
        double r80380 = z;
        double r80381 = t;
        double r80382 = r80380 * r80381;
        double r80383 = fma(r80378, r80379, r80382);
        double r80384 = fma(r80376, r80377, r80383);
        double r80385 = fma(r80374, r80375, r80384);
        return r80385;
}

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

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

Reproduce

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