1 - \log \left(1 - \frac{x - y}{1 - y}\right)\begin{array}{l}
\mathbf{if}\;y \le -1630045945.92276692 \lor \neg \left(y \le 76447033.3308169693\right):\\
\;\;\;\;1 - \log \left(1 \cdot \left(\left(\frac{x}{{y}^{2}} + \frac{x}{y}\right) - \frac{1}{y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 - \log \left(1 - \frac{1}{\sqrt[3]{1 - y} \cdot \sqrt[3]{1 - y}} \cdot \frac{x - y}{\sqrt[3]{1 - y}}\right)\\
\end{array}double f(double x, double y) {
double r381617 = 1.0;
double r381618 = x;
double r381619 = y;
double r381620 = r381618 - r381619;
double r381621 = r381617 - r381619;
double r381622 = r381620 / r381621;
double r381623 = r381617 - r381622;
double r381624 = log(r381623);
double r381625 = r381617 - r381624;
return r381625;
}
double f(double x, double y) {
double r381626 = y;
double r381627 = -1630045945.922767;
bool r381628 = r381626 <= r381627;
double r381629 = 76447033.33081697;
bool r381630 = r381626 <= r381629;
double r381631 = !r381630;
bool r381632 = r381628 || r381631;
double r381633 = 1.0;
double r381634 = x;
double r381635 = 2.0;
double r381636 = pow(r381626, r381635);
double r381637 = r381634 / r381636;
double r381638 = r381634 / r381626;
double r381639 = r381637 + r381638;
double r381640 = 1.0;
double r381641 = r381640 / r381626;
double r381642 = r381639 - r381641;
double r381643 = r381633 * r381642;
double r381644 = log(r381643);
double r381645 = r381633 - r381644;
double r381646 = r381633 - r381626;
double r381647 = cbrt(r381646);
double r381648 = r381647 * r381647;
double r381649 = r381640 / r381648;
double r381650 = r381634 - r381626;
double r381651 = r381650 / r381647;
double r381652 = r381649 * r381651;
double r381653 = r381633 - r381652;
double r381654 = log(r381653);
double r381655 = r381633 - r381654;
double r381656 = r381632 ? r381645 : r381655;
return r381656;
}




Bits error versus x




Bits error versus y
Results
| Original | 17.8 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
if y < -1630045945.922767 or 76447033.33081697 < y Initial program 46.1
rmApplied add-cube-cbrt42.3
Applied *-un-lft-identity42.3
Applied times-frac42.2
rmApplied flip3--49.3
Simplified49.3
Taylor expanded around inf 0.1
Simplified0.1
if -1630045945.922767 < y < 76447033.33081697Initial program 0.1
rmApplied add-cube-cbrt0.1
Applied *-un-lft-identity0.1
Applied times-frac0.1
Final simplification0.1
herbie shell --seed 2020062
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, B"
:precision binary64
:herbie-target
(if (< y -81284752.61947241) (- 1 (log (- (/ x (* y y)) (- (/ 1 y) (/ x y))))) (if (< y 3.0094271212461764e+25) (log (/ (exp 1) (- 1 (/ (- x y) (- 1 y))))) (- 1 (log (- (/ x (* y y)) (- (/ 1 y) (/ x y)))))))
(- 1 (log (- 1 (/ (- x y) (- 1 y))))))