Average Error: 0.1 → 0.1
Time: 19.8s
Precision: binary64
\[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \]
\[\left(a \cdot b + \left(y + \left(z \cdot \log \left(\frac{e^{0.3333333333333333}}{t}\right) + \left(z \cdot 0.6666666666666666 + x\right)\right)\right)\right) - b \cdot 0.5 \]
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\left(a \cdot b + \left(y + \left(z \cdot \log \left(\frac{e^{0.3333333333333333}}{t}\right) + \left(z \cdot 0.6666666666666666 + x\right)\right)\right)\right) - b \cdot 0.5
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
(FPCore (x y z t a b)
 :precision binary64
 (-
  (+
   (* a b)
   (+
    y
    (+
     (* z (log (/ (exp 0.3333333333333333) t)))
     (+ (* z 0.6666666666666666) x))))
  (* b 0.5)))
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 ((a * b) + (y + ((z * log(exp(0.3333333333333333) / t)) + ((z * 0.6666666666666666) + x)))) - (b * 0.5);
}

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.4
Herbie0.1
\[\left(\left(x + y\right) + \frac{\left(1 - {\log t}^{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(z, 1 - \log t, \mathsf{fma}\left(a - 0.5, b, x + y\right)\right)} \]
  3. Applied add-sqr-sqrt_binary640.1

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

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

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

    \[\leadsto \mathsf{fma}\left(z, \left(\color{blue}{\log \left(e^{1}\right)} - \log \left(\sqrt{t}\right)\right) - \log \left(\sqrt{t}\right), \mathsf{fma}\left(a - 0.5, b, x + y\right)\right) \]
  7. Applied diff-log_binary640.1

    \[\leadsto \mathsf{fma}\left(z, \color{blue}{\log \left(\frac{e^{1}}{\sqrt{t}}\right)} - \log \left(\sqrt{t}\right), \mathsf{fma}\left(a - 0.5, b, x + y\right)\right) \]
  8. Applied diff-log_binary640.1

    \[\leadsto \mathsf{fma}\left(z, \color{blue}{\log \left(\frac{\frac{e^{1}}{\sqrt{t}}}{\sqrt{t}}\right)}, \mathsf{fma}\left(a - 0.5, b, x + y\right)\right) \]
  9. Applied *-un-lft-identity_binary640.1

    \[\leadsto \mathsf{fma}\left(z, \log \left(\frac{\frac{e^{1}}{\sqrt{t}}}{\sqrt{\color{blue}{1 \cdot t}}}\right), \mathsf{fma}\left(a - 0.5, b, x + y\right)\right) \]
  10. Applied sqrt-prod_binary640.1

    \[\leadsto \mathsf{fma}\left(z, \log \left(\frac{\frac{e^{1}}{\sqrt{t}}}{\color{blue}{\sqrt{1} \cdot \sqrt{t}}}\right), \mathsf{fma}\left(a - 0.5, b, x + y\right)\right) \]
  11. Applied *-un-lft-identity_binary640.1

    \[\leadsto \mathsf{fma}\left(z, \log \left(\frac{\frac{e^{1}}{\sqrt{\color{blue}{1 \cdot t}}}}{\sqrt{1} \cdot \sqrt{t}}\right), \mathsf{fma}\left(a - 0.5, b, x + y\right)\right) \]
  12. Applied sqrt-prod_binary640.1

    \[\leadsto \mathsf{fma}\left(z, \log \left(\frac{\frac{e^{1}}{\color{blue}{\sqrt{1} \cdot \sqrt{t}}}}{\sqrt{1} \cdot \sqrt{t}}\right), \mathsf{fma}\left(a - 0.5, b, x + y\right)\right) \]
  13. Applied add-cube-cbrt_binary640.1

    \[\leadsto \mathsf{fma}\left(z, \log \left(\frac{\frac{\color{blue}{\left(\sqrt[3]{e^{1}} \cdot \sqrt[3]{e^{1}}\right) \cdot \sqrt[3]{e^{1}}}}{\sqrt{1} \cdot \sqrt{t}}}{\sqrt{1} \cdot \sqrt{t}}\right), \mathsf{fma}\left(a - 0.5, b, x + y\right)\right) \]
  14. Applied times-frac_binary640.1

    \[\leadsto \mathsf{fma}\left(z, \log \left(\frac{\color{blue}{\frac{\sqrt[3]{e^{1}} \cdot \sqrt[3]{e^{1}}}{\sqrt{1}} \cdot \frac{\sqrt[3]{e^{1}}}{\sqrt{t}}}}{\sqrt{1} \cdot \sqrt{t}}\right), \mathsf{fma}\left(a - 0.5, b, x + y\right)\right) \]
  15. Applied times-frac_binary640.1

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

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

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

    \[\leadsto \mathsf{fma}\left(z, 2 \cdot \log \left(\sqrt[3]{e}\right) + \color{blue}{\log \left(\frac{\sqrt[3]{e}}{t}\right)}, \mathsf{fma}\left(a - 0.5, b, x + y\right)\right) \]
  19. Taylor expanded in z around 0 0.1

    \[\leadsto \color{blue}{\left(a \cdot b + \left(y + \left(z \cdot \log \left(\frac{e^{0.3333333333333333}}{t}\right) + \left(0.6666666666666666 \cdot z + x\right)\right)\right)\right) - 0.5 \cdot b} \]
  20. Final simplification0.1

    \[\leadsto \left(a \cdot b + \left(y + \left(z \cdot \log \left(\frac{e^{0.3333333333333333}}{t}\right) + \left(z \cdot 0.6666666666666666 + x\right)\right)\right)\right) - b \cdot 0.5 \]

Reproduce

herbie shell --seed 2021280 
(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.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b))

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