Average Error: 0.0 → 0.0
Time: 8.4s
Precision: 64
Internal Precision: 320
\[\frac{-\left(f + n\right)}{f - n}\]
\[\frac{-1}{\frac{f - n}{f + n}}\]

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 *-un-lft-identity0.0

    \[\leadsto -\frac{\color{blue}{1 \cdot \left(n + f\right)}}{f - n}\]
  5. Applied associate-/l*0.0

    \[\leadsto -\color{blue}{\frac{1}{\frac{f - n}{n + f}}}\]
  6. Final simplification0.0

    \[\leadsto \frac{-1}{\frac{f - n}{f + n}}\]

Runtime

Time bar (total: 8.4s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes0.00.00.00.00%
herbie shell --seed 2018340 +o rules:numerics
(FPCore (f n)
  :name "subtraction fraction"
  (/ (- (+ f n)) (- f n)))