x \cdot \sqrt{y \cdot y - z \cdot z}\begin{array}{l}
\mathbf{if}\;y \le -2.794570820839950878036101099737855872471 \cdot 10^{-243}:\\
\;\;\;\;-x \cdot y\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}double f(double x, double y, double z) {
double r464502 = x;
double r464503 = y;
double r464504 = r464503 * r464503;
double r464505 = z;
double r464506 = r464505 * r464505;
double r464507 = r464504 - r464506;
double r464508 = sqrt(r464507);
double r464509 = r464502 * r464508;
return r464509;
}
double f(double x, double y, double __attribute__((unused)) z) {
double r464510 = y;
double r464511 = -2.794570820839951e-243;
bool r464512 = r464510 <= r464511;
double r464513 = x;
double r464514 = r464513 * r464510;
double r464515 = -r464514;
double r464516 = r464512 ? r464515 : r464514;
return r464516;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 25.0 |
|---|---|
| Target | 0.6 |
| Herbie | 0.7 |
if y < -2.794570820839951e-243Initial program 25.4
Taylor expanded around -inf 0.6
Simplified0.6
if -2.794570820839951e-243 < y Initial program 24.7
Taylor expanded around inf 0.9
Final simplification0.7
herbie shell --seed 2019306
(FPCore (x y z)
:name "Diagrams.TwoD.Apollonian:initialConfig from diagrams-contrib-1.3.0.5, B"
:precision binary64
:herbie-target
(if (< y 2.58160964882516951e-278) (- (* x y)) (* x (* (sqrt (+ y z)) (sqrt (- y z)))))
(* x (sqrt (- (* y y) (* z z)))))