x + y \cdot \frac{z - t}{a - t}\begin{array}{l}
\mathbf{if}\;\frac{z - t}{a - t} \le -7.558343828768458999521828437649306587911 \cdot 10^{262}:\\
\;\;\;\;\left(z - t\right) \cdot \left(y \cdot \frac{1}{a - t}\right) + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y, x\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r484394 = x;
double r484395 = y;
double r484396 = z;
double r484397 = t;
double r484398 = r484396 - r484397;
double r484399 = a;
double r484400 = r484399 - r484397;
double r484401 = r484398 / r484400;
double r484402 = r484395 * r484401;
double r484403 = r484394 + r484402;
return r484403;
}
double f(double x, double y, double z, double t, double a) {
double r484404 = z;
double r484405 = t;
double r484406 = r484404 - r484405;
double r484407 = a;
double r484408 = r484407 - r484405;
double r484409 = r484406 / r484408;
double r484410 = -7.558343828768459e+262;
bool r484411 = r484409 <= r484410;
double r484412 = y;
double r484413 = 1.0;
double r484414 = r484413 / r484408;
double r484415 = r484412 * r484414;
double r484416 = r484406 * r484415;
double r484417 = x;
double r484418 = r484416 + r484417;
double r484419 = fma(r484409, r484412, r484417);
double r484420 = r484411 ? r484418 : r484419;
return r484420;
}




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.3 |
| Herbie | 0.7 |
if (/ (- z t) (- a t)) < -7.558343828768459e+262Initial program 34.9
Simplified34.9
rmApplied div-inv34.9
rmApplied add-cube-cbrt35.3
Applied associate-*r*35.2
rmApplied fma-udef35.2
Simplified0.3
if -7.558343828768459e+262 < (/ (- z t) (- a t)) Initial program 0.7
Simplified0.7
Final simplification0.7
herbie shell --seed 2019326 +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)))))