Average Error: 0.0 → 0.0
Time: 17.9s
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 r83765 = x;
        double r83766 = y;
        double r83767 = r83765 * r83766;
        double r83768 = z;
        double r83769 = t;
        double r83770 = r83768 * r83769;
        double r83771 = r83767 + r83770;
        double r83772 = a;
        double r83773 = b;
        double r83774 = r83772 * r83773;
        double r83775 = r83771 + r83774;
        double r83776 = c;
        double r83777 = i;
        double r83778 = r83776 * r83777;
        double r83779 = r83775 + r83778;
        return r83779;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r83780 = i;
        double r83781 = c;
        double r83782 = a;
        double r83783 = b;
        double r83784 = x;
        double r83785 = y;
        double r83786 = t;
        double r83787 = z;
        double r83788 = r83786 * r83787;
        double r83789 = fma(r83784, r83785, r83788);
        double r83790 = fma(r83782, r83783, r83789);
        double r83791 = fma(r83780, r83781, r83790);
        return r83791;
}

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