Average Error: 0.1 → 0.1
Time: 6.7s
Precision: 64
\[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\]
\[\mathsf{fma}\left(b, a - 0.5, \mathsf{fma}\left(z, 1 - \log \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right), x + y\right) - \log \left(\sqrt[3]{t}\right) \cdot z\right)\]
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\mathsf{fma}\left(b, a - 0.5, \mathsf{fma}\left(z, 1 - \log \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right), x + y\right) - \log \left(\sqrt[3]{t}\right) \cdot z\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r356253 = x;
        double r356254 = y;
        double r356255 = r356253 + r356254;
        double r356256 = z;
        double r356257 = r356255 + r356256;
        double r356258 = t;
        double r356259 = log(r356258);
        double r356260 = r356256 * r356259;
        double r356261 = r356257 - r356260;
        double r356262 = a;
        double r356263 = 0.5;
        double r356264 = r356262 - r356263;
        double r356265 = b;
        double r356266 = r356264 * r356265;
        double r356267 = r356261 + r356266;
        return r356267;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r356268 = b;
        double r356269 = a;
        double r356270 = 0.5;
        double r356271 = r356269 - r356270;
        double r356272 = z;
        double r356273 = 1.0;
        double r356274 = t;
        double r356275 = cbrt(r356274);
        double r356276 = r356275 * r356275;
        double r356277 = log(r356276);
        double r356278 = r356273 - r356277;
        double r356279 = x;
        double r356280 = y;
        double r356281 = r356279 + r356280;
        double r356282 = fma(r356272, r356278, r356281);
        double r356283 = log(r356275);
        double r356284 = r356283 * r356272;
        double r356285 = r356282 - r356284;
        double r356286 = fma(r356268, r356271, r356285);
        return r356286;
}

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

Target

Original0.1
Target0.3
Herbie0.1
\[\left(\left(x + y\right) + \frac{\left(1 - {\left(\log t\right)}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b\]

Derivation

  1. Initial program 0.1

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

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

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

    \[\leadsto \mathsf{fma}\left(b, a - 0.5, \left(\left(x + y\right) + z\right) - z \cdot \color{blue}{\left(\log \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) + \log \left(\sqrt[3]{t}\right)\right)}\right)\]
  6. Applied distribute-rgt-in0.1

    \[\leadsto \mathsf{fma}\left(b, a - 0.5, \left(\left(x + y\right) + z\right) - \color{blue}{\left(\log \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) \cdot z + \log \left(\sqrt[3]{t}\right) \cdot z\right)}\right)\]
  7. Applied associate--r+0.1

    \[\leadsto \mathsf{fma}\left(b, a - 0.5, \color{blue}{\left(\left(\left(x + y\right) + z\right) - \log \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) \cdot z\right) - \log \left(\sqrt[3]{t}\right) \cdot z}\right)\]
  8. Simplified0.1

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

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

Reproduce

herbie shell --seed 2020089 +o rules:numerics
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
  :precision binary64

  :herbie-target
  (+ (+ (+ x y) (/ (* (- 1 (pow (log t) 2)) z) (+ 1 (log t)))) (* (- a 0.5) b))

  (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))