Average Error: 46.5 → 0.2
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{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 r56273 = i;
        double r56274 = r56273 * r56273;
        double r56275 = r56274 * r56274;
        double r56276 = 2.0;
        double r56277 = r56276 * r56273;
        double r56278 = r56277 * r56277;
        double r56279 = r56275 / r56278;
        double r56280 = 1.0;
        double r56281 = r56278 - r56280;
        double r56282 = r56279 / r56281;
        return r56282;
}

double f(double i) {
        double r56283 = i;
        double r56284 = 16.0;
        double r56285 = r56284 * r56283;
        double r56286 = 4.0;
        double r56287 = 1.0;
        double r56288 = r56287 / r56283;
        double r56289 = r56286 * r56288;
        double r56290 = r56285 - r56289;
        double r56291 = r56283 / r56290;
        return r56291;
}

Error

Bits error versus i

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 46.5

    \[\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.5

    \[\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*16.1

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