x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\begin{array}{l}
\mathbf{if}\;z \le -2.28480809319162867 \cdot 10^{173} \lor \neg \left(z \le 1.41772240633504955 \cdot 10^{216}\right):\\
\;\;\;\;\mathsf{fma}\left(y, \frac{x}{z} - \frac{t}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{a - z}{y - z}}{t - x}} + x\\
\end{array}double code(double x, double y, double z, double t, double a) {
return (x + (((y - z) * (t - x)) / (a - z)));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((z <= -2.2848080931916287e+173) || !(z <= 1.4177224063350496e+216))) {
VAR = fma(y, ((x / z) - (t / z)), t);
} else {
VAR = ((1.0 / (((a - z) / (y - z)) / (t - x))) + x);
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.5 |
|---|---|
| Target | 11.7 |
| Herbie | 9.3 |
if z < -2.2848080931916287e+173 or 1.4177224063350496e+216 < z Initial program 50.0
Simplified22.6
Taylor expanded around inf 22.8
Simplified12.5
if -2.2848080931916287e+173 < z < 1.4177224063350496e+216Initial program 17.9
Simplified8.5
rmApplied clear-num8.5
rmApplied fma-udef8.5
Simplified8.4
rmApplied clear-num8.4
Final simplification9.3
herbie shell --seed 2020102 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))
(+ x (/ (* (- y z) (- t x)) (- a z))))