Average Error: 46.2 → 0.0
Time: 8.5s
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 901.6077917941473:\\ \;\;\;\;\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 < 901.6077917941473

    1. Initial program 45.1

      \[\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}}\]

    if 901.6077917941473 < i

    1. Initial program 47.4

      \[\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. Simplified32.2

      \[\leadsto \color{blue}{\frac{i \cdot \frac{i}{4}}{i \cdot \left(4 \cdot i\right) - 1.0}}\]
    3. Using strategy rm
    4. Applied associate-/l*32.2

      \[\leadsto \color{blue}{\frac{i}{\frac{i \cdot \left(4 \cdot i\right) - 1.0}{\frac{i}{4}}}}\]
    5. 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)}\]
    6. 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 901.6077917941473:\\ \;\;\;\;\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 2019007 
(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: 8.3s)Debug log

sample36.0ms

Algorithm
intervals

simplify139.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

139.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: 18.2b

localize34.0ms

Local error

Found 1 expressions with local error:

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

rewrite12.0ms

Algorithm
rewrite-expression-head
Counts
1 → 22
Calls

1 calls. Slowest were:

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

series38.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

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

simplify653.0ms

Counts
17 → 25
Calls

17 calls. Slowest were:

158.0ms
(+ (* (* i (* 4 i)) (* i (* 4 i))) (+ (* 1.0 1.0) (* (* i (* 4 i)) 1.0)))
92.0ms
(- (log (* i (/ i 4))) (log (- (* i (* 4 i)) 1.0)))
86.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)))

prune212.0ms

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

localize6.0ms

Local error

Found 2 expressions with local error:

17.0b
(/ (- (* i (* 4 i)) 1.0) (/ i 4))
0.6b
(/ i (/ (- (* i (* 4 i)) 1.0) (/ i 4)))

rewrite8.0ms

Algorithm
rewrite-expression-head
Counts
2 → 63
Calls

2 calls. Slowest were:

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

series125.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

74.0ms
(/ (- (* i (* 4 i)) 1.0) (/ i 4))
51.0ms
(/ i (/ (- (* i (* 4 i)) 1.0) (/ i 4)))

simplify3.3s

Counts
58 → 69
Calls

58 calls. Slowest were:

401.0ms
(- (pow (* i (* 4 i)) 3) (pow 1.0 3))
361.0ms
(/ (* (* (- (* i (* 4 i)) 1.0) (- (* i (* 4 i)) 1.0)) (- (* i (* 4 i)) 1.0)) (* (* (/ i 4) (/ i 4)) (/ i 4)))
214.0ms
(/ (- (* i (* 4 i)) 1.0) (/ 1 4))

prune572.0ms

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0b

localize20.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))))

rewrite10.0ms

Algorithm
rewrite-expression-head
Counts
3 → 43
Calls

3 calls. Slowest were:

7.0ms
(+ (/ (/ 0.015625 i) i) (+ 1/16 (/ 0.00390625 (pow i 4))))
3.0ms
(/ (/ 0.015625 i) i)
0.0ms
(/ 0.00390625 (pow i 4))

series60.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

26.0ms
(/ 0.00390625 (pow i 4))
19.0ms
(/ (/ 0.015625 i) i)
15.0ms
(+ (/ (/ 0.015625 i) i) (+ 1/16 (/ 0.00390625 (pow i 4))))

simplify819.0ms

Counts
21 → 52
Calls

21 calls. Slowest were:

340.0ms
(* i (+ (* 1/16 1/16) (- (* (/ 0.00390625 (pow i 4)) (/ 0.00390625 (pow i 4))) (* 1/16 (/ 0.00390625 (pow i 4))))))
145.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))))))
100.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))))

prune405.0ms

Pruning

3 alts after pruning (0 fresh and 3 done)

Merged error: 0b

regimes52.0ms

Accuracy

100% (0.0b remaining)

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

bsearch84.0ms

end0.0ms

sample1.7s

Algorithm
intervals