Average Error: 46.5 → 0.1
Time: 1.5s
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 r65652 = i;
        double r65653 = r65652 * r65652;
        double r65654 = r65653 * r65653;
        double r65655 = 2.0;
        double r65656 = r65655 * r65652;
        double r65657 = r65656 * r65656;
        double r65658 = r65654 / r65657;
        double r65659 = 1.0;
        double r65660 = r65657 - r65659;
        double r65661 = r65658 / r65660;
        return r65661;
}

double f(double i) {
        double r65662 = i;
        double r65663 = 16.0;
        double r65664 = r65663 * r65662;
        double r65665 = 4.0;
        double r65666 = 1.0;
        double r65667 = r65666 / r65662;
        double r65668 = r65665 * r65667;
        double r65669 = r65664 - r65668;
        double r65670 = r65662 / r65669;
        return r65670;
}

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. Simplified15.9

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

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

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

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

Reproduce

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