Average Error: 58.9 → 0.2
Time: 15.4s
Precision: 64
\[\log \left(x + 10\right) - \log \left(x - 10\right)\]
\[\frac{4 \cdot 10^{4}}{{x}^{5}} + \left(\frac{20}{x} + \frac{666.66666666666662877105409279465675354}{\left(x \cdot x\right) \cdot x}\right)\]
\log \left(x + 10\right) - \log \left(x - 10\right)
\frac{4 \cdot 10^{4}}{{x}^{5}} + \left(\frac{20}{x} + \frac{666.66666666666662877105409279465675354}{\left(x \cdot x\right) \cdot x}\right)
double f(double x) {
        double r36824276 = x;
        double r36824277 = 10.0;
        double r36824278 = r36824276 + r36824277;
        double r36824279 = log(r36824278);
        double r36824280 = r36824276 - r36824277;
        double r36824281 = log(r36824280);
        double r36824282 = r36824279 - r36824281;
        return r36824282;
}

double f(double x) {
        double r36824283 = 40000.0;
        double r36824284 = x;
        double r36824285 = 5.0;
        double r36824286 = pow(r36824284, r36824285);
        double r36824287 = r36824283 / r36824286;
        double r36824288 = 20.0;
        double r36824289 = r36824288 / r36824284;
        double r36824290 = 666.6666666666666;
        double r36824291 = r36824284 * r36824284;
        double r36824292 = r36824291 * r36824284;
        double r36824293 = r36824290 / r36824292;
        double r36824294 = r36824289 + r36824293;
        double r36824295 = r36824287 + r36824294;
        return r36824295;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 58.9

    \[\log \left(x + 10\right) - \log \left(x - 10\right)\]
  2. Taylor expanded around inf 0.4

    \[\leadsto \color{blue}{4 \cdot 10^{4} \cdot \frac{1}{{x}^{5}} + \left(20 \cdot \frac{1}{x} + 666.66666666666662877105409279465675354 \cdot \frac{1}{{x}^{3}}\right)}\]
  3. Simplified0.2

    \[\leadsto \color{blue}{\frac{4 \cdot 10^{4}}{{x}^{5}} + \left(\frac{666.66666666666662877105409279465675354}{x \cdot \left(x \cdot x\right)} + \frac{20}{x}\right)}\]
  4. Final simplification0.2

    \[\leadsto \frac{4 \cdot 10^{4}}{{x}^{5}} + \left(\frac{20}{x} + \frac{666.66666666666662877105409279465675354}{\left(x \cdot x\right) \cdot x}\right)\]

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "log(x+10)-log(x-10)"
  (- (log (+ x 10.0)) (log (- x 10.0))))