Average Error: 47.1 → 0.2
Time: 1.7s
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 r66709 = i;
        double r66710 = r66709 * r66709;
        double r66711 = r66710 * r66710;
        double r66712 = 2.0;
        double r66713 = r66712 * r66709;
        double r66714 = r66713 * r66713;
        double r66715 = r66711 / r66714;
        double r66716 = 1.0;
        double r66717 = r66714 - r66716;
        double r66718 = r66715 / r66717;
        return r66718;
}

double f(double i) {
        double r66719 = i;
        double r66720 = 16.0;
        double r66721 = r66720 * r66719;
        double r66722 = 4.0;
        double r66723 = 1.0;
        double r66724 = r66723 / r66719;
        double r66725 = r66722 * r66724;
        double r66726 = r66721 - r66725;
        double r66727 = r66719 / r66726;
        return r66727;
}

Error

Bits error versus i

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 47.1

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