Average Error: 46.5 → 0.0
Time: 7.8s
Precision: 64
Internal precision: 384
\[\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 14343.200142683158:\\
\;\;\;\;\frac{\frac{i}{2} \cdot \frac{i}{2}}{{\left(i + i\right)}^2 - 1.0}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.015625}{{i}^2} + \left(\frac{1}{16} + \frac{0.00390625}{{i}^{4}}\right)\\
\end{array}\]
Derivation
- Split input into 2 regimes.
-
if i < 14343.200142683158
Initial program 44.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}\]
Applied simplify 0.0
\[\leadsto \color{blue}{\frac{\frac{i}{2} \cdot \frac{i}{2}}{\left(i + i\right) \cdot \left(i + i\right) - 1.0}}\]
Applied simplify 0.0
\[\leadsto \frac{\frac{i}{2} \cdot \frac{i}{2}}{\color{blue}{{\left(i + i\right)}^2 - 1.0}}\]
if 14343.200142683158 < i
Initial program 48.5
\[\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}\]
Applied simplify 32.8
\[\leadsto \color{blue}{\frac{\frac{i}{2} \cdot \frac{i}{2}}{\left(i + i\right) \cdot \left(i + i\right) - 1.0}}\]
Applied taylor 0
\[\leadsto 0.00390625 \cdot \frac{1}{{i}^{4}} + \left(0.015625 \cdot \frac{1}{{i}^2} + \frac{1}{16}\right)\]
Taylor expanded around inf 0
\[\leadsto \color{blue}{0.00390625 \cdot \frac{1}{{i}^{4}} + \left(0.015625 \cdot \frac{1}{{i}^2} + \frac{1}{16}\right)}\]
Applied simplify 0
\[\leadsto \color{blue}{\frac{\frac{0.015625}{i}}{i} + \left(\frac{1}{16} + \frac{0.00390625}{{i}^{4}}\right)}\]
Applied simplify 0
\[\leadsto \color{blue}{\frac{0.015625}{{i}^2}} + \left(\frac{1}{16} + \frac{0.00390625}{{i}^{4}}\right)\]
- Recombined 2 regimes into one program.
- Removed slow pow expressions
Runtime
Please include this information when filing a bug report:
herbie shell --seed '#(1064524629 4159152179 2999149171 575749698 4006532819 692958815)'
(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)))