x + y \cdot \frac{z - t}{a - t}\begin{array}{l}
\mathbf{if}\;y \le -264285570891771721809920 \lor \neg \left(y \le 7048436.448544465936720371246337890625\right):\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z}{a - t} - \frac{t}{a - t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-\frac{t}{a - t}, y, \frac{y \cdot z}{a - t}\right) + x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r700502 = x;
double r700503 = y;
double r700504 = z;
double r700505 = t;
double r700506 = r700504 - r700505;
double r700507 = a;
double r700508 = r700507 - r700505;
double r700509 = r700506 / r700508;
double r700510 = r700503 * r700509;
double r700511 = r700502 + r700510;
return r700511;
}
double f(double x, double y, double z, double t, double a) {
double r700512 = y;
double r700513 = -2.6428557089177172e+23;
bool r700514 = r700512 <= r700513;
double r700515 = 7048436.448544466;
bool r700516 = r700512 <= r700515;
double r700517 = !r700516;
bool r700518 = r700514 || r700517;
double r700519 = z;
double r700520 = a;
double r700521 = t;
double r700522 = r700520 - r700521;
double r700523 = r700519 / r700522;
double r700524 = r700521 / r700522;
double r700525 = r700523 - r700524;
double r700526 = x;
double r700527 = fma(r700512, r700525, r700526);
double r700528 = -r700524;
double r700529 = r700512 * r700519;
double r700530 = r700529 / r700522;
double r700531 = fma(r700528, r700512, r700530);
double r700532 = r700531 + r700526;
double r700533 = r700518 ? r700527 : r700532;
return r700533;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 1.3 |
|---|---|
| Target | 0.5 |
| Herbie | 0.4 |
if y < -2.6428557089177172e+23 or 7048436.448544466 < y Initial program 0.6
Simplified0.6
rmApplied div-sub0.6
if -2.6428557089177172e+23 < y < 7048436.448544466Initial program 1.8
Simplified1.8
rmApplied div-sub1.8
rmApplied add-cube-cbrt1.9
Applied *-un-lft-identity1.9
Applied add-cube-cbrt2.0
Applied times-frac2.0
Applied prod-diff2.0
Simplified2.0
Simplified2.0
rmApplied fma-udef2.0
Simplified0.2
Final simplification0.4
herbie shell --seed 2019354 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< y -8.508084860551241e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.894426862792089e-49) (+ x (* (* y (- z t)) (/ 1 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))
(+ x (* y (/ (- z t) (- a t)))))