1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\begin{array}{l}
\mathbf{if}\;y \le -4201198044259844344621563904 \lor \neg \left(y \le 528433753610563.25\right):\\
\;\;\;\;\left(x + \frac{1}{y}\right) - 1 \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\left(1 - \frac{\left(1 - x\right) \cdot {y}^{3}}{{y}^{3} + {1}^{3}}\right) - \left(\left(1 - x\right) \cdot \frac{y}{{y}^{3} + {1}^{3}}\right) \cdot \left(1 \cdot 1 - y \cdot 1\right)\\
\end{array}double f(double x, double y) {
double r432642 = 1.0;
double r432643 = x;
double r432644 = r432642 - r432643;
double r432645 = y;
double r432646 = r432644 * r432645;
double r432647 = r432645 + r432642;
double r432648 = r432646 / r432647;
double r432649 = r432642 - r432648;
return r432649;
}
double f(double x, double y) {
double r432650 = y;
double r432651 = -4.2011980442598443e+27;
bool r432652 = r432650 <= r432651;
double r432653 = 528433753610563.25;
bool r432654 = r432650 <= r432653;
double r432655 = !r432654;
bool r432656 = r432652 || r432655;
double r432657 = x;
double r432658 = 1.0;
double r432659 = r432658 / r432650;
double r432660 = r432657 + r432659;
double r432661 = r432657 / r432650;
double r432662 = r432658 * r432661;
double r432663 = r432660 - r432662;
double r432664 = r432658 - r432657;
double r432665 = 3.0;
double r432666 = pow(r432650, r432665);
double r432667 = r432664 * r432666;
double r432668 = pow(r432658, r432665);
double r432669 = r432666 + r432668;
double r432670 = r432667 / r432669;
double r432671 = r432658 - r432670;
double r432672 = r432650 / r432669;
double r432673 = r432664 * r432672;
double r432674 = r432658 * r432658;
double r432675 = r432650 * r432658;
double r432676 = r432674 - r432675;
double r432677 = r432673 * r432676;
double r432678 = r432671 - r432677;
double r432679 = r432656 ? r432663 : r432678;
return r432679;
}




Bits error versus x




Bits error versus y
Results
| Original | 22.3 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
if y < -4.2011980442598443e+27 or 528433753610563.25 < y Initial program 46.8
rmApplied *-un-lft-identity46.8
Applied times-frac29.8
Simplified29.8
rmApplied flip3-+53.6
Applied associate-/r/53.6
Applied associate-*r*53.6
Taylor expanded around inf 0.0
Simplified0.0
if -4.2011980442598443e+27 < y < 528433753610563.25Initial program 1.1
rmApplied *-un-lft-identity1.1
Applied times-frac1.0
Simplified1.0
rmApplied flip3-+1.1
Applied associate-/r/1.1
Applied associate-*r*1.1
rmApplied distribute-lft-in1.1
Applied associate--r+0.5
Simplified0.4
Final simplification0.2
herbie shell --seed 2019303
(FPCore (x y)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, D"
:precision binary64
:herbie-target
(if (< y -3693.84827882972468) (- (/ 1 y) (- (/ x y) x)) (if (< y 6799310503.41891003) (- 1 (/ (* (- 1 x) y) (+ y 1))) (- (/ 1 y) (- (/ x y) x))))
(- 1 (/ (* (- 1 x) y) (+ y 1))))