Average Error: 0.1 → 0.1
Time: 4.5s
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(z + a \cdot b\right) + \left(b \cdot \left(-0.5\right) - z \cdot \log t\right)\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(z + a \cdot b\right) + \left(b \cdot \left(-0.5\right) - z \cdot \log t\right)\right)
double code(double x, double y, double z, double t, double a, double b) {
	return ((((x + y) + z) - (z * log(t))) + ((a - 0.5) * b));
}
double code(double x, double y, double z, double t, double a, double b) {
	return ((x + y) + ((z + (a * b)) + ((b * -0.5) - (z * log(t)))));
}

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

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

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

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

    \[\leadsto \color{blue}{\left(x + y\right) + \left(z + \left(b \cdot \left(a - 0.5\right) - z \cdot \log t\right)\right)}\]
  8. Using strategy rm
  9. Applied sub-neg0.1

    \[\leadsto \left(x + y\right) + \left(z + \left(b \cdot \color{blue}{\left(a + \left(-0.5\right)\right)} - z \cdot \log t\right)\right)\]
  10. Applied distribute-lft-in0.1

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

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

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

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

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

Reproduce

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