Average Error: 0.0 → 0.0
Time: 31.4s
Precision: 64
Internal Precision: 128
\[\frac{-\left(f + n\right)}{f - n}\]
\[-\sqrt[3]{{\left(\frac{n + f}{f - n}\right)}^{3}}\]

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. Initial simplification0.0

    \[\leadsto -\frac{n + f}{f - n}\]
  3. Using strategy rm
  4. Applied add-cbrt-cube41.5

    \[\leadsto -\frac{n + f}{\color{blue}{\sqrt[3]{\left(\left(f - n\right) \cdot \left(f - n\right)\right) \cdot \left(f - n\right)}}}\]
  5. Applied add-cbrt-cube41.7

    \[\leadsto -\frac{\color{blue}{\sqrt[3]{\left(\left(n + f\right) \cdot \left(n + f\right)\right) \cdot \left(n + f\right)}}}{\sqrt[3]{\left(\left(f - n\right) \cdot \left(f - n\right)\right) \cdot \left(f - n\right)}}\]
  6. Applied cbrt-undiv41.7

    \[\leadsto -\color{blue}{\sqrt[3]{\frac{\left(\left(n + f\right) \cdot \left(n + f\right)\right) \cdot \left(n + f\right)}{\left(\left(f - n\right) \cdot \left(f - n\right)\right) \cdot \left(f - n\right)}}}\]
  7. Simplified0.0

    \[\leadsto -\sqrt[3]{\color{blue}{{\left(\frac{f + n}{f - n}\right)}^{3}}}\]
  8. Final simplification0.0

    \[\leadsto -\sqrt[3]{{\left(\frac{n + f}{f - n}\right)}^{3}}\]

Reproduce

herbie shell --seed 2018360 
(FPCore (f n)
  :name "subtraction fraction"
  (/ (- (+ f n)) (- f n)))

Details

Time bar (total: 29.4s)Debug log

start640.0ms

Algorithm
intervals

setup81.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize102.0ms

Local error

Found 1 expressions with local error:

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

rewrite50.0ms

Algorithm
rewrite-expression-head
Counts
1 → 31
Calls

1 calls. Slowest were:

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

series72.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

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

simplify398.0ms

Counts
32 → 34
Calls

32 calls. Slowest were:

226.0ms
(/ (* (* (+ n f) (+ n f)) (+ n f)) (* (* (- f n) (- f n)) (- f n)))
22.0ms
(/ (* (cbrt (+ n f)) (cbrt (+ n f))) (* (cbrt (- f n)) (cbrt (- f n))))
15.0ms
(+ (* f f) (+ (* n n) (* f n)))

prune316.0ms

Pruning

3 alts after pruning (3 fresh and 0 done)

Merged error: 0.0b

localize25.0ms

Local error

Found 3 expressions with local error:

0.0b
(pow (/ (+ f n) (- f n)) 3)
0.0b
(/ (+ f n) (- f n))
0.0b
(cbrt (pow (/ (+ f n) (- f n)) 3))

rewrite18.0ms

Algorithm
rewrite-expression-head
Counts
3 → 122
Calls

3 calls. Slowest were:

6.0ms
(/ (+ f n) (- f n))
5.0ms
(pow (/ (+ f n) (- f n)) 3)
3.0ms
(cbrt (pow (/ (+ f n) (- f n)) 3))

series190.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

81.0ms
(cbrt (pow (/ (+ f n) (- f n)) 3))
57.0ms
(pow (/ (+ f n) (- f n)) 3)
52.0ms
(/ (+ f n) (- f n))

simplify11.2s

Counts
111 → 131
Calls

111 calls. Slowest were:

539.0ms
(pow (/ (* (cbrt (+ f n)) (cbrt (+ f n))) (sqrt (- f n))) 3)
533.0ms
(cbrt (pow (/ (* (cbrt (+ f n)) (cbrt (+ f n))) (sqrt (- f n))) 3))
512.0ms
(pow (/ (* (cbrt (+ f n)) (cbrt (+ f n))) (sqrt (- f n))) 3)

prune1.4s

Pruning

4 alts after pruning (3 fresh and 1 done)

Merged error: 0b

localize27.0ms

Local error

Found 4 expressions with local error:

0.0b
(pow (/ (+ f n) (- f n)) 3)
0.0b
(* (/ (+ n f) (- f n)) (/ (+ n f) (- f n)))
0.0b
(/ (+ n f) (- f n))
0.0b
(/ (+ n f) (- f n))

rewrite18.0ms

Algorithm
rewrite-expression-head
Counts
4 → 161
Calls

4 calls. Slowest were:

7.0ms
(* (/ (+ n f) (- f n)) (/ (+ n f) (- f n)))
3.0ms
(/ (+ n f) (- f n))
3.0ms
(/ (+ n f) (- f n))

series198.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

54.0ms
(pow (/ (+ f n) (- f n)) 3)
51.0ms
(/ (+ n f) (- f n))
48.0ms
(/ (+ n f) (- f n))
44.0ms
(* (/ (+ n f) (- f n)) (/ (+ n f) (- f n)))

simplify7.9s

Counts
151 → 173
Calls

151 calls. Slowest were:

534.0ms
(pow (/ (* (cbrt (+ f n)) (cbrt (+ f n))) (sqrt (- f n))) 3)
468.0ms
(pow (/ (* (cbrt (+ f n)) (cbrt (+ f n))) (sqrt (- f n))) 3)
363.0ms
(* (* (+ f n) (+ f n)) (+ f n))

prune2.8s

Pruning

4 alts after pruning (2 fresh and 2 done)

Merged error: 0b

localize27.0ms

Local error

Found 4 expressions with local error:

0.6b
(cbrt (+ n f))
0.6b
(cbrt (+ n f))
0.6b
(cbrt (+ n f))
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))

series651.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

180.0ms
(* (cbrt (+ n f)) (cbrt (+ n f)))
164.0ms
(cbrt (+ n f))
162.0ms
(cbrt (+ n f))
145.0ms
(cbrt (+ n f))

simplify1.5s

Counts
59 → 87
Calls

59 calls. Slowest were:

160.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))))
141.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))))
127.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.6s

Pruning

4 alts after pruning (1 fresh and 3 done)

Merged error: 0b

regimes111.0ms

Accuracy

0% (0.0b remaining)

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

bsearch1.0ms