\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\left(\frac{x}{y} + \left(\log z + \mathsf{fma}\left(\log t, a, \log y\right)\right)\right) - \mathsf{fma}\left(0.5, \log t + \sqrt[3]{{\left(\frac{x}{y}\right)}^{6}}, t\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 (- (+ (/ x y) (+ (log z) (fma (log t) a (log y)))) (fma 0.5 (+ (log t) (cbrt (pow (/ x y) 6.0))) 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 ((x / y) + (log(z) + fma(log(t), a, log(y)))) - fma(0.5, (log(t) + cbrt(pow((x / y), 6.0))), t);
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 0.3 |
|---|---|
| Target | 0.3 |
| Herbie | 0.3 |
Initial program 0.3
Simplified0.3
Taylor expanded in x around 0 7.7
Simplified0.3
Applied add-cbrt-cube_binary640.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2022097
(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))))