Average Error: 44.8 → 0.0
Time: 6.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 277.08384918144907:\\ \;\;\;\;\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 < 277.08384918144907

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

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

    if 277.08384918144907 < 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. Simplified31.5

      \[\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-identity31.5

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

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

      \[\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 277.08384918144907:\\ \;\;\;\;\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 2019018 
(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: 6.6s)Debug log

sample38.0ms

Algorithm
intervals
Results
25.0ms256×body80valid
5.0ms256×pre80true

simplify173.0ms

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

prune13.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 12.6b

localize27.0ms

Local error

Found 1 expressions with local error:

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

rewrite11.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
11.0ms
(/ (* i (/ i 4)) (- (* i (* 4 i)) 1.0))

series56.0ms

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

simplify761.0ms

Counts
17 → 25
Calls
17 calls:
Slowest
140.0ms
(+ (* (* i (* 4 i)) (* i (* 4 i))) (+ (* 1.0 1.0) (* (* i (* 4 i)) 1.0)))
132.0ms
(- (log (* i (/ i 4))) (log (- (* i (* 4 i)) 1.0)))
113.0ms
(- (+ (* 0.25 (pow i 2)) (+ (* 1.0 (pow i 4)) (* 4.0 (pow i 6)))))
111.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)))
60.0ms
(+ (* 0.015625 (/ 1 (pow i 2))) (+ 1/16 (* 0.00390625 (/ 1 (pow i 4)))))

prune462.0ms

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

localize10.0ms

Local error

Found 2 expressions with local error:

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

rewrite19.0ms

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

series65.0ms

Counts
2 → 6
Calls
2 calls:
Slowest
33.0ms
(* i (/ (/ i 4) (- (* i (* 4 i)) 1.0)))
32.0ms
(/ (/ i 4) (- (* i (* 4 i)) 1.0))

simplify2.0s

Counts
58 → 67
Calls
58 calls:
Slowest
243.0ms
(/ (* (* (/ i 4) (/ i 4)) (/ i 4)) (* (* (- (* i (* 4 i)) 1.0) (- (* i (* 4 i)) 1.0)) (- (* i (* 4 i)) 1.0)))
154.0ms
(- (+ (* 0.25 i) (+ (* 1.0 (pow i 3)) (* 4.0 (pow i 5)))))
127.0ms
(+ (* (* i (* 4 i)) (* i (* 4 i))) (+ (* 1.0 1.0) (* (* i (* 4 i)) 1.0)))
125.0ms
(+ (* (* i (* 4 i)) (* i (* 4 i))) (+ (* 1.0 1.0) (* (* i (* 4 i)) 1.0)))
119.0ms
(+ (* 0.00390625 (/ 1 (pow i 5))) (+ (* 0.015625 (/ 1 (pow i 3))) (* 1/16 (/ 1 i))))

prune549.0ms

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0b

localize25.0ms

Local error

Found 3 expressions with local error:

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

rewrite9.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
6.0ms
(+ (/ (/ 0.015625 i) i) (+ 1/16 (/ 0.00390625 (pow i 4))))
2.0ms
(/ (/ 0.015625 i) i)
1.0ms
(/ 0.00390625 (pow i 4))

series53.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
23.0ms
(+ (/ (/ 0.015625 i) i) (+ 1/16 (/ 0.00390625 (pow i 4))))
16.0ms
(/ 0.00390625 (pow i 4))
15.0ms
(/ (/ 0.015625 i) i)

simplify661.0ms

Counts
21 → 52
Calls
21 calls:
Slowest
279.0ms
(* i (+ (* 1/16 1/16) (- (* (/ 0.00390625 (pow i 4)) (/ 0.00390625 (pow i 4))) (* 1/16 (/ 0.00390625 (pow i 4))))))
101.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))))))
81.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))))
45.0ms
(* i (- 1/16 (/ 0.00390625 (pow i 4))))
37.0ms
(+ (* 0.015625 (/ 1 (pow i 2))) (+ 1/16 (* 0.00390625 (/ 1 (pow i 4)))))

prune486.0ms

Pruning

3 alts after pruning (0 fresh and 3 done)

Merged error: 0b

regimes48.0ms

Accuracy

100% (0.0b remaining)

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

bsearch50.0ms

end0.0ms

sample1.1s

Algorithm
intervals
Results
866.0ms8000×body80valid
193.0ms8000×pre80true