\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\mathsf{fma}\left(b, a - 0.5, \mathsf{fma}\left(z, \left(1 - 2 \cdot \log \left(\sqrt[3]{t}\right)\right) - \log \left(\sqrt[3]{t}\right), x + y\right) + \log t \cdot \left(\left(-z\right) + z\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 fma(b, (a - 0.5), (fma(z, ((1.0 - (2.0 * log(cbrt(t)))) - log(cbrt(t))), (x + y)) + (log(t) * (-z + z))));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b
Results
| Original | 0.1 |
|---|---|
| Target | 0.3 |
| Herbie | 0.1 |
Initial program 0.1
Simplified0.1
rmApplied add-sqr-sqrt32.1
Applied prod-diff32.1
Simplified0.1
Simplified0.1
rmApplied add-cube-cbrt0.1
Applied log-prod0.1
Applied associate--r+0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2020056 +o rules:numerics
(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)))