Average Error: 0.0 → 0.0
Time: 5.5s
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 r3296327 = x;
        double r3296328 = y;
        double r3296329 = r3296327 * r3296328;
        double r3296330 = z;
        double r3296331 = t;
        double r3296332 = r3296330 * r3296331;
        double r3296333 = r3296329 + r3296332;
        double r3296334 = a;
        double r3296335 = b;
        double r3296336 = r3296334 * r3296335;
        double r3296337 = r3296333 + r3296336;
        double r3296338 = c;
        double r3296339 = i;
        double r3296340 = r3296338 * r3296339;
        double r3296341 = r3296337 + r3296340;
        return r3296341;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r3296342 = i;
        double r3296343 = c;
        double r3296344 = a;
        double r3296345 = b;
        double r3296346 = x;
        double r3296347 = y;
        double r3296348 = t;
        double r3296349 = z;
        double r3296350 = r3296348 * r3296349;
        double r3296351 = fma(r3296346, r3296347, r3296350);
        double r3296352 = fma(r3296344, r3296345, r3296351);
        double r3296353 = fma(r3296342, r3296343, r3296352);
        return r3296353;
}

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