Average Error: 45.4 → 0.2
Time: 15.3s
Precision: 64
\[i \gt 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.0}\]
\[\frac{1}{i \cdot 4 - \frac{1.0}{i}} \cdot \frac{i}{4}\]
\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.0}
\frac{1}{i \cdot 4 - \frac{1.0}{i}} \cdot \frac{i}{4}
double f(double i) {
        double r2963763 = i;
        double r2963764 = r2963763 * r2963763;
        double r2963765 = r2963764 * r2963764;
        double r2963766 = 2.0;
        double r2963767 = r2963766 * r2963763;
        double r2963768 = r2963767 * r2963767;
        double r2963769 = r2963765 / r2963768;
        double r2963770 = 1.0;
        double r2963771 = r2963768 - r2963770;
        double r2963772 = r2963769 / r2963771;
        return r2963772;
}

double f(double i) {
        double r2963773 = 1.0;
        double r2963774 = i;
        double r2963775 = 4.0;
        double r2963776 = r2963774 * r2963775;
        double r2963777 = 1.0;
        double r2963778 = r2963777 / r2963774;
        double r2963779 = r2963776 - r2963778;
        double r2963780 = r2963773 / r2963779;
        double r2963781 = r2963774 / r2963775;
        double r2963782 = r2963780 * r2963781;
        return r2963782;
}

Error

Bits error versus i

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 45.4

    \[\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.0}\]
  2. Simplified0.2

    \[\leadsto \color{blue}{\frac{i}{\left(4 \cdot i - \frac{1.0}{i}\right) \cdot 4}}\]
  3. Using strategy rm
  4. Applied *-un-lft-identity0.2

    \[\leadsto \frac{\color{blue}{1 \cdot i}}{\left(4 \cdot i - \frac{1.0}{i}\right) \cdot 4}\]
  5. Applied times-frac0.2

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

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

Reproduce

herbie shell --seed 2019158 +o rules:numerics
(FPCore (i)
  :name "Octave 3.8, jcobi/4, as called"
  :pre (and (> i 0))
  (/ (/ (* (* i i) (* i i)) (* (* 2 i) (* 2 i))) (- (* (* 2 i) (* 2 i)) 1.0)))