\[\frac{e^{x} - 1}{x}\]
Test:
Kahan's exp quotient
Bits:
128 bits
Bits error versus x
Time: 4.5 s
Input Error: 26.6
Output Error: 2.4
Log:
Profile: 🕒
\(\log \left(e^{\frac{1}{6} \cdot {x}^2}\right) + \left(1 + \frac{1}{2} \cdot x\right)\)
  1. Started with
    \[\frac{e^{x} - 1}{x}\]
    26.6
  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.1
  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.1
  4. Using strategy rm
    0.1
  5. Applied add-log-exp to get
    \[\color{red}{\frac{1}{6} \cdot {x}^2} + \left(1 + \frac{1}{2} \cdot x\right) \leadsto \color{blue}{\log \left(e^{\frac{1}{6} \cdot {x}^2}\right)} + \left(1 + \frac{1}{2} \cdot x\right)\]
    2.4

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