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















Bits error versus x















Bits error versus y















Bits error versus z
Results
| Original | 15.6 |
|---|---|
| Target | 7.8 |
| Herbie | 0.2 |
| Alternative 1 | |
|---|---|
| Error | 0.2 |
| Cost | 39232 |
| Alternative 2 | |
|---|---|
| Error | 0.2 |
| Cost | 39425 |
| Alternative 3 | |
|---|---|
| Error | 0.4 |
| Cost | 13761 |
| Alternative 4 | |
|---|---|
| Error | 4.6 |
| Cost | 14339 |
| Alternative 5 | |
|---|---|
| Error | 6.1 |
| Cost | 14018 |
| Alternative 6 | |
|---|---|
| Error | 6.1 |
| Cost | 13890 |
| Alternative 7 | |
|---|---|
| Error | 8.1 |
| Cost | 20488 |
| Alternative 8 | |
|---|---|
| Error | 21.8 |
| Cost | 7313 |
| Alternative 9 | |
|---|---|
| Error | 31.7 |
| Cost | 128 |
| Alternative 10 | |
|---|---|
| Error | 61.9 |
| Cost | 64 |
| Alternative 11 | |
|---|---|
| Error | 61.9 |
| Cost | 64 |

Initial program 15.6
rmApplied add-cube-cbrt_binary64_1341215.6
Applied add-cube-cbrt_binary64_1341215.6
Applied times-frac_binary64_1338315.6
Applied log-prod_binary64_134633.7
Applied distribute-rgt-in_binary64_133273.7
Simplified0.2
Simplified0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2021044
(FPCore (x y z)
:name "Numeric.SpecFunctions.Extra:bd0 from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(if (< y 7.595077799083773e-308) (- (* x (log (/ x y))) z) (- (* x (- (log x) (log y))) z))
(- (* x (log (/ x y))) z))