x \cdot \sqrt{y \cdot y - z \cdot z}\begin{array}{l}
\mathbf{if}\;y \le -7.287557259675908303240197014885371553978 \cdot 10^{-253}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}double f(double x, double y, double z) {
double r513655 = x;
double r513656 = y;
double r513657 = r513656 * r513656;
double r513658 = z;
double r513659 = r513658 * r513658;
double r513660 = r513657 - r513659;
double r513661 = sqrt(r513660);
double r513662 = r513655 * r513661;
return r513662;
}
double f(double x, double y, double __attribute__((unused)) z) {
double r513663 = y;
double r513664 = -7.287557259675908e-253;
bool r513665 = r513663 <= r513664;
double r513666 = x;
double r513667 = -r513663;
double r513668 = r513666 * r513667;
double r513669 = r513666 * r513663;
double r513670 = r513665 ? r513668 : r513669;
return r513670;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 24.7 |
|---|---|
| Target | 0.5 |
| Herbie | 0.7 |
if y < -7.287557259675908e-253Initial program 24.7
Taylor expanded around -inf 0.5
Simplified0.5
if -7.287557259675908e-253 < y Initial program 24.8
Taylor expanded around inf 0.9
Final simplification0.7
herbie shell --seed 2019208 +o rules:numerics
(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)))))