\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;a \le -1.0092107391768066 \cdot 10^{-119}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a - t}, t - z, y + x\right)\\
\mathbf{elif}\;a \le 1.0196092676127147 \cdot 10^{-123}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z}{t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{a - t}{t - z}} + \left(y + x\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r25731652 = x;
double r25731653 = y;
double r25731654 = r25731652 + r25731653;
double r25731655 = z;
double r25731656 = t;
double r25731657 = r25731655 - r25731656;
double r25731658 = r25731657 * r25731653;
double r25731659 = a;
double r25731660 = r25731659 - r25731656;
double r25731661 = r25731658 / r25731660;
double r25731662 = r25731654 - r25731661;
return r25731662;
}
double f(double x, double y, double z, double t, double a) {
double r25731663 = a;
double r25731664 = -1.0092107391768066e-119;
bool r25731665 = r25731663 <= r25731664;
double r25731666 = y;
double r25731667 = t;
double r25731668 = r25731663 - r25731667;
double r25731669 = r25731666 / r25731668;
double r25731670 = z;
double r25731671 = r25731667 - r25731670;
double r25731672 = x;
double r25731673 = r25731666 + r25731672;
double r25731674 = fma(r25731669, r25731671, r25731673);
double r25731675 = 1.0196092676127147e-123;
bool r25731676 = r25731663 <= r25731675;
double r25731677 = r25731670 / r25731667;
double r25731678 = fma(r25731666, r25731677, r25731672);
double r25731679 = r25731668 / r25731671;
double r25731680 = r25731666 / r25731679;
double r25731681 = r25731680 + r25731673;
double r25731682 = r25731676 ? r25731678 : r25731681;
double r25731683 = r25731665 ? r25731674 : r25731682;
return r25731683;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 16.0 |
|---|---|
| Target | 8.1 |
| Herbie | 8.4 |
if a < -1.0092107391768066e-119Initial program 14.2
Simplified7.5
rmApplied div-inv7.5
rmApplied fma-udef7.5
Simplified7.4
rmApplied associate-/r/8.2
Applied fma-def8.1
if -1.0092107391768066e-119 < a < 1.0196092676127147e-123Initial program 19.8
Simplified19.1
rmApplied div-inv19.1
Taylor expanded around inf 10.3
Simplified9.1
if 1.0196092676127147e-123 < a Initial program 14.7
Simplified8.2
rmApplied div-inv8.2
rmApplied fma-udef8.2
Simplified8.2
Final simplification8.4
herbie shell --seed 2019163 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
: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))))