Average Error: 42.3 → 15.8
Time: 1.4m
Precision: 64
Internal Precision: 128
\[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
\[\begin{array}{l} \mathbf{if}\;i \le -4.058170487789591 \cdot 10^{-10}:\\ \;\;\;\;\frac{100}{i} \cdot \left(\left(e^{i} - 1\right) \cdot n\right)\\ \mathbf{elif}\;i \le -1.7183817648621783 \cdot 10^{-282}:\\ \;\;\;\;\left(100 \cdot \frac{1}{i}\right) \cdot \left(\left(i \cdot \left(i \cdot n\right)\right) \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot i\right) + i \cdot n\right)\\ \mathbf{elif}\;i \le 6.029086482308106 \cdot 10^{-307}:\\ \;\;\;\;\left(\left(i \cdot 50 + 100\right) + \frac{50}{3} \cdot \left(i \cdot i\right)\right) \cdot n\\ \mathbf{elif}\;i \le 8.902851403664407 \cdot 10^{-08}:\\ \;\;\;\;\left(100 \cdot \frac{1}{i}\right) \cdot \left(\left(i \cdot \left(i \cdot n\right)\right) \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot i\right) + i \cdot n\right)\\ \mathbf{else}:\\ \;\;\;\;\left(100 \cdot \frac{1}{i}\right) \cdot \left(\left(\left({n}^{4} \cdot \left(\left(\frac{1}{6} \cdot \log n\right) \cdot \left(\log n \cdot \log i\right)\right) + \left(\log i \cdot \left(n \cdot n\right) + \left(\left(n \cdot \frac{1}{2}\right) \cdot \left(n \cdot n\right)\right) \cdot \left(\log i \cdot \log i\right)\right)\right) + \log i \cdot \left(\left({n}^{4} \cdot \frac{1}{3}\right) \cdot \left(\log n \cdot \log n\right) + \left({n}^{4} \cdot \frac{1}{6}\right) \cdot \left(\log i \cdot \log i\right)\right)\right) + \left(\left(\left(\left(n \cdot \frac{1}{2}\right) \cdot \left(n \cdot n\right)\right) \cdot \left(\log n \cdot \log n\right) - \left(\left(\log i \cdot n\right) \cdot \left(\log n \cdot \left(n \cdot n\right)\right) + \log n \cdot \left(n \cdot n\right)\right)\right) - \left(\left(\left(\frac{1}{3} \cdot \log n\right) \cdot \left(\log i \cdot \log i\right)\right) \cdot {n}^{4} + \left(\log n \cdot \log n + \log i \cdot \log i\right) \cdot \left(\log n \cdot \left({n}^{4} \cdot \frac{1}{6}\right)\right)\right)\right)\right)\\ \end{array}\]

Error

Bits error versus i

Bits error versus n

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original42.3
Target42.0
Herbie15.8
\[100 \cdot \frac{e^{n \cdot \begin{array}{l} \mathbf{if}\;1 + \frac{i}{n} = 1:\\ \;\;\;\;\frac{i}{n}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{i}{n} \cdot \log \left(1 + \frac{i}{n}\right)}{\left(\frac{i}{n} + 1\right) - 1}\\ \end{array}} - 1}{\frac{i}{n}}\]

Derivation

  1. Split input into 4 regimes
  2. if i < -4.058170487789591e-10

    1. Initial program 29.6

      \[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
    2. Using strategy rm
    3. Applied div-inv29.6

      \[\leadsto 100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\color{blue}{i \cdot \frac{1}{n}}}\]
    4. Applied *-un-lft-identity29.6

      \[\leadsto 100 \cdot \frac{\color{blue}{1 \cdot \left({\left(1 + \frac{i}{n}\right)}^{n} - 1\right)}}{i \cdot \frac{1}{n}}\]
    5. Applied times-frac30.1

      \[\leadsto 100 \cdot \color{blue}{\left(\frac{1}{i} \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{1}{n}}\right)}\]
    6. Applied associate-*r*30.1

      \[\leadsto \color{blue}{\left(100 \cdot \frac{1}{i}\right) \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{1}{n}}}\]
    7. Simplified30.1

      \[\leadsto \left(100 \cdot \frac{1}{i}\right) \cdot \color{blue}{\left(n \cdot {\left(\frac{i}{n} + 1\right)}^{n} - n\right)}\]
    8. Taylor expanded around inf 12.7

      \[\leadsto \left(100 \cdot \frac{1}{i}\right) \cdot \color{blue}{\left(\left(e^{i} - 1\right) \cdot n\right)}\]
    9. Taylor expanded around inf 12.6

      \[\leadsto \color{blue}{\frac{100}{i}} \cdot \left(\left(e^{i} - 1\right) \cdot n\right)\]

    if -4.058170487789591e-10 < i < -1.7183817648621783e-282 or 6.029086482308106e-307 < i < 8.902851403664407e-08

    1. Initial program 49.6

      \[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
    2. Using strategy rm
    3. Applied div-inv49.6

      \[\leadsto 100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\color{blue}{i \cdot \frac{1}{n}}}\]
    4. Applied *-un-lft-identity49.6

      \[\leadsto 100 \cdot \frac{\color{blue}{1 \cdot \left({\left(1 + \frac{i}{n}\right)}^{n} - 1\right)}}{i \cdot \frac{1}{n}}\]
    5. Applied times-frac49.8

      \[\leadsto 100 \cdot \color{blue}{\left(\frac{1}{i} \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{1}{n}}\right)}\]
    6. Applied associate-*r*49.8

      \[\leadsto \color{blue}{\left(100 \cdot \frac{1}{i}\right) \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{1}{n}}}\]
    7. Simplified49.8

      \[\leadsto \left(100 \cdot \frac{1}{i}\right) \cdot \color{blue}{\left(n \cdot {\left(\frac{i}{n} + 1\right)}^{n} - n\right)}\]
    8. Taylor expanded around inf 49.7

      \[\leadsto \left(100 \cdot \frac{1}{i}\right) \cdot \color{blue}{\left(\left(e^{i} - 1\right) \cdot n\right)}\]
    9. Taylor expanded around 0 16.0

      \[\leadsto \left(100 \cdot \frac{1}{i}\right) \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({i}^{2} \cdot n\right) + \left(\frac{1}{6} \cdot \left({i}^{3} \cdot n\right) + i \cdot n\right)\right)}\]
    10. Simplified16.0

      \[\leadsto \left(100 \cdot \frac{1}{i}\right) \cdot \color{blue}{\left(\left(i \cdot \frac{1}{6} + \frac{1}{2}\right) \cdot \left(i \cdot \left(i \cdot n\right)\right) + i \cdot n\right)}\]

    if -1.7183817648621783e-282 < i < 6.029086482308106e-307

    1. Initial program 46.0

      \[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
    2. Using strategy rm
    3. Applied div-inv46.0

      \[\leadsto 100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\color{blue}{i \cdot \frac{1}{n}}}\]
    4. Applied *-un-lft-identity46.0

      \[\leadsto 100 \cdot \frac{\color{blue}{1 \cdot \left({\left(1 + \frac{i}{n}\right)}^{n} - 1\right)}}{i \cdot \frac{1}{n}}\]
    5. Applied times-frac46.4

      \[\leadsto 100 \cdot \color{blue}{\left(\frac{1}{i} \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{1}{n}}\right)}\]
    6. Applied associate-*r*48.7

      \[\leadsto \color{blue}{\left(100 \cdot \frac{1}{i}\right) \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{1}{n}}}\]
    7. Simplified48.7

      \[\leadsto \left(100 \cdot \frac{1}{i}\right) \cdot \color{blue}{\left(n \cdot {\left(\frac{i}{n} + 1\right)}^{n} - n\right)}\]
    8. Taylor expanded around inf 48.7

      \[\leadsto \left(100 \cdot \frac{1}{i}\right) \cdot \color{blue}{\left(\left(e^{i} - 1\right) \cdot n\right)}\]
    9. Taylor expanded around 0 15.6

      \[\leadsto \color{blue}{\frac{50}{3} \cdot \left({i}^{2} \cdot n\right) + \left(100 \cdot n + 50 \cdot \left(i \cdot n\right)\right)}\]
    10. Simplified15.6

      \[\leadsto \color{blue}{\left(\left(100 + i \cdot 50\right) + \left(i \cdot i\right) \cdot \frac{50}{3}\right) \cdot n}\]

    if 8.902851403664407e-08 < i

    1. Initial program 32.1

      \[100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{i}{n}}\]
    2. Using strategy rm
    3. Applied div-inv32.1

      \[\leadsto 100 \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\color{blue}{i \cdot \frac{1}{n}}}\]
    4. Applied *-un-lft-identity32.1

      \[\leadsto 100 \cdot \frac{\color{blue}{1 \cdot \left({\left(1 + \frac{i}{n}\right)}^{n} - 1\right)}}{i \cdot \frac{1}{n}}\]
    5. Applied times-frac32.1

      \[\leadsto 100 \cdot \color{blue}{\left(\frac{1}{i} \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{1}{n}}\right)}\]
    6. Applied associate-*r*32.1

      \[\leadsto \color{blue}{\left(100 \cdot \frac{1}{i}\right) \cdot \frac{{\left(1 + \frac{i}{n}\right)}^{n} - 1}{\frac{1}{n}}}\]
    7. Simplified32.1

      \[\leadsto \left(100 \cdot \frac{1}{i}\right) \cdot \color{blue}{\left(n \cdot {\left(\frac{i}{n} + 1\right)}^{n} - n\right)}\]
    8. Taylor expanded around 0 20.6

      \[\leadsto \left(100 \cdot \frac{1}{i}\right) \cdot \color{blue}{\left(\left(\frac{1}{6} \cdot \left({n}^{4} \cdot \left(\log i \cdot {\left(\log n\right)}^{2}\right)\right) + \left(\frac{1}{2} \cdot \left({n}^{3} \cdot {\left(\log n\right)}^{2}\right) + \left(\frac{1}{2} \cdot \left({n}^{3} \cdot {\left(\log i\right)}^{2}\right) + \left(\frac{1}{3} \cdot \left({n}^{4} \cdot \left({\left(\log n\right)}^{2} \cdot \log i\right)\right) + \left(\frac{1}{6} \cdot \left({n}^{4} \cdot {\left(\log i\right)}^{3}\right) + {n}^{2} \cdot \log i\right)\right)\right)\right)\right) - \left(\frac{1}{2} \cdot \left({n}^{3} \cdot \left(\log n \cdot \log i\right)\right) + \left(\frac{1}{2} \cdot \left({n}^{3} \cdot \left(\log i \cdot \log n\right)\right) + \left({n}^{2} \cdot \log n + \left(\frac{1}{6} \cdot \left({n}^{4} \cdot {\left(\log n\right)}^{3}\right) + \left(\frac{1}{6} \cdot \left({n}^{4} \cdot \left(\log n \cdot {\left(\log i\right)}^{2}\right)\right) + \frac{1}{3} \cdot \left({n}^{4} \cdot \left({\left(\log i\right)}^{2} \cdot \log n\right)\right)\right)\right)\right)\right)\right)\right)}\]
    9. Simplified20.6

      \[\leadsto \left(100 \cdot \frac{1}{i}\right) \cdot \color{blue}{\left(\left(\log i \cdot \left(\left(\log i \cdot \log i\right) \cdot \left({n}^{4} \cdot \frac{1}{6}\right) + \left(\log n \cdot \log n\right) \cdot \left(\frac{1}{3} \cdot {n}^{4}\right)\right) + \left(\left(\left(\left(n \cdot \frac{1}{2}\right) \cdot \left(n \cdot n\right)\right) \cdot \left(\log i \cdot \log i\right) + \left(n \cdot n\right) \cdot \log i\right) + {n}^{4} \cdot \left(\left(\frac{1}{6} \cdot \log n\right) \cdot \left(\log i \cdot \log n\right)\right)\right)\right) + \left(\left(\left(\left(n \cdot \frac{1}{2}\right) \cdot \left(n \cdot n\right)\right) \cdot \left(\log n \cdot \log n\right) - \left(\left(\left(n \cdot n\right) \cdot \log n\right) \cdot \left(\log i \cdot n\right) + \left(n \cdot n\right) \cdot \log n\right)\right) - \left({n}^{4} \cdot \left(\left(\log i \cdot \log i\right) \cdot \left(\log n \cdot \frac{1}{3}\right)\right) + \left(\log n \cdot \left({n}^{4} \cdot \frac{1}{6}\right)\right) \cdot \left(\log i \cdot \log i + \log n \cdot \log n\right)\right)\right)\right)}\]
  3. Recombined 4 regimes into one program.
  4. Final simplification15.8

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \le -4.058170487789591 \cdot 10^{-10}:\\ \;\;\;\;\frac{100}{i} \cdot \left(\left(e^{i} - 1\right) \cdot n\right)\\ \mathbf{elif}\;i \le -1.7183817648621783 \cdot 10^{-282}:\\ \;\;\;\;\left(100 \cdot \frac{1}{i}\right) \cdot \left(\left(i \cdot \left(i \cdot n\right)\right) \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot i\right) + i \cdot n\right)\\ \mathbf{elif}\;i \le 6.029086482308106 \cdot 10^{-307}:\\ \;\;\;\;\left(\left(i \cdot 50 + 100\right) + \frac{50}{3} \cdot \left(i \cdot i\right)\right) \cdot n\\ \mathbf{elif}\;i \le 8.902851403664407 \cdot 10^{-08}:\\ \;\;\;\;\left(100 \cdot \frac{1}{i}\right) \cdot \left(\left(i \cdot \left(i \cdot n\right)\right) \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot i\right) + i \cdot n\right)\\ \mathbf{else}:\\ \;\;\;\;\left(100 \cdot \frac{1}{i}\right) \cdot \left(\left(\left({n}^{4} \cdot \left(\left(\frac{1}{6} \cdot \log n\right) \cdot \left(\log n \cdot \log i\right)\right) + \left(\log i \cdot \left(n \cdot n\right) + \left(\left(n \cdot \frac{1}{2}\right) \cdot \left(n \cdot n\right)\right) \cdot \left(\log i \cdot \log i\right)\right)\right) + \log i \cdot \left(\left({n}^{4} \cdot \frac{1}{3}\right) \cdot \left(\log n \cdot \log n\right) + \left({n}^{4} \cdot \frac{1}{6}\right) \cdot \left(\log i \cdot \log i\right)\right)\right) + \left(\left(\left(\left(n \cdot \frac{1}{2}\right) \cdot \left(n \cdot n\right)\right) \cdot \left(\log n \cdot \log n\right) - \left(\left(\log i \cdot n\right) \cdot \left(\log n \cdot \left(n \cdot n\right)\right) + \log n \cdot \left(n \cdot n\right)\right)\right) - \left(\left(\left(\frac{1}{3} \cdot \log n\right) \cdot \left(\log i \cdot \log i\right)\right) \cdot {n}^{4} + \left(\log n \cdot \log n + \log i \cdot \log i\right) \cdot \left(\log n \cdot \left({n}^{4} \cdot \frac{1}{6}\right)\right)\right)\right)\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2018360 
(FPCore (i n)
  :name "Compound Interest"

  :herbie-target
  (* 100 (/ (- (exp (* n (if (== (+ 1 (/ i n)) 1) (/ i n) (/ (* (/ i n) (log (+ 1 (/ i n)))) (- (+ (/ i n) 1) 1))))) 1) (/ i n)))

  (* 100 (/ (- (pow (+ 1 (/ i n)) n) 1) (/ i n))))

Details

Time bar (total: 1.2m)Debug log

start449.0ms

Algorithm
intervals

setup598.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 42.6b

localize17.0ms

Local error

Found 4 expressions with local error:

12.1b
(/ (- (pow (+ 1 (/ i n)) n) 1) (/ i n))
5.2b
(pow (+ 1 (/ i n)) n)
1.6b
(- (pow (+ 1 (/ i n)) n) 1)
0.0b
(* 100 (/ (- (pow (+ 1 (/ i n)) n) 1) (/ i n)))

rewrite43.0ms

Algorithm
rewrite-expression-head
Counts
4 → 105
Calls

4 calls. Slowest were:

16.0ms
(/ (- (pow (+ 1 (/ i n)) n) 1) (/ i n))
12.0ms
(- (pow (+ 1 (/ i n)) n) 1)
11.0ms
(* 100 (/ (- (pow (+ 1 (/ i n)) n) 1) (/ i n)))

series803.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

261.0ms
(* 100 (/ (- (pow (+ 1 (/ i n)) n) 1) (/ i n)))
215.0ms
(/ (- (pow (+ 1 (/ i n)) n) 1) (/ i n))
183.0ms
(- (pow (+ 1 (/ i n)) n) 1)
144.0ms
(pow (+ 1 (/ i n)) n)

simplify3.7s

Counts
97 → 117
Calls

97 calls. Slowest were:

354.0ms
(/ (* n (- (exp (* n (- (log (/ -1 n)) (log (/ -1 i))))) 1)) i)
294.0ms
(/ (* (* (- (pow (+ 1 (/ i n)) n) 1) (- (pow (+ 1 (/ i n)) n) 1)) (- (pow (+ 1 (/ i n)) n) 1)) (* (* (/ i n) (/ i n)) (/ i n)))
287.0ms
(- (exp (* n (- (log (/ -1 n)) (log (/ -1 i))))) 1)

prune1.4s

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 19.7b

localize38.0ms

Local error

Found 4 expressions with local error:

12.1b
(/ (/ (- (pow (pow (+ 1 (/ i n)) n) 3) (pow 1 3)) (+ (* (pow (+ 1 (/ i n)) n) (pow (+ 1 (/ i n)) n)) (+ (* 1 1) (* (pow (+ 1 (/ i n)) n) 1)))) (/ i n))
5.2b
(pow (+ 1 (/ i n)) n)
5.2b
(pow (+ 1 (/ i n)) n)
5.2b
(pow (+ 1 (/ i n)) n)

rewrite76.0ms

Algorithm
rewrite-expression-head
Counts
4 → 255
Calls

4 calls. Slowest were:

62.0ms
(/ (/ (- (pow (pow (+ 1 (/ i n)) n) 3) (pow 1 3)) (+ (* (pow (+ 1 (/ i n)) n) (pow (+ 1 (/ i n)) n)) (+ (* 1 1) (* (pow (+ 1 (/ i n)) n) 1)))) (/ i n))
1.0ms
(pow (+ 1 (/ i n)) n)
1.0ms
(pow (+ 1 (/ i n)) n)

series5.2s

Counts
4 → 12
Calls

4 calls. Slowest were:

4.8s
(/ (/ (- (pow (pow (+ 1 (/ i n)) n) 3) (pow 1 3)) (+ (* (pow (+ 1 (/ i n)) n) (pow (+ 1 (/ i n)) n)) (+ (* 1 1) (* (pow (+ 1 (/ i n)) n) 1)))) (/ i n))
142.0ms
(pow (+ 1 (/ i n)) n)
116.0ms
(pow (+ 1 (/ i n)) n)
113.0ms
(pow (+ 1 (/ i n)) n)

simplify44.9s

Counts
387 → 267
Calls

387 calls. Slowest were:

710.0ms
(/ (/ (- (pow (sqrt (pow (+ 1 (/ i n)) n)) 3) (sqrt (pow 1 3))) (cbrt (+ (* (pow (+ 1 (/ i n)) n) (pow (+ 1 (/ i n)) n)) (+ (* 1 1) (* (pow (+ 1 (/ i n)) n) 1))))) (/ 1 n))
685.0ms
(/ (/ (- (pow (sqrt (pow (+ 1 (/ i n)) n)) 3) (sqrt (pow 1 3))) (sqrt (+ (* (pow (+ 1 (/ i n)) n) (pow (+ 1 (/ i n)) n)) (+ (* 1 1) (* (pow (+ 1 (/ i n)) n) 1))))) (/ 1 n))
638.0ms
(/ (/ (- (pow (sqrt (pow (+ 1 (/ i n)) n)) 3) (sqrt (pow 1 3))) (+ (* (pow (+ 1 (/ i n)) n) (pow (+ 1 (/ i n)) n)) (+ (* 1 1) (* (pow (+ 1 (/ i n)) n) 1)))) (/ i n))

prune3.8s

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 19.7b

localize19.0ms

Local error

Found 4 expressions with local error:

5.2b
(pow (+ (/ i n) 1) n)
1.6b
(- (* n (pow (+ (/ i n) 1) n)) n)
0.3b
(* 100 (/ 1 i))
0.3b
(* (* 100 (/ 1 i)) (- (* n (pow (+ (/ i n) 1) n)) n))

rewrite29.0ms

Algorithm
rewrite-expression-head
Counts
4 → 65
Calls

4 calls. Slowest were:

19.0ms
(* (* 100 (/ 1 i)) (- (* n (pow (+ (/ i n) 1) n)) n))
5.0ms
(- (* n (pow (+ (/ i n) 1) n)) n)
4.0ms
(pow (+ (/ i n) 1) n)

series349.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

149.0ms
(- (* n (pow (+ (/ i n) 1) n)) n)
97.0ms
(* (* 100 (/ 1 i)) (- (* n (pow (+ (/ i n) 1) n)) n))
96.0ms
(pow (+ (/ i n) 1) n)
7.0ms
(* 100 (/ 1 i))

simplify3.5s

Counts
43 → 77
Calls

43 calls. Slowest were:

514.0ms
(/ (* (- (* 100 (exp (* (- (log (/ 1 n)) (log (/ 1 i))) n))) 100) n) i)
291.0ms
(- (+ (* 1/6 (* (pow n 4) (* (log i) (pow (log n) 2)))) (+ (* 1/2 (* (pow n 3) (pow (log n) 2))) (+ (* 1/2 (* (pow n 3) (pow (log i) 2))) (+ (* 1/3 (* (pow n 4) (* (pow (log n) 2) (log i)))) (+ (* 1/6 (* (pow n 4) (pow (log i) 3))) (* (pow n 2) (log i))))))) (+ (* 1/2 (* (pow n 3) (* (log n) (log i)))) (+ (* 1/2 (* (pow n 3) (* (log i) (log n)))) (+ (* (pow n 2) (log n)) (+ (* 1/6 (* (pow n 4) (pow (log n) 3))) (+ (* 1/6 (* (pow n 4) (* (log n) (pow (log i) 2)))) (* 1/3 (* (pow n 4) (* (pow (log i) 2) (log n))))))))))
249.0ms
(* (* 100 1) (- (* (* n (pow (+ (/ i n) 1) n)) (* n (pow (+ (/ i n) 1) n))) (* n n)))

prune656.0ms

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 14.6b

localize10.0ms

Local error

Found 4 expressions with local error:

4.5b
(- (exp i) 1)
0.4b
(* (* 100 (/ 1 i)) (* (- (exp i) 1) n))
0.3b
(* 100 (/ 1 i))
0.0b
(* (- (exp i) 1) n)

rewrite24.0ms

Algorithm
rewrite-expression-head
Counts
4 → 61
Calls

4 calls. Slowest were:

14.0ms
(* (* 100 (/ 1 i)) (* (- (exp i) 1) n))
6.0ms
(* (- (exp i) 1) n)
3.0ms
(- (exp i) 1)

series95.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

42.0ms
(* (* 100 (/ 1 i)) (* (- (exp i) 1) n))
35.0ms
(* (- (exp i) 1) n)
11.0ms
(- (exp i) 1)
7.0ms
(* 100 (/ 1 i))

simplify2.0s

Counts
37 → 73
Calls

37 calls. Slowest were:

301.0ms
(* (* 100 (/ 1 i)) (* (- (exp i) 1) n))
228.0ms
(* (* 100 1) (* (- (* (exp i) (exp i)) (* 1 1)) n))
209.0ms
(+ (* 1/2 (* (pow i 2) n)) (+ (* 1/6 (* (pow i 3) n)) (* i n)))

prune518.0ms

Pruning

11 alts after pruning (11 fresh and 0 done)

Merged error: 2.5b

regimes214.0ms

Accuracy

58.8% (12.0b remaining)

Error of 15.8b against oracle of 3.8b and baseline of 32.9b

bsearch899.0ms