Average Error: 0.0 → 0.0
Time: 34.0s
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 r146263 = x;
        double r146264 = y;
        double r146265 = r146263 * r146264;
        double r146266 = z;
        double r146267 = t;
        double r146268 = r146266 * r146267;
        double r146269 = r146265 + r146268;
        double r146270 = a;
        double r146271 = b;
        double r146272 = r146270 * r146271;
        double r146273 = r146269 + r146272;
        double r146274 = c;
        double r146275 = i;
        double r146276 = r146274 * r146275;
        double r146277 = r146273 + r146276;
        return r146277;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r146278 = i;
        double r146279 = c;
        double r146280 = a;
        double r146281 = b;
        double r146282 = x;
        double r146283 = y;
        double r146284 = t;
        double r146285 = z;
        double r146286 = r146284 * r146285;
        double r146287 = fma(r146282, r146283, r146286);
        double r146288 = fma(r146280, r146281, r146287);
        double r146289 = fma(r146278, r146279, r146288);
        return r146289;
}

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