Average Error: 46.6 → 0.4
Time: 2.4s
Precision: 64
\[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}\]
\[\frac{1}{16 - 4 \cdot \frac{1}{{i}^{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}
\frac{1}{16 - 4 \cdot \frac{1}{{i}^{2}}}
double f(double i) {
        double r58991 = i;
        double r58992 = r58991 * r58991;
        double r58993 = r58992 * r58992;
        double r58994 = 2.0;
        double r58995 = r58994 * r58991;
        double r58996 = r58995 * r58995;
        double r58997 = r58993 / r58996;
        double r58998 = 1.0;
        double r58999 = r58996 - r58998;
        double r59000 = r58997 / r58999;
        return r59000;
}

double f(double i) {
        double r59001 = 1.0;
        double r59002 = 16.0;
        double r59003 = 4.0;
        double r59004 = i;
        double r59005 = 2.0;
        double r59006 = pow(r59004, r59005);
        double r59007 = r59001 / r59006;
        double r59008 = r59003 * r59007;
        double r59009 = r59002 - r59008;
        double r59010 = r59001 / r59009;
        return r59010;
}

Error

Bits error versus i

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 46.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. Simplified16.6

    \[\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 clear-num17.0

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

    \[\leadsto \frac{1}{\color{blue}{16 - 4 \cdot \frac{1}{{i}^{2}}}}\]
  6. Final simplification0.4

    \[\leadsto \frac{1}{16 - 4 \cdot \frac{1}{{i}^{2}}}\]

Reproduce

herbie shell --seed 2020083 +o rules:numerics
(FPCore (i)
  :name "Octave 3.8, jcobi/4, as called"
  :precision binary64
  :pre (and (> i 0.0))
  (/ (/ (* (* i i) (* i i)) (* (* 2 i) (* 2 i))) (- (* (* 2 i) (* 2 i)) 1)))