Average Error: 0.0 → 0.0
Time: 3.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(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 r75008 = x;
        double r75009 = y;
        double r75010 = r75008 * r75009;
        double r75011 = z;
        double r75012 = t;
        double r75013 = r75011 * r75012;
        double r75014 = r75010 + r75013;
        double r75015 = a;
        double r75016 = b;
        double r75017 = r75015 * r75016;
        double r75018 = r75014 + r75017;
        double r75019 = c;
        double r75020 = i;
        double r75021 = r75019 * r75020;
        double r75022 = r75018 + r75021;
        return r75022;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r75023 = i;
        double r75024 = c;
        double r75025 = b;
        double r75026 = a;
        double r75027 = x;
        double r75028 = y;
        double r75029 = z;
        double r75030 = t;
        double r75031 = r75029 * r75030;
        double r75032 = fma(r75027, r75028, r75031);
        double r75033 = fma(r75025, r75026, r75032);
        double r75034 = fma(r75023, r75024, r75033);
        return r75034;
}

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