Average Error: 58.7 → 0.3
Time: 9.5s
Precision: 64
\[\frac{1}{2} \cdot \log \left(\frac{1 + x}{1 - x}\right)\]
\[\frac{1}{2} \cdot \left(\left(1.6666666666666665 \cdot {x}^{3} + \left(2 \cdot \log 1 + 2 \cdot x\right)\right) - 1 \cdot \frac{{x}^{3}}{{1}^{2}}\right)\]
\frac{1}{2} \cdot \log \left(\frac{1 + x}{1 - x}\right)
\frac{1}{2} \cdot \left(\left(1.6666666666666665 \cdot {x}^{3} + \left(2 \cdot \log 1 + 2 \cdot x\right)\right) - 1 \cdot \frac{{x}^{3}}{{1}^{2}}\right)
double f(double x) {
        double r50380 = 1.0;
        double r50381 = 2.0;
        double r50382 = r50380 / r50381;
        double r50383 = x;
        double r50384 = r50380 + r50383;
        double r50385 = r50380 - r50383;
        double r50386 = r50384 / r50385;
        double r50387 = log(r50386);
        double r50388 = r50382 * r50387;
        return r50388;
}

double f(double x) {
        double r50389 = 1.0;
        double r50390 = 2.0;
        double r50391 = r50389 / r50390;
        double r50392 = 1.6666666666666665;
        double r50393 = x;
        double r50394 = 3.0;
        double r50395 = pow(r50393, r50394);
        double r50396 = r50392 * r50395;
        double r50397 = 2.0;
        double r50398 = log(r50389);
        double r50399 = r50397 * r50398;
        double r50400 = r50390 * r50393;
        double r50401 = r50399 + r50400;
        double r50402 = r50396 + r50401;
        double r50403 = pow(r50389, r50397);
        double r50404 = r50395 / r50403;
        double r50405 = r50389 * r50404;
        double r50406 = r50402 - r50405;
        double r50407 = r50391 * r50406;
        return r50407;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 58.7

    \[\frac{1}{2} \cdot \log \left(\frac{1 + x}{1 - x}\right)\]
  2. Using strategy rm
  3. Applied add-cbrt-cube58.7

    \[\leadsto \frac{1}{2} \cdot \log \left(\frac{1 + x}{\color{blue}{\sqrt[3]{\left(\left(1 - x\right) \cdot \left(1 - x\right)\right) \cdot \left(1 - x\right)}}}\right)\]
  4. Applied add-cbrt-cube58.7

    \[\leadsto \frac{1}{2} \cdot \log \left(\frac{\color{blue}{\sqrt[3]{\left(\left(1 + x\right) \cdot \left(1 + x\right)\right) \cdot \left(1 + x\right)}}}{\sqrt[3]{\left(\left(1 - x\right) \cdot \left(1 - x\right)\right) \cdot \left(1 - x\right)}}\right)\]
  5. Applied cbrt-undiv58.7

    \[\leadsto \frac{1}{2} \cdot \log \color{blue}{\left(\sqrt[3]{\frac{\left(\left(1 + x\right) \cdot \left(1 + x\right)\right) \cdot \left(1 + x\right)}{\left(\left(1 - x\right) \cdot \left(1 - x\right)\right) \cdot \left(1 - x\right)}}\right)}\]
  6. Simplified58.7

    \[\leadsto \frac{1}{2} \cdot \log \left(\sqrt[3]{\color{blue}{{\left(\frac{1 + x}{1 - x}\right)}^{3}}}\right)\]
  7. Using strategy rm
  8. Applied flip3--58.7

    \[\leadsto \frac{1}{2} \cdot \log \left(\sqrt[3]{{\left(\frac{1 + x}{\color{blue}{\frac{{1}^{3} - {x}^{3}}{1 \cdot 1 + \left(x \cdot x + 1 \cdot x\right)}}}\right)}^{3}}\right)\]
  9. Applied associate-/r/58.7

    \[\leadsto \frac{1}{2} \cdot \log \left(\sqrt[3]{{\color{blue}{\left(\frac{1 + x}{{1}^{3} - {x}^{3}} \cdot \left(1 \cdot 1 + \left(x \cdot x + 1 \cdot x\right)\right)\right)}}^{3}}\right)\]
  10. Applied unpow-prod-down58.7

    \[\leadsto \frac{1}{2} \cdot \log \left(\sqrt[3]{\color{blue}{{\left(\frac{1 + x}{{1}^{3} - {x}^{3}}\right)}^{3} \cdot {\left(1 \cdot 1 + \left(x \cdot x + 1 \cdot x\right)\right)}^{3}}}\right)\]
  11. Applied cbrt-prod58.8

    \[\leadsto \frac{1}{2} \cdot \log \color{blue}{\left(\sqrt[3]{{\left(\frac{1 + x}{{1}^{3} - {x}^{3}}\right)}^{3}} \cdot \sqrt[3]{{\left(1 \cdot 1 + \left(x \cdot x + 1 \cdot x\right)\right)}^{3}}\right)}\]
  12. Applied log-prod58.8

    \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(\log \left(\sqrt[3]{{\left(\frac{1 + x}{{1}^{3} - {x}^{3}}\right)}^{3}}\right) + \log \left(\sqrt[3]{{\left(1 \cdot 1 + \left(x \cdot x + 1 \cdot x\right)\right)}^{3}}\right)\right)}\]
  13. Simplified58.7

    \[\leadsto \frac{1}{2} \cdot \left(\color{blue}{\log \left(\frac{1 + x}{{1}^{3} - {x}^{3}}\right)} + \log \left(\sqrt[3]{{\left(1 \cdot 1 + \left(x \cdot x + 1 \cdot x\right)\right)}^{3}}\right)\right)\]
  14. Simplified58.7

    \[\leadsto \frac{1}{2} \cdot \left(\log \left(\frac{1 + x}{{1}^{3} - {x}^{3}}\right) + \color{blue}{\log \left(x \cdot \left(1 + x\right) + 1 \cdot 1\right)}\right)\]
  15. Taylor expanded around 0 0.3

    \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(\left(1.6666666666666665 \cdot {x}^{3} + \left(2 \cdot \log 1 + 2 \cdot x\right)\right) - 1 \cdot \frac{{x}^{3}}{{1}^{2}}\right)}\]
  16. Final simplification0.3

    \[\leadsto \frac{1}{2} \cdot \left(\left(1.6666666666666665 \cdot {x}^{3} + \left(2 \cdot \log 1 + 2 \cdot x\right)\right) - 1 \cdot \frac{{x}^{3}}{{1}^{2}}\right)\]

Reproduce

herbie shell --seed 2020043 
(FPCore (x)
  :name "Hyperbolic arc-(co)tangent"
  :precision binary64
  (* (/ 1 2) (log (/ (+ 1 x) (- 1 x)))))