x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;a \le -2.0356593442717544 \cdot 10^{-150}:\\
\;\;\;\;\mathsf{fma}\left(\left(z - t\right) \cdot \frac{\sqrt[3]{y - x} \cdot \sqrt[3]{y - x}}{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}}, \frac{\sqrt[3]{y - x}}{\sqrt[3]{a - t}}, x\right)\\
\mathbf{elif}\;a \le 8.42218082085157541 \cdot 10^{-190}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z, y - \frac{z \cdot y}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z - t}{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}} \cdot \frac{y - x}{\sqrt[3]{a - t}} + x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r605506 = x;
double r605507 = y;
double r605508 = r605507 - r605506;
double r605509 = z;
double r605510 = t;
double r605511 = r605509 - r605510;
double r605512 = r605508 * r605511;
double r605513 = a;
double r605514 = r605513 - r605510;
double r605515 = r605512 / r605514;
double r605516 = r605506 + r605515;
return r605516;
}
double f(double x, double y, double z, double t, double a) {
double r605517 = a;
double r605518 = -2.0356593442717544e-150;
bool r605519 = r605517 <= r605518;
double r605520 = z;
double r605521 = t;
double r605522 = r605520 - r605521;
double r605523 = y;
double r605524 = x;
double r605525 = r605523 - r605524;
double r605526 = cbrt(r605525);
double r605527 = r605526 * r605526;
double r605528 = r605517 - r605521;
double r605529 = cbrt(r605528);
double r605530 = r605529 * r605529;
double r605531 = r605527 / r605530;
double r605532 = r605522 * r605531;
double r605533 = r605526 / r605529;
double r605534 = fma(r605532, r605533, r605524);
double r605535 = 8.422180820851575e-190;
bool r605536 = r605517 <= r605535;
double r605537 = r605524 / r605521;
double r605538 = r605520 * r605523;
double r605539 = r605538 / r605521;
double r605540 = r605523 - r605539;
double r605541 = fma(r605537, r605520, r605540);
double r605542 = r605522 / r605530;
double r605543 = r605525 / r605529;
double r605544 = r605542 * r605543;
double r605545 = r605544 + r605524;
double r605546 = r605536 ? r605541 : r605545;
double r605547 = r605519 ? r605534 : r605546;
return r605547;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 24.8 |
|---|---|
| Target | 9.6 |
| Herbie | 11.0 |
if a < -2.0356593442717544e-150Initial program 24.3
Simplified12.7
rmApplied div-inv12.8
rmApplied fma-udef12.8
Simplified12.8
rmApplied add-cube-cbrt13.3
Applied add-cube-cbrt13.4
Applied times-frac13.4
Applied associate-*r*10.7
rmApplied fma-def10.7
if -2.0356593442717544e-150 < a < 8.422180820851575e-190Initial program 29.9
Simplified24.7
rmApplied div-inv24.8
rmApplied fma-udef24.8
Simplified24.7
Taylor expanded around inf 12.6
Simplified12.1
if 8.422180820851575e-190 < a Initial program 22.8
Simplified12.7
rmApplied div-inv12.8
rmApplied fma-udef12.8
Simplified12.8
rmApplied add-cube-cbrt13.2
Applied *-un-lft-identity13.2
Applied times-frac13.3
Applied associate-*r*10.9
Simplified10.9
Final simplification11.0
herbie shell --seed 2020065 +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))))