1 - \log \left(1 - \frac{x - y}{1 - y}\right)\begin{array}{l}
\mathbf{if}\;y \le -1864702967354.43042 \lor \neg \left(y \le 28223629.6847505309\right):\\
\;\;\;\;1 - \log \left(\left(1 \cdot \frac{x}{{y}^{2}} + \frac{x}{y}\right) - \frac{1}{y}\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 r407480 = 1.0;
double r407481 = x;
double r407482 = y;
double r407483 = r407481 - r407482;
double r407484 = r407480 - r407482;
double r407485 = r407483 / r407484;
double r407486 = r407480 - r407485;
double r407487 = log(r407486);
double r407488 = r407480 - r407487;
return r407488;
}
double f(double x, double y) {
double r407489 = y;
double r407490 = -1864702967354.4304;
bool r407491 = r407489 <= r407490;
double r407492 = 28223629.68475053;
bool r407493 = r407489 <= r407492;
double r407494 = !r407493;
bool r407495 = r407491 || r407494;
double r407496 = 1.0;
double r407497 = x;
double r407498 = 2.0;
double r407499 = pow(r407489, r407498);
double r407500 = r407497 / r407499;
double r407501 = r407496 * r407500;
double r407502 = r407497 / r407489;
double r407503 = r407501 + r407502;
double r407504 = r407496 / r407489;
double r407505 = r407503 - r407504;
double r407506 = log(r407505);
double r407507 = r407496 - r407506;
double r407508 = 1.0;
double r407509 = r407496 - r407489;
double r407510 = cbrt(r407509);
double r407511 = r407510 * r407510;
double r407512 = r407508 / r407511;
double r407513 = r407497 - r407489;
double r407514 = r407513 / r407510;
double r407515 = r407512 * r407514;
double r407516 = r407496 - r407515;
double r407517 = log(r407516);
double r407518 = r407496 - r407517;
double r407519 = r407495 ? r407507 : r407518;
return r407519;
}




Bits error versus x




Bits error versus y
Results
| Original | 18.3 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
if y < -1864702967354.4304 or 28223629.68475053 < y Initial program 46.6
rmApplied add-cube-cbrt42.9
Applied *-un-lft-identity42.9
Applied times-frac42.8
Taylor expanded around inf 0.0
Simplified0.0
if -1864702967354.4304 < y < 28223629.68475053Initial program 0.2
rmApplied add-cube-cbrt0.2
Applied *-un-lft-identity0.2
Applied times-frac0.2
Final simplification0.1
herbie shell --seed 2020018
(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))))))