Average Error: 46.8 → 0.0
Time: 1.8s
Precision: binary64
\[i \gt 0.0\]
\[\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}\]
\[\begin{array}{l} \mathbf{if}\;i \le 2081.5980874676725:\\ \;\;\;\;\frac{i}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \cdot \frac{i}{2 \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;0.00390625 \cdot \frac{1}{{i}^{4}} + \left(0.015625 \cdot \frac{1}{{i}^{2}} + 0.0625\right)\\ \end{array}\]
\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}
\begin{array}{l}
\mathbf{if}\;i \le 2081.5980874676725:\\
\;\;\;\;\frac{i}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \cdot \frac{i}{2 \cdot 2}\\

\mathbf{else}:\\
\;\;\;\;0.00390625 \cdot \frac{1}{{i}^{4}} + \left(0.015625 \cdot \frac{1}{{i}^{2}} + 0.0625\right)\\

\end{array}
double code(double i) {
	return ((double) (((double) (((double) (((double) (i * i)) * ((double) (i * i)))) / ((double) (((double) (2.0 * i)) * ((double) (2.0 * i)))))) / ((double) (((double) (((double) (2.0 * i)) * ((double) (2.0 * i)))) - 1.0))));
}
double code(double i) {
	double VAR;
	if ((i <= 2081.5980874676725)) {
		VAR = ((double) (((double) (i / ((double) (((double) (((double) (2.0 * i)) * ((double) (2.0 * i)))) - 1.0)))) * ((double) (i / ((double) (2.0 * 2.0))))));
	} else {
		VAR = ((double) (((double) (0.00390625 * ((double) (1.0 / ((double) pow(i, 4.0)))))) + ((double) (((double) (0.015625 * ((double) (1.0 / ((double) pow(i, 2.0)))))) + 0.0625))));
	}
	return VAR;
}

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 < 2081.5980874676725

    1. Initial program 45.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}\]
    2. Simplified0.0

      \[\leadsto \color{blue}{\frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right) \cdot \left(2 \cdot 2\right)}}\]
    3. Using strategy rm
    4. Applied times-frac0.0

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

    if 2081.5980874676725 < i

    1. Initial program 48.0

      \[\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}\]
    2. Simplified31.7

      \[\leadsto \color{blue}{\frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right) \cdot \left(2 \cdot 2\right)}}\]
    3. Taylor expanded around inf 0

      \[\leadsto \color{blue}{0.00390625 \cdot \frac{1}{{i}^{4}} + \left(0.015625 \cdot \frac{1}{{i}^{2}} + 0.0625\right)}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \le 2081.5980874676725:\\ \;\;\;\;\frac{i}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \cdot \frac{i}{2 \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;0.00390625 \cdot \frac{1}{{i}^{4}} + \left(0.015625 \cdot \frac{1}{{i}^{2}} + 0.0625\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2020150 
(FPCore (i)
  :name "Octave 3.8, jcobi/4, as called"
  :precision binary64
  :pre (and (> i 0.0))
  (/ (/ (* (* i i) (* i i)) (* (* 2.0 i) (* 2.0 i))) (- (* (* 2.0 i) (* 2.0 i)) 1.0)))