\frac{x - y}{z - y} \cdot t\begin{array}{l}
\mathbf{if}\;\frac{x - y}{z - y} \le -5.297791397205154729856129555711534946183 \cdot 10^{-210} \lor \neg \left(\frac{x - y}{z - y} \le -0.0\right):\\
\;\;\;\;\frac{x - y}{z - y} \cdot t\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{\frac{z - y}{t}}\\
\end{array}double f(double x, double y, double z, double t) {
double r313254 = x;
double r313255 = y;
double r313256 = r313254 - r313255;
double r313257 = z;
double r313258 = r313257 - r313255;
double r313259 = r313256 / r313258;
double r313260 = t;
double r313261 = r313259 * r313260;
return r313261;
}
double f(double x, double y, double z, double t) {
double r313262 = x;
double r313263 = y;
double r313264 = r313262 - r313263;
double r313265 = z;
double r313266 = r313265 - r313263;
double r313267 = r313264 / r313266;
double r313268 = -5.297791397205155e-210;
bool r313269 = r313267 <= r313268;
double r313270 = -0.0;
bool r313271 = r313267 <= r313270;
double r313272 = !r313271;
bool r313273 = r313269 || r313272;
double r313274 = t;
double r313275 = r313267 * r313274;
double r313276 = r313266 / r313274;
double r313277 = r313264 / r313276;
double r313278 = r313273 ? r313275 : r313277;
return r313278;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.3 |
|---|---|
| Target | 2.3 |
| Herbie | 1.6 |
if (/ (- x y) (- z y)) < -5.297791397205155e-210 or -0.0 < (/ (- x y) (- z y)) Initial program 1.6
if -5.297791397205155e-210 < (/ (- x y) (- z y)) < -0.0Initial program 11.4
rmApplied div-inv11.4
Applied associate-*l*0.7
Simplified0.7
rmApplied clear-num0.7
rmApplied pow10.7
Applied pow10.7
Applied pow-prod-down0.7
Simplified0.6
Final simplification1.6
herbie shell --seed 2019326 +o rules:numerics
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))