\frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2}0.5 \cdot \left(\left(y + \left(\sqrt[3]{x \cdot \frac{x}{y}} \cdot \sqrt[3]{x \cdot \frac{x}{y}}\right) \cdot \sqrt[3]{x \cdot \frac{x}{y}}\right) - z \cdot \frac{z}{y}\right)double f(double x, double y, double z) {
double r676117 = x;
double r676118 = r676117 * r676117;
double r676119 = y;
double r676120 = r676119 * r676119;
double r676121 = r676118 + r676120;
double r676122 = z;
double r676123 = r676122 * r676122;
double r676124 = r676121 - r676123;
double r676125 = 2.0;
double r676126 = r676119 * r676125;
double r676127 = r676124 / r676126;
return r676127;
}
double f(double x, double y, double z) {
double r676128 = 0.5;
double r676129 = y;
double r676130 = x;
double r676131 = r676130 / r676129;
double r676132 = r676130 * r676131;
double r676133 = cbrt(r676132);
double r676134 = r676133 * r676133;
double r676135 = r676134 * r676133;
double r676136 = r676129 + r676135;
double r676137 = z;
double r676138 = r676137 / r676129;
double r676139 = r676137 * r676138;
double r676140 = r676136 - r676139;
double r676141 = r676128 * r676140;
return r676141;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 28.9 |
|---|---|
| Target | 0.2 |
| Herbie | 0.4 |
Initial program 28.9
Taylor expanded around 0 12.6
Simplified12.6
rmApplied *-un-lft-identity12.6
Applied add-sqr-sqrt38.9
Applied unpow-prod-down38.9
Applied times-frac36.0
Simplified35.9
Simplified6.8
rmApplied *-un-lft-identity6.8
Applied add-sqr-sqrt35.2
Applied unpow-prod-down35.2
Applied times-frac31.7
Simplified31.6
Simplified0.1
rmApplied add-cube-cbrt0.4
Final simplification0.4
herbie shell --seed 2020083
(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)))