x + \frac{y \cdot \left(z - t\right)}{a}\begin{array}{l}
\mathbf{if}\;a \le -3.890834236040981319165798918232586072344 \cdot 10^{-33} \lor \neg \left(a \le 8.531444755159096136469695842813758583876 \cdot 10^{-75}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a} + x\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \frac{\left(z - t\right) \cdot y}{a} + x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r271560 = x;
double r271561 = y;
double r271562 = z;
double r271563 = t;
double r271564 = r271562 - r271563;
double r271565 = r271561 * r271564;
double r271566 = a;
double r271567 = r271565 / r271566;
double r271568 = r271560 + r271567;
return r271568;
}
double f(double x, double y, double z, double t, double a) {
double r271569 = a;
double r271570 = -3.890834236040981e-33;
bool r271571 = r271569 <= r271570;
double r271572 = 8.531444755159096e-75;
bool r271573 = r271569 <= r271572;
double r271574 = !r271573;
bool r271575 = r271571 || r271574;
double r271576 = y;
double r271577 = z;
double r271578 = t;
double r271579 = r271577 - r271578;
double r271580 = r271579 / r271569;
double r271581 = r271576 * r271580;
double r271582 = x;
double r271583 = r271581 + r271582;
double r271584 = 1.0;
double r271585 = r271579 * r271576;
double r271586 = r271585 / r271569;
double r271587 = r271584 * r271586;
double r271588 = r271587 + r271582;
double r271589 = r271575 ? r271583 : r271588;
return r271589;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 6.1 |
|---|---|
| Target | 0.7 |
| Herbie | 0.9 |
if a < -3.890834236040981e-33 or 8.531444755159096e-75 < a Initial program 8.2
Simplified1.5
rmApplied fma-udef1.5
rmApplied div-inv1.5
Applied associate-*l*0.9
Simplified0.9
if -3.890834236040981e-33 < a < 8.531444755159096e-75Initial program 1.0
Simplified4.0
rmApplied fma-udef4.0
rmApplied *-un-lft-identity4.0
Applied *-un-lft-identity4.0
Applied times-frac4.0
Applied associate-*l*4.0
Simplified1.0
Final simplification0.9
herbie shell --seed 2019356 +o rules:numerics
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
:precision binary64
:herbie-target
(if (< y -1.0761266216389975e-10) (+ x (/ 1 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (+ x (/ (* y (- z t)) a)) (+ x (/ y (/ a (- z t))))))
(+ x (/ (* y (- z t)) a)))