Average Error: 61.4 → 0.4
Time: 9.8s
Precision: 64
\[-1 \lt x \land x \lt 1\]
\[\frac{\log \left(1 - x\right)}{\log \left(1 + x\right)}\]
\[\sqrt[3]{\frac{1}{{\left(\frac{\left(1 \cdot x + \log 1\right) - \frac{1}{2} \cdot \frac{{x}^{2}}{{1}^{2}}}{\log 1 - \left(1 \cdot x + \frac{1}{2} \cdot \frac{{x}^{2}}{{1}^{2}}\right)}\right)}^{3}}}\]
\frac{\log \left(1 - x\right)}{\log \left(1 + x\right)}
\sqrt[3]{\frac{1}{{\left(\frac{\left(1 \cdot x + \log 1\right) - \frac{1}{2} \cdot \frac{{x}^{2}}{{1}^{2}}}{\log 1 - \left(1 \cdot x + \frac{1}{2} \cdot \frac{{x}^{2}}{{1}^{2}}\right)}\right)}^{3}}}
double f(double x) {
        double r56639 = 1.0;
        double r56640 = x;
        double r56641 = r56639 - r56640;
        double r56642 = log(r56641);
        double r56643 = r56639 + r56640;
        double r56644 = log(r56643);
        double r56645 = r56642 / r56644;
        return r56645;
}

double f(double x) {
        double r56646 = 1.0;
        double r56647 = 1.0;
        double r56648 = x;
        double r56649 = r56647 * r56648;
        double r56650 = log(r56647);
        double r56651 = r56649 + r56650;
        double r56652 = 0.5;
        double r56653 = 2.0;
        double r56654 = pow(r56648, r56653);
        double r56655 = pow(r56647, r56653);
        double r56656 = r56654 / r56655;
        double r56657 = r56652 * r56656;
        double r56658 = r56651 - r56657;
        double r56659 = r56649 + r56657;
        double r56660 = r56650 - r56659;
        double r56661 = r56658 / r56660;
        double r56662 = 3.0;
        double r56663 = pow(r56661, r56662);
        double r56664 = r56646 / r56663;
        double r56665 = cbrt(r56664);
        return r56665;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original61.4
Target0.3
Herbie0.4
\[-\left(\left(\left(1 + x\right) + \frac{x \cdot x}{2}\right) + 0.4166666666666666851703837437526090070605 \cdot {x}^{3}\right)\]

Derivation

  1. Initial program 61.4

    \[\frac{\log \left(1 - x\right)}{\log \left(1 + x\right)}\]
  2. Taylor expanded around 0 60.5

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

    \[\leadsto \frac{\color{blue}{\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}}}\]
  4. Using strategy rm
  5. Applied clear-num0.4

    \[\leadsto \color{blue}{\frac{1}{\frac{\left(1 \cdot x + \log 1\right) - \frac{1}{2} \cdot \frac{{x}^{2}}{{1}^{2}}}{\log 1 - \left(1 \cdot x + \frac{1}{2} \cdot \frac{{x}^{2}}{{1}^{2}}\right)}}}\]
  6. Using strategy rm
  7. Applied add-cbrt-cube40.8

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

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

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

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

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

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

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

Reproduce

herbie shell --seed 2019353 
(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))))