\frac{\log \left(1 - x\right)}{\log \left(1 + x\right)}\sqrt[3]{\frac{\log 1 - \left(1 \cdot x + \frac{1}{2} \cdot \frac{{x}^{2}}{{1}^{2}}\right)}{\left(1 \cdot x + \log 1\right) - \frac{1}{2} \cdot \frac{{x}^{2}}{{1}^{2}}}} \cdot \sqrt[3]{\frac{\log 1 - \left(1 \cdot x + \frac{1}{2} \cdot \frac{{x}^{2}}{{1}^{2}}\right)}{\left(1 \cdot x + \log 1\right) - \frac{1}{2} \cdot \frac{{x}^{2}}{{1}^{2}}} \cdot \frac{\log 1 - \left(1 \cdot x + \frac{1}{2} \cdot \frac{{x}^{2}}{{1}^{2}}\right)}{\left(1 \cdot x + \log 1\right) - \frac{1}{2} \cdot \frac{{x}^{2}}{{1}^{2}}}}double f(double x) {
double r78498 = 1.0;
double r78499 = x;
double r78500 = r78498 - r78499;
double r78501 = log(r78500);
double r78502 = r78498 + r78499;
double r78503 = log(r78502);
double r78504 = r78501 / r78503;
return r78504;
}
double f(double x) {
double r78505 = 1.0;
double r78506 = log(r78505);
double r78507 = x;
double r78508 = r78505 * r78507;
double r78509 = 0.5;
double r78510 = 2.0;
double r78511 = pow(r78507, r78510);
double r78512 = pow(r78505, r78510);
double r78513 = r78511 / r78512;
double r78514 = r78509 * r78513;
double r78515 = r78508 + r78514;
double r78516 = r78506 - r78515;
double r78517 = r78508 + r78506;
double r78518 = r78517 - r78514;
double r78519 = r78516 / r78518;
double r78520 = cbrt(r78519);
double r78521 = r78519 * r78519;
double r78522 = cbrt(r78521);
double r78523 = r78520 * r78522;
return r78523;
}




Bits error versus x
Results
| Original | 61.6 |
|---|---|
| Target | 0.3 |
| Herbie | 0.4 |
Initial program 61.6
Taylor expanded around 0 60.6
Taylor expanded around 0 0.4
rmApplied add-cbrt-cube42.9
Applied add-cbrt-cube42.3
Applied cbrt-undiv42.3
Simplified0.4
rmApplied cube-mult0.4
Applied cbrt-prod0.4
Final simplification0.4
herbie shell --seed 2020018
(FPCore (x)
:name "qlog (example 3.10)"
:precision binary64
:pre (and (< -1 x) (< x 1))
:herbie-target
(- (+ (+ (+ 1 x) (/ (* x x) 2)) (* 0.4166666666666667 (pow x 3))))
(/ (log (- 1 x)) (log (+ 1 x))))