Average Error: 45.4 → 0.0
Time: 2.1m
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 274.2521640110874:\\
\;\;\;\;\frac{\frac{i}{2} \cdot \frac{i}{2}}{\left(i + i\right) \cdot \left(i + i\right) - 1.0}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{0.00390625}{{i}^{4}} + \frac{\frac{0.015625}{i}}{i}\right) + \frac{1}{16}\\
\end{array}\]
Derivation
- Split input into 2 regimes
if i < 274.2521640110874
Initial program 44.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}\]
Applied simplify0.0
\[\leadsto \color{blue}{\frac{\frac{i}{2} \cdot \frac{i}{2}}{\left(i + i\right) \cdot \left(i + i\right) - 1.0}}\]
if 274.2521640110874 < i
Initial program 46.7
\[\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 simplify31.0
\[\leadsto \color{blue}{\frac{\frac{i}{2} \cdot \frac{i}{2}}{\left(i + i\right) \cdot \left(i + i\right) - 1.0}}\]
Taylor expanded around inf 0.0
\[\leadsto \color{blue}{0.00390625 \cdot \frac{1}{{i}^{4}} + \left(\frac{1}{16} + 0.015625 \cdot \frac{1}{{i}^{2}}\right)}\]
Applied simplify0
\[\leadsto \color{blue}{\left(\frac{0.00390625}{{i}^{4}} + \frac{\frac{0.015625}{i}}{i}\right) + \frac{1}{16}}\]
- Recombined 2 regimes into one program.
- Removed slow
pow expressions.
Runtime
herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit +o reduce:binary-search
(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)))