Average Error: 46.9 → 0.2
Time: 2.1s
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{i}{16 \cdot i - 4 \cdot \frac{1}{i}}\]
\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{i}{16 \cdot i - 4 \cdot \frac{1}{i}}
double f(double i) {
        double r34169 = i;
        double r34170 = r34169 * r34169;
        double r34171 = r34170 * r34170;
        double r34172 = 2.0;
        double r34173 = r34172 * r34169;
        double r34174 = r34173 * r34173;
        double r34175 = r34171 / r34174;
        double r34176 = 1.0;
        double r34177 = r34174 - r34176;
        double r34178 = r34175 / r34177;
        return r34178;
}

double f(double i) {
        double r34179 = i;
        double r34180 = 16.0;
        double r34181 = r34180 * r34179;
        double r34182 = 4.0;
        double r34183 = 1.0;
        double r34184 = r34183 / r34179;
        double r34185 = r34182 * r34184;
        double r34186 = r34181 - r34185;
        double r34187 = r34179 / r34186;
        return r34187;
}

Error

Bits error versus i

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 46.9

    \[\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.4

    \[\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 associate-/l*15.9

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

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

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

Reproduce

herbie shell --seed 2020018 +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)))