Average Error: 0.0 → 0.0
Time: 24.6s
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 r2695244 = x;
        double r2695245 = y;
        double r2695246 = r2695244 * r2695245;
        double r2695247 = z;
        double r2695248 = t;
        double r2695249 = r2695247 * r2695248;
        double r2695250 = r2695246 + r2695249;
        double r2695251 = a;
        double r2695252 = b;
        double r2695253 = r2695251 * r2695252;
        double r2695254 = r2695250 + r2695253;
        double r2695255 = c;
        double r2695256 = i;
        double r2695257 = r2695255 * r2695256;
        double r2695258 = r2695254 + r2695257;
        return r2695258;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r2695259 = i;
        double r2695260 = c;
        double r2695261 = a;
        double r2695262 = b;
        double r2695263 = x;
        double r2695264 = y;
        double r2695265 = t;
        double r2695266 = z;
        double r2695267 = r2695265 * r2695266;
        double r2695268 = fma(r2695263, r2695264, r2695267);
        double r2695269 = fma(r2695261, r2695262, r2695268);
        double r2695270 = fma(r2695259, r2695260, r2695269);
        return r2695270;
}

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