x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;a \le -1.4075801034894206 \cdot 10^{-160}:\\
\;\;\;\;\left(\left(y - x\right) \cdot \frac{\sqrt[3]{z - t}}{\frac{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}}{\sqrt[3]{\sqrt[3]{z - t} \cdot \sqrt[3]{z - t}}}}\right) \cdot \frac{\sqrt[3]{z - t}}{\frac{\sqrt[3]{a - t}}{\sqrt[3]{\sqrt[3]{z - t}}}} + x\\
\mathbf{elif}\;a \le 3.1595740263796063 \cdot 10^{-93}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z, y - \frac{z \cdot y}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z - t}{a - t} + x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r623498 = x;
double r623499 = y;
double r623500 = r623499 - r623498;
double r623501 = z;
double r623502 = t;
double r623503 = r623501 - r623502;
double r623504 = r623500 * r623503;
double r623505 = a;
double r623506 = r623505 - r623502;
double r623507 = r623504 / r623506;
double r623508 = r623498 + r623507;
return r623508;
}
double f(double x, double y, double z, double t, double a) {
double r623509 = a;
double r623510 = -1.4075801034894206e-160;
bool r623511 = r623509 <= r623510;
double r623512 = y;
double r623513 = x;
double r623514 = r623512 - r623513;
double r623515 = z;
double r623516 = t;
double r623517 = r623515 - r623516;
double r623518 = cbrt(r623517);
double r623519 = r623509 - r623516;
double r623520 = cbrt(r623519);
double r623521 = r623520 * r623520;
double r623522 = r623518 * r623518;
double r623523 = cbrt(r623522);
double r623524 = r623521 / r623523;
double r623525 = r623518 / r623524;
double r623526 = r623514 * r623525;
double r623527 = cbrt(r623518);
double r623528 = r623520 / r623527;
double r623529 = r623518 / r623528;
double r623530 = r623526 * r623529;
double r623531 = r623530 + r623513;
double r623532 = 3.1595740263796063e-93;
bool r623533 = r623509 <= r623532;
double r623534 = r623513 / r623516;
double r623535 = r623515 * r623512;
double r623536 = r623535 / r623516;
double r623537 = r623512 - r623536;
double r623538 = fma(r623534, r623515, r623537);
double r623539 = r623517 / r623519;
double r623540 = r623514 * r623539;
double r623541 = r623540 + r623513;
double r623542 = r623533 ? r623538 : r623541;
double r623543 = r623511 ? r623531 : r623542;
return r623543;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 24.0 |
|---|---|
| Target | 9.2 |
| Herbie | 10.6 |
if a < -1.4075801034894206e-160Initial program 22.8
Simplified11.8
rmApplied fma-udef11.8
rmApplied div-inv11.9
Applied associate-*l*9.4
Simplified9.3
rmApplied add-cube-cbrt10.0
Applied associate-/l*10.0
rmApplied add-cube-cbrt10.0
Applied cbrt-prod10.0
Applied add-cube-cbrt10.0
Applied times-frac10.0
Applied times-frac10.0
Applied associate-*r*9.6
if -1.4075801034894206e-160 < a < 3.1595740263796063e-93Initial program 28.8
Simplified24.7
rmApplied fma-udef24.7
rmApplied div-inv24.8
Applied associate-*l*19.4
Simplified19.4
Taylor expanded around inf 15.3
Simplified14.9
if 3.1595740263796063e-93 < a Initial program 22.0
Simplified10.9
rmApplied fma-udef10.9
rmApplied div-inv11.0
Applied associate-*l*8.6
Simplified8.5
Final simplification10.6
herbie shell --seed 2020035 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))