Average Error: 46.9 → 0.0
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}\]
\[\begin{array}{l} \mathbf{if}\;i \le 206.909656509350128:\\ \;\;\;\;\frac{i \cdot i}{\mathsf{fma}\left(2 \cdot i, 2 \cdot i, -1\right) \cdot \left(2 \cdot 2\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.00390625, \frac{1}{{i}^{4}}, \mathsf{fma}\left(0.015625, \frac{1}{{i}^{2}}, 0.0625\right)\right)\\ \end{array}\]
\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}
\begin{array}{l}
\mathbf{if}\;i \le 206.909656509350128:\\
\;\;\;\;\frac{i \cdot i}{\mathsf{fma}\left(2 \cdot i, 2 \cdot i, -1\right) \cdot \left(2 \cdot 2\right)}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.00390625, \frac{1}{{i}^{4}}, \mathsf{fma}\left(0.015625, \frac{1}{{i}^{2}}, 0.0625\right)\right)\\

\end{array}
double f(double i) {
        double r105736 = i;
        double r105737 = r105736 * r105736;
        double r105738 = r105737 * r105737;
        double r105739 = 2.0;
        double r105740 = r105739 * r105736;
        double r105741 = r105740 * r105740;
        double r105742 = r105738 / r105741;
        double r105743 = 1.0;
        double r105744 = r105741 - r105743;
        double r105745 = r105742 / r105744;
        return r105745;
}

double f(double i) {
        double r105746 = i;
        double r105747 = 206.90965650935013;
        bool r105748 = r105746 <= r105747;
        double r105749 = r105746 * r105746;
        double r105750 = 2.0;
        double r105751 = r105750 * r105746;
        double r105752 = 1.0;
        double r105753 = -r105752;
        double r105754 = fma(r105751, r105751, r105753);
        double r105755 = r105750 * r105750;
        double r105756 = r105754 * r105755;
        double r105757 = r105749 / r105756;
        double r105758 = 0.00390625;
        double r105759 = 1.0;
        double r105760 = 4.0;
        double r105761 = pow(r105746, r105760);
        double r105762 = r105759 / r105761;
        double r105763 = 0.015625;
        double r105764 = 2.0;
        double r105765 = pow(r105746, r105764);
        double r105766 = r105759 / r105765;
        double r105767 = 0.0625;
        double r105768 = fma(r105763, r105766, r105767);
        double r105769 = fma(r105758, r105762, r105768);
        double r105770 = r105748 ? r105757 : r105769;
        return r105770;
}

Error

Bits error versus i

Derivation

  1. Split input into 2 regimes
  2. if i < 206.90965650935013

    1. Initial program 45.3

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

      \[\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 fma-neg0.0

      \[\leadsto \frac{i \cdot i}{\color{blue}{\mathsf{fma}\left(2 \cdot i, 2 \cdot i, -1\right)} \cdot \left(2 \cdot 2\right)}\]

    if 206.90965650935013 < i

    1. Initial program 48.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. Simplified33.1

      \[\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. Taylor expanded around inf 0.0

      \[\leadsto \color{blue}{0.00390625 \cdot \frac{1}{{i}^{4}} + \left(0.015625 \cdot \frac{1}{{i}^{2}} + 0.0625\right)}\]
    4. Simplified0.0

      \[\leadsto \color{blue}{\mathsf{fma}\left(0.00390625, \frac{1}{{i}^{4}}, \mathsf{fma}\left(0.015625, \frac{1}{{i}^{2}}, 0.0625\right)\right)}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \le 206.909656509350128:\\ \;\;\;\;\frac{i \cdot i}{\mathsf{fma}\left(2 \cdot i, 2 \cdot i, -1\right) \cdot \left(2 \cdot 2\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.00390625, \frac{1}{{i}^{4}}, \mathsf{fma}\left(0.015625, \frac{1}{{i}^{2}}, 0.0625\right)\right)\\ \end{array}\]

Reproduce

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