\[\frac{e^{x} - 1}{x}\]
Test:
Kahan's exp quotient
Bits:
128 bits
Bits error versus x
Time: 3.5 s
Input Error: 27.2
Output Error: 0.3
Log:
Profile: 🕒
\(\frac{1}{6} \cdot {x}^2 + \left(1 + \frac{1}{2} \cdot x\right)\)
  1. Started with
    \[\frac{e^{x} - 1}{x}\]
    27.2
  2. Applied taylor to get
    \[\frac{e^{x} - 1}{x} \leadsto \frac{1}{6} \cdot {x}^2 + \left(1 + \frac{1}{2} \cdot x\right)\]
    0.3
  3. Taylor expanded around 0 to get
    \[\color{red}{\frac{1}{6} \cdot {x}^2 + \left(1 + \frac{1}{2} \cdot x\right)} \leadsto \color{blue}{\frac{1}{6} \cdot {x}^2 + \left(1 + \frac{1}{2} \cdot x\right)}\]
    0.3

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)))