Average Error: 46.8 → 0.3
Time: 2.5s
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 r52384 = i;
        double r52385 = r52384 * r52384;
        double r52386 = r52385 * r52385;
        double r52387 = 2.0;
        double r52388 = r52387 * r52384;
        double r52389 = r52388 * r52388;
        double r52390 = r52386 / r52389;
        double r52391 = 1.0;
        double r52392 = r52389 - r52391;
        double r52393 = r52390 / r52392;
        return r52393;
}

double f(double i) {
        double r52394 = i;
        double r52395 = 16.0;
        double r52396 = r52395 * r52394;
        double r52397 = 4.0;
        double r52398 = 1.0;
        double r52399 = r52398 / r52394;
        double r52400 = r52397 * r52399;
        double r52401 = r52396 - r52400;
        double r52402 = r52394 / r52401;
        return r52402;
}

Error

Bits error versus i

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 46.8

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

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

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

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

Reproduce

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