x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;t \le -2.575384619930811018125252150797882880606 \cdot 10^{227}:\\
\;\;\;\;\frac{x}{t} \cdot z - \left(\frac{z}{t} \cdot y - y\right)\\
\mathbf{elif}\;t \le 8.293359549117060522486462892699697431159 \cdot 10^{222}:\\
\;\;\;\;x + \sqrt[3]{\frac{z - t}{a - t}} \cdot \left(\left(\sqrt[3]{\frac{z - t}{a - t}} \cdot \left(y - x\right)\right) \cdot \sqrt[3]{\frac{z - t}{a - t}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y + \frac{x}{\frac{t}{z}}\right) - \frac{z}{\frac{t}{y}}\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r513954 = x;
double r513955 = y;
double r513956 = r513955 - r513954;
double r513957 = z;
double r513958 = t;
double r513959 = r513957 - r513958;
double r513960 = r513956 * r513959;
double r513961 = a;
double r513962 = r513961 - r513958;
double r513963 = r513960 / r513962;
double r513964 = r513954 + r513963;
return r513964;
}
double f(double x, double y, double z, double t, double a) {
double r513965 = t;
double r513966 = -2.575384619930811e+227;
bool r513967 = r513965 <= r513966;
double r513968 = x;
double r513969 = r513968 / r513965;
double r513970 = z;
double r513971 = r513969 * r513970;
double r513972 = r513970 / r513965;
double r513973 = y;
double r513974 = r513972 * r513973;
double r513975 = r513974 - r513973;
double r513976 = r513971 - r513975;
double r513977 = 8.29335954911706e+222;
bool r513978 = r513965 <= r513977;
double r513979 = r513970 - r513965;
double r513980 = a;
double r513981 = r513980 - r513965;
double r513982 = r513979 / r513981;
double r513983 = cbrt(r513982);
double r513984 = r513973 - r513968;
double r513985 = r513983 * r513984;
double r513986 = r513985 * r513983;
double r513987 = r513983 * r513986;
double r513988 = r513968 + r513987;
double r513989 = r513965 / r513970;
double r513990 = r513968 / r513989;
double r513991 = r513973 + r513990;
double r513992 = r513965 / r513973;
double r513993 = r513970 / r513992;
double r513994 = r513991 - r513993;
double r513995 = r513978 ? r513988 : r513994;
double r513996 = r513967 ? r513976 : r513995;
return r513996;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.9 |
|---|---|
| Target | 9.4 |
| Herbie | 10.5 |
if t < -2.575384619930811e+227Initial program 51.6
Simplified32.1
rmApplied div-inv32.2
Applied associate-*l*25.4
Simplified25.3
rmApplied add-cube-cbrt25.5
Applied associate-*r*25.5
Simplified25.5
Taylor expanded around inf 23.2
Simplified13.7
if -2.575384619930811e+227 < t < 8.29335954911706e+222Initial program 19.7
Simplified11.8
rmApplied div-inv11.9
Applied associate-*l*9.6
Simplified9.5
rmApplied add-cube-cbrt10.0
Applied associate-*r*10.0
Simplified10.0
if 8.29335954911706e+222 < t Initial program 51.5
Simplified32.7
rmApplied div-inv32.7
Applied associate-*l*26.6
Simplified26.5
rmApplied add-cube-cbrt26.7
Applied associate-*r*26.7
Simplified26.7
rmApplied add-cube-cbrt26.8
Applied *-un-lft-identity26.8
Applied times-frac26.8
Applied cbrt-prod27.1
Taylor expanded around inf 22.7
Simplified12.8
Final simplification10.5
herbie shell --seed 2019195
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:herbie-target
(if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))