Average Error: 45.7 → 0.0
Time: 10.1s
Precision: 64
Internal Precision: 128
\[\frac{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1.0}\]
\[\begin{array}{l} \mathbf{if}\;i \le 233.33044365925295:\\ \;\;\;\;\frac{\frac{i}{4}}{\left(4 \cdot i\right) \cdot i - 1.0} \cdot i\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{16} + \frac{0.00390625}{{i}^{4}}\right) + \frac{\frac{0.015625}{i}}{i}\\ \end{array}\]

Error

Bits error versus i

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if i < 233.33044365925295

    1. Initial program 44.3

      \[\frac{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1.0}\]
    2. Simplified0.0

      \[\leadsto \color{blue}{\frac{i \cdot \frac{i}{4}}{i \cdot \left(4 \cdot i\right) - 1.0}}\]
    3. Using strategy rm
    4. Applied *-un-lft-identity0.0

      \[\leadsto \frac{i \cdot \frac{i}{4}}{\color{blue}{1 \cdot \left(i \cdot \left(4 \cdot i\right) - 1.0\right)}}\]
    5. Applied times-frac0.0

      \[\leadsto \color{blue}{\frac{i}{1} \cdot \frac{\frac{i}{4}}{i \cdot \left(4 \cdot i\right) - 1.0}}\]
    6. Simplified0.0

      \[\leadsto \color{blue}{i} \cdot \frac{\frac{i}{4}}{i \cdot \left(4 \cdot i\right) - 1.0}\]

    if 233.33044365925295 < i

    1. Initial program 47.2

      \[\frac{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1.0}\]
    2. Simplified30.8

      \[\leadsto \color{blue}{\frac{i \cdot \frac{i}{4}}{i \cdot \left(4 \cdot i\right) - 1.0}}\]
    3. Using strategy rm
    4. Applied *-un-lft-identity30.8

      \[\leadsto \frac{i \cdot \frac{i}{4}}{\color{blue}{1 \cdot \left(i \cdot \left(4 \cdot i\right) - 1.0\right)}}\]
    5. Applied times-frac31.0

      \[\leadsto \color{blue}{\frac{i}{1} \cdot \frac{\frac{i}{4}}{i \cdot \left(4 \cdot i\right) - 1.0}}\]
    6. Simplified31.0

      \[\leadsto \color{blue}{i} \cdot \frac{\frac{i}{4}}{i \cdot \left(4 \cdot i\right) - 1.0}\]
    7. Taylor expanded around inf 0.0

      \[\leadsto \color{blue}{0.015625 \cdot \frac{1}{{i}^{2}} + \left(\frac{1}{16} + 0.00390625 \cdot \frac{1}{{i}^{4}}\right)}\]
    8. Simplified0.0

      \[\leadsto \color{blue}{\frac{\frac{0.015625}{i}}{i} + \left(\frac{1}{16} + \frac{0.00390625}{{i}^{4}}\right)}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \le 233.33044365925295:\\ \;\;\;\;\frac{\frac{i}{4}}{\left(4 \cdot i\right) \cdot i - 1.0} \cdot i\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{16} + \frac{0.00390625}{{i}^{4}}\right) + \frac{\frac{0.015625}{i}}{i}\\ \end{array}\]

Reproduce

herbie shell --seed 2019005 
(FPCore (i)
  :name "Octave 3.8, jcobi/4, as called"
  :pre (and (> i 0))
  (/ (/ (* (* i i) (* i i)) (* (* 2 i) (* 2 i))) (- (* (* 2 i) (* 2 i)) 1.0)))

Details

Time bar (total: 9.8s)Debug log

sample31.0ms

Algorithm
intervals

simplify103.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

103.0ms
(/ (/ (* (* i i) (* i i)) (* (* 2 i) (* 2 i))) (- (* (* 2 i) (* 2 i)) 1.0))

prune8.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 16.0b

localize17.0ms

Local error

Found 1 expressions with local error:

16.0b
(/ (* i (/ i 4)) (- (* i (* 4 i)) 1.0))

rewrite6.0ms

Algorithm
rewrite-expression-head
Counts
1 → 22
Calls

1 calls. Slowest were:

6.0ms
(/ (* i (/ i 4)) (- (* i (* 4 i)) 1.0))

series29.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

29.0ms
(/ (* i (/ i 4)) (- (* i (* 4 i)) 1.0))

simplify767.0ms

Counts
17 → 25
Calls

17 calls. Slowest were:

189.0ms
(+ (* (* i (* 4 i)) (* i (* 4 i))) (+ (* 1.0 1.0) (* (* i (* 4 i)) 1.0)))
147.0ms
(- (log (* i (/ i 4))) (log (- (* i (* 4 i)) 1.0)))
109.0ms
(/ (* (* (* i (/ i 4)) (* i (/ i 4))) (* i (/ i 4))) (* (* (- (* i (* 4 i)) 1.0) (- (* i (* 4 i)) 1.0)) (- (* i (* 4 i)) 1.0)))

prune180.0ms

Pruning

4 alts after pruning (3 fresh and 1 done)

Merged error: 0b

localize5.0ms

Local error

Found 2 expressions with local error:

15.4b
(/ (/ i 4) (- (* i (* 4 i)) 1.0))
0.1b
(* i (/ (/ i 4) (- (* i (* 4 i)) 1.0)))

rewrite11.0ms

Algorithm
rewrite-expression-head
Counts
2 → 61
Calls

2 calls. Slowest were:

5.0ms
(/ (/ i 4) (- (* i (* 4 i)) 1.0))
5.0ms
(* i (/ (/ i 4) (- (* i (* 4 i)) 1.0)))

series75.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

42.0ms
(/ (/ i 4) (- (* i (* 4 i)) 1.0))
33.0ms
(* i (/ (/ i 4) (- (* i (* 4 i)) 1.0)))

simplify2.0s

Counts
58 → 67
Calls

58 calls. Slowest were:

275.0ms
(/ (* (* (/ i 4) (/ i 4)) (/ i 4)) (* (* (- (* i (* 4 i)) 1.0) (- (* i (* 4 i)) 1.0)) (- (* i (* 4 i)) 1.0)))
181.0ms
(+ (* (* i (* 4 i)) (* i (* 4 i))) (+ (* 1.0 1.0) (* (* i (* 4 i)) 1.0)))
149.0ms
(- (+ (* 0.25 i) (+ (* 1.0 (pow i 3)) (* 4.0 (pow i 5)))))

prune540.0ms

Pruning

4 alts after pruning (2 fresh and 2 done)

Merged error: 0b

localize6.0ms

Local error

Found 2 expressions with local error:

16.1b
(* (* i (/ i 4)) (/ 1 (- (* i (* 4 i)) 1.0)))
0.2b
(/ 1 (- (* i (* 4 i)) 1.0))

rewrite10.0ms

Algorithm
rewrite-expression-head
Counts
2 → 41
Calls

2 calls. Slowest were:

6.0ms
(* (* i (/ i 4)) (/ 1 (- (* i (* 4 i)) 1.0)))
3.0ms
(/ 1 (- (* i (* 4 i)) 1.0))

series73.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

42.0ms
(* (* i (/ i 4)) (/ 1 (- (* i (* 4 i)) 1.0)))
31.0ms
(/ 1 (- (* i (* 4 i)) 1.0))

simplify2.4s

Counts
27 → 47
Calls

27 calls. Slowest were:

638.0ms
(* (* (* (* i (/ i 4)) (* i (/ i 4))) (* i (/ i 4))) (* (* (/ 1 (- (* i (* 4 i)) 1.0)) (/ 1 (- (* i (* 4 i)) 1.0))) (/ 1 (- (* i (* 4 i)) 1.0))))
297.0ms
(+ (log (* i (/ i 4))) (log (/ 1 (- (* i (* 4 i)) 1.0))))
267.0ms
(* (* i (/ i 4)) (/ 1 (- (* i (* 4 i)) 1.0)))

prune331.0ms

Pruning

4 alts after pruning (1 fresh and 3 done)

Merged error: 0b

localize27.0ms

Local error

Found 3 expressions with local error:

0.2b
(/ 0.00390625 (pow i 4))
0.1b
(/ (/ 0.015625 i) i)
0.0b
(+ (/ (/ 0.015625 i) i) (+ 1/16 (/ 0.00390625 (pow i 4))))

rewrite16.0ms

Algorithm
rewrite-expression-head
Counts
3 → 43
Calls

3 calls. Slowest were:

10.0ms
(+ (/ (/ 0.015625 i) i) (+ 1/16 (/ 0.00390625 (pow i 4))))
4.0ms
(/ (/ 0.015625 i) i)
1.0ms
(/ 0.00390625 (pow i 4))

series57.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

30.0ms
(+ (/ (/ 0.015625 i) i) (+ 1/16 (/ 0.00390625 (pow i 4))))
16.0ms
(/ 0.00390625 (pow i 4))
11.0ms
(/ (/ 0.015625 i) i)

simplify771.0ms

Counts
21 → 52
Calls

21 calls. Slowest were:

270.0ms
(* i (+ (* 1/16 1/16) (- (* (/ 0.00390625 (pow i 4)) (/ 0.00390625 (pow i 4))) (* 1/16 (/ 0.00390625 (pow i 4))))))
134.0ms
(+ (* (/ 0.015625 i) (+ (* 1/16 1/16) (- (* (/ 0.00390625 (pow i 4)) (/ 0.00390625 (pow i 4))) (* 1/16 (/ 0.00390625 (pow i 4)))))) (* i (+ (pow 1/16 3) (pow (/ 0.00390625 (pow i 4)) 3))))
125.0ms
(+ (* (/ 0.015625 i) (- 1/16 (/ 0.00390625 (pow i 4)))) (* i (- (* 1/16 1/16) (* (/ 0.00390625 (pow i 4)) (/ 0.00390625 (pow i 4))))))

prune409.0ms

Pruning

4 alts after pruning (0 fresh and 4 done)

Merged error: 0b

regimes27.0ms

Accuracy

100% (0.0b remaining)

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

bsearch85.0ms

end0.0ms

sample1.8s

Algorithm
intervals