Average Error: 45.8 → 0.0
Time: 11.6s
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 227.34436273801197:\\ \;\;\;\;\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 < 227.34436273801197

    1. Initial program 45.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. Simplified0.0

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

    if 227.34436273801197 < i

    1. Initial program 46.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. Simplified30.9

      \[\leadsto \color{blue}{\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 227.34436273801197:\\ \;\;\;\;\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 2019016 
(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: 11.3s)Debug log

sample29.0ms

Algorithm
intervals
Results
256×(pre true 80)
256×(body real 80)

simplify137.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
137.0ms
(/ (/ (* (* i i) (* i i)) (* (* 2 i) (* 2 i))) (- (* (* 2 i) (* 2 i)) 1.0))

prune20.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 12.8b

localize26.0ms

Local error

Found 1 expressions with local error:

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

rewrite6.0ms

Algorithm
rewrite-expression-head
Rules
add-cube-cbrt
add-exp-log
add-cbrt-cube
times-frac
*-un-lft-identity
associate-/r*
add-sqr-sqrt
associate-/r/
associate-/l/
add-log-exp
associate-/l*
flip--
div-inv
associate-*r/
div-exp
flip3--
frac-2neg
clear-num
cbrt-undiv
pow1
Counts
1 → 22
Calls
1 calls:
Slowest
5.0ms
(/ (* i (/ i 4)) (- (* i (* 4 i)) 1.0))

series31.0ms

Counts
1 → 3
Calls
1 calls:
Slowest
31.0ms
(/ (* i (/ i 4)) (- (* i (* 4 i)) 1.0))

simplify782.0ms

Counts
17 → 25
Calls
17 calls:
Slowest
200.0ms
(+ (* (* i (* 4 i)) (* i (* 4 i))) (+ (* 1.0 1.0) (* (* i (* 4 i)) 1.0)))
112.0ms
(- (+ (* 0.25 (pow i 2)) (+ (* 1.0 (pow i 4)) (* 4.0 (pow i 6)))))
95.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)))
86.0ms
(- (log (* i (/ i 4))) (log (- (* i (* 4 i)) 1.0)))
67.0ms
(+ (* 0.015625 (/ 1 (pow i 2))) (+ 1/16 (* 0.00390625 (/ 1 (pow i 4)))))

prune156.0ms

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

localize10.0ms

Local error

Found 4 expressions with local error:

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

rewrite13.0ms

Algorithm
rewrite-expression-head
Rules
27×cbrt-prod
12×add-cube-cbrt
12×times-frac
12×*-un-lft-identity
12×add-sqr-sqrt
associate-/r/
add-exp-log
add-cbrt-cube
add-log-exp
flip--
div-inv
flip3--
pow1
pow1/3
associate-/r*
cbrt-div
associate-/l/
associate-/l*
associate-*r/
div-exp
frac-2neg
clear-num
cbrt-undiv
Counts
4 → 76
Calls
4 calls:
Slowest
5.0ms
(/ (* i (/ i 4)) (- (* i (* 4 i)) 1.0))
2.0ms
(cbrt (/ (* i (/ i 4)) (- (* i (* 4 i)) 1.0)))
2.0ms
(cbrt (/ (* i (/ i 4)) (- (* i (* 4 i)) 1.0)))
2.0ms
(cbrt (/ (* i (/ i 4)) (- (* i (* 4 i)) 1.0)))

series659.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
217.0ms
(cbrt (/ (* i (/ i 4)) (- (* i (* 4 i)) 1.0)))
207.0ms
(cbrt (/ (* i (/ i 4)) (- (* i (* 4 i)) 1.0)))
189.0ms
(cbrt (/ (* i (/ i 4)) (- (* i (* 4 i)) 1.0)))
45.0ms
(/ (* i (/ i 4)) (- (* i (* 4 i)) 1.0))

simplify5.9s

Counts
56 → 88
Calls
56 calls:
Slowest
505.0ms
(cbrt (/ (* i (/ i 4)) (- (pow (* i (* 4 i)) 3) (pow 1.0 3))))
467.0ms
(cbrt (/ (* i (/ i 4)) (- (pow (* i (* 4 i)) 3) (pow 1.0 3))))
466.0ms
(cbrt (/ (* i (/ i 4)) (- (pow (* i (* 4 i)) 3) (pow 1.0 3))))
306.0ms
(+ (* (cbrt 1/4) (pow 1/4 1/3)) (+ (* 0.013888888888888888 (* (/ (cbrt 1/4) (pow i 4)) (pow 1/4 1/3))) (* 0.08333333333333333 (* (/ (cbrt 1/4) (pow i 2)) (pow 1/4 1/3)))))
295.0ms
(cbrt (/ (* i (/ i 4)) (- (* (* i (* 4 i)) (* i (* 4 i))) (* 1.0 1.0))))

prune971.0ms

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0b

localize18.0ms

Local error

Found 3 expressions with local error:

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

rewrite11.0ms

Algorithm
rewrite-expression-head
Rules
*-un-lft-identity
add-log-exp
add-cube-cbrt
add-sqr-sqrt
associate-/l*
div-inv
add-exp-log
add-cbrt-cube
associate-/r*
pow1
flip-+
frac-add
flip3-+
frac-2neg
clear-num
associate-/l/
distribute-lft-out
sum-log
associate-+r+
+-commutative
Counts
3 → 43
Calls
3 calls:
Slowest
8.0ms
(+ (/ (/ 0.015625 i) i) (+ 1/16 (/ 0.00390625 (pow i 4))))
2.0ms
(/ (/ 0.015625 i) i)
0.0ms
(/ 0.00390625 (pow i 4))

series68.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
26.0ms
(/ 0.00390625 (pow i 4))
25.0ms
(+ (/ (/ 0.015625 i) i) (+ 1/16 (/ 0.00390625 (pow i 4))))
17.0ms
(/ (/ 0.015625 i) i)

simplify800.0ms

Counts
21 → 52
Calls
21 calls:
Slowest
276.0ms
(* i (+ (* 1/16 1/16) (- (* (/ 0.00390625 (pow i 4)) (/ 0.00390625 (pow i 4))) (* 1/16 (/ 0.00390625 (pow i 4))))))
161.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))))))
129.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))))
47.0ms
(* (exp (/ (/ 0.015625 i) i)) (exp (+ 1/16 (/ 0.00390625 (pow i 4)))))
42.0ms
(+ (* 0.015625 (/ 1 (pow i 2))) (+ 1/16 (* 0.00390625 (/ 1 (pow i 4)))))

prune380.0ms

Pruning

3 alts after pruning (0 fresh and 3 done)

Merged error: 0b

regimes36.0ms

Accuracy

100% (0.0b remaining)

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

bsearch80.0ms

end0.0ms

sample1.2s

Algorithm
intervals
Results
8000×(pre true 80)
8000×(body real 80)