Average Error: 46.8 → 0.4
Time: 2.3s
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 r74563 = i;
        double r74564 = r74563 * r74563;
        double r74565 = r74564 * r74564;
        double r74566 = 2.0;
        double r74567 = r74566 * r74563;
        double r74568 = r74567 * r74567;
        double r74569 = r74565 / r74568;
        double r74570 = 1.0;
        double r74571 = r74568 - r74570;
        double r74572 = r74569 / r74571;
        return r74572;
}

double f(double i) {
        double r74573 = 1.0;
        double r74574 = 16.0;
        double r74575 = 4.0;
        double r74576 = i;
        double r74577 = 2.0;
        double r74578 = pow(r74576, r74577);
        double r74579 = r74573 / r74578;
        double r74580 = r74575 * r74579;
        double r74581 = r74574 - r74580;
        double r74582 = r74573 / r74581;
        return r74582;
}

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.2

    \[\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-num16.6

    \[\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 2019346 +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)))