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

Details

Time bar (total: 46.2s)Debug log

sample173.0ms

Algorithm
intervals

simplify69.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune8.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.3b

localize20.0ms

Local error

Found 1 expressions with local error:

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

rewrite15.0ms

Algorithm
rewrite-expression-head
Counts
1 → 63
Calls

1 calls. Slowest were:

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

series625.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

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

simplify1.4s

Counts
81 → 66
Calls

81 calls. Slowest were:

258.0ms
(- (- (* f f) (* n n)))
153.0ms
(/ (* (* (- (+ f n)) (- (+ f n))) (- (+ f n))) (* (* (- f n) (- f n)) (- f n)))
50.0ms
(/ (- (* (cbrt (+ f n)) (cbrt (+ f n)))) (* (cbrt (- f n)) (cbrt (- f n))))

prune489.0ms

Pruning

4 alts after pruning (3 fresh and 1 done)

Merged error: 0.2b

localize21.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)))

rewrite17.0ms

Algorithm
rewrite-expression-head
Counts
4 → 83
Calls

4 calls. Slowest were:

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

series575.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

166.0ms
(cbrt (- f n))
143.0ms
(cbrt (- f n))
134.0ms
(* (cbrt (- f n)) (cbrt (- f n)))
132.0ms
(cbrt (- f n))

simplify2.0s

Counts
59 → 95
Calls

59 calls. Slowest were:

192.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))))
151.0ms
(* (cbrt (- (* f f) (* n n))) (cbrt (- f n)))
149.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))))

prune918.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:

prune5.0ms

Pruning

4 alts after pruning (1 fresh and 3 done)

Merged error: 0.2b

localize19.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))))

rewrite46.0ms

Algorithm
rewrite-expression-head
Counts
2 → 491
Calls

2 calls. Slowest were:

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

series102.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

51.0ms
(/ (- (sqrt (+ f n))) (/ (- f n) (sqrt (+ f n))))
51.0ms
(/ (- f n) (sqrt (+ f n)))

simplify33.6s

Counts
871 → 497
Calls

871 calls. Slowest were:

542.0ms
(/ (- (* (cbrt (sqrt (+ f n))) (cbrt (sqrt (+ f n))))) (/ (* (cbrt (- f n)) (cbrt (- f n))) 1))
452.0ms
(/ (- (* (cbrt (sqrt (+ f n))) (cbrt (sqrt (+ f n))))) (/ (* (cbrt (- f n)) (cbrt (- f n))) (* (cbrt (sqrt (+ f n))) (cbrt (sqrt (+ f n))))))
441.0ms
(/ (- (* (cbrt (sqrt (+ f n))) (cbrt (sqrt (+ f n))))) (/ (* (cbrt (- f n)) (cbrt (- f n))) (sqrt (sqrt (+ f n)))))

prune5.2s

Pruning

4 alts after pruning (1 fresh and 3 done)

Merged error: 0b

regimes148.0ms

Accuracy

0% (0.0b remaining)

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

bsearch3.0ms

end0.0ms

sample772.0ms

Algorithm
intervals