x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\begin{array}{l}
\mathbf{if}\;z \leq -4.412580790819901 \cdot 10^{+208} \lor \neg \left(z \leq 1.5608717846500168 \cdot 10^{+132}\right):\\
\;\;\;\;t + \left(\frac{x}{\frac{z}{y}} - \frac{t}{\frac{z}{y}}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}} \cdot \frac{t - x}{\sqrt[3]{a - z}}\\
\end{array}(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
(FPCore (x y z t a)
:precision binary64
(if (or (<= z -4.412580790819901e+208) (not (<= z 1.5608717846500168e+132)))
(+ t (- (/ x (/ z y)) (/ t (/ z y))))
(+
x
(*
(/ (- y z) (* (cbrt (- a z)) (cbrt (- a z))))
(/ (- t x) (cbrt (- a z)))))))double code(double x, double y, double z, double t, double a) {
return ((double) (x + (((double) (((double) (y - z)) * ((double) (t - x)))) / ((double) (a - z)))));
}
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z <= -4.412580790819901e+208) || !(z <= 1.5608717846500168e+132))) {
tmp = ((double) (t + ((double) ((x / (z / y)) - (t / (z / y))))));
} else {
tmp = ((double) (x + ((double) ((((double) (y - z)) / ((double) (((double) cbrt(((double) (a - z)))) * ((double) cbrt(((double) (a - z))))))) * (((double) (t - x)) / ((double) cbrt(((double) (a - z)))))))));
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.2 |
|---|---|
| Target | 11.8 |
| Herbie | 10.1 |
if z < -4.412580790819901e208 or 1.5608717846500168e132 < z Initial program Error: 47.5 bits
SimplifiedError: 28.3 bits
rmApplied add-cube-cbrtError: 28.9 bits
Applied *-un-lft-identityError: 28.9 bits
Applied times-fracError: 28.9 bits
Applied associate-*r*Error: 24.0 bits
SimplifiedError: 24.0 bits
rmApplied add-cube-cbrtError: 24.2 bits
Applied *-un-lft-identityError: 24.2 bits
Applied times-fracError: 24.2 bits
Applied associate-*r*Error: 23.8 bits
SimplifiedError: 23.7 bits
Taylor expanded around inf Error: 25.0 bits
SimplifiedError: 14.6 bits
if -4.412580790819901e208 < z < 1.5608717846500168e132Initial program Error: 16.2 bits
SimplifiedError: 9.9 bits
rmApplied add-cube-cbrtError: 10.4 bits
Applied *-un-lft-identityError: 10.4 bits
Applied times-fracError: 10.5 bits
Applied associate-*r*Error: 8.5 bits
SimplifiedError: 8.5 bits
Final simplificationError: 10.1 bits
herbie shell --seed 2020204
(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))))