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

Details

Time bar (total: 10.9s)Debug log

start151.0ms

Algorithm
intervals

setup55.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize96.0ms

Local error

Found 1 expressions with local error:

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

rewrite12.0ms

Algorithm
rewrite-expression-head
Counts
1 → 61
Calls

1 calls. Slowest were:

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

series100.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

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

simplify1.7s

Counts
81 → 64
Calls

81 calls. Slowest were:

248.0ms
(/ (* (* (- (+ f n)) (- (+ f n))) (- (+ f n))) (* (* (- f n) (- f n)) (- f n)))
140.0ms
(- (- (* f f) (* n n)))
120.0ms
(/ (- (* (cbrt (+ f n)) (cbrt (+ f n)))) 1)

prune517.0ms

Pruning

4 alts after pruning (3 fresh and 1 done)

Merged error: 0b

localize5.0ms

Local error

Found 2 expressions with local error:

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

rewrite4.0ms

Algorithm
rewrite-expression-head
Counts
2 → 58
Calls

2 calls. Slowest were:

3.0ms
(/ (- f n) (+ f n))
1.0ms
(/ -1 (/ (- f n) (+ f n)))

series65.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

34.0ms
(/ (- f n) (+ f n))
31.0ms
(/ -1 (/ (- f n) (+ f n)))

simplify773.0ms

Counts
52 → 64
Calls

52 calls. Slowest were:

256.0ms
(/ (* (* (- f n) (- f n)) (- f n)) (* (* (+ f n) (+ f n)) (+ f n)))
72.0ms
(+ (* f f) (- (* n n) (* f n)))
71.0ms
(+ (* f f) (- (* n n) (* f n)))

prune695.0ms

Pruning

4 alts after pruning (2 fresh and 2 done)

Merged error: 0b

localize37.0ms

Local error

Found 4 expressions with local error:

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

rewrite15.0ms

Algorithm
rewrite-expression-head
Counts
4 → 75
Calls

4 calls. Slowest were:

10.0ms
(* (cbrt (+ n f)) (cbrt (+ n f)))
1.0ms
(cbrt (+ n f))
1.0ms
(cbrt (+ n f))

series693.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

214.0ms
(* (cbrt (+ n f)) (cbrt (+ n f)))
169.0ms
(cbrt (+ f n))
162.0ms
(cbrt (+ n f))
147.0ms
(cbrt (+ n f))

simplify1.6s

Counts
59 → 87
Calls

59 calls. Slowest were:

183.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))))
182.0ms
(- (+ (* 1/3 (* n (pow (/ 1 (pow f 2)) 1/3))) (pow f 1/3)) (* 1/9 (* (pow n 2) (pow (/ 1 (pow f 5)) 1/3))))
176.0ms
(- (+ (* 1/3 (* n (pow (/ 1 (pow f 2)) 1/3))) (pow f 1/3)) (* 1/9 (* (pow n 2) (pow (/ 1 (pow f 5)) 1/3))))

prune1.0s

Pruning

4 alts after pruning (1 fresh and 3 done)

Merged error: 0b

localize14.0ms

Local error

Found 4 expressions with local error:

0.6b
(cbrt (cbrt (+ n f)))
0.6b
(cbrt (+ n f))
0.6b
(cbrt (+ n f))
0.6b
(cbrt (+ n f))

rewrite6.0ms

Algorithm
rewrite-expression-head
Counts
4 → 55
Calls

4 calls. Slowest were:

3.0ms
(cbrt (+ n f))
1.0ms
(cbrt (cbrt (+ n f)))
1.0ms
(cbrt (+ n f))

series758.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

258.0ms
(cbrt (cbrt (+ n f)))
185.0ms
(cbrt (+ n f))
180.0ms
(cbrt (+ n f))
136.0ms
(cbrt (+ n f))

simplify1.0s

Counts
35 → 67
Calls

35 calls. Slowest were:

206.0ms
(- (+ (* 1/9 (* n (pow (/ 1 (pow f 8)) 1/9))) (pow f 1/9)) (* 4/81 (* (pow n 2) (pow (/ 1 (pow f 17)) 1/9))))
196.0ms
(- (+ (* 1/3 (* n (pow (/ 1 (pow f 2)) 1/3))) (pow f 1/3)) (* 1/9 (* (pow n 2) (pow (/ 1 (pow f 5)) 1/3))))
166.0ms
(- (+ (* 1/3 (* n (pow (/ 1 (pow f 2)) 1/3))) (pow f 1/3)) (* 1/9 (* (pow n 2) (pow (/ 1 (pow f 5)) 1/3))))

prune1.4s

Pruning

4 alts after pruning (0 fresh and 4 done)

Merged error: 0b

regimes96.0ms

Accuracy

0% (0.0b remaining)

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

bsearch2.0ms