Average Error: 45.1 → 0.5
Time: 13.6s
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}{\frac{\left(4 \cdot i - \frac{1.0}{i}\right) \cdot 4}{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.0}
\frac{1}{\frac{\left(4 \cdot i - \frac{1.0}{i}\right) \cdot 4}{i}}
double f(double i) {
        double r2624845 = i;
        double r2624846 = r2624845 * r2624845;
        double r2624847 = r2624846 * r2624846;
        double r2624848 = 2.0;
        double r2624849 = r2624848 * r2624845;
        double r2624850 = r2624849 * r2624849;
        double r2624851 = r2624847 / r2624850;
        double r2624852 = 1.0;
        double r2624853 = r2624850 - r2624852;
        double r2624854 = r2624851 / r2624853;
        return r2624854;
}

double f(double i) {
        double r2624855 = 1.0;
        double r2624856 = 4.0;
        double r2624857 = i;
        double r2624858 = r2624856 * r2624857;
        double r2624859 = 1.0;
        double r2624860 = r2624859 / r2624857;
        double r2624861 = r2624858 - r2624860;
        double r2624862 = r2624861 * r2624856;
        double r2624863 = r2624862 / r2624857;
        double r2624864 = r2624855 / r2624863;
        return r2624864;
}

Error

Bits error versus i

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 45.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.0}\]
  2. Simplified0.1

    \[\leadsto \color{blue}{\frac{i}{\left(4 \cdot i - \frac{1.0}{i}\right) \cdot 4}}\]
  3. Taylor expanded around 0 0.1

    \[\leadsto \frac{i}{\color{blue}{\left(4 \cdot i - 1.0 \cdot \frac{1}{i}\right)} \cdot 4}\]
  4. Simplified0.1

    \[\leadsto \frac{i}{\color{blue}{\left(i \cdot 4 - \frac{1.0}{i}\right)} \cdot 4}\]
  5. Using strategy rm
  6. Applied clear-num0.5

    \[\leadsto \color{blue}{\frac{1}{\frac{\left(i \cdot 4 - \frac{1.0}{i}\right) \cdot 4}{i}}}\]
  7. Final simplification0.5

    \[\leadsto \frac{1}{\frac{\left(4 \cdot i - \frac{1.0}{i}\right) \cdot 4}{i}}\]

Reproduce

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