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

Details

Time bar (total: 9.9s)Debug log

sample111.0ms

Algorithm
intervals

simplify40.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune10.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize22.0ms

Local error

Found 1 expressions with local error:

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

rewrite8.0ms

Algorithm
rewrite-expression-head
Counts
1 → 61
Calls

1 calls. Slowest were:

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

series64.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

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

simplify1.1s

Counts
81 → 64
Calls

81 calls. Slowest were:

179.0ms
(- (- (* f f) (* n n)))
116.0ms
(/ (* (* (- (+ f n)) (- (+ f n))) (- (+ f n))) (* (* (- f n) (- f n)) (- f n)))
81.0ms
(/ (- (* (cbrt (+ f n)) (cbrt (+ f n)))) (* (cbrt (- f n)) (cbrt (- f n))))

prune470.0ms

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0.0b

localize30.0ms

Local error

Found 4 expressions with local error:

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

rewrite14.0ms

Algorithm
rewrite-expression-head
Counts
4 → 98
Calls

4 calls. Slowest were:

6.0ms
(* (cbrt (- f n)) (cbrt (- f n)))
5.0ms
(* (cbrt (+ f n)) (cbrt (+ f n)))
1.0ms
(cbrt (+ f n))

series613.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

197.0ms
(* (cbrt (+ f n)) (cbrt (+ f n)))
163.0ms
(cbrt (+ f n))
136.0ms
(cbrt (+ f n))
117.0ms
(* (cbrt (- f n)) (cbrt (- f n)))

simplify2.2s

Counts
86 → 110
Calls

86 calls. Slowest were:

249.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))))
203.0ms
(- (+ (* 1/3 (* (pow (/ 1 (pow n 2)) 1/3) f)) (pow n 1/3)) (* 1/9 (* (pow (/ 1 (pow n 5)) 1/3) (pow f 2))))
193.0ms
(- (+ (* 1/3 (* (pow (/ 1 (pow n 2)) 1/3) f)) (pow n 1/3)) (* 1/9 (* (pow (/ 1 (pow n 5)) 1/3) (pow f 2))))

prune1.5s

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0.0b

localize12.0ms

Local error

Found 2 expressions with local error:

0.2b
(* (- (+ f n)) (/ 1 (- f n)))
0.0b
(/ 1 (- f n))

rewrite13.0ms

Algorithm
rewrite-expression-head
Counts
2 → 53
Calls

2 calls. Slowest were:

11.0ms
(* (- (+ f n)) (/ 1 (- f n)))
2.0ms
(/ 1 (- f n))

series85.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

54.0ms
(* (- (+ f n)) (/ 1 (- f n)))
31.0ms
(/ 1 (- f n))

simplify2.0s

Counts
38 → 59
Calls

38 calls. Slowest were:

468.0ms
(* (- (+ (pow f 3) (pow n 3))) (/ 1 (- f n)))
340.0ms
(* (+ (* f f) (- (* n n) (* f n))) (- f n))
305.0ms
(* (- (+ f n)) (/ 1 (- f n)))

prune455.0ms

Pruning

3 alts after pruning (0 fresh and 3 done)

Merged error: 0.0b

regimes120.0ms

Accuracy

0% (0.0b remaining)

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

bsearch2.0ms

end0.0ms

sample970.0ms

Algorithm
intervals