Average Error: 0.0 → 0.0
Time: 27.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 r101662 = x;
        double r101663 = y;
        double r101664 = r101662 * r101663;
        double r101665 = z;
        double r101666 = t;
        double r101667 = r101665 * r101666;
        double r101668 = r101664 + r101667;
        double r101669 = a;
        double r101670 = b;
        double r101671 = r101669 * r101670;
        double r101672 = r101668 + r101671;
        double r101673 = c;
        double r101674 = i;
        double r101675 = r101673 * r101674;
        double r101676 = r101672 + r101675;
        return r101676;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r101677 = i;
        double r101678 = c;
        double r101679 = a;
        double r101680 = b;
        double r101681 = x;
        double r101682 = y;
        double r101683 = t;
        double r101684 = z;
        double r101685 = r101683 * r101684;
        double r101686 = fma(r101681, r101682, r101685);
        double r101687 = fma(r101679, r101680, r101686);
        double r101688 = fma(r101677, r101678, r101687);
        return r101688;
}

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