Octave 3.8, jcobi/4, as called

Percentage Accurate: 20.3% → 63.7%
Time: 2.1s
Alternatives: 6
Speedup: 38.2×

Specification

?
\[i > 0\]
\[\begin{array}{l} t_0 := \left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\\ \frac{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{t\_0}}{t\_0 - 1} \end{array} \]
(FPCore (i)
  :precision binary64
  (let* ((t_0 (* (* 2.0 i) (* 2.0 i))))
  (/ (/ (* (* i i) (* i i)) t_0) (- t_0 1.0))))
double code(double i) {
	double t_0 = (2.0 * i) * (2.0 * i);
	return (((i * i) * (i * i)) / t_0) / (t_0 - 1.0);
}
real(8) function code(i)
use fmin_fmax_functions
    real(8), intent (in) :: i
    real(8) :: t_0
    t_0 = (2.0d0 * i) * (2.0d0 * i)
    code = (((i * i) * (i * i)) / t_0) / (t_0 - 1.0d0)
end function
public static double code(double i) {
	double t_0 = (2.0 * i) * (2.0 * i);
	return (((i * i) * (i * i)) / t_0) / (t_0 - 1.0);
}
def code(i):
	t_0 = (2.0 * i) * (2.0 * i)
	return (((i * i) * (i * i)) / t_0) / (t_0 - 1.0)
function code(i)
	t_0 = Float64(Float64(2.0 * i) * Float64(2.0 * i))
	return Float64(Float64(Float64(Float64(i * i) * Float64(i * i)) / t_0) / Float64(t_0 - 1.0))
end
function tmp = code(i)
	t_0 = (2.0 * i) * (2.0 * i);
	tmp = (((i * i) * (i * i)) / t_0) / (t_0 - 1.0);
end
code[i_] := Block[{t$95$0 = N[(N[(2.0 * i), $MachinePrecision] * N[(2.0 * i), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(N[(i * i), $MachinePrecision] * N[(i * i), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(t$95$0 - 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
t_0 := \left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\\
\frac{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{t\_0}}{t\_0 - 1}
\end{array}

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 6 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 20.3% accurate, 1.0× speedup?

\[\begin{array}{l} t_0 := \left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\\ \frac{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{t\_0}}{t\_0 - 1} \end{array} \]
(FPCore (i)
  :precision binary64
  (let* ((t_0 (* (* 2.0 i) (* 2.0 i))))
  (/ (/ (* (* i i) (* i i)) t_0) (- t_0 1.0))))
double code(double i) {
	double t_0 = (2.0 * i) * (2.0 * i);
	return (((i * i) * (i * i)) / t_0) / (t_0 - 1.0);
}
real(8) function code(i)
use fmin_fmax_functions
    real(8), intent (in) :: i
    real(8) :: t_0
    t_0 = (2.0d0 * i) * (2.0d0 * i)
    code = (((i * i) * (i * i)) / t_0) / (t_0 - 1.0d0)
end function
public static double code(double i) {
	double t_0 = (2.0 * i) * (2.0 * i);
	return (((i * i) * (i * i)) / t_0) / (t_0 - 1.0);
}
def code(i):
	t_0 = (2.0 * i) * (2.0 * i)
	return (((i * i) * (i * i)) / t_0) / (t_0 - 1.0)
function code(i)
	t_0 = Float64(Float64(2.0 * i) * Float64(2.0 * i))
	return Float64(Float64(Float64(Float64(i * i) * Float64(i * i)) / t_0) / Float64(t_0 - 1.0))
end
function tmp = code(i)
	t_0 = (2.0 * i) * (2.0 * i);
	tmp = (((i * i) * (i * i)) / t_0) / (t_0 - 1.0);
end
code[i_] := Block[{t$95$0 = N[(N[(2.0 * i), $MachinePrecision] * N[(2.0 * i), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(N[(i * i), $MachinePrecision] * N[(i * i), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(t$95$0 - 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
t_0 := \left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\\
\frac{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{t\_0}}{t\_0 - 1}
\end{array}

Alternative 1: 63.7% accurate, 1.0× speedup?

\[\begin{array}{l} \mathbf{if}\;\left|i\right| \leq 110:\\ \;\;\;\;\frac{1}{\frac{\mathsf{fma}\left(2, \left|i\right|, -1\right)}{\frac{\left(\left(\left|i\right| \cdot \left|i\right|\right) \cdot 0.25\right) \cdot 1}{\mathsf{fma}\left(2, \left|i\right|, 1\right)}}}\\ \mathbf{elif}\;\left|i\right| \leq 4 \cdot 10^{+133}:\\ \;\;\;\;\left(0 \cdot 0\right) \cdot -0.25\\ \mathbf{else}:\\ \;\;\;\;0.0625\\ \end{array} \]
(FPCore (i)
  :precision binary64
  (if (<= (fabs i) 110.0)
  (/
   1.0
   (/
    (fma 2.0 (fabs i) -1.0)
    (/
     (* (* (* (fabs i) (fabs i)) 0.25) 1.0)
     (fma 2.0 (fabs i) 1.0))))
  (if (<= (fabs i) 4e+133) (* (* 0.0 0.0) -0.25) 0.0625)))
double code(double i) {
	double tmp;
	if (fabs(i) <= 110.0) {
		tmp = 1.0 / (fma(2.0, fabs(i), -1.0) / ((((fabs(i) * fabs(i)) * 0.25) * 1.0) / fma(2.0, fabs(i), 1.0)));
	} else if (fabs(i) <= 4e+133) {
		tmp = (0.0 * 0.0) * -0.25;
	} else {
		tmp = 0.0625;
	}
	return tmp;
}
function code(i)
	tmp = 0.0
	if (abs(i) <= 110.0)
		tmp = Float64(1.0 / Float64(fma(2.0, abs(i), -1.0) / Float64(Float64(Float64(Float64(abs(i) * abs(i)) * 0.25) * 1.0) / fma(2.0, abs(i), 1.0))));
	elseif (abs(i) <= 4e+133)
		tmp = Float64(Float64(0.0 * 0.0) * -0.25);
	else
		tmp = 0.0625;
	end
	return tmp
end
code[i_] := If[LessEqual[N[Abs[i], $MachinePrecision], 110.0], N[(1.0 / N[(N[(2.0 * N[Abs[i], $MachinePrecision] + -1.0), $MachinePrecision] / N[(N[(N[(N[(N[Abs[i], $MachinePrecision] * N[Abs[i], $MachinePrecision]), $MachinePrecision] * 0.25), $MachinePrecision] * 1.0), $MachinePrecision] / N[(2.0 * N[Abs[i], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[i], $MachinePrecision], 4e+133], N[(N[(0.0 * 0.0), $MachinePrecision] * -0.25), $MachinePrecision], 0.0625]]
\begin{array}{l}
\mathbf{if}\;\left|i\right| \leq 110:\\
\;\;\;\;\frac{1}{\frac{\mathsf{fma}\left(2, \left|i\right|, -1\right)}{\frac{\left(\left(\left|i\right| \cdot \left|i\right|\right) \cdot 0.25\right) \cdot 1}{\mathsf{fma}\left(2, \left|i\right|, 1\right)}}}\\

\mathbf{elif}\;\left|i\right| \leq 4 \cdot 10^{+133}:\\
\;\;\;\;\left(0 \cdot 0\right) \cdot -0.25\\

\mathbf{else}:\\
\;\;\;\;0.0625\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < 110

    1. Initial program 20.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. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\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. lift--.f64N/A

        \[\leadsto \frac{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)}}{\color{blue}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)}}{\color{blue}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)} - 1} \]
      4. difference-of-sqr-1N/A

        \[\leadsto \frac{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)}}{\color{blue}{\left(2 \cdot i + 1\right) \cdot \left(2 \cdot i - 1\right)}} \]
      5. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)}}{2 \cdot i + 1}}{2 \cdot i - 1}} \]
      6. div-flipN/A

        \[\leadsto \color{blue}{\frac{1}{\frac{2 \cdot i - 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)}}{2 \cdot i + 1}}}} \]
      7. remove-sound-/N/A

        \[\leadsto \color{blue}{\frac{1}{\frac{2 \cdot i - 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)}}{2 \cdot i + 1}}}} \]
      8. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{1}{\frac{2 \cdot i - 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)}}{2 \cdot i + 1}}}} \]
      9. remove-sound-/N/A

        \[\leadsto \frac{1}{\color{blue}{\frac{2 \cdot i - 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)}}{2 \cdot i + 1}}}} \]
      10. lower-/.f64N/A

        \[\leadsto \frac{1}{\color{blue}{\frac{2 \cdot i - 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)}}{2 \cdot i + 1}}}} \]
    3. Applied rewrites51.7%

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

    if 110 < i < 4.0000000000000001e133

    1. Initial program 20.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. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\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. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\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} \]
      3. associate-/l/N/A

        \[\leadsto \color{blue}{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
      5. associate-/l*N/A

        \[\leadsto \color{blue}{\left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
      6. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
      7. lower-/.f64N/A

        \[\leadsto \left(i \cdot i\right) \cdot \color{blue}{\frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
      8. lift-*.f64N/A

        \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right)} \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
      9. lift-*.f64N/A

        \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \color{blue}{\left(2 \cdot i\right)}\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
      10. associate-*r*N/A

        \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(\left(2 \cdot i\right) \cdot 2\right) \cdot i\right)} \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
      11. associate-*l*N/A

        \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(2 \cdot i\right) \cdot 2\right) \cdot \left(i \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)\right)}} \]
      12. lower-*.f64N/A

        \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(2 \cdot i\right) \cdot 2\right) \cdot \left(i \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)\right)}} \]
    3. Applied rewrites26.9%

      \[\leadsto \color{blue}{\left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(i \cdot 4\right) \cdot \left(i \cdot \mathsf{fma}\left(4, i \cdot i, -1\right)\right)}} \]
    4. Taylor expanded in i around 0

      \[\leadsto \left(i \cdot i\right) \cdot \color{blue}{\frac{-1}{4}} \]
    5. Step-by-step derivation
      1. Applied rewrites39.0%

        \[\leadsto \left(i \cdot i\right) \cdot \color{blue}{-0.25} \]
      2. Taylor expanded in undef-var around zero

        \[\leadsto \left(\color{blue}{0} \cdot i\right) \cdot -0.25 \]
      3. Step-by-step derivation
        1. Applied rewrites64.1%

          \[\leadsto \left(\color{blue}{0} \cdot i\right) \cdot -0.25 \]
        2. Taylor expanded in undef-var around zero

          \[\leadsto \left(0 \cdot \color{blue}{0}\right) \cdot -0.25 \]
        3. Step-by-step derivation
          1. Applied rewrites64.1%

            \[\leadsto \left(0 \cdot \color{blue}{0}\right) \cdot -0.25 \]

          if 4.0000000000000001e133 < i

          1. Initial program 20.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. Taylor expanded in i around inf

            \[\leadsto \color{blue}{\frac{1}{16}} \]
          3. Step-by-step derivation
            1. Applied rewrites26.7%

              \[\leadsto \color{blue}{0.0625} \]
          4. Recombined 3 regimes into one program.
          5. Add Preprocessing

          Alternative 2: 63.6% accurate, 1.2× speedup?

          \[\begin{array}{l} \mathbf{if}\;\left|i\right| \leq 110:\\ \;\;\;\;\frac{1}{\frac{\mathsf{fma}\left(4 \cdot \left|i\right|, \left|i\right|, -1\right)}{0.25 \cdot \left(\left|i\right| \cdot \left|i\right|\right)}}\\ \mathbf{elif}\;\left|i\right| \leq 4 \cdot 10^{+133}:\\ \;\;\;\;\left(0 \cdot 0\right) \cdot -0.25\\ \mathbf{else}:\\ \;\;\;\;0.0625\\ \end{array} \]
          (FPCore (i)
            :precision binary64
            (if (<= (fabs i) 110.0)
            (/
             1.0
             (/
              (fma (* 4.0 (fabs i)) (fabs i) -1.0)
              (* 0.25 (* (fabs i) (fabs i)))))
            (if (<= (fabs i) 4e+133) (* (* 0.0 0.0) -0.25) 0.0625)))
          double code(double i) {
          	double tmp;
          	if (fabs(i) <= 110.0) {
          		tmp = 1.0 / (fma((4.0 * fabs(i)), fabs(i), -1.0) / (0.25 * (fabs(i) * fabs(i))));
          	} else if (fabs(i) <= 4e+133) {
          		tmp = (0.0 * 0.0) * -0.25;
          	} else {
          		tmp = 0.0625;
          	}
          	return tmp;
          }
          
          function code(i)
          	tmp = 0.0
          	if (abs(i) <= 110.0)
          		tmp = Float64(1.0 / Float64(fma(Float64(4.0 * abs(i)), abs(i), -1.0) / Float64(0.25 * Float64(abs(i) * abs(i)))));
          	elseif (abs(i) <= 4e+133)
          		tmp = Float64(Float64(0.0 * 0.0) * -0.25);
          	else
          		tmp = 0.0625;
          	end
          	return tmp
          end
          
          code[i_] := If[LessEqual[N[Abs[i], $MachinePrecision], 110.0], N[(1.0 / N[(N[(N[(4.0 * N[Abs[i], $MachinePrecision]), $MachinePrecision] * N[Abs[i], $MachinePrecision] + -1.0), $MachinePrecision] / N[(0.25 * N[(N[Abs[i], $MachinePrecision] * N[Abs[i], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[i], $MachinePrecision], 4e+133], N[(N[(0.0 * 0.0), $MachinePrecision] * -0.25), $MachinePrecision], 0.0625]]
          
          \begin{array}{l}
          \mathbf{if}\;\left|i\right| \leq 110:\\
          \;\;\;\;\frac{1}{\frac{\mathsf{fma}\left(4 \cdot \left|i\right|, \left|i\right|, -1\right)}{0.25 \cdot \left(\left|i\right| \cdot \left|i\right|\right)}}\\
          
          \mathbf{elif}\;\left|i\right| \leq 4 \cdot 10^{+133}:\\
          \;\;\;\;\left(0 \cdot 0\right) \cdot -0.25\\
          
          \mathbf{else}:\\
          \;\;\;\;0.0625\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if i < 110

            1. Initial program 20.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. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \color{blue}{\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. lift-/.f64N/A

                \[\leadsto \frac{\color{blue}{\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} \]
              3. lift-*.f64N/A

                \[\leadsto \frac{\frac{\color{blue}{\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} \]
              4. lift-*.f64N/A

                \[\leadsto \frac{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{\color{blue}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)}}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \]
              5. times-fracN/A

                \[\leadsto \frac{\color{blue}{\frac{i \cdot i}{2 \cdot i} \cdot \frac{i \cdot i}{2 \cdot i}}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \]
              6. associate-/l*N/A

                \[\leadsto \color{blue}{\frac{i \cdot i}{2 \cdot i} \cdot \frac{\frac{i \cdot i}{2 \cdot i}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1}} \]
              7. lower-*.f64N/A

                \[\leadsto \color{blue}{\frac{i \cdot i}{2 \cdot i} \cdot \frac{\frac{i \cdot i}{2 \cdot i}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1}} \]
              8. lift-*.f64N/A

                \[\leadsto \frac{\color{blue}{i \cdot i}}{2 \cdot i} \cdot \frac{\frac{i \cdot i}{2 \cdot i}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \]
              9. associate-/l*N/A

                \[\leadsto \color{blue}{\left(i \cdot \frac{i}{2 \cdot i}\right)} \cdot \frac{\frac{i \cdot i}{2 \cdot i}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \]
              10. lower-*.f64N/A

                \[\leadsto \color{blue}{\left(i \cdot \frac{i}{2 \cdot i}\right)} \cdot \frac{\frac{i \cdot i}{2 \cdot i}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \]
              11. lower-/.f64N/A

                \[\leadsto \left(i \cdot \color{blue}{\frac{i}{2 \cdot i}}\right) \cdot \frac{\frac{i \cdot i}{2 \cdot i}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \]
              12. lift-*.f64N/A

                \[\leadsto \left(i \cdot \frac{i}{\color{blue}{2 \cdot i}}\right) \cdot \frac{\frac{i \cdot i}{2 \cdot i}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \]
              13. count-2-revN/A

                \[\leadsto \left(i \cdot \frac{i}{\color{blue}{i + i}}\right) \cdot \frac{\frac{i \cdot i}{2 \cdot i}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \]
              14. lower-+.f64N/A

                \[\leadsto \left(i \cdot \frac{i}{\color{blue}{i + i}}\right) \cdot \frac{\frac{i \cdot i}{2 \cdot i}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \]
              15. lower-/.f64N/A

                \[\leadsto \left(i \cdot \frac{i}{i + i}\right) \cdot \color{blue}{\frac{\frac{i \cdot i}{2 \cdot i}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1}} \]
            3. Applied rewrites64.3%

              \[\leadsto \color{blue}{\left(i \cdot \frac{i}{i + i}\right) \cdot \frac{i \cdot \frac{i}{i + i}}{\mathsf{fma}\left(4, i \cdot i, -1\right)}} \]
            4. Applied rewrites51.2%

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

            if 110 < i < 4.0000000000000001e133

            1. Initial program 20.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. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \color{blue}{\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. lift-/.f64N/A

                \[\leadsto \frac{\color{blue}{\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} \]
              3. associate-/l/N/A

                \[\leadsto \color{blue}{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
              4. lift-*.f64N/A

                \[\leadsto \frac{\color{blue}{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
              5. associate-/l*N/A

                \[\leadsto \color{blue}{\left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
              6. lower-*.f64N/A

                \[\leadsto \color{blue}{\left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
              7. lower-/.f64N/A

                \[\leadsto \left(i \cdot i\right) \cdot \color{blue}{\frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
              8. lift-*.f64N/A

                \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right)} \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
              9. lift-*.f64N/A

                \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \color{blue}{\left(2 \cdot i\right)}\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
              10. associate-*r*N/A

                \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(\left(2 \cdot i\right) \cdot 2\right) \cdot i\right)} \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
              11. associate-*l*N/A

                \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(2 \cdot i\right) \cdot 2\right) \cdot \left(i \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)\right)}} \]
              12. lower-*.f64N/A

                \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(2 \cdot i\right) \cdot 2\right) \cdot \left(i \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)\right)}} \]
            3. Applied rewrites26.9%

              \[\leadsto \color{blue}{\left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(i \cdot 4\right) \cdot \left(i \cdot \mathsf{fma}\left(4, i \cdot i, -1\right)\right)}} \]
            4. Taylor expanded in i around 0

              \[\leadsto \left(i \cdot i\right) \cdot \color{blue}{\frac{-1}{4}} \]
            5. Step-by-step derivation
              1. Applied rewrites39.0%

                \[\leadsto \left(i \cdot i\right) \cdot \color{blue}{-0.25} \]
              2. Taylor expanded in undef-var around zero

                \[\leadsto \left(\color{blue}{0} \cdot i\right) \cdot -0.25 \]
              3. Step-by-step derivation
                1. Applied rewrites64.1%

                  \[\leadsto \left(\color{blue}{0} \cdot i\right) \cdot -0.25 \]
                2. Taylor expanded in undef-var around zero

                  \[\leadsto \left(0 \cdot \color{blue}{0}\right) \cdot -0.25 \]
                3. Step-by-step derivation
                  1. Applied rewrites64.1%

                    \[\leadsto \left(0 \cdot \color{blue}{0}\right) \cdot -0.25 \]

                  if 4.0000000000000001e133 < i

                  1. Initial program 20.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. Taylor expanded in i around inf

                    \[\leadsto \color{blue}{\frac{1}{16}} \]
                  3. Step-by-step derivation
                    1. Applied rewrites26.7%

                      \[\leadsto \color{blue}{0.0625} \]
                  4. Recombined 3 regimes into one program.
                  5. Add Preprocessing

                  Alternative 3: 63.6% accurate, 1.6× speedup?

                  \[\begin{array}{l} \mathbf{if}\;\left|i\right| \leq 110:\\ \;\;\;\;\frac{\left|i\right|}{\mathsf{fma}\left(16, \left|i\right| \cdot \left|i\right|, -4\right)} \cdot \left|i\right|\\ \mathbf{elif}\;\left|i\right| \leq 4 \cdot 10^{+133}:\\ \;\;\;\;\left(0 \cdot 0\right) \cdot -0.25\\ \mathbf{else}:\\ \;\;\;\;0.0625\\ \end{array} \]
                  (FPCore (i)
                    :precision binary64
                    (if (<= (fabs i) 110.0)
                    (* (/ (fabs i) (fma 16.0 (* (fabs i) (fabs i)) -4.0)) (fabs i))
                    (if (<= (fabs i) 4e+133) (* (* 0.0 0.0) -0.25) 0.0625)))
                  double code(double i) {
                  	double tmp;
                  	if (fabs(i) <= 110.0) {
                  		tmp = (fabs(i) / fma(16.0, (fabs(i) * fabs(i)), -4.0)) * fabs(i);
                  	} else if (fabs(i) <= 4e+133) {
                  		tmp = (0.0 * 0.0) * -0.25;
                  	} else {
                  		tmp = 0.0625;
                  	}
                  	return tmp;
                  }
                  
                  function code(i)
                  	tmp = 0.0
                  	if (abs(i) <= 110.0)
                  		tmp = Float64(Float64(abs(i) / fma(16.0, Float64(abs(i) * abs(i)), -4.0)) * abs(i));
                  	elseif (abs(i) <= 4e+133)
                  		tmp = Float64(Float64(0.0 * 0.0) * -0.25);
                  	else
                  		tmp = 0.0625;
                  	end
                  	return tmp
                  end
                  
                  code[i_] := If[LessEqual[N[Abs[i], $MachinePrecision], 110.0], N[(N[(N[Abs[i], $MachinePrecision] / N[(16.0 * N[(N[Abs[i], $MachinePrecision] * N[Abs[i], $MachinePrecision]), $MachinePrecision] + -4.0), $MachinePrecision]), $MachinePrecision] * N[Abs[i], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[i], $MachinePrecision], 4e+133], N[(N[(0.0 * 0.0), $MachinePrecision] * -0.25), $MachinePrecision], 0.0625]]
                  
                  \begin{array}{l}
                  \mathbf{if}\;\left|i\right| \leq 110:\\
                  \;\;\;\;\frac{\left|i\right|}{\mathsf{fma}\left(16, \left|i\right| \cdot \left|i\right|, -4\right)} \cdot \left|i\right|\\
                  
                  \mathbf{elif}\;\left|i\right| \leq 4 \cdot 10^{+133}:\\
                  \;\;\;\;\left(0 \cdot 0\right) \cdot -0.25\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;0.0625\\
                  
                  
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if i < 110

                    1. Initial program 20.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. Step-by-step derivation
                      1. lift-/.f64N/A

                        \[\leadsto \color{blue}{\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. lift-/.f64N/A

                        \[\leadsto \frac{\color{blue}{\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} \]
                      3. lift-*.f64N/A

                        \[\leadsto \frac{\frac{\color{blue}{\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} \]
                      4. lift-*.f64N/A

                        \[\leadsto \frac{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{\color{blue}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)}}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \]
                      5. times-fracN/A

                        \[\leadsto \frac{\color{blue}{\frac{i \cdot i}{2 \cdot i} \cdot \frac{i \cdot i}{2 \cdot i}}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \]
                      6. associate-/l*N/A

                        \[\leadsto \color{blue}{\frac{i \cdot i}{2 \cdot i} \cdot \frac{\frac{i \cdot i}{2 \cdot i}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1}} \]
                      7. lower-*.f64N/A

                        \[\leadsto \color{blue}{\frac{i \cdot i}{2 \cdot i} \cdot \frac{\frac{i \cdot i}{2 \cdot i}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1}} \]
                      8. lift-*.f64N/A

                        \[\leadsto \frac{\color{blue}{i \cdot i}}{2 \cdot i} \cdot \frac{\frac{i \cdot i}{2 \cdot i}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \]
                      9. associate-/l*N/A

                        \[\leadsto \color{blue}{\left(i \cdot \frac{i}{2 \cdot i}\right)} \cdot \frac{\frac{i \cdot i}{2 \cdot i}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \]
                      10. lower-*.f64N/A

                        \[\leadsto \color{blue}{\left(i \cdot \frac{i}{2 \cdot i}\right)} \cdot \frac{\frac{i \cdot i}{2 \cdot i}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \]
                      11. lower-/.f64N/A

                        \[\leadsto \left(i \cdot \color{blue}{\frac{i}{2 \cdot i}}\right) \cdot \frac{\frac{i \cdot i}{2 \cdot i}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \]
                      12. lift-*.f64N/A

                        \[\leadsto \left(i \cdot \frac{i}{\color{blue}{2 \cdot i}}\right) \cdot \frac{\frac{i \cdot i}{2 \cdot i}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \]
                      13. count-2-revN/A

                        \[\leadsto \left(i \cdot \frac{i}{\color{blue}{i + i}}\right) \cdot \frac{\frac{i \cdot i}{2 \cdot i}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \]
                      14. lower-+.f64N/A

                        \[\leadsto \left(i \cdot \frac{i}{\color{blue}{i + i}}\right) \cdot \frac{\frac{i \cdot i}{2 \cdot i}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1} \]
                      15. lower-/.f64N/A

                        \[\leadsto \left(i \cdot \frac{i}{i + i}\right) \cdot \color{blue}{\frac{\frac{i \cdot i}{2 \cdot i}}{\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1}} \]
                    3. Applied rewrites64.3%

                      \[\leadsto \color{blue}{\left(i \cdot \frac{i}{i + i}\right) \cdot \frac{i \cdot \frac{i}{i + i}}{\mathsf{fma}\left(4, i \cdot i, -1\right)}} \]
                    4. Applied rewrites64.3%

                      \[\leadsto \color{blue}{\left(\frac{0.25}{\mathsf{fma}\left(4 \cdot i, i, -1\right)} \cdot i\right) \cdot i} \]
                    5. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \color{blue}{\left(\frac{\frac{1}{4}}{\mathsf{fma}\left(4 \cdot i, i, -1\right)} \cdot i\right)} \cdot i \]
                      2. lift-/.f64N/A

                        \[\leadsto \left(\color{blue}{\frac{\frac{1}{4}}{\mathsf{fma}\left(4 \cdot i, i, -1\right)}} \cdot i\right) \cdot i \]
                      3. associate-*l/N/A

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

                        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{1}{4} \cdot i\right)}{\mathsf{neg}\left(\mathsf{fma}\left(4 \cdot i, i, -1\right)\right)}} \cdot i \]
                      5. distribute-frac-neg2N/A

                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{\mathsf{neg}\left(\frac{1}{4} \cdot i\right)}{\mathsf{fma}\left(4 \cdot i, i, -1\right)}\right)\right)} \cdot i \]
                      6. distribute-rgt-neg-outN/A

                        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{1}{4} \cdot \left(\mathsf{neg}\left(i\right)\right)}}{\mathsf{fma}\left(4 \cdot i, i, -1\right)}\right)\right) \cdot i \]
                      7. associate-*l/N/A

                        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{\frac{1}{4}}{\mathsf{fma}\left(4 \cdot i, i, -1\right)} \cdot \left(\mathsf{neg}\left(i\right)\right)}\right)\right) \cdot i \]
                      8. lift-/.f64N/A

                        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{\frac{1}{4}}{\mathsf{fma}\left(4 \cdot i, i, -1\right)}} \cdot \left(\mathsf{neg}\left(i\right)\right)\right)\right) \cdot i \]
                      9. distribute-rgt-neg-outN/A

                        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\frac{\frac{1}{4}}{\mathsf{fma}\left(4 \cdot i, i, -1\right)} \cdot i\right)\right)}\right)\right) \cdot i \]
                      10. *-commutativeN/A

                        \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{i \cdot \frac{\frac{1}{4}}{\mathsf{fma}\left(4 \cdot i, i, -1\right)}}\right)\right)\right)\right) \cdot i \]
                      11. distribute-lft-neg-outN/A

                        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(i\right)\right) \cdot \frac{\frac{1}{4}}{\mathsf{fma}\left(4 \cdot i, i, -1\right)}}\right)\right) \cdot i \]
                      12. lift-/.f64N/A

                        \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(i\right)\right) \cdot \color{blue}{\frac{\frac{1}{4}}{\mathsf{fma}\left(4 \cdot i, i, -1\right)}}\right)\right) \cdot i \]
                      13. frac-2negN/A

                        \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(i\right)\right) \cdot \color{blue}{\frac{\mathsf{neg}\left(\frac{1}{4}\right)}{\mathsf{neg}\left(\mathsf{fma}\left(4 \cdot i, i, -1\right)\right)}}\right)\right) \cdot i \]
                      14. metadata-evalN/A

                        \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(i\right)\right) \cdot \frac{\color{blue}{\frac{-1}{4}}}{\mathsf{neg}\left(\mathsf{fma}\left(4 \cdot i, i, -1\right)\right)}\right)\right) \cdot i \]
                      15. associate-*r/N/A

                        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{\left(\mathsf{neg}\left(i\right)\right) \cdot \frac{-1}{4}}{\mathsf{neg}\left(\mathsf{fma}\left(4 \cdot i, i, -1\right)\right)}}\right)\right) \cdot i \]
                      16. mul-1-negN/A

                        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(-1 \cdot i\right)} \cdot \frac{-1}{4}}{\mathsf{neg}\left(\mathsf{fma}\left(4 \cdot i, i, -1\right)\right)}\right)\right) \cdot i \]
                      17. *-commutativeN/A

                        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(i \cdot -1\right)} \cdot \frac{-1}{4}}{\mathsf{neg}\left(\mathsf{fma}\left(4 \cdot i, i, -1\right)\right)}\right)\right) \cdot i \]
                      18. associate-*l*N/A

                        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{i \cdot \left(-1 \cdot \frac{-1}{4}\right)}}{\mathsf{neg}\left(\mathsf{fma}\left(4 \cdot i, i, -1\right)\right)}\right)\right) \cdot i \]
                      19. metadata-evalN/A

                        \[\leadsto \left(\mathsf{neg}\left(\frac{i \cdot \color{blue}{\frac{1}{4}}}{\mathsf{neg}\left(\mathsf{fma}\left(4 \cdot i, i, -1\right)\right)}\right)\right) \cdot i \]
                      20. metadata-evalN/A

                        \[\leadsto \left(\mathsf{neg}\left(\frac{i \cdot \color{blue}{\frac{1}{4}}}{\mathsf{neg}\left(\mathsf{fma}\left(4 \cdot i, i, -1\right)\right)}\right)\right) \cdot i \]
                      21. mult-flipN/A

                        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\frac{i}{4}}}{\mathsf{neg}\left(\mathsf{fma}\left(4 \cdot i, i, -1\right)\right)}\right)\right) \cdot i \]
                    6. Applied rewrites64.3%

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

                    if 110 < i < 4.0000000000000001e133

                    1. Initial program 20.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. Step-by-step derivation
                      1. lift-/.f64N/A

                        \[\leadsto \color{blue}{\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. lift-/.f64N/A

                        \[\leadsto \frac{\color{blue}{\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} \]
                      3. associate-/l/N/A

                        \[\leadsto \color{blue}{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
                      4. lift-*.f64N/A

                        \[\leadsto \frac{\color{blue}{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
                      5. associate-/l*N/A

                        \[\leadsto \color{blue}{\left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
                      6. lower-*.f64N/A

                        \[\leadsto \color{blue}{\left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
                      7. lower-/.f64N/A

                        \[\leadsto \left(i \cdot i\right) \cdot \color{blue}{\frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
                      8. lift-*.f64N/A

                        \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right)} \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
                      9. lift-*.f64N/A

                        \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \color{blue}{\left(2 \cdot i\right)}\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
                      10. associate-*r*N/A

                        \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(\left(2 \cdot i\right) \cdot 2\right) \cdot i\right)} \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
                      11. associate-*l*N/A

                        \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(2 \cdot i\right) \cdot 2\right) \cdot \left(i \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)\right)}} \]
                      12. lower-*.f64N/A

                        \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(2 \cdot i\right) \cdot 2\right) \cdot \left(i \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)\right)}} \]
                    3. Applied rewrites26.9%

                      \[\leadsto \color{blue}{\left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(i \cdot 4\right) \cdot \left(i \cdot \mathsf{fma}\left(4, i \cdot i, -1\right)\right)}} \]
                    4. Taylor expanded in i around 0

                      \[\leadsto \left(i \cdot i\right) \cdot \color{blue}{\frac{-1}{4}} \]
                    5. Step-by-step derivation
                      1. Applied rewrites39.0%

                        \[\leadsto \left(i \cdot i\right) \cdot \color{blue}{-0.25} \]
                      2. Taylor expanded in undef-var around zero

                        \[\leadsto \left(\color{blue}{0} \cdot i\right) \cdot -0.25 \]
                      3. Step-by-step derivation
                        1. Applied rewrites64.1%

                          \[\leadsto \left(\color{blue}{0} \cdot i\right) \cdot -0.25 \]
                        2. Taylor expanded in undef-var around zero

                          \[\leadsto \left(0 \cdot \color{blue}{0}\right) \cdot -0.25 \]
                        3. Step-by-step derivation
                          1. Applied rewrites64.1%

                            \[\leadsto \left(0 \cdot \color{blue}{0}\right) \cdot -0.25 \]

                          if 4.0000000000000001e133 < i

                          1. Initial program 20.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. Taylor expanded in i around inf

                            \[\leadsto \color{blue}{\frac{1}{16}} \]
                          3. Step-by-step derivation
                            1. Applied rewrites26.7%

                              \[\leadsto \color{blue}{0.0625} \]
                          4. Recombined 3 regimes into one program.
                          5. Add Preprocessing

                          Alternative 4: 63.5% accurate, 2.3× speedup?

                          \[\begin{array}{l} \mathbf{if}\;\left|i\right| \leq 7 \cdot 10^{-9}:\\ \;\;\;\;\left(\left|i\right| \cdot \left|i\right|\right) \cdot -0.25\\ \mathbf{elif}\;\left|i\right| \leq 4 \cdot 10^{+133}:\\ \;\;\;\;\left(0 \cdot 0\right) \cdot -0.25\\ \mathbf{else}:\\ \;\;\;\;0.0625\\ \end{array} \]
                          (FPCore (i)
                            :precision binary64
                            (if (<= (fabs i) 7e-9)
                            (* (* (fabs i) (fabs i)) -0.25)
                            (if (<= (fabs i) 4e+133) (* (* 0.0 0.0) -0.25) 0.0625)))
                          double code(double i) {
                          	double tmp;
                          	if (fabs(i) <= 7e-9) {
                          		tmp = (fabs(i) * fabs(i)) * -0.25;
                          	} else if (fabs(i) <= 4e+133) {
                          		tmp = (0.0 * 0.0) * -0.25;
                          	} else {
                          		tmp = 0.0625;
                          	}
                          	return tmp;
                          }
                          
                          real(8) function code(i)
                          use fmin_fmax_functions
                              real(8), intent (in) :: i
                              real(8) :: tmp
                              if (abs(i) <= 7d-9) then
                                  tmp = (abs(i) * abs(i)) * (-0.25d0)
                              else if (abs(i) <= 4d+133) then
                                  tmp = (0.0d0 * 0.0d0) * (-0.25d0)
                              else
                                  tmp = 0.0625d0
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double i) {
                          	double tmp;
                          	if (Math.abs(i) <= 7e-9) {
                          		tmp = (Math.abs(i) * Math.abs(i)) * -0.25;
                          	} else if (Math.abs(i) <= 4e+133) {
                          		tmp = (0.0 * 0.0) * -0.25;
                          	} else {
                          		tmp = 0.0625;
                          	}
                          	return tmp;
                          }
                          
                          def code(i):
                          	tmp = 0
                          	if math.fabs(i) <= 7e-9:
                          		tmp = (math.fabs(i) * math.fabs(i)) * -0.25
                          	elif math.fabs(i) <= 4e+133:
                          		tmp = (0.0 * 0.0) * -0.25
                          	else:
                          		tmp = 0.0625
                          	return tmp
                          
                          function code(i)
                          	tmp = 0.0
                          	if (abs(i) <= 7e-9)
                          		tmp = Float64(Float64(abs(i) * abs(i)) * -0.25);
                          	elseif (abs(i) <= 4e+133)
                          		tmp = Float64(Float64(0.0 * 0.0) * -0.25);
                          	else
                          		tmp = 0.0625;
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(i)
                          	tmp = 0.0;
                          	if (abs(i) <= 7e-9)
                          		tmp = (abs(i) * abs(i)) * -0.25;
                          	elseif (abs(i) <= 4e+133)
                          		tmp = (0.0 * 0.0) * -0.25;
                          	else
                          		tmp = 0.0625;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[i_] := If[LessEqual[N[Abs[i], $MachinePrecision], 7e-9], N[(N[(N[Abs[i], $MachinePrecision] * N[Abs[i], $MachinePrecision]), $MachinePrecision] * -0.25), $MachinePrecision], If[LessEqual[N[Abs[i], $MachinePrecision], 4e+133], N[(N[(0.0 * 0.0), $MachinePrecision] * -0.25), $MachinePrecision], 0.0625]]
                          
                          \begin{array}{l}
                          \mathbf{if}\;\left|i\right| \leq 7 \cdot 10^{-9}:\\
                          \;\;\;\;\left(\left|i\right| \cdot \left|i\right|\right) \cdot -0.25\\
                          
                          \mathbf{elif}\;\left|i\right| \leq 4 \cdot 10^{+133}:\\
                          \;\;\;\;\left(0 \cdot 0\right) \cdot -0.25\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;0.0625\\
                          
                          
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if i < 6.9999999999999998e-9

                            1. Initial program 20.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. Step-by-step derivation
                              1. lift-/.f64N/A

                                \[\leadsto \color{blue}{\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. lift-/.f64N/A

                                \[\leadsto \frac{\color{blue}{\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} \]
                              3. associate-/l/N/A

                                \[\leadsto \color{blue}{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
                              4. lift-*.f64N/A

                                \[\leadsto \frac{\color{blue}{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
                              5. associate-/l*N/A

                                \[\leadsto \color{blue}{\left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
                              6. lower-*.f64N/A

                                \[\leadsto \color{blue}{\left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
                              7. lower-/.f64N/A

                                \[\leadsto \left(i \cdot i\right) \cdot \color{blue}{\frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
                              8. lift-*.f64N/A

                                \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right)} \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
                              9. lift-*.f64N/A

                                \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \color{blue}{\left(2 \cdot i\right)}\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
                              10. associate-*r*N/A

                                \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(\left(2 \cdot i\right) \cdot 2\right) \cdot i\right)} \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
                              11. associate-*l*N/A

                                \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(2 \cdot i\right) \cdot 2\right) \cdot \left(i \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)\right)}} \]
                              12. lower-*.f64N/A

                                \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(2 \cdot i\right) \cdot 2\right) \cdot \left(i \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)\right)}} \]
                            3. Applied rewrites26.9%

                              \[\leadsto \color{blue}{\left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(i \cdot 4\right) \cdot \left(i \cdot \mathsf{fma}\left(4, i \cdot i, -1\right)\right)}} \]
                            4. Taylor expanded in i around 0

                              \[\leadsto \left(i \cdot i\right) \cdot \color{blue}{\frac{-1}{4}} \]
                            5. Step-by-step derivation
                              1. Applied rewrites39.0%

                                \[\leadsto \left(i \cdot i\right) \cdot \color{blue}{-0.25} \]

                              if 6.9999999999999998e-9 < i < 4.0000000000000001e133

                              1. Initial program 20.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. Step-by-step derivation
                                1. lift-/.f64N/A

                                  \[\leadsto \color{blue}{\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. lift-/.f64N/A

                                  \[\leadsto \frac{\color{blue}{\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} \]
                                3. associate-/l/N/A

                                  \[\leadsto \color{blue}{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
                                4. lift-*.f64N/A

                                  \[\leadsto \frac{\color{blue}{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
                                5. associate-/l*N/A

                                  \[\leadsto \color{blue}{\left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
                                6. lower-*.f64N/A

                                  \[\leadsto \color{blue}{\left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
                                7. lower-/.f64N/A

                                  \[\leadsto \left(i \cdot i\right) \cdot \color{blue}{\frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
                                8. lift-*.f64N/A

                                  \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right)} \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
                                9. lift-*.f64N/A

                                  \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \color{blue}{\left(2 \cdot i\right)}\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
                                10. associate-*r*N/A

                                  \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(\left(2 \cdot i\right) \cdot 2\right) \cdot i\right)} \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
                                11. associate-*l*N/A

                                  \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(2 \cdot i\right) \cdot 2\right) \cdot \left(i \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)\right)}} \]
                                12. lower-*.f64N/A

                                  \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(2 \cdot i\right) \cdot 2\right) \cdot \left(i \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)\right)}} \]
                              3. Applied rewrites26.9%

                                \[\leadsto \color{blue}{\left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(i \cdot 4\right) \cdot \left(i \cdot \mathsf{fma}\left(4, i \cdot i, -1\right)\right)}} \]
                              4. Taylor expanded in i around 0

                                \[\leadsto \left(i \cdot i\right) \cdot \color{blue}{\frac{-1}{4}} \]
                              5. Step-by-step derivation
                                1. Applied rewrites39.0%

                                  \[\leadsto \left(i \cdot i\right) \cdot \color{blue}{-0.25} \]
                                2. Taylor expanded in undef-var around zero

                                  \[\leadsto \left(\color{blue}{0} \cdot i\right) \cdot -0.25 \]
                                3. Step-by-step derivation
                                  1. Applied rewrites64.1%

                                    \[\leadsto \left(\color{blue}{0} \cdot i\right) \cdot -0.25 \]
                                  2. Taylor expanded in undef-var around zero

                                    \[\leadsto \left(0 \cdot \color{blue}{0}\right) \cdot -0.25 \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites64.1%

                                      \[\leadsto \left(0 \cdot \color{blue}{0}\right) \cdot -0.25 \]

                                    if 4.0000000000000001e133 < i

                                    1. Initial program 20.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. Taylor expanded in i around inf

                                      \[\leadsto \color{blue}{\frac{1}{16}} \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites26.7%

                                        \[\leadsto \color{blue}{0.0625} \]
                                    4. Recombined 3 regimes into one program.
                                    5. Add Preprocessing

                                    Alternative 5: 63.5% accurate, 2.8× speedup?

                                    \[\begin{array}{l} \mathbf{if}\;\left|i\right| \leq 0.023:\\ \;\;\;\;\left(\left|i\right| \cdot \left|i\right|\right) \cdot -0.25\\ \mathbf{else}:\\ \;\;\;\;0.0625\\ \end{array} \]
                                    (FPCore (i)
                                      :precision binary64
                                      (if (<= (fabs i) 0.023) (* (* (fabs i) (fabs i)) -0.25) 0.0625))
                                    double code(double i) {
                                    	double tmp;
                                    	if (fabs(i) <= 0.023) {
                                    		tmp = (fabs(i) * fabs(i)) * -0.25;
                                    	} else {
                                    		tmp = 0.0625;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    real(8) function code(i)
                                    use fmin_fmax_functions
                                        real(8), intent (in) :: i
                                        real(8) :: tmp
                                        if (abs(i) <= 0.023d0) then
                                            tmp = (abs(i) * abs(i)) * (-0.25d0)
                                        else
                                            tmp = 0.0625d0
                                        end if
                                        code = tmp
                                    end function
                                    
                                    public static double code(double i) {
                                    	double tmp;
                                    	if (Math.abs(i) <= 0.023) {
                                    		tmp = (Math.abs(i) * Math.abs(i)) * -0.25;
                                    	} else {
                                    		tmp = 0.0625;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(i):
                                    	tmp = 0
                                    	if math.fabs(i) <= 0.023:
                                    		tmp = (math.fabs(i) * math.fabs(i)) * -0.25
                                    	else:
                                    		tmp = 0.0625
                                    	return tmp
                                    
                                    function code(i)
                                    	tmp = 0.0
                                    	if (abs(i) <= 0.023)
                                    		tmp = Float64(Float64(abs(i) * abs(i)) * -0.25);
                                    	else
                                    		tmp = 0.0625;
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(i)
                                    	tmp = 0.0;
                                    	if (abs(i) <= 0.023)
                                    		tmp = (abs(i) * abs(i)) * -0.25;
                                    	else
                                    		tmp = 0.0625;
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[i_] := If[LessEqual[N[Abs[i], $MachinePrecision], 0.023], N[(N[(N[Abs[i], $MachinePrecision] * N[Abs[i], $MachinePrecision]), $MachinePrecision] * -0.25), $MachinePrecision], 0.0625]
                                    
                                    \begin{array}{l}
                                    \mathbf{if}\;\left|i\right| \leq 0.023:\\
                                    \;\;\;\;\left(\left|i\right| \cdot \left|i\right|\right) \cdot -0.25\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;0.0625\\
                                    
                                    
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if i < 0.023

                                      1. Initial program 20.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. Step-by-step derivation
                                        1. lift-/.f64N/A

                                          \[\leadsto \color{blue}{\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. lift-/.f64N/A

                                          \[\leadsto \frac{\color{blue}{\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} \]
                                        3. associate-/l/N/A

                                          \[\leadsto \color{blue}{\frac{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
                                        4. lift-*.f64N/A

                                          \[\leadsto \frac{\color{blue}{\left(i \cdot i\right) \cdot \left(i \cdot i\right)}}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
                                        5. associate-/l*N/A

                                          \[\leadsto \color{blue}{\left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
                                        6. lower-*.f64N/A

                                          \[\leadsto \color{blue}{\left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
                                        7. lower-/.f64N/A

                                          \[\leadsto \left(i \cdot i\right) \cdot \color{blue}{\frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)}} \]
                                        8. lift-*.f64N/A

                                          \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right)\right)} \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
                                        9. lift-*.f64N/A

                                          \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(\left(2 \cdot i\right) \cdot \color{blue}{\left(2 \cdot i\right)}\right) \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
                                        10. associate-*r*N/A

                                          \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(\left(2 \cdot i\right) \cdot 2\right) \cdot i\right)} \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)} \]
                                        11. associate-*l*N/A

                                          \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(2 \cdot i\right) \cdot 2\right) \cdot \left(i \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)\right)}} \]
                                        12. lower-*.f64N/A

                                          \[\leadsto \left(i \cdot i\right) \cdot \frac{i \cdot i}{\color{blue}{\left(\left(2 \cdot i\right) \cdot 2\right) \cdot \left(i \cdot \left(\left(2 \cdot i\right) \cdot \left(2 \cdot i\right) - 1\right)\right)}} \]
                                      3. Applied rewrites26.9%

                                        \[\leadsto \color{blue}{\left(i \cdot i\right) \cdot \frac{i \cdot i}{\left(i \cdot 4\right) \cdot \left(i \cdot \mathsf{fma}\left(4, i \cdot i, -1\right)\right)}} \]
                                      4. Taylor expanded in i around 0

                                        \[\leadsto \left(i \cdot i\right) \cdot \color{blue}{\frac{-1}{4}} \]
                                      5. Step-by-step derivation
                                        1. Applied rewrites39.0%

                                          \[\leadsto \left(i \cdot i\right) \cdot \color{blue}{-0.25} \]

                                        if 0.023 < i

                                        1. Initial program 20.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. Taylor expanded in i around inf

                                          \[\leadsto \color{blue}{\frac{1}{16}} \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites26.7%

                                            \[\leadsto \color{blue}{0.0625} \]
                                        4. Recombined 2 regimes into one program.
                                        5. Add Preprocessing

                                        Alternative 6: 26.7% accurate, 38.2× speedup?

                                        \[0.0625 \]
                                        (FPCore (i)
                                          :precision binary64
                                          0.0625)
                                        double code(double i) {
                                        	return 0.0625;
                                        }
                                        
                                        real(8) function code(i)
                                        use fmin_fmax_functions
                                            real(8), intent (in) :: i
                                            code = 0.0625d0
                                        end function
                                        
                                        public static double code(double i) {
                                        	return 0.0625;
                                        }
                                        
                                        def code(i):
                                        	return 0.0625
                                        
                                        function code(i)
                                        	return 0.0625
                                        end
                                        
                                        function tmp = code(i)
                                        	tmp = 0.0625;
                                        end
                                        
                                        code[i_] := 0.0625
                                        
                                        0.0625
                                        
                                        Derivation
                                        1. Initial program 20.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. Taylor expanded in i around inf

                                          \[\leadsto \color{blue}{\frac{1}{16}} \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites26.7%

                                            \[\leadsto \color{blue}{0.0625} \]
                                          2. Add Preprocessing

                                          Reproduce

                                          ?
                                          herbie shell --seed 2025313 -o setup:search
                                          (FPCore (i)
                                            :name "Octave 3.8, jcobi/4, as called"
                                            :precision binary64
                                            :pre (> i 0.0)
                                            (/ (/ (* (* i i) (* i i)) (* (* 2.0 i) (* 2.0 i))) (- (* (* 2.0 i) (* 2.0 i)) 1.0)))