x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;x \le 1.8634401694288545 \cdot 10^{246}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\
\mathbf{elif}\;x \le 5.34251970619663231 \cdot 10^{284}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z, y - \frac{z \cdot y}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \left(\sqrt[3]{z - t} \cdot \sqrt[3]{z - t}\right) \cdot \frac{\sqrt[3]{z - t}}{a - t}, x\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r2101175 = x;
double r2101176 = y;
double r2101177 = r2101176 - r2101175;
double r2101178 = z;
double r2101179 = t;
double r2101180 = r2101178 - r2101179;
double r2101181 = r2101177 * r2101180;
double r2101182 = a;
double r2101183 = r2101182 - r2101179;
double r2101184 = r2101181 / r2101183;
double r2101185 = r2101175 + r2101184;
return r2101185;
}
double f(double x, double y, double z, double t, double a) {
double r2101186 = x;
double r2101187 = 1.8634401694288545e+246;
bool r2101188 = r2101186 <= r2101187;
double r2101189 = y;
double r2101190 = r2101189 - r2101186;
double r2101191 = z;
double r2101192 = t;
double r2101193 = r2101191 - r2101192;
double r2101194 = a;
double r2101195 = r2101194 - r2101192;
double r2101196 = r2101193 / r2101195;
double r2101197 = fma(r2101190, r2101196, r2101186);
double r2101198 = 5.342519706196632e+284;
bool r2101199 = r2101186 <= r2101198;
double r2101200 = r2101186 / r2101192;
double r2101201 = r2101191 * r2101189;
double r2101202 = r2101201 / r2101192;
double r2101203 = r2101189 - r2101202;
double r2101204 = fma(r2101200, r2101191, r2101203);
double r2101205 = cbrt(r2101193);
double r2101206 = r2101205 * r2101205;
double r2101207 = r2101205 / r2101195;
double r2101208 = r2101206 * r2101207;
double r2101209 = fma(r2101190, r2101208, r2101186);
double r2101210 = r2101199 ? r2101204 : r2101209;
double r2101211 = r2101188 ? r2101197 : r2101210;
return r2101211;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 24.7 |
|---|---|
| Target | 9.0 |
| Herbie | 12.2 |
if x < 1.8634401694288545e+246Initial program 23.8
Simplified13.9
rmApplied fma-udef14.0
rmApplied div-inv14.0
Applied associate-*l*11.0
Simplified11.0
rmApplied fma-def11.0
if 1.8634401694288545e+246 < x < 5.342519706196632e+284Initial program 43.6
Simplified28.4
rmApplied fma-udef28.6
rmApplied div-inv28.7
Applied associate-*l*24.5
Simplified24.4
Taylor expanded around inf 48.0
Simplified44.3
if 5.342519706196632e+284 < x Initial program 47.3
Simplified30.7
rmApplied fma-udef30.7
rmApplied div-inv30.8
Applied associate-*l*25.7
Simplified25.7
rmApplied fma-def25.6
rmApplied *-un-lft-identity25.6
Applied add-cube-cbrt25.5
Applied times-frac25.6
Simplified25.6
Final simplification12.2
herbie shell --seed 2020018 +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))))