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 r416379 = x;
double r416380 = y;
double r416381 = r416380 - r416379;
double r416382 = z;
double r416383 = t;
double r416384 = r416382 - r416383;
double r416385 = r416381 * r416384;
double r416386 = a;
double r416387 = r416386 - r416383;
double r416388 = r416385 / r416387;
double r416389 = r416379 + r416388;
return r416389;
}
double f(double x, double y, double z, double t, double a) {
double r416390 = a;
double r416391 = -5.181595524895995e-145;
bool r416392 = r416390 <= r416391;
double r416393 = z;
double r416394 = t;
double r416395 = r416393 - r416394;
double r416396 = y;
double r416397 = x;
double r416398 = r416396 - r416397;
double r416399 = cbrt(r416398);
double r416400 = r416399 * r416399;
double r416401 = r416390 - r416394;
double r416402 = cbrt(r416401);
double r416403 = r416402 * r416402;
double r416404 = r416400 / r416403;
double r416405 = r416395 * r416404;
double r416406 = r416399 / r416402;
double r416407 = r416405 * r416406;
double r416408 = r416407 + r416397;
double r416409 = 3.085625866310274e-197;
bool r416410 = r416390 <= r416409;
double r416411 = r416397 / r416394;
double r416412 = r416393 * r416396;
double r416413 = r416412 / r416394;
double r416414 = r416396 - r416413;
double r416415 = fma(r416411, r416393, r416414);
double r416416 = fabs(r416406);
double r416417 = r416395 * r416416;
double r416418 = sqrt(r416404);
double r416419 = r416417 * r416418;
double r416420 = r416419 * r416406;
double r416421 = r416420 + r416397;
double r416422 = r416410 ? r416415 : r416421;
double r416423 = r416392 ? r416408 : r416422;
return r416423;
}




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))))