x \cdot \log \left(\frac{x}{y}\right) - z\log \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot x + \left(\left(\left(\log \left(\frac{\sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{y}}\right) + \log \left(\frac{\sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{y}}\right)\right) + \log \left(\frac{\sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{y}}\right)\right) \cdot x - z\right)double f(double x, double y, double z) {
double r7869186 = x;
double r7869187 = y;
double r7869188 = r7869186 / r7869187;
double r7869189 = log(r7869188);
double r7869190 = r7869186 * r7869189;
double r7869191 = z;
double r7869192 = r7869190 - r7869191;
return r7869192;
}
double f(double x, double y, double z) {
double r7869193 = x;
double r7869194 = cbrt(r7869193);
double r7869195 = r7869194 * r7869194;
double r7869196 = log(r7869195);
double r7869197 = r7869196 * r7869193;
double r7869198 = cbrt(r7869194);
double r7869199 = y;
double r7869200 = cbrt(r7869199);
double r7869201 = r7869198 / r7869200;
double r7869202 = log(r7869201);
double r7869203 = r7869202 + r7869202;
double r7869204 = r7869203 + r7869202;
double r7869205 = r7869204 * r7869193;
double r7869206 = z;
double r7869207 = r7869205 - r7869206;
double r7869208 = r7869197 + r7869207;
return r7869208;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 14.8 |
|---|---|
| Target | 7.7 |
| Herbie | 0.3 |
Initial program 14.8
rmApplied *-un-lft-identity14.8
Applied add-cube-cbrt14.8
Applied times-frac14.8
Applied log-prod4.7
Applied distribute-rgt-in4.7
Applied associate--l+4.7
rmApplied add-cube-cbrt4.7
Applied add-cube-cbrt4.7
Applied times-frac4.7
Applied log-prod0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019156 +o rules:numerics
(FPCore (x y z)
:name "Numeric.SpecFunctions.Extra:bd0 from math-functions-0.1.5.2"
:herbie-target
(if (< y 7.595077799083773e-308) (- (* x (log (/ x y))) z) (- (* x (- (log x) (log y))) z))
(- (* x (log (/ x y))) z))