Falkner and Boettcher, Appendix A

Percentage Accurate: 90.0% → 97.2%
Time: 13.4s
Alternatives: 16
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \end{array} \]
(FPCore (a k m)
 :precision binary64
 (/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))
double code(double a, double k, double m) {
	return (a * pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k));
}
real(8) function code(a, k, m)
    real(8), intent (in) :: a
    real(8), intent (in) :: k
    real(8), intent (in) :: m
    code = (a * (k ** m)) / ((1.0d0 + (10.0d0 * k)) + (k * k))
end function
public static double code(double a, double k, double m) {
	return (a * Math.pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k));
}
def code(a, k, m):
	return (a * math.pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k))
function code(a, k, m)
	return Float64(Float64(a * (k ^ m)) / Float64(Float64(1.0 + Float64(10.0 * k)) + Float64(k * k)))
end
function tmp = code(a, k, m)
	tmp = (a * (k ^ m)) / ((1.0 + (10.0 * k)) + (k * k));
end
code[a_, k_, m_] := N[(N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 + N[(10.0 * k), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}
\end{array}

Sampling outcomes in binary64 precision:

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 16 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: 90.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \end{array} \]
(FPCore (a k m)
 :precision binary64
 (/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))
double code(double a, double k, double m) {
	return (a * pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k));
}
real(8) function code(a, k, m)
    real(8), intent (in) :: a
    real(8), intent (in) :: k
    real(8), intent (in) :: m
    code = (a * (k ** m)) / ((1.0d0 + (10.0d0 * k)) + (k * k))
end function
public static double code(double a, double k, double m) {
	return (a * Math.pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k));
}
def code(a, k, m):
	return (a * math.pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k))
function code(a, k, m)
	return Float64(Float64(a * (k ^ m)) / Float64(Float64(1.0 + Float64(10.0 * k)) + Float64(k * k)))
end
function tmp = code(a, k, m)
	tmp = (a * (k ^ m)) / ((1.0 + (10.0 * k)) + (k * k));
end
code[a_, k_, m_] := N[(N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 + N[(10.0 * k), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}
\end{array}

Alternative 1: 97.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq 1:\\ \;\;\;\;\frac{a}{{\left(\frac{1}{k}\right)}^{m}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{a}{k} \cdot {k}^{m}}{k}\\ \end{array} \end{array} \]
(FPCore (a k m)
 :precision binary64
 (if (<= k 1.0) (/ a (pow (/ 1.0 k) m)) (/ (* (/ a k) (pow k m)) k)))
double code(double a, double k, double m) {
	double tmp;
	if (k <= 1.0) {
		tmp = a / pow((1.0 / k), m);
	} else {
		tmp = ((a / k) * pow(k, m)) / k;
	}
	return tmp;
}
real(8) function code(a, k, m)
    real(8), intent (in) :: a
    real(8), intent (in) :: k
    real(8), intent (in) :: m
    real(8) :: tmp
    if (k <= 1.0d0) then
        tmp = a / ((1.0d0 / k) ** m)
    else
        tmp = ((a / k) * (k ** m)) / k
    end if
    code = tmp
end function
public static double code(double a, double k, double m) {
	double tmp;
	if (k <= 1.0) {
		tmp = a / Math.pow((1.0 / k), m);
	} else {
		tmp = ((a / k) * Math.pow(k, m)) / k;
	}
	return tmp;
}
def code(a, k, m):
	tmp = 0
	if k <= 1.0:
		tmp = a / math.pow((1.0 / k), m)
	else:
		tmp = ((a / k) * math.pow(k, m)) / k
	return tmp
function code(a, k, m)
	tmp = 0.0
	if (k <= 1.0)
		tmp = Float64(a / (Float64(1.0 / k) ^ m));
	else
		tmp = Float64(Float64(Float64(a / k) * (k ^ m)) / k);
	end
	return tmp
end
function tmp_2 = code(a, k, m)
	tmp = 0.0;
	if (k <= 1.0)
		tmp = a / ((1.0 / k) ^ m);
	else
		tmp = ((a / k) * (k ^ m)) / k;
	end
	tmp_2 = tmp;
end
code[a_, k_, m_] := If[LessEqual[k, 1.0], N[(a / N[Power[N[(1.0 / k), $MachinePrecision], m], $MachinePrecision]), $MachinePrecision], N[(N[(N[(a / k), $MachinePrecision] * N[Power[k, m], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;k \leq 1:\\
\;\;\;\;\frac{a}{{\left(\frac{1}{k}\right)}^{m}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{a}{k} \cdot {k}^{m}}{k}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 1

    1. Initial program 96.4%

      \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
      3. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      6. distribute-rgt-outN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
      8. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
      9. +-lowering-+.f6496.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
    3. Simplified96.4%

      \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in k around inf

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(a \cdot e^{-1 \cdot \left(m \cdot \log \left(\frac{1}{k}\right)\right)}\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot e^{\mathsf{neg}\left(m \cdot \log \left(\frac{1}{k}\right)\right)}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
      2. exp-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot \frac{1}{e^{m \cdot \log \left(\frac{1}{k}\right)}}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
      3. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{a \cdot 1}{e^{m \cdot \log \left(\frac{1}{k}\right)}}\right), \mathsf{+.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(a \cdot 1\right), \left(e^{m \cdot \log \left(\frac{1}{k}\right)}\right)\right), \mathsf{+.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 1\right), \left(e^{m \cdot \log \left(\frac{1}{k}\right)}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 1\right), \left(e^{\log \left(\frac{1}{k}\right) \cdot m}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
      7. exp-to-powN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 1\right), \left({\left(\frac{1}{k}\right)}^{m}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 1\right), \mathsf{pow.f64}\left(\left(\frac{1}{k}\right), m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
      9. /-lowering-/.f6496.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 1\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(1, k\right), m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
    7. Simplified96.4%

      \[\leadsto \frac{\color{blue}{\frac{a \cdot 1}{{\left(\frac{1}{k}\right)}^{m}}}}{1 + k \cdot \left(k + 10\right)} \]
    8. Taylor expanded in k around 0

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 1\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(1, k\right), m\right)\right), \color{blue}{1}\right) \]
    9. Step-by-step derivation
      1. Simplified99.4%

        \[\leadsto \frac{\frac{a \cdot 1}{{\left(\frac{1}{k}\right)}^{m}}}{\color{blue}{1}} \]
      2. Step-by-step derivation
        1. /-rgt-identityN/A

          \[\leadsto \frac{a \cdot 1}{\color{blue}{{\left(\frac{1}{k}\right)}^{m}}} \]
        2. *-rgt-identityN/A

          \[\leadsto \frac{a}{{\color{blue}{\left(\frac{1}{k}\right)}}^{m}} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({\left(\frac{1}{k}\right)}^{m}\right)}\right) \]
        4. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(\left(\frac{1}{k}\right), \color{blue}{m}\right)\right) \]
        5. /-lowering-/.f6499.4%

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(1, k\right), m\right)\right) \]
      3. Applied egg-rr99.4%

        \[\leadsto \color{blue}{\frac{a}{{\left(\frac{1}{k}\right)}^{m}}} \]

      if 1 < k

      1. Initial program 78.7%

        \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
      2. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
        3. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
        4. associate-+l+N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
        6. distribute-rgt-outN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
        8. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
        9. +-lowering-+.f6478.7%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
      3. Simplified78.7%

        \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
      4. Add Preprocessing
      5. Taylor expanded in k around inf

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \color{blue}{\left({k}^{2}\right)}\right) \]
      6. Step-by-step derivation
        1. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(k \cdot \color{blue}{k}\right)\right) \]
        2. *-lowering-*.f6478.1%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
      7. Simplified78.1%

        \[\leadsto \frac{a \cdot {k}^{m}}{\color{blue}{k \cdot k}} \]
      8. Step-by-step derivation
        1. times-fracN/A

          \[\leadsto \frac{a}{k} \cdot \color{blue}{\frac{{k}^{m}}{k}} \]
        2. associate-*r/N/A

          \[\leadsto \frac{\frac{a}{k} \cdot {k}^{m}}{\color{blue}{k}} \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{a}{k} \cdot {k}^{m}\right), \color{blue}{k}\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{a}{k}\right), \left({k}^{m}\right)\right), k\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(a, k\right), \left({k}^{m}\right)\right), k\right) \]
        6. pow-lowering-pow.f6494.6%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(a, k\right), \mathsf{pow.f64}\left(k, m\right)\right), k\right) \]
      9. Applied egg-rr94.6%

        \[\leadsto \color{blue}{\frac{\frac{a}{k} \cdot {k}^{m}}{k}} \]
    10. Recombined 2 regimes into one program.
    11. Add Preprocessing

    Alternative 2: 97.2% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := a \cdot {k}^{m}\\ \mathbf{if}\;m \leq -0.0008:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;m \leq 3.6 \cdot 10^{-12}:\\ \;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (a k m)
     :precision binary64
     (let* ((t_0 (* a (pow k m))))
       (if (<= m -0.0008)
         t_0
         (if (<= m 3.6e-12) (/ a (+ 1.0 (* k (+ k 10.0)))) t_0))))
    double code(double a, double k, double m) {
    	double t_0 = a * pow(k, m);
    	double tmp;
    	if (m <= -0.0008) {
    		tmp = t_0;
    	} else if (m <= 3.6e-12) {
    		tmp = a / (1.0 + (k * (k + 10.0)));
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    real(8) function code(a, k, m)
        real(8), intent (in) :: a
        real(8), intent (in) :: k
        real(8), intent (in) :: m
        real(8) :: t_0
        real(8) :: tmp
        t_0 = a * (k ** m)
        if (m <= (-0.0008d0)) then
            tmp = t_0
        else if (m <= 3.6d-12) then
            tmp = a / (1.0d0 + (k * (k + 10.0d0)))
        else
            tmp = t_0
        end if
        code = tmp
    end function
    
    public static double code(double a, double k, double m) {
    	double t_0 = a * Math.pow(k, m);
    	double tmp;
    	if (m <= -0.0008) {
    		tmp = t_0;
    	} else if (m <= 3.6e-12) {
    		tmp = a / (1.0 + (k * (k + 10.0)));
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(a, k, m):
    	t_0 = a * math.pow(k, m)
    	tmp = 0
    	if m <= -0.0008:
    		tmp = t_0
    	elif m <= 3.6e-12:
    		tmp = a / (1.0 + (k * (k + 10.0)))
    	else:
    		tmp = t_0
    	return tmp
    
    function code(a, k, m)
    	t_0 = Float64(a * (k ^ m))
    	tmp = 0.0
    	if (m <= -0.0008)
    		tmp = t_0;
    	elseif (m <= 3.6e-12)
    		tmp = Float64(a / Float64(1.0 + Float64(k * Float64(k + 10.0))));
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, k, m)
    	t_0 = a * (k ^ m);
    	tmp = 0.0;
    	if (m <= -0.0008)
    		tmp = t_0;
    	elseif (m <= 3.6e-12)
    		tmp = a / (1.0 + (k * (k + 10.0)));
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, k_, m_] := Block[{t$95$0 = N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[m, -0.0008], t$95$0, If[LessEqual[m, 3.6e-12], N[(a / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := a \cdot {k}^{m}\\
    \mathbf{if}\;m \leq -0.0008:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;m \leq 3.6 \cdot 10^{-12}:\\
    \;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if m < -8.00000000000000038e-4 or 3.6e-12 < m

      1. Initial program 89.7%

        \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
      2. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
        3. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
        4. associate-+l+N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
        6. distribute-rgt-outN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
        8. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
        9. +-lowering-+.f6489.7%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
      3. Simplified89.7%

        \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
      4. Add Preprocessing
      5. Taylor expanded in k around 0

        \[\leadsto \color{blue}{a \cdot {k}^{m}} \]
      6. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(a, \color{blue}{\left({k}^{m}\right)}\right) \]
        2. pow-lowering-pow.f64100.0%

          \[\leadsto \mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, \color{blue}{m}\right)\right) \]
      7. Simplified100.0%

        \[\leadsto \color{blue}{a \cdot {k}^{m}} \]

      if -8.00000000000000038e-4 < m < 3.6e-12

      1. Initial program 91.7%

        \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
      2. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
        3. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
        4. associate-+l+N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
        6. distribute-rgt-outN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
        8. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
        9. +-lowering-+.f6491.7%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
      3. Simplified91.7%

        \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
      4. Add Preprocessing
      5. Taylor expanded in m around 0

        \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
      6. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
        4. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
        5. +-lowering-+.f6491.0%

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
      7. Simplified91.0%

        \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 3: 97.2% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq 1:\\ \;\;\;\;\frac{a}{{\left(\frac{1}{k}\right)}^{m}}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{k} \cdot {k}^{\left(m + -1\right)}\\ \end{array} \end{array} \]
    (FPCore (a k m)
     :precision binary64
     (if (<= k 1.0) (/ a (pow (/ 1.0 k) m)) (* (/ a k) (pow k (+ m -1.0)))))
    double code(double a, double k, double m) {
    	double tmp;
    	if (k <= 1.0) {
    		tmp = a / pow((1.0 / k), m);
    	} else {
    		tmp = (a / k) * pow(k, (m + -1.0));
    	}
    	return tmp;
    }
    
    real(8) function code(a, k, m)
        real(8), intent (in) :: a
        real(8), intent (in) :: k
        real(8), intent (in) :: m
        real(8) :: tmp
        if (k <= 1.0d0) then
            tmp = a / ((1.0d0 / k) ** m)
        else
            tmp = (a / k) * (k ** (m + (-1.0d0)))
        end if
        code = tmp
    end function
    
    public static double code(double a, double k, double m) {
    	double tmp;
    	if (k <= 1.0) {
    		tmp = a / Math.pow((1.0 / k), m);
    	} else {
    		tmp = (a / k) * Math.pow(k, (m + -1.0));
    	}
    	return tmp;
    }
    
    def code(a, k, m):
    	tmp = 0
    	if k <= 1.0:
    		tmp = a / math.pow((1.0 / k), m)
    	else:
    		tmp = (a / k) * math.pow(k, (m + -1.0))
    	return tmp
    
    function code(a, k, m)
    	tmp = 0.0
    	if (k <= 1.0)
    		tmp = Float64(a / (Float64(1.0 / k) ^ m));
    	else
    		tmp = Float64(Float64(a / k) * (k ^ Float64(m + -1.0)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, k, m)
    	tmp = 0.0;
    	if (k <= 1.0)
    		tmp = a / ((1.0 / k) ^ m);
    	else
    		tmp = (a / k) * (k ^ (m + -1.0));
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, k_, m_] := If[LessEqual[k, 1.0], N[(a / N[Power[N[(1.0 / k), $MachinePrecision], m], $MachinePrecision]), $MachinePrecision], N[(N[(a / k), $MachinePrecision] * N[Power[k, N[(m + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;k \leq 1:\\
    \;\;\;\;\frac{a}{{\left(\frac{1}{k}\right)}^{m}}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{a}{k} \cdot {k}^{\left(m + -1\right)}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if k < 1

      1. Initial program 96.4%

        \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
      2. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
        3. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
        4. associate-+l+N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
        6. distribute-rgt-outN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
        8. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
        9. +-lowering-+.f6496.4%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
      3. Simplified96.4%

        \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
      4. Add Preprocessing
      5. Taylor expanded in k around inf

        \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(a \cdot e^{-1 \cdot \left(m \cdot \log \left(\frac{1}{k}\right)\right)}\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
      6. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{/.f64}\left(\left(a \cdot e^{\mathsf{neg}\left(m \cdot \log \left(\frac{1}{k}\right)\right)}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
        2. exp-negN/A

          \[\leadsto \mathsf{/.f64}\left(\left(a \cdot \frac{1}{e^{m \cdot \log \left(\frac{1}{k}\right)}}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
        3. associate-*r/N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{a \cdot 1}{e^{m \cdot \log \left(\frac{1}{k}\right)}}\right), \mathsf{+.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(a \cdot 1\right), \left(e^{m \cdot \log \left(\frac{1}{k}\right)}\right)\right), \mathsf{+.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 1\right), \left(e^{m \cdot \log \left(\frac{1}{k}\right)}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 1\right), \left(e^{\log \left(\frac{1}{k}\right) \cdot m}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
        7. exp-to-powN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 1\right), \left({\left(\frac{1}{k}\right)}^{m}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
        8. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 1\right), \mathsf{pow.f64}\left(\left(\frac{1}{k}\right), m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
        9. /-lowering-/.f6496.4%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 1\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(1, k\right), m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
      7. Simplified96.4%

        \[\leadsto \frac{\color{blue}{\frac{a \cdot 1}{{\left(\frac{1}{k}\right)}^{m}}}}{1 + k \cdot \left(k + 10\right)} \]
      8. Taylor expanded in k around 0

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 1\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(1, k\right), m\right)\right), \color{blue}{1}\right) \]
      9. Step-by-step derivation
        1. Simplified99.4%

          \[\leadsto \frac{\frac{a \cdot 1}{{\left(\frac{1}{k}\right)}^{m}}}{\color{blue}{1}} \]
        2. Step-by-step derivation
          1. /-rgt-identityN/A

            \[\leadsto \frac{a \cdot 1}{\color{blue}{{\left(\frac{1}{k}\right)}^{m}}} \]
          2. *-rgt-identityN/A

            \[\leadsto \frac{a}{{\color{blue}{\left(\frac{1}{k}\right)}}^{m}} \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({\left(\frac{1}{k}\right)}^{m}\right)}\right) \]
          4. pow-lowering-pow.f64N/A

            \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(\left(\frac{1}{k}\right), \color{blue}{m}\right)\right) \]
          5. /-lowering-/.f6499.4%

            \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(1, k\right), m\right)\right) \]
        3. Applied egg-rr99.4%

          \[\leadsto \color{blue}{\frac{a}{{\left(\frac{1}{k}\right)}^{m}}} \]

        if 1 < k

        1. Initial program 78.7%

          \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
        2. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
          3. pow-lowering-pow.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
          4. associate-+l+N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
          5. +-lowering-+.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
          6. distribute-rgt-outN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
          8. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
          9. +-lowering-+.f6478.7%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
        3. Simplified78.7%

          \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
        4. Add Preprocessing
        5. Taylor expanded in k around inf

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \color{blue}{\left({k}^{2}\right)}\right) \]
        6. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(k \cdot \color{blue}{k}\right)\right) \]
          2. *-lowering-*.f6478.1%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
        7. Simplified78.1%

          \[\leadsto \frac{a \cdot {k}^{m}}{\color{blue}{k \cdot k}} \]
        8. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{{k}^{m} \cdot a}{\color{blue}{k} \cdot k} \]
          2. times-fracN/A

            \[\leadsto \frac{{k}^{m}}{k} \cdot \color{blue}{\frac{a}{k}} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{{k}^{m}}{k}\right), \color{blue}{\left(\frac{a}{k}\right)}\right) \]
          4. div-invN/A

            \[\leadsto \mathsf{*.f64}\left(\left({k}^{m} \cdot \frac{1}{k}\right), \left(\frac{\color{blue}{a}}{k}\right)\right) \]
          5. inv-powN/A

            \[\leadsto \mathsf{*.f64}\left(\left({k}^{m} \cdot {k}^{-1}\right), \left(\frac{a}{k}\right)\right) \]
          6. pow-prod-upN/A

            \[\leadsto \mathsf{*.f64}\left(\left({k}^{\left(m + -1\right)}\right), \left(\frac{\color{blue}{a}}{k}\right)\right) \]
          7. pow-lowering-pow.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(k, \left(m + -1\right)\right), \left(\frac{\color{blue}{a}}{k}\right)\right) \]
          8. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(k, \mathsf{+.f64}\left(m, -1\right)\right), \left(\frac{a}{k}\right)\right) \]
          9. /-lowering-/.f6494.5%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(k, \mathsf{+.f64}\left(m, -1\right)\right), \mathsf{/.f64}\left(a, \color{blue}{k}\right)\right) \]
        9. Applied egg-rr94.5%

          \[\leadsto \color{blue}{{k}^{\left(m + -1\right)} \cdot \frac{a}{k}} \]
      10. Recombined 2 regimes into one program.
      11. Final simplification97.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1:\\ \;\;\;\;\frac{a}{{\left(\frac{1}{k}\right)}^{m}}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{k} \cdot {k}^{\left(m + -1\right)}\\ \end{array} \]
      12. Add Preprocessing

      Alternative 4: 97.0% accurate, 1.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq 1:\\ \;\;\;\;\frac{a}{{\left(\frac{1}{k}\right)}^{m}}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{{k}^{\left(2 - m\right)}}\\ \end{array} \end{array} \]
      (FPCore (a k m)
       :precision binary64
       (if (<= k 1.0) (/ a (pow (/ 1.0 k) m)) (/ a (pow k (- 2.0 m)))))
      double code(double a, double k, double m) {
      	double tmp;
      	if (k <= 1.0) {
      		tmp = a / pow((1.0 / k), m);
      	} else {
      		tmp = a / pow(k, (2.0 - m));
      	}
      	return tmp;
      }
      
      real(8) function code(a, k, m)
          real(8), intent (in) :: a
          real(8), intent (in) :: k
          real(8), intent (in) :: m
          real(8) :: tmp
          if (k <= 1.0d0) then
              tmp = a / ((1.0d0 / k) ** m)
          else
              tmp = a / (k ** (2.0d0 - m))
          end if
          code = tmp
      end function
      
      public static double code(double a, double k, double m) {
      	double tmp;
      	if (k <= 1.0) {
      		tmp = a / Math.pow((1.0 / k), m);
      	} else {
      		tmp = a / Math.pow(k, (2.0 - m));
      	}
      	return tmp;
      }
      
      def code(a, k, m):
      	tmp = 0
      	if k <= 1.0:
      		tmp = a / math.pow((1.0 / k), m)
      	else:
      		tmp = a / math.pow(k, (2.0 - m))
      	return tmp
      
      function code(a, k, m)
      	tmp = 0.0
      	if (k <= 1.0)
      		tmp = Float64(a / (Float64(1.0 / k) ^ m));
      	else
      		tmp = Float64(a / (k ^ Float64(2.0 - m)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(a, k, m)
      	tmp = 0.0;
      	if (k <= 1.0)
      		tmp = a / ((1.0 / k) ^ m);
      	else
      		tmp = a / (k ^ (2.0 - m));
      	end
      	tmp_2 = tmp;
      end
      
      code[a_, k_, m_] := If[LessEqual[k, 1.0], N[(a / N[Power[N[(1.0 / k), $MachinePrecision], m], $MachinePrecision]), $MachinePrecision], N[(a / N[Power[k, N[(2.0 - m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;k \leq 1:\\
      \;\;\;\;\frac{a}{{\left(\frac{1}{k}\right)}^{m}}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{a}{{k}^{\left(2 - m\right)}}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if k < 1

        1. Initial program 96.4%

          \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
        2. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
          3. pow-lowering-pow.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
          4. associate-+l+N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
          5. +-lowering-+.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
          6. distribute-rgt-outN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
          8. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
          9. +-lowering-+.f6496.4%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
        3. Simplified96.4%

          \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
        4. Add Preprocessing
        5. Taylor expanded in k around inf

          \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(a \cdot e^{-1 \cdot \left(m \cdot \log \left(\frac{1}{k}\right)\right)}\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
        6. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{/.f64}\left(\left(a \cdot e^{\mathsf{neg}\left(m \cdot \log \left(\frac{1}{k}\right)\right)}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
          2. exp-negN/A

            \[\leadsto \mathsf{/.f64}\left(\left(a \cdot \frac{1}{e^{m \cdot \log \left(\frac{1}{k}\right)}}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
          3. associate-*r/N/A

            \[\leadsto \mathsf{/.f64}\left(\left(\frac{a \cdot 1}{e^{m \cdot \log \left(\frac{1}{k}\right)}}\right), \mathsf{+.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
          4. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(a \cdot 1\right), \left(e^{m \cdot \log \left(\frac{1}{k}\right)}\right)\right), \mathsf{+.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 1\right), \left(e^{m \cdot \log \left(\frac{1}{k}\right)}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 1\right), \left(e^{\log \left(\frac{1}{k}\right) \cdot m}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
          7. exp-to-powN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 1\right), \left({\left(\frac{1}{k}\right)}^{m}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
          8. pow-lowering-pow.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 1\right), \mathsf{pow.f64}\left(\left(\frac{1}{k}\right), m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
          9. /-lowering-/.f6496.4%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 1\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(1, k\right), m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
        7. Simplified96.4%

          \[\leadsto \frac{\color{blue}{\frac{a \cdot 1}{{\left(\frac{1}{k}\right)}^{m}}}}{1 + k \cdot \left(k + 10\right)} \]
        8. Taylor expanded in k around 0

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 1\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(1, k\right), m\right)\right), \color{blue}{1}\right) \]
        9. Step-by-step derivation
          1. Simplified99.4%

            \[\leadsto \frac{\frac{a \cdot 1}{{\left(\frac{1}{k}\right)}^{m}}}{\color{blue}{1}} \]
          2. Step-by-step derivation
            1. /-rgt-identityN/A

              \[\leadsto \frac{a \cdot 1}{\color{blue}{{\left(\frac{1}{k}\right)}^{m}}} \]
            2. *-rgt-identityN/A

              \[\leadsto \frac{a}{{\color{blue}{\left(\frac{1}{k}\right)}}^{m}} \]
            3. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({\left(\frac{1}{k}\right)}^{m}\right)}\right) \]
            4. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(\left(\frac{1}{k}\right), \color{blue}{m}\right)\right) \]
            5. /-lowering-/.f6499.4%

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(1, k\right), m\right)\right) \]
          3. Applied egg-rr99.4%

            \[\leadsto \color{blue}{\frac{a}{{\left(\frac{1}{k}\right)}^{m}}} \]

          if 1 < k

          1. Initial program 78.7%

            \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
          2. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
            3. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
            4. associate-+l+N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
            6. distribute-rgt-outN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
            8. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
            9. +-lowering-+.f6478.7%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
          3. Simplified78.7%

            \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
          4. Add Preprocessing
          5. Taylor expanded in k around inf

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \color{blue}{\left({k}^{2}\right)}\right) \]
          6. Step-by-step derivation
            1. unpow2N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(k \cdot \color{blue}{k}\right)\right) \]
            2. *-lowering-*.f6478.1%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
          7. Simplified78.1%

            \[\leadsto \frac{a \cdot {k}^{m}}{\color{blue}{k \cdot k}} \]
          8. Step-by-step derivation
            1. associate-/l*N/A

              \[\leadsto a \cdot \color{blue}{\frac{{k}^{m}}{k \cdot k}} \]
            2. clear-numN/A

              \[\leadsto a \cdot \frac{1}{\color{blue}{\frac{k \cdot k}{{k}^{m}}}} \]
            3. un-div-invN/A

              \[\leadsto \frac{a}{\color{blue}{\frac{k \cdot k}{{k}^{m}}}} \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(\frac{k \cdot k}{{k}^{m}}\right)}\right) \]
            5. pow2N/A

              \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{{k}^{2}}{{\color{blue}{k}}^{m}}\right)\right) \]
            6. pow-divN/A

              \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{\color{blue}{\left(2 - m\right)}}\right)\right) \]
            7. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(k, \color{blue}{\left(2 - m\right)}\right)\right) \]
            8. --lowering--.f6490.6%

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(k, \mathsf{\_.f64}\left(2, \color{blue}{m}\right)\right)\right) \]
          9. Applied egg-rr90.6%

            \[\leadsto \color{blue}{\frac{a}{{k}^{\left(2 - m\right)}}} \]
        10. Recombined 2 regimes into one program.
        11. Add Preprocessing

        Alternative 5: 97.0% accurate, 1.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq 1:\\ \;\;\;\;a \cdot {k}^{m}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{{k}^{\left(2 - m\right)}}\\ \end{array} \end{array} \]
        (FPCore (a k m)
         :precision binary64
         (if (<= k 1.0) (* a (pow k m)) (/ a (pow k (- 2.0 m)))))
        double code(double a, double k, double m) {
        	double tmp;
        	if (k <= 1.0) {
        		tmp = a * pow(k, m);
        	} else {
        		tmp = a / pow(k, (2.0 - m));
        	}
        	return tmp;
        }
        
        real(8) function code(a, k, m)
            real(8), intent (in) :: a
            real(8), intent (in) :: k
            real(8), intent (in) :: m
            real(8) :: tmp
            if (k <= 1.0d0) then
                tmp = a * (k ** m)
            else
                tmp = a / (k ** (2.0d0 - m))
            end if
            code = tmp
        end function
        
        public static double code(double a, double k, double m) {
        	double tmp;
        	if (k <= 1.0) {
        		tmp = a * Math.pow(k, m);
        	} else {
        		tmp = a / Math.pow(k, (2.0 - m));
        	}
        	return tmp;
        }
        
        def code(a, k, m):
        	tmp = 0
        	if k <= 1.0:
        		tmp = a * math.pow(k, m)
        	else:
        		tmp = a / math.pow(k, (2.0 - m))
        	return tmp
        
        function code(a, k, m)
        	tmp = 0.0
        	if (k <= 1.0)
        		tmp = Float64(a * (k ^ m));
        	else
        		tmp = Float64(a / (k ^ Float64(2.0 - m)));
        	end
        	return tmp
        end
        
        function tmp_2 = code(a, k, m)
        	tmp = 0.0;
        	if (k <= 1.0)
        		tmp = a * (k ^ m);
        	else
        		tmp = a / (k ^ (2.0 - m));
        	end
        	tmp_2 = tmp;
        end
        
        code[a_, k_, m_] := If[LessEqual[k, 1.0], N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision], N[(a / N[Power[k, N[(2.0 - m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;k \leq 1:\\
        \;\;\;\;a \cdot {k}^{m}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{a}{{k}^{\left(2 - m\right)}}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if k < 1

          1. Initial program 96.4%

            \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
          2. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
            3. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
            4. associate-+l+N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
            6. distribute-rgt-outN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
            8. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
            9. +-lowering-+.f6496.4%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
          3. Simplified96.4%

            \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
          4. Add Preprocessing
          5. Taylor expanded in k around 0

            \[\leadsto \color{blue}{a \cdot {k}^{m}} \]
          6. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(a, \color{blue}{\left({k}^{m}\right)}\right) \]
            2. pow-lowering-pow.f6499.4%

              \[\leadsto \mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, \color{blue}{m}\right)\right) \]
          7. Simplified99.4%

            \[\leadsto \color{blue}{a \cdot {k}^{m}} \]

          if 1 < k

          1. Initial program 78.7%

            \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
          2. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
            3. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
            4. associate-+l+N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
            6. distribute-rgt-outN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
            8. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
            9. +-lowering-+.f6478.7%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
          3. Simplified78.7%

            \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
          4. Add Preprocessing
          5. Taylor expanded in k around inf

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \color{blue}{\left({k}^{2}\right)}\right) \]
          6. Step-by-step derivation
            1. unpow2N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(k \cdot \color{blue}{k}\right)\right) \]
            2. *-lowering-*.f6478.1%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
          7. Simplified78.1%

            \[\leadsto \frac{a \cdot {k}^{m}}{\color{blue}{k \cdot k}} \]
          8. Step-by-step derivation
            1. associate-/l*N/A

              \[\leadsto a \cdot \color{blue}{\frac{{k}^{m}}{k \cdot k}} \]
            2. clear-numN/A

              \[\leadsto a \cdot \frac{1}{\color{blue}{\frac{k \cdot k}{{k}^{m}}}} \]
            3. un-div-invN/A

              \[\leadsto \frac{a}{\color{blue}{\frac{k \cdot k}{{k}^{m}}}} \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(\frac{k \cdot k}{{k}^{m}}\right)}\right) \]
            5. pow2N/A

              \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{{k}^{2}}{{\color{blue}{k}}^{m}}\right)\right) \]
            6. pow-divN/A

              \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{\color{blue}{\left(2 - m\right)}}\right)\right) \]
            7. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(k, \color{blue}{\left(2 - m\right)}\right)\right) \]
            8. --lowering--.f6490.6%

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(k, \mathsf{\_.f64}\left(2, \color{blue}{m}\right)\right)\right) \]
          9. Applied egg-rr90.6%

            \[\leadsto \color{blue}{\frac{a}{{k}^{\left(2 - m\right)}}} \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 6: 69.7% accurate, 3.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := k \cdot \left(k + 10\right)\\ \mathbf{if}\;m \leq -0.215:\\ \;\;\;\;\frac{a - \frac{\frac{a}{k} \cdot -99 + a \cdot 10}{k}}{k \cdot k}\\ \mathbf{elif}\;m \leq 1.35 \cdot 10^{-11}:\\ \;\;\;\;\frac{a}{1 + t\_0}\\ \mathbf{elif}\;m \leq 8.2 \cdot 10^{+30}:\\ \;\;\;\;\frac{a}{\frac{1}{1 + t\_0 \cdot t\_0}}\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(a \cdot \left(\left(k \cdot k\right) \cdot -980\right)\right)\\ \end{array} \end{array} \]
        (FPCore (a k m)
         :precision binary64
         (let* ((t_0 (* k (+ k 10.0))))
           (if (<= m -0.215)
             (/ (- a (/ (+ (* (/ a k) -99.0) (* a 10.0)) k)) (* k k))
             (if (<= m 1.35e-11)
               (/ a (+ 1.0 t_0))
               (if (<= m 8.2e+30)
                 (/ a (/ 1.0 (+ 1.0 (* t_0 t_0))))
                 (* k (* a (* (* k k) -980.0))))))))
        double code(double a, double k, double m) {
        	double t_0 = k * (k + 10.0);
        	double tmp;
        	if (m <= -0.215) {
        		tmp = (a - ((((a / k) * -99.0) + (a * 10.0)) / k)) / (k * k);
        	} else if (m <= 1.35e-11) {
        		tmp = a / (1.0 + t_0);
        	} else if (m <= 8.2e+30) {
        		tmp = a / (1.0 / (1.0 + (t_0 * t_0)));
        	} else {
        		tmp = k * (a * ((k * k) * -980.0));
        	}
        	return tmp;
        }
        
        real(8) function code(a, k, m)
            real(8), intent (in) :: a
            real(8), intent (in) :: k
            real(8), intent (in) :: m
            real(8) :: t_0
            real(8) :: tmp
            t_0 = k * (k + 10.0d0)
            if (m <= (-0.215d0)) then
                tmp = (a - ((((a / k) * (-99.0d0)) + (a * 10.0d0)) / k)) / (k * k)
            else if (m <= 1.35d-11) then
                tmp = a / (1.0d0 + t_0)
            else if (m <= 8.2d+30) then
                tmp = a / (1.0d0 / (1.0d0 + (t_0 * t_0)))
            else
                tmp = k * (a * ((k * k) * (-980.0d0)))
            end if
            code = tmp
        end function
        
        public static double code(double a, double k, double m) {
        	double t_0 = k * (k + 10.0);
        	double tmp;
        	if (m <= -0.215) {
        		tmp = (a - ((((a / k) * -99.0) + (a * 10.0)) / k)) / (k * k);
        	} else if (m <= 1.35e-11) {
        		tmp = a / (1.0 + t_0);
        	} else if (m <= 8.2e+30) {
        		tmp = a / (1.0 / (1.0 + (t_0 * t_0)));
        	} else {
        		tmp = k * (a * ((k * k) * -980.0));
        	}
        	return tmp;
        }
        
        def code(a, k, m):
        	t_0 = k * (k + 10.0)
        	tmp = 0
        	if m <= -0.215:
        		tmp = (a - ((((a / k) * -99.0) + (a * 10.0)) / k)) / (k * k)
        	elif m <= 1.35e-11:
        		tmp = a / (1.0 + t_0)
        	elif m <= 8.2e+30:
        		tmp = a / (1.0 / (1.0 + (t_0 * t_0)))
        	else:
        		tmp = k * (a * ((k * k) * -980.0))
        	return tmp
        
        function code(a, k, m)
        	t_0 = Float64(k * Float64(k + 10.0))
        	tmp = 0.0
        	if (m <= -0.215)
        		tmp = Float64(Float64(a - Float64(Float64(Float64(Float64(a / k) * -99.0) + Float64(a * 10.0)) / k)) / Float64(k * k));
        	elseif (m <= 1.35e-11)
        		tmp = Float64(a / Float64(1.0 + t_0));
        	elseif (m <= 8.2e+30)
        		tmp = Float64(a / Float64(1.0 / Float64(1.0 + Float64(t_0 * t_0))));
        	else
        		tmp = Float64(k * Float64(a * Float64(Float64(k * k) * -980.0)));
        	end
        	return tmp
        end
        
        function tmp_2 = code(a, k, m)
        	t_0 = k * (k + 10.0);
        	tmp = 0.0;
        	if (m <= -0.215)
        		tmp = (a - ((((a / k) * -99.0) + (a * 10.0)) / k)) / (k * k);
        	elseif (m <= 1.35e-11)
        		tmp = a / (1.0 + t_0);
        	elseif (m <= 8.2e+30)
        		tmp = a / (1.0 / (1.0 + (t_0 * t_0)));
        	else
        		tmp = k * (a * ((k * k) * -980.0));
        	end
        	tmp_2 = tmp;
        end
        
        code[a_, k_, m_] := Block[{t$95$0 = N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[m, -0.215], N[(N[(a - N[(N[(N[(N[(a / k), $MachinePrecision] * -99.0), $MachinePrecision] + N[(a * 10.0), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.35e-11], N[(a / N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 8.2e+30], N[(a / N[(1.0 / N[(1.0 + N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(a * N[(N[(k * k), $MachinePrecision] * -980.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := k \cdot \left(k + 10\right)\\
        \mathbf{if}\;m \leq -0.215:\\
        \;\;\;\;\frac{a - \frac{\frac{a}{k} \cdot -99 + a \cdot 10}{k}}{k \cdot k}\\
        
        \mathbf{elif}\;m \leq 1.35 \cdot 10^{-11}:\\
        \;\;\;\;\frac{a}{1 + t\_0}\\
        
        \mathbf{elif}\;m \leq 8.2 \cdot 10^{+30}:\\
        \;\;\;\;\frac{a}{\frac{1}{1 + t\_0 \cdot t\_0}}\\
        
        \mathbf{else}:\\
        \;\;\;\;k \cdot \left(a \cdot \left(\left(k \cdot k\right) \cdot -980\right)\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if m < -0.214999999999999997

          1. Initial program 100.0%

            \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
          2. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
            3. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
            4. associate-+l+N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
            6. distribute-rgt-outN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
            8. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
            9. +-lowering-+.f64100.0%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
          3. Simplified100.0%

            \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
          4. Add Preprocessing
          5. Taylor expanded in m around 0

            \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
          6. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
            2. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
            4. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
            5. +-lowering-+.f6436.7%

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
          7. Simplified36.7%

            \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
          8. Taylor expanded in k around -inf

            \[\leadsto \color{blue}{\frac{a + -1 \cdot \frac{\left(-100 \cdot \frac{a}{k} + \frac{a}{k}\right) - -10 \cdot a}{k}}{{k}^{2}}} \]
          9. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(a + -1 \cdot \frac{\left(-100 \cdot \frac{a}{k} + \frac{a}{k}\right) - -10 \cdot a}{k}\right), \color{blue}{\left({k}^{2}\right)}\right) \]
          10. Simplified69.0%

            \[\leadsto \color{blue}{\frac{a - \frac{-99 \cdot \frac{a}{k} + a \cdot 10}{k}}{k \cdot k}} \]

          if -0.214999999999999997 < m < 1.35000000000000002e-11

          1. Initial program 91.8%

            \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
          2. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
            3. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
            4. associate-+l+N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
            6. distribute-rgt-outN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
            8. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
            9. +-lowering-+.f6491.8%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
          3. Simplified91.8%

            \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
          4. Add Preprocessing
          5. Taylor expanded in m around 0

            \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
          6. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
            2. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
            4. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
            5. +-lowering-+.f6490.3%

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
          7. Simplified90.3%

            \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]

          if 1.35000000000000002e-11 < m < 8.20000000000000011e30

          1. Initial program 71.2%

            \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
          2. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
            3. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
            4. associate-+l+N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
            6. distribute-rgt-outN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
            8. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
            9. +-lowering-+.f6471.2%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
          3. Simplified71.2%

            \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
          4. Add Preprocessing
          5. Taylor expanded in m around 0

            \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
          6. Step-by-step derivation
            1. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
            2. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
            4. +-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
            5. +-lowering-+.f6410.9%

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
          7. Simplified10.9%

            \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
          8. Step-by-step derivation
            1. flip-+N/A

              \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{1 \cdot 1 - \left(k \cdot \left(k + 10\right)\right) \cdot \left(k \cdot \left(k + 10\right)\right)}{\color{blue}{1 - k \cdot \left(k + 10\right)}}\right)\right) \]
            2. metadata-evalN/A

              \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{1 - \left(k \cdot \left(k + 10\right)\right) \cdot \left(k \cdot \left(k + 10\right)\right)}{1 - k \cdot \left(k + 10\right)}\right)\right) \]
            3. *-commutativeN/A

              \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{1 - \left(\left(k + 10\right) \cdot k\right) \cdot \left(k \cdot \left(k + 10\right)\right)}{1 - k \cdot \left(k + 10\right)}\right)\right) \]
            4. associate-*r*N/A

              \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{1 - \left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)}{1 - k \cdot \left(k + 10\right)}\right)\right) \]
            5. div-invN/A

              \[\leadsto \mathsf{/.f64}\left(a, \left(\left(1 - \left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)\right) \cdot \color{blue}{\frac{1}{1 - k \cdot \left(k + 10\right)}}\right)\right) \]
            6. flip--N/A

              \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{1 \cdot 1 - \left(\left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)\right) \cdot \left(\left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)\right)}{1 + \left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)} \cdot \frac{\color{blue}{1}}{1 - k \cdot \left(k + 10\right)}\right)\right) \]
            7. associate-*l/N/A

              \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{\left(1 \cdot 1 - \left(\left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)\right) \cdot \left(\left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)\right)\right) \cdot \frac{1}{1 - k \cdot \left(k + 10\right)}}{\color{blue}{1 + \left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)}}\right)\right) \]
            8. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\left(\left(1 \cdot 1 - \left(\left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)\right) \cdot \left(\left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)\right)\right) \cdot \frac{1}{1 - k \cdot \left(k + 10\right)}\right), \color{blue}{\left(1 + \left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)\right)}\right)\right) \]
          9. Applied egg-rr9.5%

            \[\leadsto \frac{a}{\color{blue}{\frac{\frac{1 + \left(\left(k \cdot \left(k + 10\right)\right) \cdot \left(k \cdot \left(-10 - k\right)\right)\right) \cdot \left(\left(k \cdot \left(k + 10\right)\right) \cdot \left(k \cdot \left(k + 10\right)\right)\right)}{1 - k \cdot \left(k + 10\right)}}{1 + \left(k \cdot \left(k + 10\right)\right) \cdot \left(k \cdot \left(k + 10\right)\right)}}} \]
          10. Taylor expanded in k around 0

            \[\leadsto \mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\color{blue}{1}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right), \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right)\right)\right) \]
          11. Step-by-step derivation
            1. Simplified81.0%

              \[\leadsto \frac{a}{\frac{\color{blue}{1}}{1 + \left(k \cdot \left(k + 10\right)\right) \cdot \left(k \cdot \left(k + 10\right)\right)}} \]

            if 8.20000000000000011e30 < m

            1. Initial program 80.5%

              \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
            2. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
              3. pow-lowering-pow.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
              4. associate-+l+N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
              5. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
              6. distribute-rgt-outN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
              8. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
              9. +-lowering-+.f6480.5%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
            3. Simplified80.5%

              \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
            4. Add Preprocessing
            5. Taylor expanded in m around 0

              \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
            6. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
              2. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
              4. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
              5. +-lowering-+.f643.3%

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
            7. Simplified3.3%

              \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
            8. Taylor expanded in k around 0

              \[\leadsto \color{blue}{a + k \cdot \left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)} \]
            9. Step-by-step derivation
              1. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(a, \color{blue}{\left(k \cdot \left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)\right)}\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{\left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)}\right)\right) \]
              3. cancel-sign-sub-invN/A

                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right) + \color{blue}{\left(\mathsf{neg}\left(10\right)\right) \cdot a}\right)\right)\right) \]
              4. metadata-evalN/A

                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right) + -10 \cdot a\right)\right)\right) \]
              5. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right)\right), \color{blue}{\left(-10 \cdot a\right)}\right)\right)\right) \]
            10. Simplified14.5%

              \[\leadsto \color{blue}{a + k \cdot \left(k \cdot \left(k \cdot \left(10 \cdot \left(-98 \cdot a\right)\right) + 99 \cdot a\right) + a \cdot -10\right)} \]
            11. Taylor expanded in k around inf

              \[\leadsto \color{blue}{-980 \cdot \left(a \cdot {k}^{3}\right)} \]
            12. Step-by-step derivation
              1. associate-*r*N/A

                \[\leadsto \left(-980 \cdot a\right) \cdot \color{blue}{{k}^{3}} \]
              2. *-commutativeN/A

                \[\leadsto {k}^{3} \cdot \color{blue}{\left(-980 \cdot a\right)} \]
              3. cube-multN/A

                \[\leadsto \left(k \cdot \left(k \cdot k\right)\right) \cdot \left(\color{blue}{-980} \cdot a\right) \]
              4. unpow2N/A

                \[\leadsto \left(k \cdot {k}^{2}\right) \cdot \left(-980 \cdot a\right) \]
              5. associate-*l*N/A

                \[\leadsto k \cdot \color{blue}{\left({k}^{2} \cdot \left(-980 \cdot a\right)\right)} \]
              6. *-commutativeN/A

                \[\leadsto k \cdot \left(\left(-980 \cdot a\right) \cdot \color{blue}{{k}^{2}}\right) \]
              7. unpow2N/A

                \[\leadsto k \cdot \left(\left(-980 \cdot a\right) \cdot \left(k \cdot \color{blue}{k}\right)\right) \]
              8. associate-*r*N/A

                \[\leadsto k \cdot \left(\left(\left(-980 \cdot a\right) \cdot k\right) \cdot \color{blue}{k}\right) \]
              9. associate-*r*N/A

                \[\leadsto k \cdot \left(\left(-980 \cdot \left(a \cdot k\right)\right) \cdot k\right) \]
              10. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(k, \color{blue}{\left(\left(-980 \cdot \left(a \cdot k\right)\right) \cdot k\right)}\right) \]
              11. associate-*l*N/A

                \[\leadsto \mathsf{*.f64}\left(k, \left(-980 \cdot \color{blue}{\left(\left(a \cdot k\right) \cdot k\right)}\right)\right) \]
              12. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(k, \left(-980 \cdot \left(a \cdot \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
              13. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(k, \left(-980 \cdot \left(a \cdot {k}^{\color{blue}{2}}\right)\right)\right) \]
              14. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(k, \left(\left(a \cdot {k}^{2}\right) \cdot \color{blue}{-980}\right)\right) \]
              15. associate-*l*N/A

                \[\leadsto \mathsf{*.f64}\left(k, \left(a \cdot \color{blue}{\left({k}^{2} \cdot -980\right)}\right)\right) \]
              16. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(k, \left(a \cdot \left(\left(k \cdot k\right) \cdot -980\right)\right)\right) \]
              17. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(k, \left(a \cdot \left(k \cdot \color{blue}{\left(k \cdot -980\right)}\right)\right)\right) \]
              18. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(k, \left(a \cdot \left(k \cdot \left(-980 \cdot \color{blue}{k}\right)\right)\right)\right) \]
              19. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \color{blue}{\left(k \cdot \left(-980 \cdot k\right)\right)}\right)\right) \]
              20. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \left(k \cdot \left(k \cdot \color{blue}{-980}\right)\right)\right)\right) \]
              21. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \left(\left(k \cdot k\right) \cdot \color{blue}{-980}\right)\right)\right) \]
              22. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \left({k}^{2} \cdot -980\right)\right)\right) \]
              23. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left({k}^{2}\right), \color{blue}{-980}\right)\right)\right) \]
              24. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left(k \cdot k\right), -980\right)\right)\right) \]
              25. *-lowering-*.f6449.3%

                \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), -980\right)\right)\right) \]
            13. Simplified49.3%

              \[\leadsto \color{blue}{k \cdot \left(a \cdot \left(\left(k \cdot k\right) \cdot -980\right)\right)} \]
          12. Recombined 4 regimes into one program.
          13. Final simplification71.0%

            \[\leadsto \begin{array}{l} \mathbf{if}\;m \leq -0.215:\\ \;\;\;\;\frac{a - \frac{\frac{a}{k} \cdot -99 + a \cdot 10}{k}}{k \cdot k}\\ \mathbf{elif}\;m \leq 1.35 \cdot 10^{-11}:\\ \;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{elif}\;m \leq 8.2 \cdot 10^{+30}:\\ \;\;\;\;\frac{a}{\frac{1}{1 + \left(k \cdot \left(k + 10\right)\right) \cdot \left(k \cdot \left(k + 10\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(a \cdot \left(\left(k \cdot k\right) \cdot -980\right)\right)\\ \end{array} \]
          14. Add Preprocessing

          Alternative 7: 67.9% accurate, 3.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := k \cdot \left(k + 10\right)\\ \mathbf{if}\;m \leq -0.08:\\ \;\;\;\;a \cdot \frac{1}{k \cdot k}\\ \mathbf{elif}\;m \leq 1.35 \cdot 10^{-11}:\\ \;\;\;\;\frac{a}{1 + t\_0}\\ \mathbf{elif}\;m \leq 4.9 \cdot 10^{+33}:\\ \;\;\;\;\frac{a}{\frac{1}{1 + t\_0 \cdot t\_0}}\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(a \cdot \left(\left(k \cdot k\right) \cdot -980\right)\right)\\ \end{array} \end{array} \]
          (FPCore (a k m)
           :precision binary64
           (let* ((t_0 (* k (+ k 10.0))))
             (if (<= m -0.08)
               (* a (/ 1.0 (* k k)))
               (if (<= m 1.35e-11)
                 (/ a (+ 1.0 t_0))
                 (if (<= m 4.9e+33)
                   (/ a (/ 1.0 (+ 1.0 (* t_0 t_0))))
                   (* k (* a (* (* k k) -980.0))))))))
          double code(double a, double k, double m) {
          	double t_0 = k * (k + 10.0);
          	double tmp;
          	if (m <= -0.08) {
          		tmp = a * (1.0 / (k * k));
          	} else if (m <= 1.35e-11) {
          		tmp = a / (1.0 + t_0);
          	} else if (m <= 4.9e+33) {
          		tmp = a / (1.0 / (1.0 + (t_0 * t_0)));
          	} else {
          		tmp = k * (a * ((k * k) * -980.0));
          	}
          	return tmp;
          }
          
          real(8) function code(a, k, m)
              real(8), intent (in) :: a
              real(8), intent (in) :: k
              real(8), intent (in) :: m
              real(8) :: t_0
              real(8) :: tmp
              t_0 = k * (k + 10.0d0)
              if (m <= (-0.08d0)) then
                  tmp = a * (1.0d0 / (k * k))
              else if (m <= 1.35d-11) then
                  tmp = a / (1.0d0 + t_0)
              else if (m <= 4.9d+33) then
                  tmp = a / (1.0d0 / (1.0d0 + (t_0 * t_0)))
              else
                  tmp = k * (a * ((k * k) * (-980.0d0)))
              end if
              code = tmp
          end function
          
          public static double code(double a, double k, double m) {
          	double t_0 = k * (k + 10.0);
          	double tmp;
          	if (m <= -0.08) {
          		tmp = a * (1.0 / (k * k));
          	} else if (m <= 1.35e-11) {
          		tmp = a / (1.0 + t_0);
          	} else if (m <= 4.9e+33) {
          		tmp = a / (1.0 / (1.0 + (t_0 * t_0)));
          	} else {
          		tmp = k * (a * ((k * k) * -980.0));
          	}
          	return tmp;
          }
          
          def code(a, k, m):
          	t_0 = k * (k + 10.0)
          	tmp = 0
          	if m <= -0.08:
          		tmp = a * (1.0 / (k * k))
          	elif m <= 1.35e-11:
          		tmp = a / (1.0 + t_0)
          	elif m <= 4.9e+33:
          		tmp = a / (1.0 / (1.0 + (t_0 * t_0)))
          	else:
          		tmp = k * (a * ((k * k) * -980.0))
          	return tmp
          
          function code(a, k, m)
          	t_0 = Float64(k * Float64(k + 10.0))
          	tmp = 0.0
          	if (m <= -0.08)
          		tmp = Float64(a * Float64(1.0 / Float64(k * k)));
          	elseif (m <= 1.35e-11)
          		tmp = Float64(a / Float64(1.0 + t_0));
          	elseif (m <= 4.9e+33)
          		tmp = Float64(a / Float64(1.0 / Float64(1.0 + Float64(t_0 * t_0))));
          	else
          		tmp = Float64(k * Float64(a * Float64(Float64(k * k) * -980.0)));
          	end
          	return tmp
          end
          
          function tmp_2 = code(a, k, m)
          	t_0 = k * (k + 10.0);
          	tmp = 0.0;
          	if (m <= -0.08)
          		tmp = a * (1.0 / (k * k));
          	elseif (m <= 1.35e-11)
          		tmp = a / (1.0 + t_0);
          	elseif (m <= 4.9e+33)
          		tmp = a / (1.0 / (1.0 + (t_0 * t_0)));
          	else
          		tmp = k * (a * ((k * k) * -980.0));
          	end
          	tmp_2 = tmp;
          end
          
          code[a_, k_, m_] := Block[{t$95$0 = N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[m, -0.08], N[(a * N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.35e-11], N[(a / N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 4.9e+33], N[(a / N[(1.0 / N[(1.0 + N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(a * N[(N[(k * k), $MachinePrecision] * -980.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := k \cdot \left(k + 10\right)\\
          \mathbf{if}\;m \leq -0.08:\\
          \;\;\;\;a \cdot \frac{1}{k \cdot k}\\
          
          \mathbf{elif}\;m \leq 1.35 \cdot 10^{-11}:\\
          \;\;\;\;\frac{a}{1 + t\_0}\\
          
          \mathbf{elif}\;m \leq 4.9 \cdot 10^{+33}:\\
          \;\;\;\;\frac{a}{\frac{1}{1 + t\_0 \cdot t\_0}}\\
          
          \mathbf{else}:\\
          \;\;\;\;k \cdot \left(a \cdot \left(\left(k \cdot k\right) \cdot -980\right)\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if m < -0.0800000000000000017

            1. Initial program 100.0%

              \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
            2. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
              3. pow-lowering-pow.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
              4. associate-+l+N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
              5. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
              6. distribute-rgt-outN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
              8. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
              9. +-lowering-+.f64100.0%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
            3. Simplified100.0%

              \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
            4. Add Preprocessing
            5. Taylor expanded in m around 0

              \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
            6. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
              2. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
              4. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
              5. +-lowering-+.f6436.7%

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
            7. Simplified36.7%

              \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
            8. Taylor expanded in k around inf

              \[\leadsto \color{blue}{\frac{a}{{k}^{2}}} \]
            9. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
              2. unpow2N/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
              3. *-lowering-*.f6465.2%

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
            10. Simplified65.2%

              \[\leadsto \color{blue}{\frac{a}{k \cdot k}} \]
            11. Step-by-step derivation
              1. clear-numN/A

                \[\leadsto \frac{1}{\color{blue}{\frac{k \cdot k}{a}}} \]
              2. associate-/r/N/A

                \[\leadsto \frac{1}{k \cdot k} \cdot \color{blue}{a} \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{k \cdot k}\right), \color{blue}{a}\right) \]
              4. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(k \cdot k\right)\right), a\right) \]
              5. *-lowering-*.f6466.4%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(k, k\right)\right), a\right) \]
            12. Applied egg-rr66.4%

              \[\leadsto \color{blue}{\frac{1}{k \cdot k} \cdot a} \]

            if -0.0800000000000000017 < m < 1.35000000000000002e-11

            1. Initial program 91.8%

              \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
            2. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
              3. pow-lowering-pow.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
              4. associate-+l+N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
              5. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
              6. distribute-rgt-outN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
              8. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
              9. +-lowering-+.f6491.8%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
            3. Simplified91.8%

              \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
            4. Add Preprocessing
            5. Taylor expanded in m around 0

              \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
            6. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
              2. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
              4. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
              5. +-lowering-+.f6490.3%

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
            7. Simplified90.3%

              \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]

            if 1.35000000000000002e-11 < m < 4.90000000000000014e33

            1. Initial program 71.2%

              \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
            2. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
              3. pow-lowering-pow.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
              4. associate-+l+N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
              5. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
              6. distribute-rgt-outN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
              8. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
              9. +-lowering-+.f6471.2%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
            3. Simplified71.2%

              \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
            4. Add Preprocessing
            5. Taylor expanded in m around 0

              \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
            6. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
              2. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
              4. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
              5. +-lowering-+.f6410.9%

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
            7. Simplified10.9%

              \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
            8. Step-by-step derivation
              1. flip-+N/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{1 \cdot 1 - \left(k \cdot \left(k + 10\right)\right) \cdot \left(k \cdot \left(k + 10\right)\right)}{\color{blue}{1 - k \cdot \left(k + 10\right)}}\right)\right) \]
              2. metadata-evalN/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{1 - \left(k \cdot \left(k + 10\right)\right) \cdot \left(k \cdot \left(k + 10\right)\right)}{1 - k \cdot \left(k + 10\right)}\right)\right) \]
              3. *-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{1 - \left(\left(k + 10\right) \cdot k\right) \cdot \left(k \cdot \left(k + 10\right)\right)}{1 - k \cdot \left(k + 10\right)}\right)\right) \]
              4. associate-*r*N/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{1 - \left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)}{1 - k \cdot \left(k + 10\right)}\right)\right) \]
              5. div-invN/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(\left(1 - \left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)\right) \cdot \color{blue}{\frac{1}{1 - k \cdot \left(k + 10\right)}}\right)\right) \]
              6. flip--N/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{1 \cdot 1 - \left(\left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)\right) \cdot \left(\left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)\right)}{1 + \left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)} \cdot \frac{\color{blue}{1}}{1 - k \cdot \left(k + 10\right)}\right)\right) \]
              7. associate-*l/N/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{\left(1 \cdot 1 - \left(\left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)\right) \cdot \left(\left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)\right)\right) \cdot \frac{1}{1 - k \cdot \left(k + 10\right)}}{\color{blue}{1 + \left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)}}\right)\right) \]
              8. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\left(\left(1 \cdot 1 - \left(\left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)\right) \cdot \left(\left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)\right)\right) \cdot \frac{1}{1 - k \cdot \left(k + 10\right)}\right), \color{blue}{\left(1 + \left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)\right)}\right)\right) \]
            9. Applied egg-rr9.5%

              \[\leadsto \frac{a}{\color{blue}{\frac{\frac{1 + \left(\left(k \cdot \left(k + 10\right)\right) \cdot \left(k \cdot \left(-10 - k\right)\right)\right) \cdot \left(\left(k \cdot \left(k + 10\right)\right) \cdot \left(k \cdot \left(k + 10\right)\right)\right)}{1 - k \cdot \left(k + 10\right)}}{1 + \left(k \cdot \left(k + 10\right)\right) \cdot \left(k \cdot \left(k + 10\right)\right)}}} \]
            10. Taylor expanded in k around 0

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\color{blue}{1}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right), \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right)\right)\right) \]
            11. Step-by-step derivation
              1. Simplified81.0%

                \[\leadsto \frac{a}{\frac{\color{blue}{1}}{1 + \left(k \cdot \left(k + 10\right)\right) \cdot \left(k \cdot \left(k + 10\right)\right)}} \]

              if 4.90000000000000014e33 < m

              1. Initial program 80.5%

                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
              2. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                3. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                4. associate-+l+N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                8. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6480.5%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified80.5%

                \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
              4. Add Preprocessing
              5. Taylor expanded in m around 0

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
              6. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                4. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                5. +-lowering-+.f643.3%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              7. Simplified3.3%

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
              8. Taylor expanded in k around 0

                \[\leadsto \color{blue}{a + k \cdot \left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)} \]
              9. Step-by-step derivation
                1. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(a, \color{blue}{\left(k \cdot \left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{\left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)}\right)\right) \]
                3. cancel-sign-sub-invN/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right) + \color{blue}{\left(\mathsf{neg}\left(10\right)\right) \cdot a}\right)\right)\right) \]
                4. metadata-evalN/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right) + -10 \cdot a\right)\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right)\right), \color{blue}{\left(-10 \cdot a\right)}\right)\right)\right) \]
              10. Simplified14.5%

                \[\leadsto \color{blue}{a + k \cdot \left(k \cdot \left(k \cdot \left(10 \cdot \left(-98 \cdot a\right)\right) + 99 \cdot a\right) + a \cdot -10\right)} \]
              11. Taylor expanded in k around inf

                \[\leadsto \color{blue}{-980 \cdot \left(a \cdot {k}^{3}\right)} \]
              12. Step-by-step derivation
                1. associate-*r*N/A

                  \[\leadsto \left(-980 \cdot a\right) \cdot \color{blue}{{k}^{3}} \]
                2. *-commutativeN/A

                  \[\leadsto {k}^{3} \cdot \color{blue}{\left(-980 \cdot a\right)} \]
                3. cube-multN/A

                  \[\leadsto \left(k \cdot \left(k \cdot k\right)\right) \cdot \left(\color{blue}{-980} \cdot a\right) \]
                4. unpow2N/A

                  \[\leadsto \left(k \cdot {k}^{2}\right) \cdot \left(-980 \cdot a\right) \]
                5. associate-*l*N/A

                  \[\leadsto k \cdot \color{blue}{\left({k}^{2} \cdot \left(-980 \cdot a\right)\right)} \]
                6. *-commutativeN/A

                  \[\leadsto k \cdot \left(\left(-980 \cdot a\right) \cdot \color{blue}{{k}^{2}}\right) \]
                7. unpow2N/A

                  \[\leadsto k \cdot \left(\left(-980 \cdot a\right) \cdot \left(k \cdot \color{blue}{k}\right)\right) \]
                8. associate-*r*N/A

                  \[\leadsto k \cdot \left(\left(\left(-980 \cdot a\right) \cdot k\right) \cdot \color{blue}{k}\right) \]
                9. associate-*r*N/A

                  \[\leadsto k \cdot \left(\left(-980 \cdot \left(a \cdot k\right)\right) \cdot k\right) \]
                10. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \color{blue}{\left(\left(-980 \cdot \left(a \cdot k\right)\right) \cdot k\right)}\right) \]
                11. associate-*l*N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(-980 \cdot \color{blue}{\left(\left(a \cdot k\right) \cdot k\right)}\right)\right) \]
                12. associate-*r*N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(-980 \cdot \left(a \cdot \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
                13. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(-980 \cdot \left(a \cdot {k}^{\color{blue}{2}}\right)\right)\right) \]
                14. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(\left(a \cdot {k}^{2}\right) \cdot \color{blue}{-980}\right)\right) \]
                15. associate-*l*N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(a \cdot \color{blue}{\left({k}^{2} \cdot -980\right)}\right)\right) \]
                16. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(a \cdot \left(\left(k \cdot k\right) \cdot -980\right)\right)\right) \]
                17. associate-*r*N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(a \cdot \left(k \cdot \color{blue}{\left(k \cdot -980\right)}\right)\right)\right) \]
                18. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(a \cdot \left(k \cdot \left(-980 \cdot \color{blue}{k}\right)\right)\right)\right) \]
                19. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \color{blue}{\left(k \cdot \left(-980 \cdot k\right)\right)}\right)\right) \]
                20. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \left(k \cdot \left(k \cdot \color{blue}{-980}\right)\right)\right)\right) \]
                21. associate-*r*N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \left(\left(k \cdot k\right) \cdot \color{blue}{-980}\right)\right)\right) \]
                22. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \left({k}^{2} \cdot -980\right)\right)\right) \]
                23. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left({k}^{2}\right), \color{blue}{-980}\right)\right)\right) \]
                24. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left(k \cdot k\right), -980\right)\right)\right) \]
                25. *-lowering-*.f6449.3%

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), -980\right)\right)\right) \]
              13. Simplified49.3%

                \[\leadsto \color{blue}{k \cdot \left(a \cdot \left(\left(k \cdot k\right) \cdot -980\right)\right)} \]
            12. Recombined 4 regimes into one program.
            13. Final simplification70.2%

              \[\leadsto \begin{array}{l} \mathbf{if}\;m \leq -0.08:\\ \;\;\;\;a \cdot \frac{1}{k \cdot k}\\ \mathbf{elif}\;m \leq 1.35 \cdot 10^{-11}:\\ \;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{elif}\;m \leq 4.9 \cdot 10^{+33}:\\ \;\;\;\;\frac{a}{\frac{1}{1 + \left(k \cdot \left(k + 10\right)\right) \cdot \left(k \cdot \left(k + 10\right)\right)}}\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(a \cdot \left(\left(k \cdot k\right) \cdot -980\right)\right)\\ \end{array} \]
            14. Add Preprocessing

            Alternative 8: 68.0% accurate, 6.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -0.46:\\ \;\;\;\;a \cdot \frac{1}{k \cdot k}\\ \mathbf{elif}\;m \leq 1.35 \cdot 10^{+16}:\\ \;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(a \cdot \left(\left(k \cdot k\right) \cdot -980\right)\right)\\ \end{array} \end{array} \]
            (FPCore (a k m)
             :precision binary64
             (if (<= m -0.46)
               (* a (/ 1.0 (* k k)))
               (if (<= m 1.35e+16)
                 (/ a (+ 1.0 (* k (+ k 10.0))))
                 (* k (* a (* (* k k) -980.0))))))
            double code(double a, double k, double m) {
            	double tmp;
            	if (m <= -0.46) {
            		tmp = a * (1.0 / (k * k));
            	} else if (m <= 1.35e+16) {
            		tmp = a / (1.0 + (k * (k + 10.0)));
            	} else {
            		tmp = k * (a * ((k * k) * -980.0));
            	}
            	return tmp;
            }
            
            real(8) function code(a, k, m)
                real(8), intent (in) :: a
                real(8), intent (in) :: k
                real(8), intent (in) :: m
                real(8) :: tmp
                if (m <= (-0.46d0)) then
                    tmp = a * (1.0d0 / (k * k))
                else if (m <= 1.35d+16) then
                    tmp = a / (1.0d0 + (k * (k + 10.0d0)))
                else
                    tmp = k * (a * ((k * k) * (-980.0d0)))
                end if
                code = tmp
            end function
            
            public static double code(double a, double k, double m) {
            	double tmp;
            	if (m <= -0.46) {
            		tmp = a * (1.0 / (k * k));
            	} else if (m <= 1.35e+16) {
            		tmp = a / (1.0 + (k * (k + 10.0)));
            	} else {
            		tmp = k * (a * ((k * k) * -980.0));
            	}
            	return tmp;
            }
            
            def code(a, k, m):
            	tmp = 0
            	if m <= -0.46:
            		tmp = a * (1.0 / (k * k))
            	elif m <= 1.35e+16:
            		tmp = a / (1.0 + (k * (k + 10.0)))
            	else:
            		tmp = k * (a * ((k * k) * -980.0))
            	return tmp
            
            function code(a, k, m)
            	tmp = 0.0
            	if (m <= -0.46)
            		tmp = Float64(a * Float64(1.0 / Float64(k * k)));
            	elseif (m <= 1.35e+16)
            		tmp = Float64(a / Float64(1.0 + Float64(k * Float64(k + 10.0))));
            	else
            		tmp = Float64(k * Float64(a * Float64(Float64(k * k) * -980.0)));
            	end
            	return tmp
            end
            
            function tmp_2 = code(a, k, m)
            	tmp = 0.0;
            	if (m <= -0.46)
            		tmp = a * (1.0 / (k * k));
            	elseif (m <= 1.35e+16)
            		tmp = a / (1.0 + (k * (k + 10.0)));
            	else
            		tmp = k * (a * ((k * k) * -980.0));
            	end
            	tmp_2 = tmp;
            end
            
            code[a_, k_, m_] := If[LessEqual[m, -0.46], N[(a * N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.35e+16], N[(a / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(a * N[(N[(k * k), $MachinePrecision] * -980.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;m \leq -0.46:\\
            \;\;\;\;a \cdot \frac{1}{k \cdot k}\\
            
            \mathbf{elif}\;m \leq 1.35 \cdot 10^{+16}:\\
            \;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\
            
            \mathbf{else}:\\
            \;\;\;\;k \cdot \left(a \cdot \left(\left(k \cdot k\right) \cdot -980\right)\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if m < -0.46000000000000002

              1. Initial program 100.0%

                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
              2. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                3. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                4. associate-+l+N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                8. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f64100.0%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified100.0%

                \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
              4. Add Preprocessing
              5. Taylor expanded in m around 0

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
              6. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                4. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                5. +-lowering-+.f6436.7%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              7. Simplified36.7%

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
              8. Taylor expanded in k around inf

                \[\leadsto \color{blue}{\frac{a}{{k}^{2}}} \]
              9. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
                2. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                3. *-lowering-*.f6465.2%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
              10. Simplified65.2%

                \[\leadsto \color{blue}{\frac{a}{k \cdot k}} \]
              11. Step-by-step derivation
                1. clear-numN/A

                  \[\leadsto \frac{1}{\color{blue}{\frac{k \cdot k}{a}}} \]
                2. associate-/r/N/A

                  \[\leadsto \frac{1}{k \cdot k} \cdot \color{blue}{a} \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{k \cdot k}\right), \color{blue}{a}\right) \]
                4. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(k \cdot k\right)\right), a\right) \]
                5. *-lowering-*.f6466.4%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(k, k\right)\right), a\right) \]
              12. Applied egg-rr66.4%

                \[\leadsto \color{blue}{\frac{1}{k \cdot k} \cdot a} \]

              if -0.46000000000000002 < m < 1.35e16

              1. Initial program 91.0%

                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
              2. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                3. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                4. associate-+l+N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                8. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6491.1%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified91.1%

                \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
              4. Add Preprocessing
              5. Taylor expanded in m around 0

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
              6. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                4. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                5. +-lowering-+.f6487.2%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              7. Simplified87.2%

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]

              if 1.35e16 < m

              1. Initial program 80.0%

                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
              2. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                3. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                4. associate-+l+N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                8. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6480.0%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified80.0%

                \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
              4. Add Preprocessing
              5. Taylor expanded in m around 0

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
              6. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                4. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                5. +-lowering-+.f643.3%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              7. Simplified3.3%

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
              8. Taylor expanded in k around 0

                \[\leadsto \color{blue}{a + k \cdot \left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)} \]
              9. Step-by-step derivation
                1. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(a, \color{blue}{\left(k \cdot \left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{\left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)}\right)\right) \]
                3. cancel-sign-sub-invN/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right) + \color{blue}{\left(\mathsf{neg}\left(10\right)\right) \cdot a}\right)\right)\right) \]
                4. metadata-evalN/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right) + -10 \cdot a\right)\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right)\right), \color{blue}{\left(-10 \cdot a\right)}\right)\right)\right) \]
              10. Simplified14.0%

                \[\leadsto \color{blue}{a + k \cdot \left(k \cdot \left(k \cdot \left(10 \cdot \left(-98 \cdot a\right)\right) + 99 \cdot a\right) + a \cdot -10\right)} \]
              11. Taylor expanded in k around inf

                \[\leadsto \color{blue}{-980 \cdot \left(a \cdot {k}^{3}\right)} \]
              12. Step-by-step derivation
                1. associate-*r*N/A

                  \[\leadsto \left(-980 \cdot a\right) \cdot \color{blue}{{k}^{3}} \]
                2. *-commutativeN/A

                  \[\leadsto {k}^{3} \cdot \color{blue}{\left(-980 \cdot a\right)} \]
                3. cube-multN/A

                  \[\leadsto \left(k \cdot \left(k \cdot k\right)\right) \cdot \left(\color{blue}{-980} \cdot a\right) \]
                4. unpow2N/A

                  \[\leadsto \left(k \cdot {k}^{2}\right) \cdot \left(-980 \cdot a\right) \]
                5. associate-*l*N/A

                  \[\leadsto k \cdot \color{blue}{\left({k}^{2} \cdot \left(-980 \cdot a\right)\right)} \]
                6. *-commutativeN/A

                  \[\leadsto k \cdot \left(\left(-980 \cdot a\right) \cdot \color{blue}{{k}^{2}}\right) \]
                7. unpow2N/A

                  \[\leadsto k \cdot \left(\left(-980 \cdot a\right) \cdot \left(k \cdot \color{blue}{k}\right)\right) \]
                8. associate-*r*N/A

                  \[\leadsto k \cdot \left(\left(\left(-980 \cdot a\right) \cdot k\right) \cdot \color{blue}{k}\right) \]
                9. associate-*r*N/A

                  \[\leadsto k \cdot \left(\left(-980 \cdot \left(a \cdot k\right)\right) \cdot k\right) \]
                10. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \color{blue}{\left(\left(-980 \cdot \left(a \cdot k\right)\right) \cdot k\right)}\right) \]
                11. associate-*l*N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(-980 \cdot \color{blue}{\left(\left(a \cdot k\right) \cdot k\right)}\right)\right) \]
                12. associate-*r*N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(-980 \cdot \left(a \cdot \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
                13. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(-980 \cdot \left(a \cdot {k}^{\color{blue}{2}}\right)\right)\right) \]
                14. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(\left(a \cdot {k}^{2}\right) \cdot \color{blue}{-980}\right)\right) \]
                15. associate-*l*N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(a \cdot \color{blue}{\left({k}^{2} \cdot -980\right)}\right)\right) \]
                16. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(a \cdot \left(\left(k \cdot k\right) \cdot -980\right)\right)\right) \]
                17. associate-*r*N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(a \cdot \left(k \cdot \color{blue}{\left(k \cdot -980\right)}\right)\right)\right) \]
                18. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(a \cdot \left(k \cdot \left(-980 \cdot \color{blue}{k}\right)\right)\right)\right) \]
                19. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \color{blue}{\left(k \cdot \left(-980 \cdot k\right)\right)}\right)\right) \]
                20. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \left(k \cdot \left(k \cdot \color{blue}{-980}\right)\right)\right)\right) \]
                21. associate-*r*N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \left(\left(k \cdot k\right) \cdot \color{blue}{-980}\right)\right)\right) \]
                22. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \left({k}^{2} \cdot -980\right)\right)\right) \]
                23. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left({k}^{2}\right), \color{blue}{-980}\right)\right)\right) \]
                24. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left(k \cdot k\right), -980\right)\right)\right) \]
                25. *-lowering-*.f6447.5%

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), -980\right)\right)\right) \]
              13. Simplified47.5%

                \[\leadsto \color{blue}{k \cdot \left(a \cdot \left(\left(k \cdot k\right) \cdot -980\right)\right)} \]
            3. Recombined 3 regimes into one program.
            4. Final simplification68.3%

              \[\leadsto \begin{array}{l} \mathbf{if}\;m \leq -0.46:\\ \;\;\;\;a \cdot \frac{1}{k \cdot k}\\ \mathbf{elif}\;m \leq 1.35 \cdot 10^{+16}:\\ \;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(a \cdot \left(\left(k \cdot k\right) \cdot -980\right)\right)\\ \end{array} \]
            5. Add Preprocessing

            Alternative 9: 67.2% accurate, 6.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -0.18:\\ \;\;\;\;a \cdot \frac{1}{k \cdot k}\\ \mathbf{elif}\;m \leq 1.35 \cdot 10^{+16}:\\ \;\;\;\;\frac{a}{1 + k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(a \cdot \left(\left(k \cdot k\right) \cdot -980\right)\right)\\ \end{array} \end{array} \]
            (FPCore (a k m)
             :precision binary64
             (if (<= m -0.18)
               (* a (/ 1.0 (* k k)))
               (if (<= m 1.35e+16) (/ a (+ 1.0 (* k k))) (* k (* a (* (* k k) -980.0))))))
            double code(double a, double k, double m) {
            	double tmp;
            	if (m <= -0.18) {
            		tmp = a * (1.0 / (k * k));
            	} else if (m <= 1.35e+16) {
            		tmp = a / (1.0 + (k * k));
            	} else {
            		tmp = k * (a * ((k * k) * -980.0));
            	}
            	return tmp;
            }
            
            real(8) function code(a, k, m)
                real(8), intent (in) :: a
                real(8), intent (in) :: k
                real(8), intent (in) :: m
                real(8) :: tmp
                if (m <= (-0.18d0)) then
                    tmp = a * (1.0d0 / (k * k))
                else if (m <= 1.35d+16) then
                    tmp = a / (1.0d0 + (k * k))
                else
                    tmp = k * (a * ((k * k) * (-980.0d0)))
                end if
                code = tmp
            end function
            
            public static double code(double a, double k, double m) {
            	double tmp;
            	if (m <= -0.18) {
            		tmp = a * (1.0 / (k * k));
            	} else if (m <= 1.35e+16) {
            		tmp = a / (1.0 + (k * k));
            	} else {
            		tmp = k * (a * ((k * k) * -980.0));
            	}
            	return tmp;
            }
            
            def code(a, k, m):
            	tmp = 0
            	if m <= -0.18:
            		tmp = a * (1.0 / (k * k))
            	elif m <= 1.35e+16:
            		tmp = a / (1.0 + (k * k))
            	else:
            		tmp = k * (a * ((k * k) * -980.0))
            	return tmp
            
            function code(a, k, m)
            	tmp = 0.0
            	if (m <= -0.18)
            		tmp = Float64(a * Float64(1.0 / Float64(k * k)));
            	elseif (m <= 1.35e+16)
            		tmp = Float64(a / Float64(1.0 + Float64(k * k)));
            	else
            		tmp = Float64(k * Float64(a * Float64(Float64(k * k) * -980.0)));
            	end
            	return tmp
            end
            
            function tmp_2 = code(a, k, m)
            	tmp = 0.0;
            	if (m <= -0.18)
            		tmp = a * (1.0 / (k * k));
            	elseif (m <= 1.35e+16)
            		tmp = a / (1.0 + (k * k));
            	else
            		tmp = k * (a * ((k * k) * -980.0));
            	end
            	tmp_2 = tmp;
            end
            
            code[a_, k_, m_] := If[LessEqual[m, -0.18], N[(a * N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.35e+16], N[(a / N[(1.0 + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(a * N[(N[(k * k), $MachinePrecision] * -980.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;m \leq -0.18:\\
            \;\;\;\;a \cdot \frac{1}{k \cdot k}\\
            
            \mathbf{elif}\;m \leq 1.35 \cdot 10^{+16}:\\
            \;\;\;\;\frac{a}{1 + k \cdot k}\\
            
            \mathbf{else}:\\
            \;\;\;\;k \cdot \left(a \cdot \left(\left(k \cdot k\right) \cdot -980\right)\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if m < -0.17999999999999999

              1. Initial program 100.0%

                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
              2. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                3. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                4. associate-+l+N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                8. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f64100.0%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified100.0%

                \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
              4. Add Preprocessing
              5. Taylor expanded in m around 0

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
              6. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                4. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                5. +-lowering-+.f6436.7%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              7. Simplified36.7%

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
              8. Taylor expanded in k around inf

                \[\leadsto \color{blue}{\frac{a}{{k}^{2}}} \]
              9. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
                2. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                3. *-lowering-*.f6465.2%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
              10. Simplified65.2%

                \[\leadsto \color{blue}{\frac{a}{k \cdot k}} \]
              11. Step-by-step derivation
                1. clear-numN/A

                  \[\leadsto \frac{1}{\color{blue}{\frac{k \cdot k}{a}}} \]
                2. associate-/r/N/A

                  \[\leadsto \frac{1}{k \cdot k} \cdot \color{blue}{a} \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{k \cdot k}\right), \color{blue}{a}\right) \]
                4. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(k \cdot k\right)\right), a\right) \]
                5. *-lowering-*.f6466.4%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(k, k\right)\right), a\right) \]
              12. Applied egg-rr66.4%

                \[\leadsto \color{blue}{\frac{1}{k \cdot k} \cdot a} \]

              if -0.17999999999999999 < m < 1.35e16

              1. Initial program 91.0%

                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
              2. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                3. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                4. associate-+l+N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                8. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6491.1%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified91.1%

                \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
              4. Add Preprocessing
              5. Taylor expanded in m around 0

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
              6. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                4. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                5. +-lowering-+.f6487.2%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              7. Simplified87.2%

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
              8. Taylor expanded in k around inf

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2}\right)}\right)\right) \]
              9. Step-by-step derivation
                1. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{k}\right)\right)\right) \]
                2. *-lowering-*.f6485.7%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
              10. Simplified85.7%

                \[\leadsto \frac{a}{1 + \color{blue}{k \cdot k}} \]

              if 1.35e16 < m

              1. Initial program 80.0%

                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
              2. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                3. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                4. associate-+l+N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                8. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6480.0%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified80.0%

                \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
              4. Add Preprocessing
              5. Taylor expanded in m around 0

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
              6. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                4. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                5. +-lowering-+.f643.3%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              7. Simplified3.3%

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
              8. Taylor expanded in k around 0

                \[\leadsto \color{blue}{a + k \cdot \left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)} \]
              9. Step-by-step derivation
                1. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(a, \color{blue}{\left(k \cdot \left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{\left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)}\right)\right) \]
                3. cancel-sign-sub-invN/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right) + \color{blue}{\left(\mathsf{neg}\left(10\right)\right) \cdot a}\right)\right)\right) \]
                4. metadata-evalN/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right) + -10 \cdot a\right)\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\left(k \cdot \left(-1 \cdot \left(k \cdot \left(-10 \cdot a + -10 \cdot \left(a + -100 \cdot a\right)\right)\right) - \left(a + -100 \cdot a\right)\right)\right), \color{blue}{\left(-10 \cdot a\right)}\right)\right)\right) \]
              10. Simplified14.0%

                \[\leadsto \color{blue}{a + k \cdot \left(k \cdot \left(k \cdot \left(10 \cdot \left(-98 \cdot a\right)\right) + 99 \cdot a\right) + a \cdot -10\right)} \]
              11. Taylor expanded in k around inf

                \[\leadsto \color{blue}{-980 \cdot \left(a \cdot {k}^{3}\right)} \]
              12. Step-by-step derivation
                1. associate-*r*N/A

                  \[\leadsto \left(-980 \cdot a\right) \cdot \color{blue}{{k}^{3}} \]
                2. *-commutativeN/A

                  \[\leadsto {k}^{3} \cdot \color{blue}{\left(-980 \cdot a\right)} \]
                3. cube-multN/A

                  \[\leadsto \left(k \cdot \left(k \cdot k\right)\right) \cdot \left(\color{blue}{-980} \cdot a\right) \]
                4. unpow2N/A

                  \[\leadsto \left(k \cdot {k}^{2}\right) \cdot \left(-980 \cdot a\right) \]
                5. associate-*l*N/A

                  \[\leadsto k \cdot \color{blue}{\left({k}^{2} \cdot \left(-980 \cdot a\right)\right)} \]
                6. *-commutativeN/A

                  \[\leadsto k \cdot \left(\left(-980 \cdot a\right) \cdot \color{blue}{{k}^{2}}\right) \]
                7. unpow2N/A

                  \[\leadsto k \cdot \left(\left(-980 \cdot a\right) \cdot \left(k \cdot \color{blue}{k}\right)\right) \]
                8. associate-*r*N/A

                  \[\leadsto k \cdot \left(\left(\left(-980 \cdot a\right) \cdot k\right) \cdot \color{blue}{k}\right) \]
                9. associate-*r*N/A

                  \[\leadsto k \cdot \left(\left(-980 \cdot \left(a \cdot k\right)\right) \cdot k\right) \]
                10. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \color{blue}{\left(\left(-980 \cdot \left(a \cdot k\right)\right) \cdot k\right)}\right) \]
                11. associate-*l*N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(-980 \cdot \color{blue}{\left(\left(a \cdot k\right) \cdot k\right)}\right)\right) \]
                12. associate-*r*N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(-980 \cdot \left(a \cdot \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
                13. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(-980 \cdot \left(a \cdot {k}^{\color{blue}{2}}\right)\right)\right) \]
                14. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(\left(a \cdot {k}^{2}\right) \cdot \color{blue}{-980}\right)\right) \]
                15. associate-*l*N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(a \cdot \color{blue}{\left({k}^{2} \cdot -980\right)}\right)\right) \]
                16. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(a \cdot \left(\left(k \cdot k\right) \cdot -980\right)\right)\right) \]
                17. associate-*r*N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(a \cdot \left(k \cdot \color{blue}{\left(k \cdot -980\right)}\right)\right)\right) \]
                18. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(k, \left(a \cdot \left(k \cdot \left(-980 \cdot \color{blue}{k}\right)\right)\right)\right) \]
                19. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \color{blue}{\left(k \cdot \left(-980 \cdot k\right)\right)}\right)\right) \]
                20. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \left(k \cdot \left(k \cdot \color{blue}{-980}\right)\right)\right)\right) \]
                21. associate-*r*N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \left(\left(k \cdot k\right) \cdot \color{blue}{-980}\right)\right)\right) \]
                22. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \left({k}^{2} \cdot -980\right)\right)\right) \]
                23. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left({k}^{2}\right), \color{blue}{-980}\right)\right)\right) \]
                24. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left(k \cdot k\right), -980\right)\right)\right) \]
                25. *-lowering-*.f6447.5%

                  \[\leadsto \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), -980\right)\right)\right) \]
              13. Simplified47.5%

                \[\leadsto \color{blue}{k \cdot \left(a \cdot \left(\left(k \cdot k\right) \cdot -980\right)\right)} \]
            3. Recombined 3 regimes into one program.
            4. Final simplification67.8%

              \[\leadsto \begin{array}{l} \mathbf{if}\;m \leq -0.18:\\ \;\;\;\;a \cdot \frac{1}{k \cdot k}\\ \mathbf{elif}\;m \leq 1.35 \cdot 10^{+16}:\\ \;\;\;\;\frac{a}{1 + k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;k \cdot \left(a \cdot \left(\left(k \cdot k\right) \cdot -980\right)\right)\\ \end{array} \]
            5. Add Preprocessing

            Alternative 10: 47.0% accurate, 6.7× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq -5.1 \cdot 10^{-290}:\\ \;\;\;\;a \cdot \frac{1}{k \cdot k}\\ \mathbf{elif}\;k \leq 44000000:\\ \;\;\;\;\frac{a}{1 + k \cdot 10}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{a}{k}}{k}\\ \end{array} \end{array} \]
            (FPCore (a k m)
             :precision binary64
             (if (<= k -5.1e-290)
               (* a (/ 1.0 (* k k)))
               (if (<= k 44000000.0) (/ a (+ 1.0 (* k 10.0))) (/ (/ a k) k))))
            double code(double a, double k, double m) {
            	double tmp;
            	if (k <= -5.1e-290) {
            		tmp = a * (1.0 / (k * k));
            	} else if (k <= 44000000.0) {
            		tmp = a / (1.0 + (k * 10.0));
            	} else {
            		tmp = (a / k) / k;
            	}
            	return tmp;
            }
            
            real(8) function code(a, k, m)
                real(8), intent (in) :: a
                real(8), intent (in) :: k
                real(8), intent (in) :: m
                real(8) :: tmp
                if (k <= (-5.1d-290)) then
                    tmp = a * (1.0d0 / (k * k))
                else if (k <= 44000000.0d0) then
                    tmp = a / (1.0d0 + (k * 10.0d0))
                else
                    tmp = (a / k) / k
                end if
                code = tmp
            end function
            
            public static double code(double a, double k, double m) {
            	double tmp;
            	if (k <= -5.1e-290) {
            		tmp = a * (1.0 / (k * k));
            	} else if (k <= 44000000.0) {
            		tmp = a / (1.0 + (k * 10.0));
            	} else {
            		tmp = (a / k) / k;
            	}
            	return tmp;
            }
            
            def code(a, k, m):
            	tmp = 0
            	if k <= -5.1e-290:
            		tmp = a * (1.0 / (k * k))
            	elif k <= 44000000.0:
            		tmp = a / (1.0 + (k * 10.0))
            	else:
            		tmp = (a / k) / k
            	return tmp
            
            function code(a, k, m)
            	tmp = 0.0
            	if (k <= -5.1e-290)
            		tmp = Float64(a * Float64(1.0 / Float64(k * k)));
            	elseif (k <= 44000000.0)
            		tmp = Float64(a / Float64(1.0 + Float64(k * 10.0)));
            	else
            		tmp = Float64(Float64(a / k) / k);
            	end
            	return tmp
            end
            
            function tmp_2 = code(a, k, m)
            	tmp = 0.0;
            	if (k <= -5.1e-290)
            		tmp = a * (1.0 / (k * k));
            	elseif (k <= 44000000.0)
            		tmp = a / (1.0 + (k * 10.0));
            	else
            		tmp = (a / k) / k;
            	end
            	tmp_2 = tmp;
            end
            
            code[a_, k_, m_] := If[LessEqual[k, -5.1e-290], N[(a * N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 44000000.0], N[(a / N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a / k), $MachinePrecision] / k), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;k \leq -5.1 \cdot 10^{-290}:\\
            \;\;\;\;a \cdot \frac{1}{k \cdot k}\\
            
            \mathbf{elif}\;k \leq 44000000:\\
            \;\;\;\;\frac{a}{1 + k \cdot 10}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{\frac{a}{k}}{k}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if k < -5.1e-290

              1. Initial program 92.2%

                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
              2. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                3. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                4. associate-+l+N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                8. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6492.2%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified92.2%

                \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
              4. Add Preprocessing
              5. Taylor expanded in m around 0

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
              6. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                4. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                5. +-lowering-+.f6423.4%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              7. Simplified23.4%

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
              8. Taylor expanded in k around inf

                \[\leadsto \color{blue}{\frac{a}{{k}^{2}}} \]
              9. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
                2. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                3. *-lowering-*.f6436.7%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
              10. Simplified36.7%

                \[\leadsto \color{blue}{\frac{a}{k \cdot k}} \]
              11. Step-by-step derivation
                1. clear-numN/A

                  \[\leadsto \frac{1}{\color{blue}{\frac{k \cdot k}{a}}} \]
                2. associate-/r/N/A

                  \[\leadsto \frac{1}{k \cdot k} \cdot \color{blue}{a} \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{k \cdot k}\right), \color{blue}{a}\right) \]
                4. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(k \cdot k\right)\right), a\right) \]
                5. *-lowering-*.f6438.0%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(k, k\right)\right), a\right) \]
              12. Applied egg-rr38.0%

                \[\leadsto \color{blue}{\frac{1}{k \cdot k} \cdot a} \]

              if -5.1e-290 < k < 4.4e7

              1. Initial program 100.0%

                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
              2. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                3. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                4. associate-+l+N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                8. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f64100.0%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified100.0%

                \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
              4. Add Preprocessing
              5. Taylor expanded in m around 0

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
              6. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                4. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                5. +-lowering-+.f6453.7%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              7. Simplified53.7%

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
              8. Taylor expanded in k around 0

                \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + 10 \cdot k\right)}\right) \]
              9. Step-by-step derivation
                1. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k\right)}\right)\right) \]
                2. *-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{10}\right)\right)\right) \]
                3. *-lowering-*.f6453.4%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{10}\right)\right)\right) \]
              10. Simplified53.4%

                \[\leadsto \frac{a}{\color{blue}{1 + k \cdot 10}} \]

              if 4.4e7 < k

              1. Initial program 78.2%

                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
              2. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                3. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                4. associate-+l+N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                8. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6478.2%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified78.2%

                \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
              4. Add Preprocessing
              5. Taylor expanded in m around 0

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
              6. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                4. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                5. +-lowering-+.f6455.6%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              7. Simplified55.6%

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
              8. Taylor expanded in k around inf

                \[\leadsto \color{blue}{\frac{a}{{k}^{2}}} \]
              9. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
                2. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                3. *-lowering-*.f6454.9%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
              10. Simplified54.9%

                \[\leadsto \color{blue}{\frac{a}{k \cdot k}} \]
              11. Step-by-step derivation
                1. associate-/r*N/A

                  \[\leadsto \frac{\frac{a}{k}}{\color{blue}{k}} \]
                2. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(\frac{a}{k}\right), \color{blue}{k}\right) \]
                3. /-lowering-/.f6459.3%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, k\right), k\right) \]
              12. Applied egg-rr59.3%

                \[\leadsto \color{blue}{\frac{\frac{a}{k}}{k}} \]
            3. Recombined 3 regimes into one program.
            4. Final simplification50.7%

              \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -5.1 \cdot 10^{-290}:\\ \;\;\;\;a \cdot \frac{1}{k \cdot k}\\ \mathbf{elif}\;k \leq 44000000:\\ \;\;\;\;\frac{a}{1 + k \cdot 10}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{a}{k}}{k}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 11: 47.0% accurate, 6.7× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq -5.1 \cdot 10^{-290}:\\ \;\;\;\;a \cdot \frac{1}{k \cdot k}\\ \mathbf{elif}\;k \leq 0.028:\\ \;\;\;\;a + a \cdot \left(k \cdot -10\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{a}{k}}{k}\\ \end{array} \end{array} \]
            (FPCore (a k m)
             :precision binary64
             (if (<= k -5.1e-290)
               (* a (/ 1.0 (* k k)))
               (if (<= k 0.028) (+ a (* a (* k -10.0))) (/ (/ a k) k))))
            double code(double a, double k, double m) {
            	double tmp;
            	if (k <= -5.1e-290) {
            		tmp = a * (1.0 / (k * k));
            	} else if (k <= 0.028) {
            		tmp = a + (a * (k * -10.0));
            	} else {
            		tmp = (a / k) / k;
            	}
            	return tmp;
            }
            
            real(8) function code(a, k, m)
                real(8), intent (in) :: a
                real(8), intent (in) :: k
                real(8), intent (in) :: m
                real(8) :: tmp
                if (k <= (-5.1d-290)) then
                    tmp = a * (1.0d0 / (k * k))
                else if (k <= 0.028d0) then
                    tmp = a + (a * (k * (-10.0d0)))
                else
                    tmp = (a / k) / k
                end if
                code = tmp
            end function
            
            public static double code(double a, double k, double m) {
            	double tmp;
            	if (k <= -5.1e-290) {
            		tmp = a * (1.0 / (k * k));
            	} else if (k <= 0.028) {
            		tmp = a + (a * (k * -10.0));
            	} else {
            		tmp = (a / k) / k;
            	}
            	return tmp;
            }
            
            def code(a, k, m):
            	tmp = 0
            	if k <= -5.1e-290:
            		tmp = a * (1.0 / (k * k))
            	elif k <= 0.028:
            		tmp = a + (a * (k * -10.0))
            	else:
            		tmp = (a / k) / k
            	return tmp
            
            function code(a, k, m)
            	tmp = 0.0
            	if (k <= -5.1e-290)
            		tmp = Float64(a * Float64(1.0 / Float64(k * k)));
            	elseif (k <= 0.028)
            		tmp = Float64(a + Float64(a * Float64(k * -10.0)));
            	else
            		tmp = Float64(Float64(a / k) / k);
            	end
            	return tmp
            end
            
            function tmp_2 = code(a, k, m)
            	tmp = 0.0;
            	if (k <= -5.1e-290)
            		tmp = a * (1.0 / (k * k));
            	elseif (k <= 0.028)
            		tmp = a + (a * (k * -10.0));
            	else
            		tmp = (a / k) / k;
            	end
            	tmp_2 = tmp;
            end
            
            code[a_, k_, m_] := If[LessEqual[k, -5.1e-290], N[(a * N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.028], N[(a + N[(a * N[(k * -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a / k), $MachinePrecision] / k), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;k \leq -5.1 \cdot 10^{-290}:\\
            \;\;\;\;a \cdot \frac{1}{k \cdot k}\\
            
            \mathbf{elif}\;k \leq 0.028:\\
            \;\;\;\;a + a \cdot \left(k \cdot -10\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{\frac{a}{k}}{k}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if k < -5.1e-290

              1. Initial program 92.2%

                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
              2. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                3. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                4. associate-+l+N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                8. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6492.2%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified92.2%

                \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
              4. Add Preprocessing
              5. Taylor expanded in m around 0

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
              6. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                4. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                5. +-lowering-+.f6423.4%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              7. Simplified23.4%

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
              8. Taylor expanded in k around inf

                \[\leadsto \color{blue}{\frac{a}{{k}^{2}}} \]
              9. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
                2. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                3. *-lowering-*.f6436.7%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
              10. Simplified36.7%

                \[\leadsto \color{blue}{\frac{a}{k \cdot k}} \]
              11. Step-by-step derivation
                1. clear-numN/A

                  \[\leadsto \frac{1}{\color{blue}{\frac{k \cdot k}{a}}} \]
                2. associate-/r/N/A

                  \[\leadsto \frac{1}{k \cdot k} \cdot \color{blue}{a} \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{k \cdot k}\right), \color{blue}{a}\right) \]
                4. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(k \cdot k\right)\right), a\right) \]
                5. *-lowering-*.f6438.0%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(k, k\right)\right), a\right) \]
              12. Applied egg-rr38.0%

                \[\leadsto \color{blue}{\frac{1}{k \cdot k} \cdot a} \]

              if -5.1e-290 < k < 0.0280000000000000006

              1. Initial program 99.9%

                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
              2. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                3. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                4. associate-+l+N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                8. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6499.9%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified99.9%

                \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
              4. Add Preprocessing
              5. Taylor expanded in m around 0

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
              6. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                4. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                5. +-lowering-+.f6454.8%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              7. Simplified54.8%

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
              8. Step-by-step derivation
                1. flip-+N/A

                  \[\leadsto \frac{a}{\frac{1 \cdot 1 - \left(k \cdot \left(k + 10\right)\right) \cdot \left(k \cdot \left(k + 10\right)\right)}{\color{blue}{1 - k \cdot \left(k + 10\right)}}} \]
                2. metadata-evalN/A

                  \[\leadsto \frac{a}{\frac{1 - \left(k \cdot \left(k + 10\right)\right) \cdot \left(k \cdot \left(k + 10\right)\right)}{1 - k \cdot \left(k + 10\right)}} \]
                3. *-commutativeN/A

                  \[\leadsto \frac{a}{\frac{1 - \left(\left(k + 10\right) \cdot k\right) \cdot \left(k \cdot \left(k + 10\right)\right)}{1 - k \cdot \left(k + 10\right)}} \]
                4. associate-*r*N/A

                  \[\leadsto \frac{a}{\frac{1 - \left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)}{1 - k \cdot \left(k + 10\right)}} \]
                5. associate-/r/N/A

                  \[\leadsto \frac{a}{1 - \left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)} \cdot \color{blue}{\left(1 - k \cdot \left(k + 10\right)\right)} \]
                6. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\left(\frac{a}{1 - \left(k + 10\right) \cdot \left(k \cdot \left(k \cdot \left(k + 10\right)\right)\right)}\right), \color{blue}{\left(1 - k \cdot \left(k + 10\right)\right)}\right) \]
              9. Applied egg-rr54.8%

                \[\leadsto \color{blue}{\frac{a}{1 + \left(k \cdot \left(k + 10\right)\right) \cdot \left(k \cdot \left(-10 - k\right)\right)} \cdot \left(1 - k \cdot \left(k + 10\right)\right)} \]
              10. Taylor expanded in k around 0

                \[\leadsto \color{blue}{a + -10 \cdot \left(a \cdot k\right)} \]
              11. Step-by-step derivation
                1. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(a, \color{blue}{\left(-10 \cdot \left(a \cdot k\right)\right)}\right) \]
                2. associate-*r*N/A

                  \[\leadsto \mathsf{+.f64}\left(a, \left(\left(-10 \cdot a\right) \cdot \color{blue}{k}\right)\right) \]
                3. *-commutativeN/A

                  \[\leadsto \mathsf{+.f64}\left(a, \left(\left(a \cdot -10\right) \cdot k\right)\right) \]
                4. associate-*l*N/A

                  \[\leadsto \mathsf{+.f64}\left(a, \left(a \cdot \color{blue}{\left(-10 \cdot k\right)}\right)\right) \]
                5. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(a, \color{blue}{\left(-10 \cdot k\right)}\right)\right) \]
                6. *-lowering-*.f6454.4%

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(-10, \color{blue}{k}\right)\right)\right) \]
              12. Simplified54.4%

                \[\leadsto \color{blue}{a + a \cdot \left(-10 \cdot k\right)} \]

              if 0.0280000000000000006 < k

              1. Initial program 78.7%

                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
              2. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                3. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                4. associate-+l+N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                8. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6478.7%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified78.7%

                \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
              4. Add Preprocessing
              5. Taylor expanded in m around 0

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
              6. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                4. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                5. +-lowering-+.f6454.4%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              7. Simplified54.4%

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
              8. Taylor expanded in k around inf

                \[\leadsto \color{blue}{\frac{a}{{k}^{2}}} \]
              9. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
                2. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                3. *-lowering-*.f6453.7%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
              10. Simplified53.7%

                \[\leadsto \color{blue}{\frac{a}{k \cdot k}} \]
              11. Step-by-step derivation
                1. associate-/r*N/A

                  \[\leadsto \frac{\frac{a}{k}}{\color{blue}{k}} \]
                2. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(\frac{a}{k}\right), \color{blue}{k}\right) \]
                3. /-lowering-/.f6458.0%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, k\right), k\right) \]
              12. Applied egg-rr58.0%

                \[\leadsto \color{blue}{\frac{\frac{a}{k}}{k}} \]
            3. Recombined 3 regimes into one program.
            4. Final simplification50.7%

              \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -5.1 \cdot 10^{-290}:\\ \;\;\;\;a \cdot \frac{1}{k \cdot k}\\ \mathbf{elif}\;k \leq 0.028:\\ \;\;\;\;a + a \cdot \left(k \cdot -10\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{a}{k}}{k}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 12: 46.7% accurate, 7.6× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq -5.1 \cdot 10^{-290}:\\ \;\;\;\;a \cdot \frac{1}{k \cdot k}\\ \mathbf{elif}\;k \leq 44000000:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{a}{k}}{k}\\ \end{array} \end{array} \]
            (FPCore (a k m)
             :precision binary64
             (if (<= k -5.1e-290)
               (* a (/ 1.0 (* k k)))
               (if (<= k 44000000.0) a (/ (/ a k) k))))
            double code(double a, double k, double m) {
            	double tmp;
            	if (k <= -5.1e-290) {
            		tmp = a * (1.0 / (k * k));
            	} else if (k <= 44000000.0) {
            		tmp = a;
            	} else {
            		tmp = (a / k) / k;
            	}
            	return tmp;
            }
            
            real(8) function code(a, k, m)
                real(8), intent (in) :: a
                real(8), intent (in) :: k
                real(8), intent (in) :: m
                real(8) :: tmp
                if (k <= (-5.1d-290)) then
                    tmp = a * (1.0d0 / (k * k))
                else if (k <= 44000000.0d0) then
                    tmp = a
                else
                    tmp = (a / k) / k
                end if
                code = tmp
            end function
            
            public static double code(double a, double k, double m) {
            	double tmp;
            	if (k <= -5.1e-290) {
            		tmp = a * (1.0 / (k * k));
            	} else if (k <= 44000000.0) {
            		tmp = a;
            	} else {
            		tmp = (a / k) / k;
            	}
            	return tmp;
            }
            
            def code(a, k, m):
            	tmp = 0
            	if k <= -5.1e-290:
            		tmp = a * (1.0 / (k * k))
            	elif k <= 44000000.0:
            		tmp = a
            	else:
            		tmp = (a / k) / k
            	return tmp
            
            function code(a, k, m)
            	tmp = 0.0
            	if (k <= -5.1e-290)
            		tmp = Float64(a * Float64(1.0 / Float64(k * k)));
            	elseif (k <= 44000000.0)
            		tmp = a;
            	else
            		tmp = Float64(Float64(a / k) / k);
            	end
            	return tmp
            end
            
            function tmp_2 = code(a, k, m)
            	tmp = 0.0;
            	if (k <= -5.1e-290)
            		tmp = a * (1.0 / (k * k));
            	elseif (k <= 44000000.0)
            		tmp = a;
            	else
            		tmp = (a / k) / k;
            	end
            	tmp_2 = tmp;
            end
            
            code[a_, k_, m_] := If[LessEqual[k, -5.1e-290], N[(a * N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 44000000.0], a, N[(N[(a / k), $MachinePrecision] / k), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;k \leq -5.1 \cdot 10^{-290}:\\
            \;\;\;\;a \cdot \frac{1}{k \cdot k}\\
            
            \mathbf{elif}\;k \leq 44000000:\\
            \;\;\;\;a\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{\frac{a}{k}}{k}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if k < -5.1e-290

              1. Initial program 92.2%

                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
              2. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                3. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                4. associate-+l+N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                8. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6492.2%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified92.2%

                \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
              4. Add Preprocessing
              5. Taylor expanded in m around 0

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
              6. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                4. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                5. +-lowering-+.f6423.4%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              7. Simplified23.4%

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
              8. Taylor expanded in k around inf

                \[\leadsto \color{blue}{\frac{a}{{k}^{2}}} \]
              9. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
                2. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                3. *-lowering-*.f6436.7%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
              10. Simplified36.7%

                \[\leadsto \color{blue}{\frac{a}{k \cdot k}} \]
              11. Step-by-step derivation
                1. clear-numN/A

                  \[\leadsto \frac{1}{\color{blue}{\frac{k \cdot k}{a}}} \]
                2. associate-/r/N/A

                  \[\leadsto \frac{1}{k \cdot k} \cdot \color{blue}{a} \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{k \cdot k}\right), \color{blue}{a}\right) \]
                4. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(k \cdot k\right)\right), a\right) \]
                5. *-lowering-*.f6438.0%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(k, k\right)\right), a\right) \]
              12. Applied egg-rr38.0%

                \[\leadsto \color{blue}{\frac{1}{k \cdot k} \cdot a} \]

              if -5.1e-290 < k < 4.4e7

              1. Initial program 100.0%

                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
              2. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                3. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                4. associate-+l+N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                8. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f64100.0%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified100.0%

                \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
              4. Add Preprocessing
              5. Taylor expanded in m around 0

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
              6. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                4. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                5. +-lowering-+.f6453.7%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              7. Simplified53.7%

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
              8. Taylor expanded in k around 0

                \[\leadsto \color{blue}{a} \]
              9. Step-by-step derivation
                1. Simplified52.7%

                  \[\leadsto \color{blue}{a} \]

                if 4.4e7 < k

                1. Initial program 78.2%

                  \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                2. Step-by-step derivation
                  1. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                  2. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                  3. pow-lowering-pow.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                  4. associate-+l+N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                  5. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                  6. distribute-rgt-outN/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                  7. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                  8. +-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                  9. +-lowering-+.f6478.2%

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                3. Simplified78.2%

                  \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
                4. Add Preprocessing
                5. Taylor expanded in m around 0

                  \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
                6. Step-by-step derivation
                  1. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                  2. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                  3. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                  4. +-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                  5. +-lowering-+.f6455.6%

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                7. Simplified55.6%

                  \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                8. Taylor expanded in k around inf

                  \[\leadsto \color{blue}{\frac{a}{{k}^{2}}} \]
                9. Step-by-step derivation
                  1. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
                  2. unpow2N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                  3. *-lowering-*.f6454.9%

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
                10. Simplified54.9%

                  \[\leadsto \color{blue}{\frac{a}{k \cdot k}} \]
                11. Step-by-step derivation
                  1. associate-/r*N/A

                    \[\leadsto \frac{\frac{a}{k}}{\color{blue}{k}} \]
                  2. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\left(\frac{a}{k}\right), \color{blue}{k}\right) \]
                  3. /-lowering-/.f6459.3%

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, k\right), k\right) \]
                12. Applied egg-rr59.3%

                  \[\leadsto \color{blue}{\frac{\frac{a}{k}}{k}} \]
              10. Recombined 3 regimes into one program.
              11. Final simplification50.5%

                \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -5.1 \cdot 10^{-290}:\\ \;\;\;\;a \cdot \frac{1}{k \cdot k}\\ \mathbf{elif}\;k \leq 44000000:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{a}{k}}{k}\\ \end{array} \]
              12. Add Preprocessing

              Alternative 13: 46.7% accurate, 7.6× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq -5.1 \cdot 10^{-290}:\\ \;\;\;\;\frac{a}{k \cdot k}\\ \mathbf{elif}\;k \leq 44000000:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{a}{k}}{k}\\ \end{array} \end{array} \]
              (FPCore (a k m)
               :precision binary64
               (if (<= k -5.1e-290) (/ a (* k k)) (if (<= k 44000000.0) a (/ (/ a k) k))))
              double code(double a, double k, double m) {
              	double tmp;
              	if (k <= -5.1e-290) {
              		tmp = a / (k * k);
              	} else if (k <= 44000000.0) {
              		tmp = a;
              	} else {
              		tmp = (a / k) / k;
              	}
              	return tmp;
              }
              
              real(8) function code(a, k, m)
                  real(8), intent (in) :: a
                  real(8), intent (in) :: k
                  real(8), intent (in) :: m
                  real(8) :: tmp
                  if (k <= (-5.1d-290)) then
                      tmp = a / (k * k)
                  else if (k <= 44000000.0d0) then
                      tmp = a
                  else
                      tmp = (a / k) / k
                  end if
                  code = tmp
              end function
              
              public static double code(double a, double k, double m) {
              	double tmp;
              	if (k <= -5.1e-290) {
              		tmp = a / (k * k);
              	} else if (k <= 44000000.0) {
              		tmp = a;
              	} else {
              		tmp = (a / k) / k;
              	}
              	return tmp;
              }
              
              def code(a, k, m):
              	tmp = 0
              	if k <= -5.1e-290:
              		tmp = a / (k * k)
              	elif k <= 44000000.0:
              		tmp = a
              	else:
              		tmp = (a / k) / k
              	return tmp
              
              function code(a, k, m)
              	tmp = 0.0
              	if (k <= -5.1e-290)
              		tmp = Float64(a / Float64(k * k));
              	elseif (k <= 44000000.0)
              		tmp = a;
              	else
              		tmp = Float64(Float64(a / k) / k);
              	end
              	return tmp
              end
              
              function tmp_2 = code(a, k, m)
              	tmp = 0.0;
              	if (k <= -5.1e-290)
              		tmp = a / (k * k);
              	elseif (k <= 44000000.0)
              		tmp = a;
              	else
              		tmp = (a / k) / k;
              	end
              	tmp_2 = tmp;
              end
              
              code[a_, k_, m_] := If[LessEqual[k, -5.1e-290], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 44000000.0], a, N[(N[(a / k), $MachinePrecision] / k), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;k \leq -5.1 \cdot 10^{-290}:\\
              \;\;\;\;\frac{a}{k \cdot k}\\
              
              \mathbf{elif}\;k \leq 44000000:\\
              \;\;\;\;a\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{\frac{a}{k}}{k}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if k < -5.1e-290

                1. Initial program 92.2%

                  \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                2. Step-by-step derivation
                  1. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                  2. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                  3. pow-lowering-pow.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                  4. associate-+l+N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                  5. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                  6. distribute-rgt-outN/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                  7. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                  8. +-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                  9. +-lowering-+.f6492.2%

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                3. Simplified92.2%

                  \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
                4. Add Preprocessing
                5. Taylor expanded in m around 0

                  \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
                6. Step-by-step derivation
                  1. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                  2. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                  3. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                  4. +-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                  5. +-lowering-+.f6423.4%

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                7. Simplified23.4%

                  \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                8. Taylor expanded in k around inf

                  \[\leadsto \color{blue}{\frac{a}{{k}^{2}}} \]
                9. Step-by-step derivation
                  1. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
                  2. unpow2N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                  3. *-lowering-*.f6436.7%

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
                10. Simplified36.7%

                  \[\leadsto \color{blue}{\frac{a}{k \cdot k}} \]

                if -5.1e-290 < k < 4.4e7

                1. Initial program 100.0%

                  \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                2. Step-by-step derivation
                  1. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                  2. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                  3. pow-lowering-pow.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                  4. associate-+l+N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                  5. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                  6. distribute-rgt-outN/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                  7. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                  8. +-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                  9. +-lowering-+.f64100.0%

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                3. Simplified100.0%

                  \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
                4. Add Preprocessing
                5. Taylor expanded in m around 0

                  \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
                6. Step-by-step derivation
                  1. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                  2. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                  3. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                  4. +-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                  5. +-lowering-+.f6453.7%

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                7. Simplified53.7%

                  \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                8. Taylor expanded in k around 0

                  \[\leadsto \color{blue}{a} \]
                9. Step-by-step derivation
                  1. Simplified52.7%

                    \[\leadsto \color{blue}{a} \]

                  if 4.4e7 < k

                  1. Initial program 78.2%

                    \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                  2. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                    3. pow-lowering-pow.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                    4. associate-+l+N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                    5. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                    6. distribute-rgt-outN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                    7. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                    8. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                    9. +-lowering-+.f6478.2%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                  3. Simplified78.2%

                    \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
                  4. Add Preprocessing
                  5. Taylor expanded in m around 0

                    \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
                  6. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                    2. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                    3. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                    4. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                    5. +-lowering-+.f6455.6%

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                  7. Simplified55.6%

                    \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                  8. Taylor expanded in k around inf

                    \[\leadsto \color{blue}{\frac{a}{{k}^{2}}} \]
                  9. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
                    2. unpow2N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                    3. *-lowering-*.f6454.9%

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
                  10. Simplified54.9%

                    \[\leadsto \color{blue}{\frac{a}{k \cdot k}} \]
                  11. Step-by-step derivation
                    1. associate-/r*N/A

                      \[\leadsto \frac{\frac{a}{k}}{\color{blue}{k}} \]
                    2. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\left(\frac{a}{k}\right), \color{blue}{k}\right) \]
                    3. /-lowering-/.f6459.3%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, k\right), k\right) \]
                  12. Applied egg-rr59.3%

                    \[\leadsto \color{blue}{\frac{\frac{a}{k}}{k}} \]
                10. Recombined 3 regimes into one program.
                11. Add Preprocessing

                Alternative 14: 45.8% accurate, 7.6× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{a}{k \cdot k}\\ \mathbf{if}\;k \leq -5.1 \cdot 10^{-290}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;k \leq 44000000:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                (FPCore (a k m)
                 :precision binary64
                 (let* ((t_0 (/ a (* k k))))
                   (if (<= k -5.1e-290) t_0 (if (<= k 44000000.0) a t_0))))
                double code(double a, double k, double m) {
                	double t_0 = a / (k * k);
                	double tmp;
                	if (k <= -5.1e-290) {
                		tmp = t_0;
                	} else if (k <= 44000000.0) {
                		tmp = a;
                	} else {
                		tmp = t_0;
                	}
                	return tmp;
                }
                
                real(8) function code(a, k, m)
                    real(8), intent (in) :: a
                    real(8), intent (in) :: k
                    real(8), intent (in) :: m
                    real(8) :: t_0
                    real(8) :: tmp
                    t_0 = a / (k * k)
                    if (k <= (-5.1d-290)) then
                        tmp = t_0
                    else if (k <= 44000000.0d0) then
                        tmp = a
                    else
                        tmp = t_0
                    end if
                    code = tmp
                end function
                
                public static double code(double a, double k, double m) {
                	double t_0 = a / (k * k);
                	double tmp;
                	if (k <= -5.1e-290) {
                		tmp = t_0;
                	} else if (k <= 44000000.0) {
                		tmp = a;
                	} else {
                		tmp = t_0;
                	}
                	return tmp;
                }
                
                def code(a, k, m):
                	t_0 = a / (k * k)
                	tmp = 0
                	if k <= -5.1e-290:
                		tmp = t_0
                	elif k <= 44000000.0:
                		tmp = a
                	else:
                		tmp = t_0
                	return tmp
                
                function code(a, k, m)
                	t_0 = Float64(a / Float64(k * k))
                	tmp = 0.0
                	if (k <= -5.1e-290)
                		tmp = t_0;
                	elseif (k <= 44000000.0)
                		tmp = a;
                	else
                		tmp = t_0;
                	end
                	return tmp
                end
                
                function tmp_2 = code(a, k, m)
                	t_0 = a / (k * k);
                	tmp = 0.0;
                	if (k <= -5.1e-290)
                		tmp = t_0;
                	elseif (k <= 44000000.0)
                		tmp = a;
                	else
                		tmp = t_0;
                	end
                	tmp_2 = tmp;
                end
                
                code[a_, k_, m_] := Block[{t$95$0 = N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -5.1e-290], t$95$0, If[LessEqual[k, 44000000.0], a, t$95$0]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := \frac{a}{k \cdot k}\\
                \mathbf{if}\;k \leq -5.1 \cdot 10^{-290}:\\
                \;\;\;\;t\_0\\
                
                \mathbf{elif}\;k \leq 44000000:\\
                \;\;\;\;a\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_0\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if k < -5.1e-290 or 4.4e7 < k

                  1. Initial program 84.8%

                    \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                  2. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                    3. pow-lowering-pow.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                    4. associate-+l+N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                    5. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                    6. distribute-rgt-outN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                    7. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                    8. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                    9. +-lowering-+.f6484.9%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                  3. Simplified84.9%

                    \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
                  4. Add Preprocessing
                  5. Taylor expanded in m around 0

                    \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
                  6. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                    2. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                    3. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                    4. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                    5. +-lowering-+.f6440.3%

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                  7. Simplified40.3%

                    \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                  8. Taylor expanded in k around inf

                    \[\leadsto \color{blue}{\frac{a}{{k}^{2}}} \]
                  9. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
                    2. unpow2N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                    3. *-lowering-*.f6446.3%

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
                  10. Simplified46.3%

                    \[\leadsto \color{blue}{\frac{a}{k \cdot k}} \]

                  if -5.1e-290 < k < 4.4e7

                  1. Initial program 100.0%

                    \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                  2. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                    3. pow-lowering-pow.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                    4. associate-+l+N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                    5. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                    6. distribute-rgt-outN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                    7. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                    8. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                    9. +-lowering-+.f64100.0%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                  3. Simplified100.0%

                    \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
                  4. Add Preprocessing
                  5. Taylor expanded in m around 0

                    \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
                  6. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                    2. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                    3. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                    4. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                    5. +-lowering-+.f6453.7%

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                  7. Simplified53.7%

                    \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                  8. Taylor expanded in k around 0

                    \[\leadsto \color{blue}{a} \]
                  9. Step-by-step derivation
                    1. Simplified52.7%

                      \[\leadsto \color{blue}{a} \]
                  10. Recombined 2 regimes into one program.
                  11. Add Preprocessing

                  Alternative 15: 51.3% accurate, 9.5× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -0.0305:\\ \;\;\;\;a \cdot \frac{1}{k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{1 + k \cdot k}\\ \end{array} \end{array} \]
                  (FPCore (a k m)
                   :precision binary64
                   (if (<= m -0.0305) (* a (/ 1.0 (* k k))) (/ a (+ 1.0 (* k k)))))
                  double code(double a, double k, double m) {
                  	double tmp;
                  	if (m <= -0.0305) {
                  		tmp = a * (1.0 / (k * k));
                  	} else {
                  		tmp = a / (1.0 + (k * k));
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(a, k, m)
                      real(8), intent (in) :: a
                      real(8), intent (in) :: k
                      real(8), intent (in) :: m
                      real(8) :: tmp
                      if (m <= (-0.0305d0)) then
                          tmp = a * (1.0d0 / (k * k))
                      else
                          tmp = a / (1.0d0 + (k * k))
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double a, double k, double m) {
                  	double tmp;
                  	if (m <= -0.0305) {
                  		tmp = a * (1.0 / (k * k));
                  	} else {
                  		tmp = a / (1.0 + (k * k));
                  	}
                  	return tmp;
                  }
                  
                  def code(a, k, m):
                  	tmp = 0
                  	if m <= -0.0305:
                  		tmp = a * (1.0 / (k * k))
                  	else:
                  		tmp = a / (1.0 + (k * k))
                  	return tmp
                  
                  function code(a, k, m)
                  	tmp = 0.0
                  	if (m <= -0.0305)
                  		tmp = Float64(a * Float64(1.0 / Float64(k * k)));
                  	else
                  		tmp = Float64(a / Float64(1.0 + Float64(k * k)));
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(a, k, m)
                  	tmp = 0.0;
                  	if (m <= -0.0305)
                  		tmp = a * (1.0 / (k * k));
                  	else
                  		tmp = a / (1.0 + (k * k));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[a_, k_, m_] := If[LessEqual[m, -0.0305], N[(a * N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a / N[(1.0 + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;m \leq -0.0305:\\
                  \;\;\;\;a \cdot \frac{1}{k \cdot k}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{a}{1 + k \cdot k}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if m < -0.030499999999999999

                    1. Initial program 100.0%

                      \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                    2. Step-by-step derivation
                      1. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                      2. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                      3. pow-lowering-pow.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                      4. associate-+l+N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                      5. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                      6. distribute-rgt-outN/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                      7. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                      8. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                      9. +-lowering-+.f64100.0%

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                    3. Simplified100.0%

                      \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
                    4. Add Preprocessing
                    5. Taylor expanded in m around 0

                      \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
                    6. Step-by-step derivation
                      1. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                      2. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                      3. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                      4. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                      5. +-lowering-+.f6436.7%

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                    7. Simplified36.7%

                      \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                    8. Taylor expanded in k around inf

                      \[\leadsto \color{blue}{\frac{a}{{k}^{2}}} \]
                    9. Step-by-step derivation
                      1. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
                      2. unpow2N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                      3. *-lowering-*.f6465.2%

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
                    10. Simplified65.2%

                      \[\leadsto \color{blue}{\frac{a}{k \cdot k}} \]
                    11. Step-by-step derivation
                      1. clear-numN/A

                        \[\leadsto \frac{1}{\color{blue}{\frac{k \cdot k}{a}}} \]
                      2. associate-/r/N/A

                        \[\leadsto \frac{1}{k \cdot k} \cdot \color{blue}{a} \]
                      3. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{k \cdot k}\right), \color{blue}{a}\right) \]
                      4. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(k \cdot k\right)\right), a\right) \]
                      5. *-lowering-*.f6466.4%

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(k, k\right)\right), a\right) \]
                    12. Applied egg-rr66.4%

                      \[\leadsto \color{blue}{\frac{1}{k \cdot k} \cdot a} \]

                    if -0.030499999999999999 < m

                    1. Initial program 86.0%

                      \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                    2. Step-by-step derivation
                      1. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                      2. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                      3. pow-lowering-pow.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                      4. associate-+l+N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                      5. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                      6. distribute-rgt-outN/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                      7. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                      8. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                      9. +-lowering-+.f6486.0%

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                    3. Simplified86.0%

                      \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
                    4. Add Preprocessing
                    5. Taylor expanded in m around 0

                      \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
                    6. Step-by-step derivation
                      1. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                      2. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                      3. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                      4. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                      5. +-lowering-+.f6449.1%

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                    7. Simplified49.1%

                      \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                    8. Taylor expanded in k around inf

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2}\right)}\right)\right) \]
                    9. Step-by-step derivation
                      1. unpow2N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{k}\right)\right)\right) \]
                      2. *-lowering-*.f6448.2%

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
                    10. Simplified48.2%

                      \[\leadsto \frac{a}{1 + \color{blue}{k \cdot k}} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification53.9%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;m \leq -0.0305:\\ \;\;\;\;a \cdot \frac{1}{k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{1 + k \cdot k}\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 16: 19.9% accurate, 114.0× speedup?

                  \[\begin{array}{l} \\ a \end{array} \]
                  (FPCore (a k m) :precision binary64 a)
                  double code(double a, double k, double m) {
                  	return a;
                  }
                  
                  real(8) function code(a, k, m)
                      real(8), intent (in) :: a
                      real(8), intent (in) :: k
                      real(8), intent (in) :: m
                      code = a
                  end function
                  
                  public static double code(double a, double k, double m) {
                  	return a;
                  }
                  
                  def code(a, k, m):
                  	return a
                  
                  function code(a, k, m)
                  	return a
                  end
                  
                  function tmp = code(a, k, m)
                  	tmp = a;
                  end
                  
                  code[a_, k_, m_] := a
                  
                  \begin{array}{l}
                  
                  \\
                  a
                  \end{array}
                  
                  Derivation
                  1. Initial program 90.4%

                    \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                  2. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                    3. pow-lowering-pow.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                    4. associate-+l+N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                    5. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                    6. distribute-rgt-outN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                    7. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                    8. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                    9. +-lowering-+.f6490.4%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                  3. Simplified90.4%

                    \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
                  4. Add Preprocessing
                  5. Taylor expanded in m around 0

                    \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
                  6. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                    2. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                    3. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                    4. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                    5. +-lowering-+.f6445.2%

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                  7. Simplified45.2%

                    \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                  8. Taylor expanded in k around 0

                    \[\leadsto \color{blue}{a} \]
                  9. Step-by-step derivation
                    1. Simplified21.8%

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

                    Reproduce

                    ?
                    herbie shell --seed 2024158 
                    (FPCore (a k m)
                      :name "Falkner and Boettcher, Appendix A"
                      :precision binary64
                      (/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))