Average Error: 45.1 → 0.5
Time: 13.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}{\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 r2017553 = i;
        double r2017554 = r2017553 * r2017553;
        double r2017555 = r2017554 * r2017554;
        double r2017556 = 2.0;
        double r2017557 = r2017556 * r2017553;
        double r2017558 = r2017557 * r2017557;
        double r2017559 = r2017555 / r2017558;
        double r2017560 = 1.0;
        double r2017561 = r2017558 - r2017560;
        double r2017562 = r2017559 / r2017561;
        return r2017562;
}

double f(double i) {
        double r2017563 = 1.0;
        double r2017564 = 4.0;
        double r2017565 = i;
        double r2017566 = r2017564 * r2017565;
        double r2017567 = 1.0;
        double r2017568 = r2017567 / r2017565;
        double r2017569 = r2017566 - r2017568;
        double r2017570 = r2017569 * r2017564;
        double r2017571 = r2017570 / r2017565;
        double r2017572 = r2017563 / r2017571;
        return r2017572;
}

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)))