x \cdot \sqrt{y \cdot y - z \cdot z}\begin{array}{l}
\mathbf{if}\;y \le -5.65053048987856224 \cdot 10^{-263}:\\
\;\;\;\;x \cdot \left(-1 \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}double code(double x, double y, double z) {
return ((double) (x * ((double) sqrt(((double) (((double) (y * y)) - ((double) (z * z))))))));
}
double code(double x, double y, double z) {
double VAR;
if ((y <= -5.650530489878562e-263)) {
VAR = ((double) (x * ((double) (-1.0 * y))));
} else {
VAR = ((double) (x * y));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 25.2 |
|---|---|
| Target | 0.6 |
| Herbie | 0.7 |
if y < -5.65053048987856224e-263Initial program 25.1
Taylor expanded around -inf 0.6
if -5.65053048987856224e-263 < y Initial program 25.2
Taylor expanded around inf 0.8
Final simplification0.7
herbie shell --seed 2020163
(FPCore (x y z)
:name "Diagrams.TwoD.Apollonian:initialConfig from diagrams-contrib-1.3.0.5, B"
:precision binary64
:herbie-target
(if (< y 2.5816096488251695e-278) (neg (* x y)) (* x (* (sqrt (+ y z)) (sqrt (- y z)))))
(* x (sqrt (- (* y y) (* z z)))))