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(\left(\frac{x}{y} + 1 \cdot \frac{x}{{y}^{2}}\right) - 1 \cdot \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 r322288 = 1.0;
double r322289 = x;
double r322290 = y;
double r322291 = r322289 - r322290;
double r322292 = r322288 - r322290;
double r322293 = r322291 / r322292;
double r322294 = r322288 - r322293;
double r322295 = log(r322294);
double r322296 = r322288 - r322295;
return r322296;
}
double f(double x, double y) {
double r322297 = y;
double r322298 = -1630045945.922767;
bool r322299 = r322297 <= r322298;
double r322300 = 76447033.33081697;
bool r322301 = r322297 <= r322300;
double r322302 = !r322301;
bool r322303 = r322299 || r322302;
double r322304 = 1.0;
double r322305 = x;
double r322306 = r322305 / r322297;
double r322307 = 2.0;
double r322308 = pow(r322297, r322307);
double r322309 = r322305 / r322308;
double r322310 = r322304 * r322309;
double r322311 = r322306 + r322310;
double r322312 = 1.0;
double r322313 = r322312 / r322297;
double r322314 = r322304 * r322313;
double r322315 = r322311 - r322314;
double r322316 = log(r322315);
double r322317 = r322304 - r322316;
double r322318 = r322304 - r322297;
double r322319 = cbrt(r322318);
double r322320 = r322319 * r322319;
double r322321 = r322312 / r322320;
double r322322 = r322305 - r322297;
double r322323 = r322322 / r322319;
double r322324 = r322321 * r322323;
double r322325 = r322304 - r322324;
double r322326 = log(r322325);
double r322327 = r322304 - r322326;
double r322328 = r322303 ? r322317 : r322327;
return r322328;
}




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 flip3--53.3
Simplified53.3
Taylor expanded around inf 0.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 +o rules:numerics
(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))))))