x \cdot \sqrt{y \cdot y - z \cdot z}\begin{array}{l}
\mathbf{if}\;y \le -5.361090024927945737200223454493579227102 \cdot 10^{-259}:\\
\;\;\;\;\left(-x\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}double f(double x, double y, double z) {
double r30153505 = x;
double r30153506 = y;
double r30153507 = r30153506 * r30153506;
double r30153508 = z;
double r30153509 = r30153508 * r30153508;
double r30153510 = r30153507 - r30153509;
double r30153511 = sqrt(r30153510);
double r30153512 = r30153505 * r30153511;
return r30153512;
}
double f(double x, double y, double __attribute__((unused)) z) {
double r30153513 = y;
double r30153514 = -5.361090024927946e-259;
bool r30153515 = r30153513 <= r30153514;
double r30153516 = x;
double r30153517 = -r30153516;
double r30153518 = r30153517 * r30153513;
double r30153519 = r30153516 * r30153513;
double r30153520 = r30153515 ? r30153518 : r30153519;
return r30153520;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 24.4 |
|---|---|
| Target | 0.6 |
| Herbie | 0.8 |
if y < -5.361090024927946e-259Initial program 24.2
Taylor expanded around -inf 0.6
Simplified0.6
if -5.361090024927946e-259 < y Initial program 24.6
Taylor expanded around inf 1.0
Final simplification0.8
herbie shell --seed 2019169
(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)))))