Average Error: 0.0 → 0.0
Time: 22.7s
Precision: 64
Internal Precision: 128
\[\frac{-\left(f + n\right)}{f - n}\]
\[-\frac{n + f}{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. Final simplification0.0

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

Reproduce

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

Details

Time bar (total: 22.4s)Debug log

sample270.0ms

Algorithm
intervals

simplify23.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

22.0ms
(/ (- (+ f n)) (- f n))

prune11.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize26.0ms

Local error

Found 1 expressions with local error:

0.0b
(/ (- (+ f n)) (- f n))

rewrite16.0ms

Algorithm
rewrite-expression-head
Counts
1 → 63
Calls

1 calls. Slowest were:

12.0ms
(/ (- (+ f n)) (- f n))

series78.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

77.0ms
(/ (- (+ f n)) (- f n))

simplify1.3s

Counts
81 → 66
Calls

81 calls. Slowest were:

243.0ms
(- (- (* f f) (* n n)))
136.0ms
(/ (* (* (- (+ f n)) (- (+ f n))) (- (+ f n))) (* (* (- f n) (- f n)) (- f n)))
47.0ms
(/ (- (* (cbrt (+ f n)) (cbrt (+ f n)))) 1)

prune535.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize18.0ms

Local error

Found 4 expressions with local error:

0.0b
(cbrt (* (* (/ (- (+ f n)) (- f n)) (/ (- (+ f n)) (- f n))) (/ (- (+ f n)) (- f n))))
0.0b
(* (* (/ (- (+ f n)) (- f n)) (/ (- (+ f n)) (- f n))) (/ (- (+ f n)) (- f n)))
0.0b
(* (/ (- (+ f n)) (- f n)) (/ (- (+ f n)) (- f n)))
0.0b
(/ (- (+ f n)) (- f n))

rewrite80.0ms

Algorithm
rewrite-expression-head
Counts
4 → 268
Calls

4 calls. Slowest were:

29.0ms
(* (* (/ (- (+ f n)) (- f n)) (/ (- (+ f n)) (- f n))) (/ (- (+ f n)) (- f n)))
18.0ms
(* (/ (- (+ f n)) (- f n)) (/ (- (+ f n)) (- f n)))
17.0ms
(cbrt (* (* (/ (- (+ f n)) (- f n)) (/ (- (+ f n)) (- f n))) (/ (- (+ f n)) (- f n))))

series300.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

130.0ms
(cbrt (* (* (/ (- (+ f n)) (- f n)) (/ (- (+ f n)) (- f n))) (/ (- (+ f n)) (- f n))))
59.0ms
(* (/ (- (+ f n)) (- f n)) (/ (- (+ f n)) (- f n)))
55.0ms
(* (* (/ (- (+ f n)) (- f n)) (/ (- (+ f n)) (- f n))) (/ (- (+ f n)) (- f n)))
54.0ms
(/ (- (+ f n)) (- f n))

simplify15.5s

Counts
270 → 280
Calls

270 calls. Slowest were:

480.0ms
(* (* (* (* (/ (- (+ f n)) (- f n)) (/ (- (+ f n)) (- f n))) (/ (- (+ f n)) (- f n))) (/ (* (* (- (+ f n)) (- (+ f n))) (- (+ f n))) (* (* (- f n) (- f n)) (- f n)))) (/ (* (* (- (+ f n)) (- (+ f n))) (- (+ f n))) (* (* (- f n) (- f n)) (- f n))))
473.0ms
(* (* (/ (* (* (- (+ f n)) (- (+ f n))) (- (+ f n))) (* (* (- f n) (- f n)) (- f n))) (* (* (/ (- (+ f n)) (- f n)) (/ (- (+ f n)) (- f n))) (/ (- (+ f n)) (- f n)))) (/ (* (* (- (+ f n)) (- (+ f n))) (- (+ f n))) (* (* (- f n) (- f n)) (- f n))))
456.0ms
(* (* (/ (- (+ f n)) (- f n)) (- (+ f n))) (- (+ f n)))

prune3.2s

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes100.0ms

Accuracy

0% (0.0b remaining)

Error of 0.0b against oracle of 0.0b and baseline of 0.0b

bsearch2.0ms

end0.0ms

sample854.0ms

Algorithm
intervals