Average Error: 0.0 → 0.0
Time: 16.3s
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, t \cdot z\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, t \cdot z\right)\right)\right)
double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r3695454 = x;
        double r3695455 = y;
        double r3695456 = r3695454 * r3695455;
        double r3695457 = z;
        double r3695458 = t;
        double r3695459 = r3695457 * r3695458;
        double r3695460 = r3695456 + r3695459;
        double r3695461 = a;
        double r3695462 = b;
        double r3695463 = r3695461 * r3695462;
        double r3695464 = r3695460 + r3695463;
        double r3695465 = c;
        double r3695466 = i;
        double r3695467 = r3695465 * r3695466;
        double r3695468 = r3695464 + r3695467;
        return r3695468;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r3695469 = i;
        double r3695470 = c;
        double r3695471 = a;
        double r3695472 = b;
        double r3695473 = x;
        double r3695474 = y;
        double r3695475 = t;
        double r3695476 = z;
        double r3695477 = r3695475 * r3695476;
        double r3695478 = fma(r3695473, r3695474, r3695477);
        double r3695479 = fma(r3695471, r3695472, r3695478);
        double r3695480 = fma(r3695469, r3695470, r3695479);
        return r3695480;
}

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

Reproduce

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