\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\begin{array}{l}
t_1 := \log \left(\sqrt{t}\right)\\
\left(\left(1 - t_1\right) \cdot z - t_1 \cdot z\right) + \mathsf{fma}\left(a - 0.5, b, x + y\right)
\end{array}
(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 (let* ((t_1 (log (sqrt t)))) (+ (- (* (- 1.0 t_1) z) (* t_1 z)) (fma (- a 0.5) b (+ x y)))))
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) {
double t_1 = log(sqrt(t));
return (((1.0 - t_1) * z) - (t_1 * z)) + fma((a - 0.5), b, (x + y));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b
| Original | 0.1 |
|---|---|
| Target | 0.4 |
| Herbie | 0.1 |
Initial program 0.1
Simplified0.1
Applied fma-udef_binary640.1
Simplified0.1
Applied add-sqr-sqrt_binary640.1
Applied log-prod_binary640.1
Applied distribute-rgt-in_binary640.1
Applied associate--r+_binary640.1
Taylor expanded in z around 0 0.1
Final simplification0.1
herbie shell --seed 2021215
(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)))