Average Error: 40.0 → 0.9
Time: 22.3s
Precision: 64
Internal Precision: 128
\[\frac{e^{x}}{e^{x} - 1}\]
\[\frac{e^{x}}{x + \left(x \cdot \frac{1}{6} + \frac{1}{2}\right) \cdot \left(x \cdot x\right)}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original40.0
Target39.6
Herbie0.9
\[\frac{1}{1 - e^{-x}}\]

Derivation

  1. Initial program 40.0

    \[\frac{e^{x}}{e^{x} - 1}\]
  2. Taylor expanded around 0 11.6

    \[\leadsto \frac{e^{x}}{\color{blue}{x + \left(\frac{1}{6} \cdot {x}^{3} + \frac{1}{2} \cdot {x}^{2}\right)}}\]
  3. Simplified0.9

    \[\leadsto \frac{e^{x}}{\color{blue}{x + \left(x \cdot \frac{1}{6} + \frac{1}{2}\right) \cdot \left(x \cdot x\right)}}\]
  4. Final simplification0.9

    \[\leadsto \frac{e^{x}}{x + \left(x \cdot \frac{1}{6} + \frac{1}{2}\right) \cdot \left(x \cdot x\right)}\]

Runtime

Time bar (total: 22.3s)Debug logProfile

herbie shell --seed 2018346 
(FPCore (x)
  :name "expq2 (section 3.11)"

  :herbie-target
  (/ 1 (- 1 (exp (- x))))

  (/ (exp x) (- (exp x) 1)))