Average Error: 0.1 → 0.5
Time: 35.4s
Precision: 64
\[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\]
\[\mathsf{fma}\left(\sqrt[3]{\mathsf{fma}\left(\log y, x, z\right)} \cdot \sqrt[3]{\mathsf{fma}\left(\log y, x, z\right)}, \sqrt[3]{\mathsf{fma}\left(\log y, x, z\right)}, t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, a\right)\right)\]
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\mathsf{fma}\left(\sqrt[3]{\mathsf{fma}\left(\log y, x, z\right)} \cdot \sqrt[3]{\mathsf{fma}\left(\log y, x, z\right)}, \sqrt[3]{\mathsf{fma}\left(\log y, x, z\right)}, t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, a\right)\right)
double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r2620755 = x;
        double r2620756 = y;
        double r2620757 = log(r2620756);
        double r2620758 = r2620755 * r2620757;
        double r2620759 = z;
        double r2620760 = r2620758 + r2620759;
        double r2620761 = t;
        double r2620762 = r2620760 + r2620761;
        double r2620763 = a;
        double r2620764 = r2620762 + r2620763;
        double r2620765 = b;
        double r2620766 = 0.5;
        double r2620767 = r2620765 - r2620766;
        double r2620768 = c;
        double r2620769 = log(r2620768);
        double r2620770 = r2620767 * r2620769;
        double r2620771 = r2620764 + r2620770;
        double r2620772 = i;
        double r2620773 = r2620756 * r2620772;
        double r2620774 = r2620771 + r2620773;
        return r2620774;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r2620775 = y;
        double r2620776 = log(r2620775);
        double r2620777 = x;
        double r2620778 = z;
        double r2620779 = fma(r2620776, r2620777, r2620778);
        double r2620780 = cbrt(r2620779);
        double r2620781 = r2620780 * r2620780;
        double r2620782 = t;
        double r2620783 = fma(r2620781, r2620780, r2620782);
        double r2620784 = b;
        double r2620785 = 0.5;
        double r2620786 = r2620784 - r2620785;
        double r2620787 = c;
        double r2620788 = log(r2620787);
        double r2620789 = i;
        double r2620790 = a;
        double r2620791 = fma(r2620775, r2620789, r2620790);
        double r2620792 = fma(r2620786, r2620788, r2620791);
        double r2620793 = r2620783 + r2620792;
        return r2620793;
}

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.1

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\]
  2. Simplified0.1

    \[\leadsto \color{blue}{\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, a\right)\right) + \left(\mathsf{fma}\left(\log y, x, z\right) + t\right)}\]
  3. Using strategy rm
  4. Applied add-cube-cbrt0.5

    \[\leadsto \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, a\right)\right) + \left(\color{blue}{\left(\sqrt[3]{\mathsf{fma}\left(\log y, x, z\right)} \cdot \sqrt[3]{\mathsf{fma}\left(\log y, x, z\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(\log y, x, z\right)}} + t\right)\]
  5. Applied fma-def0.5

    \[\leadsto \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, a\right)\right) + \color{blue}{\mathsf{fma}\left(\sqrt[3]{\mathsf{fma}\left(\log y, x, z\right)} \cdot \sqrt[3]{\mathsf{fma}\left(\log y, x, z\right)}, \sqrt[3]{\mathsf{fma}\left(\log y, x, z\right)}, t\right)}\]
  6. Final simplification0.5

    \[\leadsto \mathsf{fma}\left(\sqrt[3]{\mathsf{fma}\left(\log y, x, z\right)} \cdot \sqrt[3]{\mathsf{fma}\left(\log y, x, z\right)}, \sqrt[3]{\mathsf{fma}\left(\log y, x, z\right)}, t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, a\right)\right)\]

Reproduce

herbie shell --seed 2019168 +o rules:numerics
(FPCore (x y z t a b c i)
  :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B"
  (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))