Average Error: 58.8 → 0.2
Time: 14.6s
Precision: 64
$\log \left(x + 5\right) - \log \left(x - 5\right)$
$\frac{1250}{{x}^{5}} + \left(\frac{10}{x} + \frac{83.3333333333333285963817615993320941925}{\left(x \cdot x\right) \cdot x}\right)$
\log \left(x + 5\right) - \log \left(x - 5\right)
\frac{1250}{{x}^{5}} + \left(\frac{10}{x} + \frac{83.3333333333333285963817615993320941925}{\left(x \cdot x\right) \cdot x}\right)
double f(double x) {
double r37647130 = x;
double r37647131 = 5.0;
double r37647132 = r37647130 + r37647131;
double r37647133 = log(r37647132);
double r37647134 = r37647130 - r37647131;
double r37647135 = log(r37647134);
double r37647136 = r37647133 - r37647135;
return r37647136;
}


double f(double x) {
double r37647137 = 1250.0;
double r37647138 = x;
double r37647139 = 5.0;
double r37647140 = pow(r37647138, r37647139);
double r37647141 = r37647137 / r37647140;
double r37647142 = 10.0;
double r37647143 = r37647142 / r37647138;
double r37647144 = 83.33333333333333;
double r37647145 = r37647138 * r37647138;
double r37647146 = r37647145 * r37647138;
double r37647147 = r37647144 / r37647146;
double r37647148 = r37647143 + r37647147;
double r37647149 = r37647141 + r37647148;
return r37647149;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 58.8

$\log \left(x + 5\right) - \log \left(x - 5\right)$
2. Taylor expanded around inf 0.5

$\leadsto \color{blue}{1250 \cdot \frac{1}{{x}^{5}} + \left(10 \cdot \frac{1}{x} + 83.3333333333333285963817615993320941925 \cdot \frac{1}{{x}^{3}}\right)}$
3. Simplified0.2

$\leadsto \color{blue}{\frac{1250}{{x}^{5}} + \left(\frac{83.3333333333333285963817615993320941925}{x \cdot \left(x \cdot x\right)} + \frac{10}{x}\right)}$
4. Final simplification0.2

$\leadsto \frac{1250}{{x}^{5}} + \left(\frac{10}{x} + \frac{83.3333333333333285963817615993320941925}{\left(x \cdot x\right) \cdot x}\right)$

# Reproduce

herbie shell --seed 1
(FPCore (x)
:name "log(x+5)-log(x-5)"
(- (log (+ x 5.0)) (log (- x 5.0))))