Average Error: 58.5 → 0.3
Time: 56.2s
Precision: 64
Internal Precision: 1344
\[\frac{1}{2} \cdot \log \left(x + 1\right) - \frac{1}{2} \cdot \log \left(1 - x\right)\]
\[\frac{\left(x + x\right) + \left(x \cdot x\right) \cdot \left(\left(\frac{1}{2} + \frac{1}{3} \cdot x\right) + \left(\frac{1}{3} \cdot x - \frac{1}{2}\right)\right)}{2}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 58.5

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

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

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

    \[\leadsto \frac{\left(x - \color{blue}{\left(-\left(\frac{1}{2} \cdot {x}^{2} + \left(x + \frac{1}{3} \cdot {x}^{3}\right)\right)\right)}\right) + \left(x \cdot x\right) \cdot \left(x \cdot \frac{1}{3} - \frac{1}{2}\right)}{2}\]
  5. Applied simplify0.3

    \[\leadsto \color{blue}{\frac{\left(x + x\right) + \left(x \cdot x\right) \cdot \left(\left(\frac{1}{2} + \frac{1}{3} \cdot x\right) + \left(\frac{1}{3} \cdot x - \frac{1}{2}\right)\right)}{2}}\]

Runtime

Time bar (total: 56.2s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)' 
(FPCore (x)
  :name "1/2 log(x + 1) - 1/2 log(1 - x)"
  (- (* (/ 1 2) (log (+ x 1))) (* (/ 1 2) (log (- 1 x)))))