Average Error: 42.1 → 40.4
Time: 1.0m
Precision: 64
Internal Precision: 128
\[\frac{e^{x}}{e^{x} - 1}\]
\[\frac{e^{x}}{\sqrt[3]{\left(\frac{1}{6} \cdot x + \frac{1}{2}\right) \cdot \left(x \cdot x\right) + x}} \cdot \frac{1}{\sqrt[3]{\left(\frac{1}{6} \cdot x + \frac{1}{2}\right) \cdot \left(x \cdot x\right) + x} \cdot \left(\sqrt[3]{\frac{1}{6}} \cdot x + \frac{\sqrt[3]{\frac{1}{6}}}{x} \cdot \left(\frac{x}{x} + x\right)\right)}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original42.1
Target42.1
Herbie40.4
\[\frac{1}{1 - e^{-x}}\]

Derivation

  1. Initial program 42.1

    \[\frac{e^{x}}{e^{x} - 1}\]
  2. Initial simplification42.1

    \[\leadsto \frac{e^{x}}{e^{x} - 1}\]
  3. Taylor expanded around 0 51.8

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

    \[\leadsto \frac{e^{x}}{\color{blue}{x + \left(x \cdot \frac{1}{6} + \frac{1}{2}\right) \cdot \left(x \cdot x\right)}}\]
  5. Using strategy rm
  6. Applied add-cube-cbrt41.5

    \[\leadsto \frac{e^{x}}{\color{blue}{\left(\sqrt[3]{x + \left(x \cdot \frac{1}{6} + \frac{1}{2}\right) \cdot \left(x \cdot x\right)} \cdot \sqrt[3]{x + \left(x \cdot \frac{1}{6} + \frac{1}{2}\right) \cdot \left(x \cdot x\right)}\right) \cdot \sqrt[3]{x + \left(x \cdot \frac{1}{6} + \frac{1}{2}\right) \cdot \left(x \cdot x\right)}}}\]
  7. Applied *-un-lft-identity41.5

    \[\leadsto \frac{\color{blue}{1 \cdot e^{x}}}{\left(\sqrt[3]{x + \left(x \cdot \frac{1}{6} + \frac{1}{2}\right) \cdot \left(x \cdot x\right)} \cdot \sqrt[3]{x + \left(x \cdot \frac{1}{6} + \frac{1}{2}\right) \cdot \left(x \cdot x\right)}\right) \cdot \sqrt[3]{x + \left(x \cdot \frac{1}{6} + \frac{1}{2}\right) \cdot \left(x \cdot x\right)}}\]
  8. Applied times-frac41.5

    \[\leadsto \color{blue}{\frac{1}{\sqrt[3]{x + \left(x \cdot \frac{1}{6} + \frac{1}{2}\right) \cdot \left(x \cdot x\right)} \cdot \sqrt[3]{x + \left(x \cdot \frac{1}{6} + \frac{1}{2}\right) \cdot \left(x \cdot x\right)}} \cdot \frac{e^{x}}{\sqrt[3]{x + \left(x \cdot \frac{1}{6} + \frac{1}{2}\right) \cdot \left(x \cdot x\right)}}}\]
  9. Taylor expanded around inf 61.8

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

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

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

Runtime

Time bar (total: 1.0m)Debug logProfile

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

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

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