Average Error: 45.3 → 0.2
Time: 7.2s
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}\]
\[\frac{i}{i \cdot 16 - \frac{4.0}{i}}\]

Error

Bits error versus i

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 45.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. Simplified15.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 associate-/l*15.8

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

    \[\leadsto \frac{i}{\color{blue}{16 \cdot i - 4.0 \cdot \frac{1}{i}}}\]
  6. Simplified0.2

    \[\leadsto \frac{i}{\color{blue}{16 \cdot i - \frac{4.0}{i}}}\]
  7. Final simplification0.2

    \[\leadsto \frac{i}{i \cdot 16 - \frac{4.0}{i}}\]

Reproduce

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

sample36.0ms

Algorithm
intervals
Results
22.0ms256×body80valid
5.0ms256×pre80true

simplify125.0ms

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

prune7.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 12.2b

localize24.0ms

Local error

Found 2 expressions with local error:

12.2b
(/ (* i (/ i 4)) (- (* i (* 4 i)) 1.0))
0.0b
(- (* i (* 4 i)) 1.0)

rewrite17.0ms

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

series71.0ms

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

simplify727.0ms

Counts
20 → 39
Calls
20 calls:
Slowest
138.0ms
(+ (* (* i (* 4 i)) (* i (* 4 i))) (+ (* 1.0 1.0) (* (* i (* 4 i)) 1.0)))
120.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)))
110.0ms
(- (log (* i (/ i 4))) (log (- (* i (* 4 i)) 1.0)))
85.0ms
(- (+ (* 0.25 (pow i 2)) (+ (* 1.0 (pow i 4)) (* 4.0 (pow i 6)))))
53.0ms
(+ (* 0.015625 (/ 1 (pow i 2))) (+ 1/16 (* 0.00390625 (/ 1 (pow i 4)))))

prune278.0ms

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

localize5.0ms

Local error

Found 3 expressions with local error:

11.8b
(/ (- (* i (* 4 i)) 1.0) (/ i 4))
0.1b
(/ i (/ (- (* i (* 4 i)) 1.0) (/ i 4)))
0.0b
(- (* i (* 4 i)) 1.0)

rewrite12.0ms

Algorithm
rewrite-expression-head
Rules
24×times-frac
21×associate-/r*
20×add-cube-cbrt
20×*-un-lft-identity
20×add-sqr-sqrt
10×div-inv
add-exp-log
add-cbrt-cube
add-log-exp
associate-/l*
associate-/r/
pow1
associate-/l/
flip--
flip3--
frac-2neg
clear-num
div-exp
div-sub
sub-neg
cbrt-undiv
Counts
3 → 74
Calls
3 calls:
Slowest
6.0ms
(/ (- (* i (* 4 i)) 1.0) (/ i 4))
4.0ms
(/ i (/ (- (* i (* 4 i)) 1.0) (/ i 4)))
2.0ms
(- (* i (* 4 i)) 1.0)

series140.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
52.0ms
(/ (- (* i (* 4 i)) 1.0) (/ i 4))
46.0ms
(/ i (/ (- (* i (* 4 i)) 1.0) (/ i 4)))
42.0ms
(- (* i (* 4 i)) 1.0)

simplify3.0s

Counts
61 → 83
Calls
61 calls:
Slowest
361.0ms
(- (pow (* i (* 4 i)) 3) (pow 1.0 3))
309.0ms
(/ (* (* (- (* i (* 4 i)) 1.0) (- (* i (* 4 i)) 1.0)) (- (* i (* 4 i)) 1.0)) (* (* (/ i 4) (/ i 4)) (/ i 4)))
213.0ms
(- (* (* i (* 4 i)) (* i (* 4 i))) (* 1.0 1.0))
171.0ms
(/ (- (* i (* 4 i)) 1.0) (/ i 4))
155.0ms
(/ (- (* i (* 4 i)) 1.0) (/ 1 4))

prune601.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize18.0ms

Local error

Found 2 expressions with local error:

0.1b
(/ i (- (* 16 i) (/ 4.0 i)))
0.0b
(- (* 16 i) (/ 4.0 i))

rewrite6.0ms

Algorithm
rewrite-expression-head
Rules
add-log-exp
add-cube-cbrt
*-un-lft-identity
associate-/r*
add-sqr-sqrt
flip--
associate-/r/
add-exp-log
add-cbrt-cube
flip3--
pow1
div-inv
diff-log
frac-2neg
sub-neg
clear-num
Counts
2 → 27
Calls
2 calls:
Slowest
3.0ms
(- (* 16 i) (/ 4.0 i))
3.0ms
(/ i (- (* 16 i) (/ 4.0 i)))

series84.0ms

Counts
2 → 6
Calls
2 calls:
Slowest
43.0ms
(/ i (- (* 16 i) (/ 4.0 i)))
41.0ms
(- (* 16 i) (/ 4.0 i))

simplify507.0ms

Counts
12 → 33
Calls
12 calls:
Slowest
144.0ms
(+ (* (* 16 i) (* 16 i)) (+ (* (/ 4.0 i) (/ 4.0 i)) (* (* 16 i) (/ 4.0 i))))
88.0ms
(- (+ (* 0.25 (pow i 2)) (+ (* 1.0 (pow i 4)) (* 4.0 (pow i 6)))))
61.0ms
(- (* 16 i) (* 4.0 (/ 1 i)))
38.0ms
(+ (* 0.015625 (/ 1 (pow i 2))) (+ 1/16 (* 0.00390625 (/ 1 (pow i 4)))))
38.0ms
(+ (* 0.015625 (/ 1 (pow i 2))) (+ 1/16 (* 0.00390625 (/ 1 (pow i 4)))))

prune217.0ms

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes32.0ms

Accuracy

0% (0.1b remaining)

Error of 0.2b against oracle of 0.1b and baseline of 0.2b

bsearch1.0ms

end0.0ms

sample1.1s

Algorithm
intervals
Results
854.0ms8000×body80valid
159.0ms8000×pre80true