\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\left(\log \left(y + x\right) + \left(\log z + 0.5 \cdot \log \left(\frac{1}{t}\right)\right)\right) - \left(t - \left(a \cdot \log \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) + a \cdot \log \left(\sqrt[3]{t}\right)\right)\right)
(FPCore (x y z t a) :precision binary64 (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))
(FPCore (x y z t a) :precision binary64 (- (+ (log (+ y x)) (+ (log z) (* 0.5 (log (/ 1.0 t))))) (- t (+ (* a (log (* (cbrt t) (cbrt t)))) (* a (log (cbrt t)))))))
double code(double x, double y, double z, double t, double a) {
return ((log(x + y) + log(z)) - t) + ((a - 0.5) * log(t));
}
double code(double x, double y, double z, double t, double a) {
return (log(y + x) + (log(z) + (0.5 * log(1.0 / t)))) - (t - ((a * log(cbrt(t) * cbrt(t))) + (a * log(cbrt(t)))));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 0.2 |
|---|---|
| Target | 0.2 |
| Herbie | 0.3 |
Initial program 0.2
Simplified0.2
Taylor expanded in t around inf 0.2
Applied add-cube-cbrt_binary640.2
Applied add-cube-cbrt_binary640.2
Applied times-frac_binary640.2
Applied log-prod_binary640.3
Applied distribute-rgt-in_binary640.3
Simplified0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2021215
(FPCore (x y z t a)
:name "Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(+ (log (+ x y)) (+ (- (log z) t) (* (- a 0.5) (log t))))
(+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))