Average Error: 39.6 → 0.2
Time: 6.4s
Precision: 64
Internal Precision: 1344
\[\frac{e^{x} - 1}{x}\]
\[\sqrt{\frac{(e^{x} - 1)^*}{x}} \cdot \sqrt{\frac{(e^{x} - 1)^*}{x}}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original39.6
Target38.8
Herbie0.2
\[\begin{array}{l} \mathbf{if}\;x \lt 1 \land x \gt -1:\\ \;\;\;\;\frac{e^{x} - 1}{\log \left(e^{x}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{x} - 1}{x}\\ \end{array}\]

Derivation

  1. Initial program 39.6

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

    \[\leadsto \frac{(e^{x} - 1)^*}{x}\]
  3. Using strategy rm
  4. Applied add-sqr-sqrt0.2

    \[\leadsto \color{blue}{\sqrt{\frac{(e^{x} - 1)^*}{x}} \cdot \sqrt{\frac{(e^{x} - 1)^*}{x}}}\]
  5. Final simplification0.2

    \[\leadsto \sqrt{\frac{(e^{x} - 1)^*}{x}} \cdot \sqrt{\frac{(e^{x} - 1)^*}{x}}\]

Runtime

Time bar (total: 6.4s)Debug logProfile

herbie shell --seed 2018227 +o rules:numerics
(FPCore (x)
  :name "Kahan's exp quotient"

  :herbie-target
  (if (and (< x 1) (> x -1)) (/ (- (exp x) 1) (log (exp x))) (/ (- (exp x) 1) x))

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