x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;a \le -5.181595524895994673884436306821384479432 \cdot 10^{-145}:\\
\;\;\;\;\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}}\right) \cdot \frac{\sqrt[3]{y - x}}{\sqrt[3]{a - t}} + x\\
\mathbf{elif}\;a \le 3.085625866310274161423784322836746942828 \cdot 10^{-197}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z, y - \frac{z \cdot y}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(z - t\right) \cdot \left|\frac{\sqrt[3]{y - x}}{\sqrt[3]{a - t}}\right|\right) \cdot \sqrt{\frac{\sqrt[3]{y - x} \cdot \sqrt[3]{y - x}}{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}}}\right) \cdot \frac{\sqrt[3]{y - x}}{\sqrt[3]{a - t}} + x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r380247 = x;
double r380248 = y;
double r380249 = r380248 - r380247;
double r380250 = z;
double r380251 = t;
double r380252 = r380250 - r380251;
double r380253 = r380249 * r380252;
double r380254 = a;
double r380255 = r380254 - r380251;
double r380256 = r380253 / r380255;
double r380257 = r380247 + r380256;
return r380257;
}
double f(double x, double y, double z, double t, double a) {
double r380258 = a;
double r380259 = -5.181595524895995e-145;
bool r380260 = r380258 <= r380259;
double r380261 = z;
double r380262 = t;
double r380263 = r380261 - r380262;
double r380264 = y;
double r380265 = x;
double r380266 = r380264 - r380265;
double r380267 = cbrt(r380266);
double r380268 = r380267 * r380267;
double r380269 = r380258 - r380262;
double r380270 = cbrt(r380269);
double r380271 = r380270 * r380270;
double r380272 = r380268 / r380271;
double r380273 = r380263 * r380272;
double r380274 = r380267 / r380270;
double r380275 = r380273 * r380274;
double r380276 = r380275 + r380265;
double r380277 = 3.085625866310274e-197;
bool r380278 = r380258 <= r380277;
double r380279 = r380265 / r380262;
double r380280 = r380261 * r380264;
double r380281 = r380280 / r380262;
double r380282 = r380264 - r380281;
double r380283 = fma(r380279, r380261, r380282);
double r380284 = fabs(r380274);
double r380285 = r380263 * r380284;
double r380286 = sqrt(r380272);
double r380287 = r380285 * r380286;
double r380288 = r380287 * r380274;
double r380289 = r380288 + r380265;
double r380290 = r380278 ? r380283 : r380289;
double r380291 = r380260 ? r380276 : r380290;
return r380291;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 25.2 |
|---|---|
| Target | 9.6 |
| Herbie | 10.7 |
if a < -5.181595524895995e-145Initial program 24.0
Simplified12.1
rmApplied div-inv12.1
rmApplied fma-udef12.2
Simplified12.1
rmApplied add-cube-cbrt12.6
Applied add-cube-cbrt12.8
Applied times-frac12.8
Applied associate-*r*10.0
if -5.181595524895995e-145 < a < 3.085625866310274e-197Initial program 31.0
Simplified26.6
rmApplied div-inv26.7
rmApplied fma-udef26.7
Simplified26.6
Taylor expanded around inf 11.6
Simplified11.4
if 3.085625866310274e-197 < a Initial program 23.5
Simplified12.8
rmApplied div-inv12.9
rmApplied fma-udef12.9
Simplified12.9
rmApplied add-cube-cbrt13.4
Applied add-cube-cbrt13.5
Applied times-frac13.5
Applied associate-*r*10.8
rmApplied add-sqr-sqrt10.8
Applied associate-*r*10.8
Simplified10.8
Final simplification10.7
herbie shell --seed 2019323 +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))))