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

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. Using strategy rm
  3. Applied add-log-exp0.0

    \[\leadsto \color{blue}{\log \left(e^{\frac{-\left(f + n\right)}{f - n}}\right)}\]
  4. Using strategy rm
  5. Applied add-sqr-sqrt0.0

    \[\leadsto \log \color{blue}{\left(\sqrt{e^{\frac{-\left(f + n\right)}{f - n}}} \cdot \sqrt{e^{\frac{-\left(f + n\right)}{f - n}}}\right)}\]
  6. Applied log-prod0.0

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

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

Reproduce

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

Details

Time bar (total: 27.6s)Debug log

sample154.0ms

Algorithm
intervals

simplify22.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
21.0ms
(/ (- (+ f n)) (- f n))

prune10.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize25.0ms

Local error

Found 1 expressions with local error:

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

rewrite15.0ms

Algorithm
rewrite-expression-head
Rules
30×times-frac
24×add-cube-cbrt
24×*-un-lft-identity
24×add-sqr-sqrt
12×distribute-rgt-neg-in
12×distribute-lft-neg-in
10×associate-/l*
neg-mul-1
add-exp-log
add-cbrt-cube
associate-/r*
associate-/l/
distribute-neg-frac
associate-/r/
add-log-exp
flip--
div-inv
flip-+
distribute-frac-neg
div-exp
div-sub
flip3--
flip3-+
frac-2neg
clear-num
cbrt-undiv
pow1
neg-sub0
Counts
1 → 61
Calls
1 calls:
Slowest
11.0ms
(/ (- (+ f n)) (- f n))

series84.0ms

Counts
1 → 3
Calls
1 calls:
Slowest
84.0ms
(/ (- (+ f n)) (- f n))

simplify1.0s

Counts
81 → 64
Calls
81 calls:
Slowest
149.0ms
(- (- (* f f) (* n n)))
112.0ms
(/ (* (* (- (+ f n)) (- (+ f n))) (- (+ f n))) (* (* (- f n) (- f n)) (- f n)))
54.0ms
(/ (- (* (cbrt (+ f n)) (cbrt (+ f n)))) (* (cbrt (- f n)) (cbrt (- f n))))
44.0ms
(/ (- (* (cbrt (+ f n)) (cbrt (+ f n)))) 1)
33.0ms
(/ (* (cbrt (+ f n)) (cbrt (+ f n))) (* (cbrt (- f n)) (cbrt (- f n))))

prune401.0ms

Pruning

4 alts after pruning (4 fresh and 0 done)

Merged error: 0b

localize17.0ms

Local error

Found 3 expressions with local error:

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

rewrite33.0ms

Algorithm
rewrite-expression-head
Rules
90×times-frac
72×exp-prod
67×add-cube-cbrt
67×*-un-lft-identity
67×add-sqr-sqrt
37×log-pow
30×distribute-rgt-neg-in
30×distribute-lft-neg-in
10×associate-/l*
10×neg-mul-1
associate-/r/
add-exp-log
add-cbrt-cube
add-log-exp
distribute-frac-neg
pow1
flip--
div-inv
div-sub
flip3--
associate-/r*
log-prod
exp-neg
neg-sub0
associate-/l/
distribute-neg-frac
exp-diff
log-div
rem-exp-log
flip-+
log-rec
rem-log-exp
div-exp
flip3-+
frac-2neg
clear-num
cbrt-undiv
Counts
3 → 158
Calls
3 calls:
Slowest
11.0ms
(log (exp (/ (- (+ f n)) (- f n))))
9.0ms
(exp (/ (- (+ f n)) (- f n)))
8.0ms
(/ (- (+ f n)) (- f n))

series216.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
103.0ms
(exp (/ (- (+ f n)) (- f n)))
58.0ms
(/ (- (+ f n)) (- f n))
55.0ms
(log (exp (/ (- (+ f n)) (- f n))))

simplify2.3s

Counts
168 → 167
Calls
168 calls:
Slowest
140.0ms
(- (- (* f f) (* n n)))
118.0ms
(/ (* (* (- (+ f n)) (- (+ f n))) (- (+ f n))) (* (* (- f n) (- f n)) (- f n)))
105.0ms
(exp (/ (- (+ f n)) (- (* f f) (* n n))))
88.0ms
(exp (/ (- (* (cbrt (+ f n)) (cbrt (+ f n)))) (* (cbrt (- f n)) (cbrt (- f n)))))
67.0ms
(/ (- (* (cbrt (+ f n)) (cbrt (+ f n)))) (* (cbrt (- f n)) (cbrt (- f n))))

prune1.6s

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

localize9.0ms

Local error

Found 4 expressions with local error:

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

rewrite23.0ms

Algorithm
rewrite-expression-head
Rules
120×times-frac
90×add-cube-cbrt
90×*-un-lft-identity
90×add-sqr-sqrt
72×exp-prod
42×distribute-rgt-neg-in
42×distribute-lft-neg-in
20×associate-/l*
14×neg-mul-1
associate-/r/
add-exp-log
add-cbrt-cube
add-log-exp
associate-/r*
associate-/l/
distribute-neg-frac
flip--
div-inv
distribute-frac-neg
div-sub
flip3--
pow1
neg-sub0
rem-exp-log
flip-+
div-exp
exp-diff
flip3-+
frac-2neg
clear-num
cbrt-undiv
exp-neg
Counts
4 → 214
Calls
4 calls:
Slowest
7.0ms
(exp (/ (- (+ f n)) (- f n)))
4.0ms
(exp (/ (- (+ f n)) (- f n)))
4.0ms
(/ (- (+ f n)) (- f n))
4.0ms
(/ (- (+ f n)) (- f n))

series242.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
77.0ms
(exp (/ (- (+ f n)) (- f n)))
73.0ms
(exp (/ (- (+ f n)) (- f n)))
48.0ms
(/ (- (+ f n)) (- f n))
43.0ms
(/ (- (+ f n)) (- f n))

simplify3.5s

Counts
244 → 226
Calls
244 calls:
Slowest
175.0ms
(- (- (* f f) (* n n)))
159.0ms
(- (- (* f f) (* n n)))
104.0ms
(exp (/ (- (+ f n)) (- (* f f) (* n n))))
96.0ms
(exp (/ (- (+ f n)) (- (* f f) (* n n))))
93.0ms
(/ (* (* (- (+ f n)) (- (+ f n))) (- (+ f n))) (* (* (- f n) (- f n)) (- f n)))

prune3.4s

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0b

localize33.0ms

Local error

Found 4 expressions with local error:

29.6b
(/ (- (+ f n)) (- (* f f) (* n n)))
2.2b
(- (* f f) (* n n))
0.1b
(* (/ (- (+ f n)) (- (* f f) (* n n))) (+ f n))
0.0b
(exp (* (/ (- (+ f n)) (- (* f f) (* n n))) (+ f n)))

rewrite48.0ms

Algorithm
rewrite-expression-head
Rules
80×times-frac
54×add-cube-cbrt
54×*-un-lft-identity
54×add-sqr-sqrt
46×associate-*l*
27×distribute-rgt-neg-in
27×distribute-lft-neg-in
22×difference-of-squares
11×add-exp-log
11×add-cbrt-cube
10×associate-/l*
neg-mul-1
add-log-exp
pow1
associate-/r/
associate-/r*
flip--
flip-+
distribute-frac-neg
associate-*r*
flip3--
flip3-+
associate-/l/
distribute-neg-frac
div-inv
cbrt-unprod
associate-*r/
prod-exp
exp-sum
div-exp
distribute-lft-in
cbrt-undiv
frac-times
distribute-rgt-in
distribute-lft-neg-out
rem-exp-log
*-commutative
associate-*l/
pow-prod-down
div-sub
diff-log
exp-to-pow
frac-2neg
sub-neg
clear-num
exp-prod
exp-neg
neg-sub0
Counts
4 → 168
Calls
4 calls:
Slowest
22.0ms
(* (/ (- (+ f n)) (- (* f f) (* n n))) (+ f n))
11.0ms
(/ (- (+ f n)) (- (* f f) (* n n)))
6.0ms
(exp (* (/ (- (+ f n)) (- (* f f) (* n n))) (+ f n)))
4.0ms
(- (* f f) (* n n))

series200.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
112.0ms
(exp (* (/ (- (+ f n)) (- (* f f) (* n n))) (+ f n)))
43.0ms
(* (/ (- (+ f n)) (- (* f f) (* n n))) (+ f n))
27.0ms
(/ (- (+ f n)) (- (* f f) (* n n)))
17.0ms
(- (* f f) (* n n))

simplify11.8s

Counts
182 → 180
Calls
182 calls:
Slowest
614.0ms
(* (/ (- (+ f n)) (- (* f f) (* n n))) (+ f n))
511.0ms
(* (/ (- (+ f n)) (- (* f f) (* n n))) (+ f n))
491.0ms
(* (- (* f f) (* n n)) (+ (* f f) (- (* n n) (* f n))))
347.0ms
(* (/ (* (* (- (+ f n)) (- (+ f n))) (- (+ f n))) (* (* (- (* f f) (* n n)) (- (* f f) (* n n))) (- (* f f) (* n n)))) (* (* (+ f n) (+ f n)) (+ f n)))
296.0ms
(+ (- (log (- (+ f n))) (log (- (* f f) (* n n)))) (log (+ f n)))

prune1.8s

Pruning

3 alts after pruning (0 fresh and 3 done)

Merged error: 0b

regimes84.0ms

Accuracy

0% (0.0b remaining)

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

bsearch4.0ms

end0.0ms

sample582.0ms

Algorithm
intervals