Average Error: 61.0 → 0.0
Time: 42.5s
Precision: 64
Internal Precision: 1408
\[\frac{\log \left(1 - x\right)}{\log \left(1 + x\right)}\]
\[\sqrt[3]{{\left(\frac{\log_* (1 + \left(-x\right))}{\log_* (1 + x)}\right)}^{3}}\]

Error

Bits error versus x

Target

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

Derivation

  1. Initial program 61.0

    \[\frac{\log \left(1 - x\right)}{\log \left(1 + x\right)}\]
  2. Applied simplify60.1

    \[\leadsto \color{blue}{\frac{\log \left(1 - x\right)}{\log_* (1 + x)}}\]
  3. Using strategy rm
  4. Applied log1p-expm1-u60.1

    \[\leadsto \frac{\color{blue}{\log_* (1 + (e^{\log \left(1 - x\right)} - 1)^*)}}{\log_* (1 + x)}\]
  5. Applied simplify0.0

    \[\leadsto \frac{\log_* (1 + \color{blue}{\left(-x\right)})}{\log_* (1 + x)}\]
  6. Using strategy rm
  7. Applied add-cbrt-cube40.6

    \[\leadsto \frac{\log_* (1 + \left(-x\right))}{\color{blue}{\sqrt[3]{\left(\log_* (1 + x) \cdot \log_* (1 + x)\right) \cdot \log_* (1 + x)}}}\]
  8. Applied add-cbrt-cube40.9

    \[\leadsto \frac{\color{blue}{\sqrt[3]{\left(\log_* (1 + \left(-x\right)) \cdot \log_* (1 + \left(-x\right))\right) \cdot \log_* (1 + \left(-x\right))}}}{\sqrt[3]{\left(\log_* (1 + x) \cdot \log_* (1 + x)\right) \cdot \log_* (1 + x)}}\]
  9. Applied cbrt-undiv40.9

    \[\leadsto \color{blue}{\sqrt[3]{\frac{\left(\log_* (1 + \left(-x\right)) \cdot \log_* (1 + \left(-x\right))\right) \cdot \log_* (1 + \left(-x\right))}{\left(\log_* (1 + x) \cdot \log_* (1 + x)\right) \cdot \log_* (1 + x)}}}\]
  10. Applied simplify0.0

    \[\leadsto \sqrt[3]{\color{blue}{{\left(\frac{\log_* (1 + \left(-x\right))}{\log_* (1 + x)}\right)}^{3}}}\]

Runtime

Time bar (total: 42.5s)Debug logProfile

herbie shell --seed '#(1070960995 739739648 2531964651 3069671617 351857262 3877178482)' +o rules:numerics
(FPCore (x)
  :name "qlog (example 3.10)"
  :pre (and (< -1 x) (< x 1))

  :herbie-target
  (- (+ (+ (+ 1 x) (/ (* x x) 2)) (* 5/12 (pow x 3))))

  (/ (log (- 1 x)) (log (+ 1 x))))