Average Error: 45.7 → 0.0
Time: 5.9s
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 1554.9721509854132:\\ \;\;\;\;\frac{\frac{i}{4} \cdot i}{i \cdot \left(4 \cdot i\right) - 1.0}\\ \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 < 1554.9721509854132

    1. Initial program 44.8

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

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

    if 1554.9721509854132 < i

    1. Initial program 46.6

      \[\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. Initial simplification31.1

      \[\leadsto \frac{i \cdot \frac{i}{4}}{i \cdot \left(4 \cdot i\right) - 1.0}\]
    3. 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)}\]
    4. 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 1554.9721509854132:\\ \;\;\;\;\frac{\frac{i}{4} \cdot i}{i \cdot \left(4 \cdot i\right) - 1.0}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{1}{16} + \frac{0.00390625}{{i}^{4}}\right) + \frac{\frac{0.015625}{i}}{i}\\ \end{array}\]

Reproduce

herbie shell --seed 2018362 
(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: 3.1s)Debug log

start77.0ms

Algorithm
intervals

setup136.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 15.5b

localize36.0ms

Local error

Found 1 expressions with local error:

15.5b
(/ (* 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))

series31.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

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

simplify804.0ms

Counts
17 → 25
Calls

17 calls. Slowest were:

164.0ms
(+ (* (* i (* 4 i)) (* i (* 4 i))) (+ (* 1.0 1.0) (* (* i (* 4 i)) 1.0)))
137.0ms
(- (+ (* 0.25 (pow i 2)) (+ (* 1.0 (pow i 4)) (* 4.0 (pow i 6)))))
125.0ms
(- (log (* i (/ i 4))) (log (- (* i (* 4 i)) 1.0)))

prune271.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize19.0ms

Local error

Found 3 expressions with local error:

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

rewrite22.0ms

Algorithm
rewrite-expression-head
Counts
3 → 43
Calls

3 calls. Slowest were:

17.0ms
(+ (/ (/ 0.015625 i) i) (+ 1/16 (/ 0.00390625 (pow i 4))))
3.0ms
(/ (/ 0.015625 i) i)
1.0ms
(/ 0.00390625 (pow i 4))

series56.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

22.0ms
(/ 0.00390625 (pow i 4))
20.0ms
(/ (/ 0.015625 i) i)
15.0ms
(+ (/ (/ 0.015625 i) i) (+ 1/16 (/ 0.00390625 (pow i 4))))

simplify805.0ms

Counts
21 → 52
Calls

21 calls. Slowest were:

308.0ms
(* i (+ (* 1/16 1/16) (- (* (/ 0.00390625 (pow i 4)) (/ 0.00390625 (pow i 4))) (* 1/16 (/ 0.00390625 (pow i 4))))))
110.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))))))
108.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))))

prune717.0ms

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes44.0ms

Accuracy

100% (0.0b remaining)

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

bsearch69.0ms