\frac{x \cdot y}{y + 1}\begin{array}{l}
\mathbf{if}\;y \le -3269494741.838665 \lor \neg \left(y \le 238450.39056172513\right):\\
\;\;\;\;x + 1 \cdot \left(\frac{x}{{y}^{2}} - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{y + 1}\\
\end{array}double code(double x, double y) {
return ((double) (((double) (x * y)) / ((double) (y + 1.0))));
}
double code(double x, double y) {
double VAR;
if (((y <= -3269494741.838665) || !(y <= 238450.39056172513))) {
VAR = ((double) (x + ((double) (1.0 * ((double) (((double) (x / ((double) pow(y, 2.0)))) - ((double) (x / y))))))));
} else {
VAR = ((double) (((double) (x * y)) / ((double) (y + 1.0))));
}
return VAR;
}




Bits error versus x




Bits error versus y
Results
| Original | 7.8 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
if y < -3269494741.838665 or 238450.39056172513 < y Initial program 16.0
Taylor expanded around inf 0.0
Simplified0.0
if -3269494741.838665 < y < 238450.39056172513Initial program 0.0
Final simplification0.0
herbie shell --seed 2020162
(FPCore (x y)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, B"
:precision binary64
:herbie-target
(if (< y -3693.8482788297247) (- (/ x (* y y)) (- (/ x y) x)) (if (< y 6799310503.41891) (/ (* x y) (+ y 1.0)) (- (/ x (* y y)) (- (/ x y) x))))
(/ (* x y) (+ y 1.0)))