x \cdot \sqrt{y \cdot y - z \cdot z}\begin{array}{l}
\mathbf{if}\;y \le -3.0360529674537215 \cdot 10^{-253}:\\
\;\;\;\;\left(-x\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}double f(double x, double y, double z) {
double r45590358 = x;
double r45590359 = y;
double r45590360 = r45590359 * r45590359;
double r45590361 = z;
double r45590362 = r45590361 * r45590361;
double r45590363 = r45590360 - r45590362;
double r45590364 = sqrt(r45590363);
double r45590365 = r45590358 * r45590364;
return r45590365;
}
double f(double x, double y, double __attribute__((unused)) z) {
double r45590366 = y;
double r45590367 = -3.0360529674537215e-253;
bool r45590368 = r45590366 <= r45590367;
double r45590369 = x;
double r45590370 = -r45590369;
double r45590371 = r45590370 * r45590366;
double r45590372 = r45590369 * r45590366;
double r45590373 = r45590368 ? r45590371 : r45590372;
return r45590373;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 23.5 |
|---|---|
| Target | 0.5 |
| Herbie | 0.8 |
if y < -3.0360529674537215e-253Initial program 23.3
Taylor expanded around -inf 0.5
Simplified0.5
if -3.0360529674537215e-253 < y Initial program 23.7
Taylor expanded around inf 1.0
Final simplification0.8
herbie shell --seed 2019158
(FPCore (x y z)
:name "Diagrams.TwoD.Apollonian:initialConfig from diagrams-contrib-1.3.0.5, B"
:herbie-target
(if (< y 2.5816096488251695e-278) (- (* x y)) (* x (* (sqrt (+ y z)) (sqrt (- y z)))))
(* x (sqrt (- (* y y) (* z z)))))