\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\begin{array}{l}
\mathbf{if}\;t \leq 4.5577939887046744 \cdot 10^{-133}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \left(t \cdot \frac{1}{y}\right) \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{\frac{y}{z}}{3}\right) + t \cdot \frac{0.3333333333333333}{y \cdot z}\\
\end{array}
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
(FPCore (x y z t) :precision binary64 (if (<= t 4.5577939887046744e-133) (+ (- x (/ y (* z 3.0))) (* (* t (/ 1.0 y)) (/ 0.3333333333333333 z))) (+ (- x (/ (/ y z) 3.0)) (* t (/ 0.3333333333333333 (* y z))))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 4.5577939887046744e-133) {
tmp = (x - (y / (z * 3.0))) + ((t * (1.0 / y)) * (0.3333333333333333 / z));
} else {
tmp = (x - ((y / z) / 3.0)) + (t * (0.3333333333333333 / (y * z)));
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.6 |
|---|---|
| Target | 2.6 |
| Herbie | 2.1 |
if t < 4.55779398870467442e-133Initial program 3.2
Applied div-inv_binary643.5
Simplified3.5
Applied *-un-lft-identity_binary643.5
Applied times-frac_binary643.5
Applied associate-*r*_binary642.3
if 4.55779398870467442e-133 < t Initial program 1.5
Applied div-inv_binary641.7
Simplified1.6
Applied associate-/r*_binary641.6
Final simplification2.1
herbie shell --seed 2022088
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:herbie-target
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))