\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;t \le -2.2415885201745266 \cdot 10^{195}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 \cdot \frac{y}{a - t}, t - z, x + y\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r534645 = x;
double r534646 = y;
double r534647 = r534645 + r534646;
double r534648 = z;
double r534649 = t;
double r534650 = r534648 - r534649;
double r534651 = r534650 * r534646;
double r534652 = a;
double r534653 = r534652 - r534649;
double r534654 = r534651 / r534653;
double r534655 = r534647 - r534654;
return r534655;
}
double f(double x, double y, double z, double t, double a) {
double r534656 = t;
double r534657 = -2.2415885201745266e+195;
bool r534658 = r534656 <= r534657;
double r534659 = x;
double r534660 = 1.0;
double r534661 = y;
double r534662 = a;
double r534663 = r534662 - r534656;
double r534664 = r534661 / r534663;
double r534665 = r534660 * r534664;
double r534666 = z;
double r534667 = r534656 - r534666;
double r534668 = r534659 + r534661;
double r534669 = fma(r534665, r534667, r534668);
double r534670 = r534658 ? r534659 : r534669;
return r534670;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 17.0 |
|---|---|
| Target | 8.5 |
| Herbie | 11.5 |
if t < -2.2415885201745266e+195Initial program 33.6
Simplified23.8
Taylor expanded around 0 17.9
if -2.2415885201745266e+195 < t Initial program 15.1
Simplified10.8
rmApplied clear-num10.8
rmApplied *-un-lft-identity10.8
Applied *-un-lft-identity10.8
Applied times-frac10.8
Applied add-cube-cbrt10.8
Applied times-frac10.8
Simplified10.8
Simplified10.8
Final simplification11.5
herbie shell --seed 2020036 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-07) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))