\frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2}0.5 \cdot \left(\left(y + x \cdot \frac{x}{y}\right) - \left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \left(\sqrt[3]{z} \cdot \frac{z}{y}\right)\right)double f(double x, double y, double z) {
double r660788 = x;
double r660789 = r660788 * r660788;
double r660790 = y;
double r660791 = r660790 * r660790;
double r660792 = r660789 + r660791;
double r660793 = z;
double r660794 = r660793 * r660793;
double r660795 = r660792 - r660794;
double r660796 = 2.0;
double r660797 = r660790 * r660796;
double r660798 = r660795 / r660797;
return r660798;
}
double f(double x, double y, double z) {
double r660799 = 0.5;
double r660800 = y;
double r660801 = x;
double r660802 = r660801 / r660800;
double r660803 = r660801 * r660802;
double r660804 = r660800 + r660803;
double r660805 = z;
double r660806 = cbrt(r660805);
double r660807 = r660806 * r660806;
double r660808 = r660805 / r660800;
double r660809 = r660806 * r660808;
double r660810 = r660807 * r660809;
double r660811 = r660804 - r660810;
double r660812 = r660799 * r660811;
return r660812;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 28.6 |
|---|---|
| Target | 0.2 |
| Herbie | 0.4 |
Initial program 28.6
Taylor expanded around 0 12.2
Simplified12.2
rmApplied *-un-lft-identity12.2
Applied add-sqr-sqrt38.5
Applied unpow-prod-down38.5
Applied times-frac35.9
Simplified35.9
Simplified6.7
rmApplied *-un-lft-identity6.7
Applied add-sqr-sqrt35.8
Applied unpow-prod-down35.8
Applied times-frac32.5
Simplified32.4
Simplified0.1
rmApplied add-cube-cbrt0.4
Applied associate-*l*0.4
Final simplification0.4
herbie shell --seed 2020021
(FPCore (x y z)
:name "Diagrams.TwoD.Apollonian:initialConfig from diagrams-contrib-1.3.0.5, A"
:precision binary64
:herbie-target
(- (* y 0.5) (* (* (/ 0.5 y) (+ z x)) (- z x)))
(/ (- (+ (* x x) (* y y)) (* z z)) (* y 2)))