\[\frac{-\left(f + n\right)}{f - n}\]
Test:
subtraction fraction
Bits:
128 bits
Bits error versus f
Bits error versus n
Time: 9.5 s
Input Error: 0.1
Output Error: 0.1
Log:
Profile: 🕒
\(\log \left(e^{\frac{-\left(f + n\right)}{f - n}}\right)\)
  1. Started with
    \[\frac{-\left(f + n\right)}{f - n}\]
    0.1
  2. Using strategy rm
    0.1
  3. Applied add-log-exp to get
    \[\color{red}{\frac{-\left(f + n\right)}{f - n}} \leadsto \color{blue}{\log \left(e^{\frac{-\left(f + n\right)}{f - n}}\right)}\]
    0.1

  4. Removed slow pow expressions

Original test:


(lambda ((f default) (n default))
  #:name "subtraction fraction"
  (/ (- (+ f n)) (- f n)))