\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 r517201 = x;
double r517202 = y;
double r517203 = r517201 + r517202;
double r517204 = z;
double r517205 = t;
double r517206 = r517204 - r517205;
double r517207 = r517206 * r517202;
double r517208 = a;
double r517209 = r517208 - r517205;
double r517210 = r517207 / r517209;
double r517211 = r517203 - r517210;
return r517211;
}
double f(double x, double y, double z, double t, double a) {
double r517212 = t;
double r517213 = -2.2415885201745266e+195;
bool r517214 = r517212 <= r517213;
double r517215 = x;
double r517216 = 1.0;
double r517217 = y;
double r517218 = a;
double r517219 = r517218 - r517212;
double r517220 = r517217 / r517219;
double r517221 = r517216 * r517220;
double r517222 = z;
double r517223 = r517212 - r517222;
double r517224 = r517215 + r517217;
double r517225 = fma(r517221, r517223, r517224);
double r517226 = r517214 ? r517215 : r517225;
return r517226;
}




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))))