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) - zdouble f(double x, double y, double z) {
double r498195 = x;
double r498196 = y;
double r498197 = r498195 / r498196;
double r498198 = log(r498197);
double r498199 = r498195 * r498198;
double r498200 = z;
double r498201 = r498199 - r498200;
return r498201;
}
double f(double x, double y, double z) {
double r498202 = x;
double r498203 = 2.0;
double r498204 = cbrt(r498202);
double r498205 = y;
double r498206 = cbrt(r498205);
double r498207 = r498204 / r498206;
double r498208 = log(r498207);
double r498209 = r498203 * r498208;
double r498210 = r498202 * r498209;
double r498211 = r498202 * r498208;
double r498212 = r498210 + r498211;
double r498213 = z;
double r498214 = r498212 - r498213;
return r498214;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.3 |
|---|---|
| Target | 7.8 |
| Herbie | 0.2 |
Initial program 15.3
rmApplied add-cube-cbrt15.3
Applied add-cube-cbrt15.3
Applied times-frac15.3
Applied log-prod3.7
Applied distribute-lft-in3.7
Simplified0.2
Final simplification0.2
herbie shell --seed 2019350 +o rules:numerics
(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))