\[\frac{e^{x} - 1}{x}\]
Test:
Kahan's exp quotient
Bits:
128 bits
Bits error versus x
Time: 2.9 s
Input Error: 60.8
Output Error: 0.5
Log:
Profile: 🕒
\(\frac{1}{\left(x \cdot x\right) \cdot \frac{1}{12} + \left(1 - x \cdot \frac{1}{2}\right)}\)
  1. Started with
    \[\frac{e^{x} - 1}{x}\]
    60.8
  2. Using strategy rm
    60.8
  3. Applied clear-num to get
    \[\color{red}{\frac{e^{x} - 1}{x}} \leadsto \color{blue}{\frac{1}{\frac{x}{e^{x} - 1}}}\]
    60.8
  4. Applied taylor to get
    \[\frac{1}{\frac{x}{e^{x} - 1}} \leadsto \frac{1}{\left(\frac{1}{12} \cdot {x}^2 + 1\right) - \frac{1}{2} \cdot x}\]
    0.5
  5. Taylor expanded around 0 to get
    \[\frac{1}{\color{red}{\left(\frac{1}{12} \cdot {x}^2 + 1\right) - \frac{1}{2} \cdot x}} \leadsto \frac{1}{\color{blue}{\left(\frac{1}{12} \cdot {x}^2 + 1\right) - \frac{1}{2} \cdot x}}\]
    0.5
  6. Applied simplify to get
    \[\frac{1}{\left(\frac{1}{12} \cdot {x}^2 + 1\right) - \frac{1}{2} \cdot x} \leadsto \frac{1}{\left(x \cdot x\right) \cdot \frac{1}{12} + \left(1 - x \cdot \frac{1}{2}\right)}\]
    0.5

  7. Applied final simplification

Original test:


(lambda ((x default))
  #:name "Kahan's exp quotient"
  (/ (- (exp x) 1) x)
  #:target
  (if (and (< x 1) (> x -1)) (/ (- (exp x) 1) (log (exp x))) (/ (- (exp x) 1) x)))