Average Error: 0.0 → 0.0
Time: 40.9s
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 2019004 
(FPCore (f n)
  :name "subtraction fraction"
  (/ (- (+ f n)) (- f n)))

Details

Time bar (total: 40.6s)Debug log

sample85.0ms

Algorithm
intervals

simplify54.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune10.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.3b

localize89.0ms

Local error

Found 1 expressions with local error:

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

rewrite20.0ms

Algorithm
rewrite-expression-head
Counts
1 → 61
Calls

1 calls. Slowest were:

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

series112.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

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

simplify1.7s

Counts
81 → 64
Calls

81 calls. Slowest were:

227.0ms
(/ (* (* (- (+ f n)) (- (+ f n))) (- (+ f n))) (* (* (- f n) (- f n)) (- f n)))
165.0ms
(- (- (* f f) (* n n)))
153.0ms
(/ (- (* (cbrt (+ f n)) (cbrt (+ f n)))) (* (cbrt (- f n)) (cbrt (- f n))))

prune564.0ms

Pruning

4 alts after pruning (3 fresh and 1 done)

Merged error: 0.2b

localize30.0ms

Local error

Found 4 expressions with local error:

0.7b
(cbrt (- f n))
0.7b
(cbrt (- f n))
0.7b
(cbrt (- f n))
0.5b
(* (cbrt (- f n)) (cbrt (- f n)))

rewrite16.0ms

Algorithm
rewrite-expression-head
Counts
4 → 75
Calls

4 calls. Slowest were:

11.0ms
(* (cbrt (- f n)) (cbrt (- f n)))
1.0ms
(cbrt (- f n))
1.0ms
(cbrt (- f n))

series593.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

190.0ms
(cbrt (- f n))
147.0ms
(cbrt (- f n))
138.0ms
(cbrt (- f n))
118.0ms
(* (cbrt (- f n)) (cbrt (- f n)))

simplify2.1s

Counts
59 → 87
Calls

59 calls. Slowest were:

279.0ms
(- (pow n 2/3) (+ (* 1/9 (* (pow (/ 1 (pow n 4)) 1/3) (pow f 2))) (* 2/3 (* (pow (/ 1 n) 1/3) f))))
248.0ms
(- (exp (* 1/3 (+ (log -1) (log n)))) (+ (* 1/9 (* (pow f 2) (exp (* 1/3 (- (log -1) (* 5 (log n))))))) (* 1/3 (* (exp (* 1/3 (- (log -1) (* 2 (log n))))) f))))
225.0ms
(- (exp (* 1/3 (+ (log -1) (log n)))) (+ (* 1/9 (* (pow f 2) (exp (* 1/3 (- (log -1) (* 5 (log n))))))) (* 1/3 (* (exp (* 1/3 (- (log -1) (* 2 (log n))))) f))))

prune885.0ms

Pruning

4 alts after pruning (2 fresh and 2 done)

Merged error: 0.2b

localize0.0ms

Local error

Found 0 expressions with local error:

rewrite0.0ms

Algorithm
rewrite-expression-head
Counts
0 → 0
Calls

0 calls. Slowest were:

series0.0ms

Counts
0 → 0
Calls

0 calls. Slowest were:

simplify0.0ms

Counts
0 → 0
Calls

0 calls. Slowest were:

prune3.0ms

Pruning

4 alts after pruning (1 fresh and 3 done)

Merged error: 0.2b

localize11.0ms

Local error

Found 2 expressions with local error:

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

rewrite53.0ms

Algorithm
rewrite-expression-head
Counts
2 → 485
Calls

2 calls. Slowest were:

15.0ms
(/ (sqrt (+ f n)) (/ (- f n) (- (sqrt (+ f n)))))
8.0ms
(/ (- f n) (- (sqrt (+ f n))))

series90.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

54.0ms
(/ (- f n) (- (sqrt (+ f n))))
36.0ms
(/ (sqrt (+ f n)) (/ (- f n) (- (sqrt (+ f n)))))

simplify29.4s

Counts
841 → 491
Calls

841 calls. Slowest were:

487.0ms
(/ (sqrt 1) (/ (* (cbrt (- f n)) (cbrt (- f n))) (* (cbrt (sqrt (+ f n))) (cbrt (sqrt (+ f n))))))
461.0ms
(/ (* (cbrt (sqrt (+ f n))) (cbrt (sqrt (+ f n)))) (/ 1 (- (* (cbrt (sqrt (+ f n))) (cbrt (sqrt (+ f n)))))))
433.0ms
(/ (sqrt 1) (/ (* (cbrt (- f n)) (cbrt (- f n))) (* (cbrt (- (sqrt (+ f n)))) (cbrt (- (sqrt (+ f n)))))))

prune4.1s

Pruning

4 alts after pruning (1 fresh and 3 done)

Merged error: 0b

regimes82.0ms

Accuracy

0% (0.0b remaining)

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

bsearch2.0ms

end0.0ms

sample545.0ms

Algorithm
intervals