Average Error: 0.0 → 0.0
Time: 20.7s
Precision: 64
Internal Precision: 128
\[\frac{-\left(f + n\right)}{f - n}\]
\[\log_* (1 + (e^{-\frac{n + f}{f - n}} - 1)^*)\]

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 log1p-expm1-u0.0

    \[\leadsto \color{blue}{\log_* (1 + (e^{\frac{-\left(f + n\right)}{f - n}} - 1)^*)}\]
  4. Final simplification0.0

    \[\leadsto \log_* (1 + (e^{-\frac{n + f}{f - n}} - 1)^*)\]

Reproduce

herbie shell --seed 2019005 +o rules:numerics
(FPCore (f n)
  :name "subtraction fraction"
  (/ (- (+ f n)) (- f n)))

Details

Time bar (total: 19.8s)Debug log

sample109.0ms

Algorithm
intervals

simplify23.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune6.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize62.0ms

Local error

Found 1 expressions with local error:

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

rewrite17.0ms

Algorithm
rewrite-expression-head
Counts
1 → 63
Calls

1 calls. Slowest were:

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

series162.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

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

simplify1.4s

Counts
81 → 66
Calls

81 calls. Slowest were:

262.0ms
(- (- (* f f) (* n n)))
88.0ms
(/ (* (* (- (+ f n)) (- (+ f n))) (- (+ f n))) (* (* (- f n) (- f n)) (- f n)))
84.0ms
(/ (- (* (cbrt (+ f n)) (cbrt (+ f n)))) (* (cbrt (- f n)) (cbrt (- f n))))

prune517.0ms

Pruning

6 alts after pruning (6 fresh and 0 done)

Merged error: 0b

localize14.0ms

Local error

Found 3 expressions with local error:

0.5b
(expm1 (/ (- (+ f n)) (- f n)))
0.0b
(/ (- (+ f n)) (- f n))
0.0b
(log1p (expm1 (/ (- (+ f n)) (- f n))))

rewrite12.0ms

Algorithm
rewrite-expression-head
Counts
3 → 85
Calls

3 calls. Slowest were:

9.0ms
(/ (- (+ f n)) (- f n))
1.0ms
(expm1 (/ (- (+ f n)) (- f n)))
0.0ms
(log1p (expm1 (/ (- (+ f n)) (- f n))))

series215.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

102.0ms
(expm1 (/ (- (+ f n)) (- f n)))
74.0ms
(log1p (expm1 (/ (- (+ f n)) (- f n))))
39.0ms
(/ (- (+ f n)) (- f n))

simplify1.3s

Counts
89 → 94
Calls

89 calls. Slowest were:

239.0ms
(- (- (* f f) (* n n)))
118.0ms
(/ (* (* (- (+ f n)) (- (+ f n))) (- (+ f n))) (* (* (- f n) (- f n)) (- f n)))
84.0ms
(/ (- (* (cbrt (+ f n)) (cbrt (+ f n)))) (* (cbrt (- f n)) (cbrt (- f n))))

prune965.0ms

Pruning

5 alts after pruning (4 fresh and 1 done)

Merged error: 0b

localize15.0ms

Local error

Found 4 expressions with local error:

0.5b
(expm1 (* (* (cbrt (/ (- (+ f n)) (- f n))) (cbrt (/ (- (+ f n)) (- f n)))) (cbrt (/ (- (+ f n)) (- f n)))))
0.0b
(* (* (cbrt (/ (- (+ f n)) (- f n))) (cbrt (/ (- (+ f n)) (- f n)))) (cbrt (/ (- (+ f n)) (- f n))))
0.0b
(/ (- (+ f n)) (- f n))
0.0b
(/ (- (+ f n)) (- f n))

rewrite42.0ms

Algorithm
rewrite-expression-head
Counts
4 → 209
Calls

4 calls. Slowest were:

20.0ms
(* (* (cbrt (/ (- (+ f n)) (- f n))) (cbrt (/ (- (+ f n)) (- f n)))) (cbrt (/ (- (+ f n)) (- f n))))
11.0ms
(/ (- (+ f n)) (- f n))
5.0ms
(/ (- (+ f n)) (- f n))

series331.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

127.0ms
(expm1 (* (* (cbrt (/ (- (+ f n)) (- f n))) (cbrt (/ (- (+ f n)) (- f n)))) (cbrt (/ (- (+ f n)) (- f n)))))
94.0ms
(* (* (cbrt (/ (- (+ f n)) (- f n))) (cbrt (/ (- (+ f n)) (- f n)))) (cbrt (/ (- (+ f n)) (- f n))))
56.0ms
(/ (- (+ f n)) (- f n))
53.0ms
(/ (- (+ f n)) (- f n))

simplify4.6s

Counts
238 → 221
Calls

238 calls. Slowest were:

314.0ms
(* (* (* (* (cbrt (/ (- (+ f n)) (- f n))) (cbrt (/ (- (+ f n)) (- f n)))) (* (cbrt (/ (- (+ f n)) (- f n))) (cbrt (/ (- (+ f n)) (- f n))))) (* (cbrt (/ (- (+ f n)) (- f n))) (cbrt (/ (- (+ f n)) (- f n))))) (/ (- (+ f n)) (- f n)))
272.0ms
(* (* (/ (- (+ f n)) (- f n)) (/ (- (+ f n)) (- f n))) (/ (- (+ f n)) (- f n)))
268.0ms
(- (- (* f f) (* n n)))

prune2.9s

Pruning

4 alts after pruning (3 fresh and 1 done)

Merged error: 0b

localize37.0ms

Local error

Found 4 expressions with local error:

0.6b
(cbrt (- f n))
0.6b
(cbrt (- (+ f n)))
0.5b
(expm1 (/ (* (* (cbrt (/ (- (+ f n)) (- f n))) (cbrt (/ (- (+ f n)) (- f n)))) (cbrt (- (+ f n)))) (cbrt (- f n))))
0.0b
(/ (* (* (cbrt (/ (- (+ f n)) (- f n))) (cbrt (/ (- (+ f n)) (- f n)))) (cbrt (- (+ f n)))) (cbrt (- f n)))

rewrite25.0ms

Algorithm
rewrite-expression-head
Counts
4 → 92
Calls

4 calls. Slowest were:

22.0ms
(/ (* (* (cbrt (/ (- (+ f n)) (- f n))) (cbrt (/ (- (+ f n)) (- f n)))) (cbrt (- (+ f n)))) (cbrt (- f n)))
1.0ms
(cbrt (- f n))
1.0ms
(cbrt (- (+ f n)))

series541.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

157.0ms
(cbrt (- (+ f n)))
154.0ms
(cbrt (- f n))
152.0ms
(expm1 (/ (* (* (cbrt (/ (- (+ f n)) (- f n))) (cbrt (/ (- (+ f n)) (- f n)))) (cbrt (- (+ f n)))) (cbrt (- f n))))
79.0ms
(/ (* (* (cbrt (/ (- (+ f n)) (- f n))) (cbrt (/ (- (+ f n)) (- f n)))) (cbrt (- (+ f n)))) (cbrt (- f n)))

simplify4.2s

Counts
68 → 104
Calls

68 calls. Slowest were:

430.0ms
(/ (* (* (* (* (cbrt (/ (- (+ f n)) (- f n))) (cbrt (/ (- (+ f n)) (- f n)))) (* (cbrt (/ (- (+ f n)) (- f n))) (cbrt (/ (- (+ f n)) (- f n))))) (* (cbrt (/ (- (+ f n)) (- f n))) (cbrt (/ (- (+ f n)) (- f n))))) (- (+ f n))) (- f n))
394.0ms
(* (* (cbrt (/ (- (+ f n)) (- f n))) (cbrt (/ (- (+ f n)) (- f n)))) (cbrt (- (- (* f f) (* n n)))))
388.0ms
(* (* (cbrt (/ (- (+ f n)) (- f n))) (cbrt (- (+ f n)))) (cbrt (- (- (* f f) (* n n)))))

prune1.4s

Pruning

4 alts after pruning (2 fresh and 2 done)

Merged error: 0b

regimes100.0ms

Accuracy

0% (0.0b remaining)

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

bsearch2.0ms

end0.0ms

sample844.0ms

Algorithm
intervals