x \cdot \sqrt{y \cdot y - z \cdot z}\begin{array}{l}
\mathbf{if}\;y \le -1.650359340362325641012254610154623215362 \cdot 10^{-234}:\\
\;\;\;\;-x \cdot y\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}double f(double x, double y, double z) {
double r551395 = x;
double r551396 = y;
double r551397 = r551396 * r551396;
double r551398 = z;
double r551399 = r551398 * r551398;
double r551400 = r551397 - r551399;
double r551401 = sqrt(r551400);
double r551402 = r551395 * r551401;
return r551402;
}
double f(double x, double y, double __attribute__((unused)) z) {
double r551403 = y;
double r551404 = -1.6503593403623256e-234;
bool r551405 = r551403 <= r551404;
double r551406 = x;
double r551407 = r551406 * r551403;
double r551408 = -r551407;
double r551409 = r551405 ? r551408 : r551407;
return r551409;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 24.8 |
|---|---|
| Target | 0.6 |
| Herbie | 0.9 |
if y < -1.6503593403623256e-234Initial program 24.9
Taylor expanded around -inf 0.5
Simplified0.5
if -1.6503593403623256e-234 < y Initial program 24.7
Taylor expanded around inf 1.4
Final simplification0.9
herbie shell --seed 2019179
(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)))))