\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;a \le -2.073980726117884802107450590791436932533 \cdot 10^{-225} \lor \neg \left(a \le 1.563379921336354695015274590614129069856 \cdot 10^{-22}\right):\\
\;\;\;\;\frac{t - z}{a - t} \cdot y + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot y}{t} + x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r438327 = x;
double r438328 = y;
double r438329 = r438327 + r438328;
double r438330 = z;
double r438331 = t;
double r438332 = r438330 - r438331;
double r438333 = r438332 * r438328;
double r438334 = a;
double r438335 = r438334 - r438331;
double r438336 = r438333 / r438335;
double r438337 = r438329 - r438336;
return r438337;
}
double f(double x, double y, double z, double t, double a) {
double r438338 = a;
double r438339 = -2.0739807261178848e-225;
bool r438340 = r438338 <= r438339;
double r438341 = 1.5633799213363547e-22;
bool r438342 = r438338 <= r438341;
double r438343 = !r438342;
bool r438344 = r438340 || r438343;
double r438345 = t;
double r438346 = z;
double r438347 = r438345 - r438346;
double r438348 = r438338 - r438345;
double r438349 = r438347 / r438348;
double r438350 = y;
double r438351 = r438349 * r438350;
double r438352 = x;
double r438353 = r438352 + r438350;
double r438354 = r438351 + r438353;
double r438355 = r438346 * r438350;
double r438356 = r438355 / r438345;
double r438357 = r438356 + r438352;
double r438358 = r438344 ? r438354 : r438357;
return r438358;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 16.2 |
|---|---|
| Target | 8.3 |
| Herbie | 9.6 |
if a < -2.0739807261178848e-225 or 1.5633799213363547e-22 < a Initial program 14.7
Simplified8.4
rmApplied fma-udef8.4
if -2.0739807261178848e-225 < a < 1.5633799213363547e-22Initial program 19.8
Simplified19.5
rmApplied fma-udef19.5
rmApplied add-cube-cbrt19.8
Applied associate-/r*19.8
rmApplied add-cube-cbrt19.8
Applied cbrt-prod19.8
Applied add-cube-cbrt19.9
Applied times-frac19.8
Applied times-frac19.9
Applied associate-*l*17.1
Simplified17.2
Taylor expanded around inf 12.6
Final simplification9.6
herbie shell --seed 2019325 +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))))