Average Error: 0.1 → 0.1
Time: 18.1s
Precision: 64
\[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\]
\[\left(\left(x + y\right) + \left(1 - \log t\right) \cdot z\right) + \left(a - 0.5\right) \cdot b\]
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\left(\left(x + y\right) + \left(1 - \log t\right) \cdot z\right) + \left(a - 0.5\right) \cdot b
double f(double x, double y, double z, double t, double a, double b) {
        double r285800 = x;
        double r285801 = y;
        double r285802 = r285800 + r285801;
        double r285803 = z;
        double r285804 = r285802 + r285803;
        double r285805 = t;
        double r285806 = log(r285805);
        double r285807 = r285803 * r285806;
        double r285808 = r285804 - r285807;
        double r285809 = a;
        double r285810 = 0.5;
        double r285811 = r285809 - r285810;
        double r285812 = b;
        double r285813 = r285811 * r285812;
        double r285814 = r285808 + r285813;
        return r285814;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r285815 = x;
        double r285816 = y;
        double r285817 = r285815 + r285816;
        double r285818 = 1.0;
        double r285819 = t;
        double r285820 = log(r285819);
        double r285821 = r285818 - r285820;
        double r285822 = z;
        double r285823 = r285821 * r285822;
        double r285824 = r285817 + r285823;
        double r285825 = a;
        double r285826 = 0.5;
        double r285827 = r285825 - r285826;
        double r285828 = b;
        double r285829 = r285827 * r285828;
        double r285830 = r285824 + r285829;
        return r285830;
}

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. Taylor expanded around 0 0.1

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

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

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

Reproduce

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