1 - \log \left(1 - \frac{x - y}{1 - y}\right)\begin{array}{l}
\mathbf{if}\;y \le -51178879.934393361 \lor \neg \left(y \le 53143023.8704946265\right):\\
\;\;\;\;\log \left(\frac{e^{1}}{\left(\frac{x}{y} + 1 \cdot \frac{x}{{y}^{2}}\right) - \frac{1}{y}}\right)\\
\mathbf{else}:\\
\;\;\;\;1 - \log \left(1 - \left(\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}\right) \cdot \frac{\sqrt[3]{x - y}}{1 - y}\right)\\
\end{array}double f(double x, double y) {
double r1113780 = 1.0;
double r1113781 = x;
double r1113782 = y;
double r1113783 = r1113781 - r1113782;
double r1113784 = r1113780 - r1113782;
double r1113785 = r1113783 / r1113784;
double r1113786 = r1113780 - r1113785;
double r1113787 = log(r1113786);
double r1113788 = r1113780 - r1113787;
return r1113788;
}
double f(double x, double y) {
double r1113789 = y;
double r1113790 = -51178879.93439336;
bool r1113791 = r1113789 <= r1113790;
double r1113792 = 53143023.87049463;
bool r1113793 = r1113789 <= r1113792;
double r1113794 = !r1113793;
bool r1113795 = r1113791 || r1113794;
double r1113796 = 1.0;
double r1113797 = exp(r1113796);
double r1113798 = x;
double r1113799 = r1113798 / r1113789;
double r1113800 = 2.0;
double r1113801 = pow(r1113789, r1113800);
double r1113802 = r1113798 / r1113801;
double r1113803 = r1113796 * r1113802;
double r1113804 = r1113799 + r1113803;
double r1113805 = r1113796 / r1113789;
double r1113806 = r1113804 - r1113805;
double r1113807 = r1113797 / r1113806;
double r1113808 = log(r1113807);
double r1113809 = r1113798 - r1113789;
double r1113810 = cbrt(r1113809);
double r1113811 = r1113810 * r1113810;
double r1113812 = r1113796 - r1113789;
double r1113813 = r1113810 / r1113812;
double r1113814 = r1113811 * r1113813;
double r1113815 = r1113796 - r1113814;
double r1113816 = log(r1113815);
double r1113817 = r1113796 - r1113816;
double r1113818 = r1113795 ? r1113808 : r1113817;
return r1113818;
}




Bits error versus x




Bits error versus y
Results
| Original | 18.2 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
if y < -51178879.93439336 or 53143023.87049463 < y Initial program 47.0
rmApplied add-log-exp47.0
Applied diff-log47.0
Taylor expanded around inf 0.2
Simplified0.2
if -51178879.93439336 < y < 53143023.87049463Initial program 0.1
rmApplied *-un-lft-identity0.1
Applied add-cube-cbrt0.1
Applied times-frac0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2020047
(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))))))