Average Error: 0.0 → 0.0
Time: 14.5s
Precision: 64
Internal Precision: 128
\[\frac{-\left(f + n\right)}{f - n}\]
\[-\log \left(e^{\frac{f + n}{f - n}}\right)\]

Error

Bits error versus f

Bits error versus n

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\frac{-\left(f + n\right)}{f - n}\]
  2. Initial simplification0.0

    \[\leadsto -\frac{n + f}{f - n}\]
  3. Using strategy rm
  4. Applied add-log-exp0.0

    \[\leadsto -\color{blue}{\log \left(e^{\frac{n + f}{f - n}}\right)}\]
  5. Final simplification0.0

    \[\leadsto -\log \left(e^{\frac{f + n}{f - n}}\right)\]

Runtime

Time bar (total: 14.5s)Debug logProfile

herbie shell --seed 2018285 +o rules:numerics
(FPCore (f n)
  :name "subtraction fraction"
  (/ (- (+ f n)) (- f n)))