\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}\begin{array}{l}
\mathbf{if}\;x \le -0.369313210638426204:\\
\;\;\;\;\frac{x + \left(y \cdot \frac{z}{z \cdot t - x} - \frac{1}{t \cdot \frac{z}{x} + -1}\right)}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sqrt{x + 1}} \cdot \frac{x + \left(\frac{y}{t - \frac{x}{z}} - \frac{x}{z \cdot t - x}\right)}{\sqrt{x + 1}}\\
\end{array}double code(double x, double y, double z, double t) {
return ((double) (((double) (x + ((double) (((double) (((double) (y * z)) - x)) / ((double) (((double) (t * z)) - x)))))) / ((double) (x + 1.0))));
}
double code(double x, double y, double z, double t) {
double VAR;
if ((x <= -0.3693132106384262)) {
VAR = ((double) (((double) (x + ((double) (((double) (y * ((double) (z / ((double) (((double) (z * t)) - x)))))) - ((double) (1.0 / ((double) (((double) (t * ((double) (z / x)))) + -1.0)))))))) / ((double) (x + 1.0))));
} else {
VAR = ((double) (((double) (1.0 / ((double) sqrt(((double) (x + 1.0)))))) * ((double) (((double) (x + ((double) (((double) (y / ((double) (t - ((double) (x / z)))))) - ((double) (x / ((double) (((double) (z * t)) - x)))))))) / ((double) sqrt(((double) (x + 1.0))))))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.2 |
|---|---|
| Target | 0.4 |
| Herbie | 0.6 |
if x < -0.369313210638426204Initial program 7.4
rmApplied div-sub7.4
Simplified1.0
Simplified1.0
rmApplied clear-num1.0
Simplified1.0
if -0.369313210638426204 < x Initial program 7.1
rmApplied div-sub7.1
Simplified2.8
Simplified2.8
rmApplied add-sqr-sqrt3.0
Applied *-un-lft-identity3.0
Applied times-frac3.0
Simplified0.5
Final simplification0.6
herbie shell --seed 2020179
(FPCore (x y z t)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, A"
:precision binary64
:herbie-target
(/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0))
(/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))