Average Error: 0.1 → 0.1
Time: 5.9s
Precision: 64
\[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\]
\[\left(x + y\right) + \left(\left(1 - \log t\right) \cdot z + \left(a - 0.5\right) \cdot b\right)\]
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\left(x + y\right) + \left(\left(1 - \log t\right) \cdot z + \left(a - 0.5\right) \cdot b\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r372743 = x;
        double r372744 = y;
        double r372745 = r372743 + r372744;
        double r372746 = z;
        double r372747 = r372745 + r372746;
        double r372748 = t;
        double r372749 = log(r372748);
        double r372750 = r372746 * r372749;
        double r372751 = r372747 - r372750;
        double r372752 = a;
        double r372753 = 0.5;
        double r372754 = r372752 - r372753;
        double r372755 = b;
        double r372756 = r372754 * r372755;
        double r372757 = r372751 + r372756;
        return r372757;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r372758 = x;
        double r372759 = y;
        double r372760 = r372758 + r372759;
        double r372761 = 1.0;
        double r372762 = t;
        double r372763 = log(r372762);
        double r372764 = r372761 - r372763;
        double r372765 = z;
        double r372766 = r372764 * r372765;
        double r372767 = a;
        double r372768 = 0.5;
        double r372769 = r372767 - r372768;
        double r372770 = b;
        double r372771 = r372769 * r372770;
        double r372772 = r372766 + r372771;
        double r372773 = r372760 + r372772;
        return r372773;
}

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

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

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. Using strategy rm
  3. Applied associate--l+0.1

    \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(a - 0.5\right) \cdot b\]
  4. Applied associate-+l+0.1

    \[\leadsto \color{blue}{\left(x + y\right) + \left(\left(z - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\right)}\]
  5. Taylor expanded around 0 0.1

    \[\leadsto \left(x + y\right) + \left(\color{blue}{z \cdot \left(1 - \log t\right)} + \left(a - 0.5\right) \cdot b\right)\]
  6. Simplified0.1

    \[\leadsto \left(x + y\right) + \left(\color{blue}{\left(1 - \log t\right) \cdot z} + \left(a - 0.5\right) \cdot b\right)\]
  7. Final simplification0.1

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

Reproduce

herbie shell --seed 2020025 
(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)))