Falkner and Boettcher, Appendix A

Percentage Accurate: 90.6% → 97.9%
Time: 12.5s
Alternatives: 14
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 14 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.6% 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.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := a \cdot {k}^{m}\\ \mathbf{if}\;\frac{t\_0}{\left(1 + k \cdot 10\right) + k \cdot k} \leq \infty:\\ \;\;\;\;\frac{t\_0}{1 + \frac{k}{\frac{1}{k + 10}}}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(k \cdot \left(k \cdot 99\right)\right)\\ \end{array} \end{array} \]
(FPCore (a k m)
 :precision binary64
 (let* ((t_0 (* a (pow k m))))
   (if (<= (/ t_0 (+ (+ 1.0 (* k 10.0)) (* k k))) INFINITY)
     (/ t_0 (+ 1.0 (/ k (/ 1.0 (+ k 10.0)))))
     (* a (* k (* k 99.0))))))
double code(double a, double k, double m) {
	double t_0 = a * pow(k, m);
	double tmp;
	if ((t_0 / ((1.0 + (k * 10.0)) + (k * k))) <= ((double) INFINITY)) {
		tmp = t_0 / (1.0 + (k / (1.0 / (k + 10.0))));
	} else {
		tmp = a * (k * (k * 99.0));
	}
	return tmp;
}
public static double code(double a, double k, double m) {
	double t_0 = a * Math.pow(k, m);
	double tmp;
	if ((t_0 / ((1.0 + (k * 10.0)) + (k * k))) <= Double.POSITIVE_INFINITY) {
		tmp = t_0 / (1.0 + (k / (1.0 / (k + 10.0))));
	} else {
		tmp = a * (k * (k * 99.0));
	}
	return tmp;
}
def code(a, k, m):
	t_0 = a * math.pow(k, m)
	tmp = 0
	if (t_0 / ((1.0 + (k * 10.0)) + (k * k))) <= math.inf:
		tmp = t_0 / (1.0 + (k / (1.0 / (k + 10.0))))
	else:
		tmp = a * (k * (k * 99.0))
	return tmp
function code(a, k, m)
	t_0 = Float64(a * (k ^ m))
	tmp = 0.0
	if (Float64(t_0 / Float64(Float64(1.0 + Float64(k * 10.0)) + Float64(k * k))) <= Inf)
		tmp = Float64(t_0 / Float64(1.0 + Float64(k / Float64(1.0 / Float64(k + 10.0)))));
	else
		tmp = Float64(a * Float64(k * Float64(k * 99.0)));
	end
	return tmp
end
function tmp_2 = code(a, k, m)
	t_0 = a * (k ^ m);
	tmp = 0.0;
	if ((t_0 / ((1.0 + (k * 10.0)) + (k * k))) <= Inf)
		tmp = t_0 / (1.0 + (k / (1.0 / (k + 10.0))));
	else
		tmp = a * (k * (k * 99.0));
	end
	tmp_2 = tmp;
end
code[a_, k_, m_] := Block[{t$95$0 = N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$0 / N[(N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(t$95$0 / N[(1.0 + N[(k / N[(1.0 / N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(k * N[(k * 99.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := a \cdot {k}^{m}\\
\mathbf{if}\;\frac{t\_0}{\left(1 + k \cdot 10\right) + k \cdot k} \leq \infty:\\
\;\;\;\;\frac{t\_0}{1 + \frac{k}{\frac{1}{k + 10}}}\\

\mathbf{else}:\\
\;\;\;\;a \cdot \left(k \cdot \left(k \cdot 99\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k))) < +inf.0

    1. Initial program 97.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-+.f6497.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. Simplified97.9%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(\frac{k}{\color{blue}{\frac{k - 10}{k \cdot k - 10 \cdot 10}}}\right)\right)\right) \]
      4. /-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(\frac{k - 10}{k \cdot k - 10 \cdot 10}\right)}\right)\right)\right) \]
      5. clear-numN/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(\frac{1}{\color{blue}{\frac{k \cdot k - 10 \cdot 10}{k - 10}}}\right)\right)\right)\right) \]
      6. flip-+N/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(\frac{1}{k + \color{blue}{10}}\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, \mathsf{/.f64}\left(1, \color{blue}{\left(k + 10\right)}\right)\right)\right)\right) \]
      8. +-lowering-+.f6498.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(1, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right)\right) \]
    6. Applied egg-rr98.0%

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

    if +inf.0 < (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k)))

    1. Initial program 0.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-+.f640.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. Simplified0.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-+.f641.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. Simplified1.6%

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

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

        \[\leadsto \frac{1}{1 + k \cdot \left(k + 10\right)} \cdot \color{blue}{a} \]
      3. frac-2negN/A

        \[\leadsto \frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\left(1 + k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
      4. metadata-evalN/A

        \[\leadsto \frac{-1}{\mathsf{neg}\left(\left(1 + k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
      5. distribute-neg-inN/A

        \[\leadsto \frac{-1}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
      6. metadata-evalN/A

        \[\leadsto \frac{-1}{-1 + \left(\mathsf{neg}\left(k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
      7. sub-negN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right), a\right) \]
    9. Applied egg-rr1.6%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(-10, \left(k \cdot 99\right)\right)\right)\right), a\right) \]
      8. *-lowering-*.f64100.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(-10, \mathsf{*.f64}\left(k, 99\right)\right)\right)\right), a\right) \]
    12. Simplified100.0%

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

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(99 \cdot {k}^{2}\right)}, a\right) \]
    14. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(k \cdot \left(k \cdot 99\right)\right), a\right) \]
      4. *-commutativeN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \left(99 \cdot k\right)\right), a\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \left(k \cdot 99\right)\right), a\right) \]
      7. *-lowering-*.f64100.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, 99\right)\right), a\right) \]
    15. Simplified100.0%

      \[\leadsto \color{blue}{\left(k \cdot \left(k \cdot 99\right)\right)} \cdot a \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.1%

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

Alternative 2: 97.9% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 97.1%

      \[\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-+.f6497.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. Simplified97.1%

      \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. associate-/l*N/A

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

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

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

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

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

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

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

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

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

    if 4.0999999999999996 < m

    1. Initial program 76.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-+.f6476.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. Simplified76.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}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.1%

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

Alternative 3: 97.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -1.1 \cdot 10^{-14}:\\ \;\;\;\;\frac{1}{\frac{\frac{1}{{k}^{m}}}{a}}\\ \mathbf{elif}\;m \leq 2.6 \cdot 10^{-18}:\\ \;\;\;\;\frac{a}{1 + \frac{k}{\frac{1}{k + 10}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{{k}^{\left(0 - m\right)}}\\ \end{array} \end{array} \]
(FPCore (a k m)
 :precision binary64
 (if (<= m -1.1e-14)
   (/ 1.0 (/ (/ 1.0 (pow k m)) a))
   (if (<= m 2.6e-18)
     (/ a (+ 1.0 (/ k (/ 1.0 (+ k 10.0)))))
     (/ a (pow k (- 0.0 m))))))
double code(double a, double k, double m) {
	double tmp;
	if (m <= -1.1e-14) {
		tmp = 1.0 / ((1.0 / pow(k, m)) / a);
	} else if (m <= 2.6e-18) {
		tmp = a / (1.0 + (k / (1.0 / (k + 10.0))));
	} else {
		tmp = a / pow(k, (0.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 (m <= (-1.1d-14)) then
        tmp = 1.0d0 / ((1.0d0 / (k ** m)) / a)
    else if (m <= 2.6d-18) then
        tmp = a / (1.0d0 + (k / (1.0d0 / (k + 10.0d0))))
    else
        tmp = a / (k ** (0.0d0 - m))
    end if
    code = tmp
end function
public static double code(double a, double k, double m) {
	double tmp;
	if (m <= -1.1e-14) {
		tmp = 1.0 / ((1.0 / Math.pow(k, m)) / a);
	} else if (m <= 2.6e-18) {
		tmp = a / (1.0 + (k / (1.0 / (k + 10.0))));
	} else {
		tmp = a / Math.pow(k, (0.0 - m));
	}
	return tmp;
}
def code(a, k, m):
	tmp = 0
	if m <= -1.1e-14:
		tmp = 1.0 / ((1.0 / math.pow(k, m)) / a)
	elif m <= 2.6e-18:
		tmp = a / (1.0 + (k / (1.0 / (k + 10.0))))
	else:
		tmp = a / math.pow(k, (0.0 - m))
	return tmp
function code(a, k, m)
	tmp = 0.0
	if (m <= -1.1e-14)
		tmp = Float64(1.0 / Float64(Float64(1.0 / (k ^ m)) / a));
	elseif (m <= 2.6e-18)
		tmp = Float64(a / Float64(1.0 + Float64(k / Float64(1.0 / Float64(k + 10.0)))));
	else
		tmp = Float64(a / (k ^ Float64(0.0 - m)));
	end
	return tmp
end
function tmp_2 = code(a, k, m)
	tmp = 0.0;
	if (m <= -1.1e-14)
		tmp = 1.0 / ((1.0 / (k ^ m)) / a);
	elseif (m <= 2.6e-18)
		tmp = a / (1.0 + (k / (1.0 / (k + 10.0))));
	else
		tmp = a / (k ^ (0.0 - m));
	end
	tmp_2 = tmp;
end
code[a_, k_, m_] := If[LessEqual[m, -1.1e-14], N[(1.0 / N[(N[(1.0 / N[Power[k, m], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 2.6e-18], N[(a / N[(1.0 + N[(k / N[(1.0 / N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a / N[Power[k, N[(0.0 - m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;m \leq -1.1 \cdot 10^{-14}:\\
\;\;\;\;\frac{1}{\frac{\frac{1}{{k}^{m}}}{a}}\\

\mathbf{elif}\;m \leq 2.6 \cdot 10^{-18}:\\
\;\;\;\;\frac{a}{1 + \frac{k}{\frac{1}{k + 10}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{a}{{k}^{\left(0 - m\right)}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if m < -1.1e-14

    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. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{1 + k \cdot \left(k + 10\right)}{a \cdot {k}^{m}}}} \]
      2. div-invN/A

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(-1, \left(\mathsf{neg}\left(\left(1 + k \cdot \left(k + 10\right)\right)\right)\right)\right), \left(\frac{\color{blue}{1}}{a \cdot {k}^{m}}\right)\right) \]
      8. distribute-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(-1, \left(\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(k \cdot \left(k + 10\right)\right)\right)\right)\right), \left(\frac{1}{a \cdot {k}^{m}}\right)\right) \]
      9. metadata-evalN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{\_.f64}\left(-1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{pow.f64}\left(k, m\right)\right), a\right)\right) \]
    6. Applied egg-rr100.0%

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

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

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

      if -1.1e-14 < m < 2.6e-18

      1. Initial program 94.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-+.f6494.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. Simplified94.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-+.f6494.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. Simplified94.7%

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

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

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

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

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

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

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

      if 2.6e-18 < m

      1. Initial program 77.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-+.f6477.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. Simplified77.5%

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

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

        \[\leadsto \color{blue}{a \cdot {k}^{m}} \]
      8. Taylor expanded in k around inf

        \[\leadsto \color{blue}{a \cdot e^{-1 \cdot \left(m \cdot \log \left(\frac{1}{k}\right)\right)}} \]
      9. Step-by-step derivation
        1. mul-1-negN/A

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(1, k\right), m\right)\right) \]
      10. Simplified99.5%

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

        \[\leadsto \color{blue}{\frac{a}{{\left(\frac{1}{k}\right)}^{m}}} \]
      12. Step-by-step derivation
        1. exp-to-powN/A

          \[\leadsto \frac{a}{e^{\log \left(\frac{1}{k}\right) \cdot m}} \]
        2. log-recN/A

          \[\leadsto \frac{a}{e^{\left(\mathsf{neg}\left(\log k\right)\right) \cdot m}} \]
        3. distribute-lft-neg-inN/A

          \[\leadsto \frac{a}{e^{\mathsf{neg}\left(\log k \cdot m\right)}} \]
        4. *-commutativeN/A

          \[\leadsto \frac{a}{e^{\mathsf{neg}\left(m \cdot \log k\right)}} \]
        5. mul-1-negN/A

          \[\leadsto \frac{a}{e^{-1 \cdot \left(m \cdot \log k\right)}} \]
        6. /-lowering-/.f64N/A

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(k, \color{blue}{\left(-1 \cdot m\right)}\right)\right) \]
        11. mul-1-negN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(k, \left(\mathsf{neg}\left(m\right)\right)\right)\right) \]
        12. neg-lowering-neg.f6499.5%

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(k, \mathsf{neg.f64}\left(m\right)\right)\right) \]
      13. Simplified99.5%

        \[\leadsto \color{blue}{\frac{a}{{k}^{\left(-m\right)}}} \]
    9. Recombined 3 regimes into one program.
    10. Final simplification98.0%

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

    Alternative 4: 97.1% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -1.1 \cdot 10^{-14}:\\ \;\;\;\;a \cdot {k}^{m}\\ \mathbf{elif}\;m \leq 2.6 \cdot 10^{-18}:\\ \;\;\;\;\frac{a}{1 + \frac{k}{\frac{1}{k + 10}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{{k}^{\left(0 - m\right)}}\\ \end{array} \end{array} \]
    (FPCore (a k m)
     :precision binary64
     (if (<= m -1.1e-14)
       (* a (pow k m))
       (if (<= m 2.6e-18)
         (/ a (+ 1.0 (/ k (/ 1.0 (+ k 10.0)))))
         (/ a (pow k (- 0.0 m))))))
    double code(double a, double k, double m) {
    	double tmp;
    	if (m <= -1.1e-14) {
    		tmp = a * pow(k, m);
    	} else if (m <= 2.6e-18) {
    		tmp = a / (1.0 + (k / (1.0 / (k + 10.0))));
    	} else {
    		tmp = a / pow(k, (0.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 (m <= (-1.1d-14)) then
            tmp = a * (k ** m)
        else if (m <= 2.6d-18) then
            tmp = a / (1.0d0 + (k / (1.0d0 / (k + 10.0d0))))
        else
            tmp = a / (k ** (0.0d0 - m))
        end if
        code = tmp
    end function
    
    public static double code(double a, double k, double m) {
    	double tmp;
    	if (m <= -1.1e-14) {
    		tmp = a * Math.pow(k, m);
    	} else if (m <= 2.6e-18) {
    		tmp = a / (1.0 + (k / (1.0 / (k + 10.0))));
    	} else {
    		tmp = a / Math.pow(k, (0.0 - m));
    	}
    	return tmp;
    }
    
    def code(a, k, m):
    	tmp = 0
    	if m <= -1.1e-14:
    		tmp = a * math.pow(k, m)
    	elif m <= 2.6e-18:
    		tmp = a / (1.0 + (k / (1.0 / (k + 10.0))))
    	else:
    		tmp = a / math.pow(k, (0.0 - m))
    	return tmp
    
    function code(a, k, m)
    	tmp = 0.0
    	if (m <= -1.1e-14)
    		tmp = Float64(a * (k ^ m));
    	elseif (m <= 2.6e-18)
    		tmp = Float64(a / Float64(1.0 + Float64(k / Float64(1.0 / Float64(k + 10.0)))));
    	else
    		tmp = Float64(a / (k ^ Float64(0.0 - m)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, k, m)
    	tmp = 0.0;
    	if (m <= -1.1e-14)
    		tmp = a * (k ^ m);
    	elseif (m <= 2.6e-18)
    		tmp = a / (1.0 + (k / (1.0 / (k + 10.0))));
    	else
    		tmp = a / (k ^ (0.0 - m));
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, k_, m_] := If[LessEqual[m, -1.1e-14], N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 2.6e-18], N[(a / N[(1.0 + N[(k / N[(1.0 / N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a / N[Power[k, N[(0.0 - m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;m \leq -1.1 \cdot 10^{-14}:\\
    \;\;\;\;a \cdot {k}^{m}\\
    
    \mathbf{elif}\;m \leq 2.6 \cdot 10^{-18}:\\
    \;\;\;\;\frac{a}{1 + \frac{k}{\frac{1}{k + 10}}}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{a}{{k}^{\left(0 - m\right)}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if m < -1.1e-14

      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 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 -1.1e-14 < m < 2.6e-18

      1. Initial program 94.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-+.f6494.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. Simplified94.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-+.f6494.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. Simplified94.7%

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

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

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

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

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

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

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

      if 2.6e-18 < m

      1. Initial program 77.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-+.f6477.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. Simplified77.5%

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

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

        \[\leadsto \color{blue}{a \cdot {k}^{m}} \]
      8. Taylor expanded in k around inf

        \[\leadsto \color{blue}{a \cdot e^{-1 \cdot \left(m \cdot \log \left(\frac{1}{k}\right)\right)}} \]
      9. Step-by-step derivation
        1. mul-1-negN/A

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(1, k\right), m\right)\right) \]
      10. Simplified99.5%

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

        \[\leadsto \color{blue}{\frac{a}{{\left(\frac{1}{k}\right)}^{m}}} \]
      12. Step-by-step derivation
        1. exp-to-powN/A

          \[\leadsto \frac{a}{e^{\log \left(\frac{1}{k}\right) \cdot m}} \]
        2. log-recN/A

          \[\leadsto \frac{a}{e^{\left(\mathsf{neg}\left(\log k\right)\right) \cdot m}} \]
        3. distribute-lft-neg-inN/A

          \[\leadsto \frac{a}{e^{\mathsf{neg}\left(\log k \cdot m\right)}} \]
        4. *-commutativeN/A

          \[\leadsto \frac{a}{e^{\mathsf{neg}\left(m \cdot \log k\right)}} \]
        5. mul-1-negN/A

          \[\leadsto \frac{a}{e^{-1 \cdot \left(m \cdot \log k\right)}} \]
        6. /-lowering-/.f64N/A

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(k, \color{blue}{\left(-1 \cdot m\right)}\right)\right) \]
        11. mul-1-negN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(k, \left(\mathsf{neg}\left(m\right)\right)\right)\right) \]
        12. neg-lowering-neg.f6499.5%

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(k, \mathsf{neg.f64}\left(m\right)\right)\right) \]
      13. Simplified99.5%

        \[\leadsto \color{blue}{\frac{a}{{k}^{\left(-m\right)}}} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification98.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;m \leq -1.1 \cdot 10^{-14}:\\ \;\;\;\;a \cdot {k}^{m}\\ \mathbf{elif}\;m \leq 2.6 \cdot 10^{-18}:\\ \;\;\;\;\frac{a}{1 + \frac{k}{\frac{1}{k + 10}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{{k}^{\left(0 - m\right)}}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 5: 97.1% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := a \cdot {k}^{m}\\ \mathbf{if}\;m \leq -1.1 \cdot 10^{-14}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;m \leq 2.6 \cdot 10^{-18}:\\ \;\;\;\;\frac{a}{1 + \frac{k}{\frac{1}{k + 10}}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (a k m)
     :precision binary64
     (let* ((t_0 (* a (pow k m))))
       (if (<= m -1.1e-14)
         t_0
         (if (<= m 2.6e-18) (/ a (+ 1.0 (/ k (/ 1.0 (+ k 10.0))))) t_0))))
    double code(double a, double k, double m) {
    	double t_0 = a * pow(k, m);
    	double tmp;
    	if (m <= -1.1e-14) {
    		tmp = t_0;
    	} else if (m <= 2.6e-18) {
    		tmp = a / (1.0 + (k / (1.0 / (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 <= (-1.1d-14)) then
            tmp = t_0
        else if (m <= 2.6d-18) then
            tmp = a / (1.0d0 + (k / (1.0d0 / (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 <= -1.1e-14) {
    		tmp = t_0;
    	} else if (m <= 2.6e-18) {
    		tmp = a / (1.0 + (k / (1.0 / (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 <= -1.1e-14:
    		tmp = t_0
    	elif m <= 2.6e-18:
    		tmp = a / (1.0 + (k / (1.0 / (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 <= -1.1e-14)
    		tmp = t_0;
    	elseif (m <= 2.6e-18)
    		tmp = Float64(a / Float64(1.0 + Float64(k / Float64(1.0 / 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 <= -1.1e-14)
    		tmp = t_0;
    	elseif (m <= 2.6e-18)
    		tmp = a / (1.0 + (k / (1.0 / (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, -1.1e-14], t$95$0, If[LessEqual[m, 2.6e-18], N[(a / N[(1.0 + N[(k / N[(1.0 / N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := a \cdot {k}^{m}\\
    \mathbf{if}\;m \leq -1.1 \cdot 10^{-14}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;m \leq 2.6 \cdot 10^{-18}:\\
    \;\;\;\;\frac{a}{1 + \frac{k}{\frac{1}{k + 10}}}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if m < -1.1e-14 or 2.6e-18 < m

      1. Initial program 87.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-+.f6487.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. Simplified87.9%

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

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

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

      if -1.1e-14 < m < 2.6e-18

      1. Initial program 94.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-+.f6494.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. Simplified94.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-+.f6494.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. Simplified94.7%

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

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

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

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

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

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

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

    Alternative 6: 74.0% accurate, 5.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -4.2 \cdot 10^{+30}:\\ \;\;\;\;\frac{\frac{1 + \frac{-10 + \frac{99}{k}}{k}}{k \cdot k}}{\frac{1}{a}}\\ \mathbf{elif}\;m \leq 1350000000:\\ \;\;\;\;\frac{a}{1 + \frac{k}{\frac{1}{k + 10}}}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(k \cdot \left(k \cdot 99\right)\right)\\ \end{array} \end{array} \]
    (FPCore (a k m)
     :precision binary64
     (if (<= m -4.2e+30)
       (/ (/ (+ 1.0 (/ (+ -10.0 (/ 99.0 k)) k)) (* k k)) (/ 1.0 a))
       (if (<= m 1350000000.0)
         (/ a (+ 1.0 (/ k (/ 1.0 (+ k 10.0)))))
         (* a (* k (* k 99.0))))))
    double code(double a, double k, double m) {
    	double tmp;
    	if (m <= -4.2e+30) {
    		tmp = ((1.0 + ((-10.0 + (99.0 / k)) / k)) / (k * k)) / (1.0 / a);
    	} else if (m <= 1350000000.0) {
    		tmp = a / (1.0 + (k / (1.0 / (k + 10.0))));
    	} else {
    		tmp = a * (k * (k * 99.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 <= (-4.2d+30)) then
            tmp = ((1.0d0 + (((-10.0d0) + (99.0d0 / k)) / k)) / (k * k)) / (1.0d0 / a)
        else if (m <= 1350000000.0d0) then
            tmp = a / (1.0d0 + (k / (1.0d0 / (k + 10.0d0))))
        else
            tmp = a * (k * (k * 99.0d0))
        end if
        code = tmp
    end function
    
    public static double code(double a, double k, double m) {
    	double tmp;
    	if (m <= -4.2e+30) {
    		tmp = ((1.0 + ((-10.0 + (99.0 / k)) / k)) / (k * k)) / (1.0 / a);
    	} else if (m <= 1350000000.0) {
    		tmp = a / (1.0 + (k / (1.0 / (k + 10.0))));
    	} else {
    		tmp = a * (k * (k * 99.0));
    	}
    	return tmp;
    }
    
    def code(a, k, m):
    	tmp = 0
    	if m <= -4.2e+30:
    		tmp = ((1.0 + ((-10.0 + (99.0 / k)) / k)) / (k * k)) / (1.0 / a)
    	elif m <= 1350000000.0:
    		tmp = a / (1.0 + (k / (1.0 / (k + 10.0))))
    	else:
    		tmp = a * (k * (k * 99.0))
    	return tmp
    
    function code(a, k, m)
    	tmp = 0.0
    	if (m <= -4.2e+30)
    		tmp = Float64(Float64(Float64(1.0 + Float64(Float64(-10.0 + Float64(99.0 / k)) / k)) / Float64(k * k)) / Float64(1.0 / a));
    	elseif (m <= 1350000000.0)
    		tmp = Float64(a / Float64(1.0 + Float64(k / Float64(1.0 / Float64(k + 10.0)))));
    	else
    		tmp = Float64(a * Float64(k * Float64(k * 99.0)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, k, m)
    	tmp = 0.0;
    	if (m <= -4.2e+30)
    		tmp = ((1.0 + ((-10.0 + (99.0 / k)) / k)) / (k * k)) / (1.0 / a);
    	elseif (m <= 1350000000.0)
    		tmp = a / (1.0 + (k / (1.0 / (k + 10.0))));
    	else
    		tmp = a * (k * (k * 99.0));
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, k_, m_] := If[LessEqual[m, -4.2e+30], N[(N[(N[(1.0 + N[(N[(-10.0 + N[(99.0 / k), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(1.0 / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1350000000.0], N[(a / N[(1.0 + N[(k / N[(1.0 / N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(k * N[(k * 99.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;m \leq -4.2 \cdot 10^{+30}:\\
    \;\;\;\;\frac{\frac{1 + \frac{-10 + \frac{99}{k}}{k}}{k \cdot k}}{\frac{1}{a}}\\
    
    \mathbf{elif}\;m \leq 1350000000:\\
    \;\;\;\;\frac{a}{1 + \frac{k}{\frac{1}{k + 10}}}\\
    
    \mathbf{else}:\\
    \;\;\;\;a \cdot \left(k \cdot \left(k \cdot 99\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if m < -4.2e30

      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. Step-by-step derivation
        1. clear-numN/A

          \[\leadsto \frac{1}{\color{blue}{\frac{1 + k \cdot \left(k + 10\right)}{a \cdot {k}^{m}}}} \]
        2. div-invN/A

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(-1, \left(\mathsf{neg}\left(\left(1 + k \cdot \left(k + 10\right)\right)\right)\right)\right), \left(\frac{\color{blue}{1}}{a \cdot {k}^{m}}\right)\right) \]
        8. distribute-neg-inN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(-1, \left(\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(k \cdot \left(k + 10\right)\right)\right)\right)\right), \left(\frac{1}{a \cdot {k}^{m}}\right)\right) \]
        9. metadata-evalN/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(-1, \mathsf{\_.f64}\left(-1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{pow.f64}\left(k, m\right)\right), a\right)\right) \]
      6. Applied egg-rr100.0%

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

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

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

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

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

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

        if -4.2e30 < m < 1.35e9

        1. Initial program 95.3%

          \[\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-+.f6495.3%

            \[\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. Simplified95.3%

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

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

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

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

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

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

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

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

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

        if 1.35e9 < m

        1. Initial program 76.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-+.f6476.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. Simplified76.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.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. Simplified3.0%

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

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

            \[\leadsto \frac{1}{1 + k \cdot \left(k + 10\right)} \cdot \color{blue}{a} \]
          3. frac-2negN/A

            \[\leadsto \frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\left(1 + k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          4. metadata-evalN/A

            \[\leadsto \frac{-1}{\mathsf{neg}\left(\left(1 + k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          5. distribute-neg-inN/A

            \[\leadsto \frac{-1}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          6. metadata-evalN/A

            \[\leadsto \frac{-1}{-1 + \left(\mathsf{neg}\left(k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          7. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(-10, \left(k \cdot 99\right)\right)\right)\right), a\right) \]
          8. *-lowering-*.f6429.8%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(-10, \mathsf{*.f64}\left(k, 99\right)\right)\right)\right), a\right) \]
        12. Simplified29.8%

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

          \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(99 \cdot {k}^{2}\right)}, a\right) \]
        14. Step-by-step derivation
          1. *-commutativeN/A

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

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

            \[\leadsto \mathsf{*.f64}\left(\left(k \cdot \left(k \cdot 99\right)\right), a\right) \]
          4. *-commutativeN/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \left(99 \cdot k\right)\right), a\right) \]
          6. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \left(k \cdot 99\right)\right), a\right) \]
          7. *-lowering-*.f6463.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, 99\right)\right), a\right) \]
        15. Simplified63.7%

          \[\leadsto \color{blue}{\left(k \cdot \left(k \cdot 99\right)\right)} \cdot a \]
      9. Recombined 3 regimes into one program.
      10. Final simplification74.8%

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

      Alternative 7: 73.8% accurate, 5.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -1.3 \cdot 10^{+19}:\\ \;\;\;\;\frac{a - \frac{a}{k} \cdot \left(10 + \frac{-99}{k}\right)}{k \cdot k}\\ \mathbf{elif}\;m \leq 1350000000:\\ \;\;\;\;\frac{a}{1 + \frac{k}{\frac{1}{k + 10}}}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(k \cdot \left(k \cdot 99\right)\right)\\ \end{array} \end{array} \]
      (FPCore (a k m)
       :precision binary64
       (if (<= m -1.3e+19)
         (/ (- a (* (/ a k) (+ 10.0 (/ -99.0 k)))) (* k k))
         (if (<= m 1350000000.0)
           (/ a (+ 1.0 (/ k (/ 1.0 (+ k 10.0)))))
           (* a (* k (* k 99.0))))))
      double code(double a, double k, double m) {
      	double tmp;
      	if (m <= -1.3e+19) {
      		tmp = (a - ((a / k) * (10.0 + (-99.0 / k)))) / (k * k);
      	} else if (m <= 1350000000.0) {
      		tmp = a / (1.0 + (k / (1.0 / (k + 10.0))));
      	} else {
      		tmp = a * (k * (k * 99.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 <= (-1.3d+19)) then
              tmp = (a - ((a / k) * (10.0d0 + ((-99.0d0) / k)))) / (k * k)
          else if (m <= 1350000000.0d0) then
              tmp = a / (1.0d0 + (k / (1.0d0 / (k + 10.0d0))))
          else
              tmp = a * (k * (k * 99.0d0))
          end if
          code = tmp
      end function
      
      public static double code(double a, double k, double m) {
      	double tmp;
      	if (m <= -1.3e+19) {
      		tmp = (a - ((a / k) * (10.0 + (-99.0 / k)))) / (k * k);
      	} else if (m <= 1350000000.0) {
      		tmp = a / (1.0 + (k / (1.0 / (k + 10.0))));
      	} else {
      		tmp = a * (k * (k * 99.0));
      	}
      	return tmp;
      }
      
      def code(a, k, m):
      	tmp = 0
      	if m <= -1.3e+19:
      		tmp = (a - ((a / k) * (10.0 + (-99.0 / k)))) / (k * k)
      	elif m <= 1350000000.0:
      		tmp = a / (1.0 + (k / (1.0 / (k + 10.0))))
      	else:
      		tmp = a * (k * (k * 99.0))
      	return tmp
      
      function code(a, k, m)
      	tmp = 0.0
      	if (m <= -1.3e+19)
      		tmp = Float64(Float64(a - Float64(Float64(a / k) * Float64(10.0 + Float64(-99.0 / k)))) / Float64(k * k));
      	elseif (m <= 1350000000.0)
      		tmp = Float64(a / Float64(1.0 + Float64(k / Float64(1.0 / Float64(k + 10.0)))));
      	else
      		tmp = Float64(a * Float64(k * Float64(k * 99.0)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(a, k, m)
      	tmp = 0.0;
      	if (m <= -1.3e+19)
      		tmp = (a - ((a / k) * (10.0 + (-99.0 / k)))) / (k * k);
      	elseif (m <= 1350000000.0)
      		tmp = a / (1.0 + (k / (1.0 / (k + 10.0))));
      	else
      		tmp = a * (k * (k * 99.0));
      	end
      	tmp_2 = tmp;
      end
      
      code[a_, k_, m_] := If[LessEqual[m, -1.3e+19], N[(N[(a - N[(N[(a / k), $MachinePrecision] * N[(10.0 + N[(-99.0 / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1350000000.0], N[(a / N[(1.0 + N[(k / N[(1.0 / N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(k * N[(k * 99.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;m \leq -1.3 \cdot 10^{+19}:\\
      \;\;\;\;\frac{a - \frac{a}{k} \cdot \left(10 + \frac{-99}{k}\right)}{k \cdot k}\\
      
      \mathbf{elif}\;m \leq 1350000000:\\
      \;\;\;\;\frac{a}{1 + \frac{k}{\frac{1}{k + 10}}}\\
      
      \mathbf{else}:\\
      \;\;\;\;a \cdot \left(k \cdot \left(k \cdot 99\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if m < -1.3e19

        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-+.f6435.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. Simplified35.2%

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

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

            \[\leadsto \frac{1}{1 + k \cdot \left(k + 10\right)} \cdot \color{blue}{a} \]
          3. frac-2negN/A

            \[\leadsto \frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\left(1 + k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          4. metadata-evalN/A

            \[\leadsto \frac{-1}{\mathsf{neg}\left(\left(1 + k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          5. distribute-neg-inN/A

            \[\leadsto \frac{-1}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          6. metadata-evalN/A

            \[\leadsto \frac{-1}{-1 + \left(\mathsf{neg}\left(k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          7. sub-negN/A

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right), a\right) \]
        9. Applied egg-rr35.2%

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

          \[\leadsto \color{blue}{\frac{\left(a + -1 \cdot \frac{a + -100 \cdot a}{{k}^{2}}\right) - 10 \cdot \frac{a}{k}}{{k}^{2}}} \]
        11. Simplified61.1%

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

        if -1.3e19 < m < 1.35e9

        1. Initial program 95.1%

          \[\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-+.f6495.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. Simplified95.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-+.f6492.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. Simplified92.2%

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

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

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

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

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

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

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

        if 1.35e9 < m

        1. Initial program 76.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-+.f6476.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. Simplified76.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.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. Simplified3.0%

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

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

            \[\leadsto \frac{1}{1 + k \cdot \left(k + 10\right)} \cdot \color{blue}{a} \]
          3. frac-2negN/A

            \[\leadsto \frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\left(1 + k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          4. metadata-evalN/A

            \[\leadsto \frac{-1}{\mathsf{neg}\left(\left(1 + k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          5. distribute-neg-inN/A

            \[\leadsto \frac{-1}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          6. metadata-evalN/A

            \[\leadsto \frac{-1}{-1 + \left(\mathsf{neg}\left(k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          7. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(-10, \left(k \cdot 99\right)\right)\right)\right), a\right) \]
          8. *-lowering-*.f6429.8%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(-10, \mathsf{*.f64}\left(k, 99\right)\right)\right)\right), a\right) \]
        12. Simplified29.8%

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

          \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(99 \cdot {k}^{2}\right)}, a\right) \]
        14. Step-by-step derivation
          1. *-commutativeN/A

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

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

            \[\leadsto \mathsf{*.f64}\left(\left(k \cdot \left(k \cdot 99\right)\right), a\right) \]
          4. *-commutativeN/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \left(99 \cdot k\right)\right), a\right) \]
          6. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \left(k \cdot 99\right)\right), a\right) \]
          7. *-lowering-*.f6463.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, 99\right)\right), a\right) \]
        15. Simplified63.7%

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

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

      Alternative 8: 71.8% accurate, 5.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -4.2 \cdot 10^{+30}:\\ \;\;\;\;\frac{a}{k \cdot k}\\ \mathbf{elif}\;m \leq 1350000000:\\ \;\;\;\;\frac{a}{1 + \frac{k}{\frac{1}{k + 10}}}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(k \cdot \left(k \cdot 99\right)\right)\\ \end{array} \end{array} \]
      (FPCore (a k m)
       :precision binary64
       (if (<= m -4.2e+30)
         (/ a (* k k))
         (if (<= m 1350000000.0)
           (/ a (+ 1.0 (/ k (/ 1.0 (+ k 10.0)))))
           (* a (* k (* k 99.0))))))
      double code(double a, double k, double m) {
      	double tmp;
      	if (m <= -4.2e+30) {
      		tmp = a / (k * k);
      	} else if (m <= 1350000000.0) {
      		tmp = a / (1.0 + (k / (1.0 / (k + 10.0))));
      	} else {
      		tmp = a * (k * (k * 99.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 <= (-4.2d+30)) then
              tmp = a / (k * k)
          else if (m <= 1350000000.0d0) then
              tmp = a / (1.0d0 + (k / (1.0d0 / (k + 10.0d0))))
          else
              tmp = a * (k * (k * 99.0d0))
          end if
          code = tmp
      end function
      
      public static double code(double a, double k, double m) {
      	double tmp;
      	if (m <= -4.2e+30) {
      		tmp = a / (k * k);
      	} else if (m <= 1350000000.0) {
      		tmp = a / (1.0 + (k / (1.0 / (k + 10.0))));
      	} else {
      		tmp = a * (k * (k * 99.0));
      	}
      	return tmp;
      }
      
      def code(a, k, m):
      	tmp = 0
      	if m <= -4.2e+30:
      		tmp = a / (k * k)
      	elif m <= 1350000000.0:
      		tmp = a / (1.0 + (k / (1.0 / (k + 10.0))))
      	else:
      		tmp = a * (k * (k * 99.0))
      	return tmp
      
      function code(a, k, m)
      	tmp = 0.0
      	if (m <= -4.2e+30)
      		tmp = Float64(a / Float64(k * k));
      	elseif (m <= 1350000000.0)
      		tmp = Float64(a / Float64(1.0 + Float64(k / Float64(1.0 / Float64(k + 10.0)))));
      	else
      		tmp = Float64(a * Float64(k * Float64(k * 99.0)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(a, k, m)
      	tmp = 0.0;
      	if (m <= -4.2e+30)
      		tmp = a / (k * k);
      	elseif (m <= 1350000000.0)
      		tmp = a / (1.0 + (k / (1.0 / (k + 10.0))));
      	else
      		tmp = a * (k * (k * 99.0));
      	end
      	tmp_2 = tmp;
      end
      
      code[a_, k_, m_] := If[LessEqual[m, -4.2e+30], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1350000000.0], N[(a / N[(1.0 + N[(k / N[(1.0 / N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(k * N[(k * 99.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;m \leq -4.2 \cdot 10^{+30}:\\
      \;\;\;\;\frac{a}{k \cdot k}\\
      
      \mathbf{elif}\;m \leq 1350000000:\\
      \;\;\;\;\frac{a}{1 + \frac{k}{\frac{1}{k + 10}}}\\
      
      \mathbf{else}:\\
      \;\;\;\;a \cdot \left(k \cdot \left(k \cdot 99\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if m < -4.2e30

        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-+.f6435.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. Simplified35.2%

          \[\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-*.f6457.9%

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

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

        if -4.2e30 < m < 1.35e9

        1. Initial program 95.3%

          \[\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-+.f6495.3%

            \[\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. Simplified95.3%

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

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

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

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

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

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

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

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

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

        if 1.35e9 < m

        1. Initial program 76.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-+.f6476.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. Simplified76.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.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. Simplified3.0%

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

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

            \[\leadsto \frac{1}{1 + k \cdot \left(k + 10\right)} \cdot \color{blue}{a} \]
          3. frac-2negN/A

            \[\leadsto \frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\left(1 + k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          4. metadata-evalN/A

            \[\leadsto \frac{-1}{\mathsf{neg}\left(\left(1 + k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          5. distribute-neg-inN/A

            \[\leadsto \frac{-1}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          6. metadata-evalN/A

            \[\leadsto \frac{-1}{-1 + \left(\mathsf{neg}\left(k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          7. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(-10, \left(k \cdot 99\right)\right)\right)\right), a\right) \]
          8. *-lowering-*.f6429.8%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(-10, \mathsf{*.f64}\left(k, 99\right)\right)\right)\right), a\right) \]
        12. Simplified29.8%

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

          \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(99 \cdot {k}^{2}\right)}, a\right) \]
        14. Step-by-step derivation
          1. *-commutativeN/A

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

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

            \[\leadsto \mathsf{*.f64}\left(\left(k \cdot \left(k \cdot 99\right)\right), a\right) \]
          4. *-commutativeN/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \left(99 \cdot k\right)\right), a\right) \]
          6. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \left(k \cdot 99\right)\right), a\right) \]
          7. *-lowering-*.f6463.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, 99\right)\right), a\right) \]
        15. Simplified63.7%

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

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

      Alternative 9: 71.9% accurate, 6.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -4.2 \cdot 10^{+30}:\\ \;\;\;\;\frac{a}{k \cdot k}\\ \mathbf{elif}\;m \leq 1350000000:\\ \;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(k \cdot \left(k \cdot 99\right)\right)\\ \end{array} \end{array} \]
      (FPCore (a k m)
       :precision binary64
       (if (<= m -4.2e+30)
         (/ a (* k k))
         (if (<= m 1350000000.0)
           (/ a (+ 1.0 (* k (+ k 10.0))))
           (* a (* k (* k 99.0))))))
      double code(double a, double k, double m) {
      	double tmp;
      	if (m <= -4.2e+30) {
      		tmp = a / (k * k);
      	} else if (m <= 1350000000.0) {
      		tmp = a / (1.0 + (k * (k + 10.0)));
      	} else {
      		tmp = a * (k * (k * 99.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 <= (-4.2d+30)) then
              tmp = a / (k * k)
          else if (m <= 1350000000.0d0) then
              tmp = a / (1.0d0 + (k * (k + 10.0d0)))
          else
              tmp = a * (k * (k * 99.0d0))
          end if
          code = tmp
      end function
      
      public static double code(double a, double k, double m) {
      	double tmp;
      	if (m <= -4.2e+30) {
      		tmp = a / (k * k);
      	} else if (m <= 1350000000.0) {
      		tmp = a / (1.0 + (k * (k + 10.0)));
      	} else {
      		tmp = a * (k * (k * 99.0));
      	}
      	return tmp;
      }
      
      def code(a, k, m):
      	tmp = 0
      	if m <= -4.2e+30:
      		tmp = a / (k * k)
      	elif m <= 1350000000.0:
      		tmp = a / (1.0 + (k * (k + 10.0)))
      	else:
      		tmp = a * (k * (k * 99.0))
      	return tmp
      
      function code(a, k, m)
      	tmp = 0.0
      	if (m <= -4.2e+30)
      		tmp = Float64(a / Float64(k * k));
      	elseif (m <= 1350000000.0)
      		tmp = Float64(a / Float64(1.0 + Float64(k * Float64(k + 10.0))));
      	else
      		tmp = Float64(a * Float64(k * Float64(k * 99.0)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(a, k, m)
      	tmp = 0.0;
      	if (m <= -4.2e+30)
      		tmp = a / (k * k);
      	elseif (m <= 1350000000.0)
      		tmp = a / (1.0 + (k * (k + 10.0)));
      	else
      		tmp = a * (k * (k * 99.0));
      	end
      	tmp_2 = tmp;
      end
      
      code[a_, k_, m_] := If[LessEqual[m, -4.2e+30], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1350000000.0], N[(a / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(k * N[(k * 99.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;m \leq -4.2 \cdot 10^{+30}:\\
      \;\;\;\;\frac{a}{k \cdot k}\\
      
      \mathbf{elif}\;m \leq 1350000000:\\
      \;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;a \cdot \left(k \cdot \left(k \cdot 99\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if m < -4.2e30

        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-+.f6435.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. Simplified35.2%

          \[\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-*.f6457.9%

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

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

        if -4.2e30 < m < 1.35e9

        1. Initial program 95.3%

          \[\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-+.f6495.3%

            \[\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. Simplified95.3%

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

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

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

        if 1.35e9 < m

        1. Initial program 76.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-+.f6476.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. Simplified76.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.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. Simplified3.0%

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

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

            \[\leadsto \frac{1}{1 + k \cdot \left(k + 10\right)} \cdot \color{blue}{a} \]
          3. frac-2negN/A

            \[\leadsto \frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\left(1 + k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          4. metadata-evalN/A

            \[\leadsto \frac{-1}{\mathsf{neg}\left(\left(1 + k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          5. distribute-neg-inN/A

            \[\leadsto \frac{-1}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          6. metadata-evalN/A

            \[\leadsto \frac{-1}{-1 + \left(\mathsf{neg}\left(k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          7. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(-10, \left(k \cdot 99\right)\right)\right)\right), a\right) \]
          8. *-lowering-*.f6429.8%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(-10, \mathsf{*.f64}\left(k, 99\right)\right)\right)\right), a\right) \]
        12. Simplified29.8%

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

          \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(99 \cdot {k}^{2}\right)}, a\right) \]
        14. Step-by-step derivation
          1. *-commutativeN/A

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

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

            \[\leadsto \mathsf{*.f64}\left(\left(k \cdot \left(k \cdot 99\right)\right), a\right) \]
          4. *-commutativeN/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \left(99 \cdot k\right)\right), a\right) \]
          6. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \left(k \cdot 99\right)\right), a\right) \]
          7. *-lowering-*.f6463.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, 99\right)\right), a\right) \]
        15. Simplified63.7%

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

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

      Alternative 10: 71.2% accurate, 6.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -1.05 \cdot 10^{+25}:\\ \;\;\;\;\frac{a}{k \cdot k}\\ \mathbf{elif}\;m \leq 1350000000:\\ \;\;\;\;\frac{a}{1 + k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(k \cdot \left(k \cdot 99\right)\right)\\ \end{array} \end{array} \]
      (FPCore (a k m)
       :precision binary64
       (if (<= m -1.05e+25)
         (/ a (* k k))
         (if (<= m 1350000000.0) (/ a (+ 1.0 (* k k))) (* a (* k (* k 99.0))))))
      double code(double a, double k, double m) {
      	double tmp;
      	if (m <= -1.05e+25) {
      		tmp = a / (k * k);
      	} else if (m <= 1350000000.0) {
      		tmp = a / (1.0 + (k * k));
      	} else {
      		tmp = a * (k * (k * 99.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 <= (-1.05d+25)) then
              tmp = a / (k * k)
          else if (m <= 1350000000.0d0) then
              tmp = a / (1.0d0 + (k * k))
          else
              tmp = a * (k * (k * 99.0d0))
          end if
          code = tmp
      end function
      
      public static double code(double a, double k, double m) {
      	double tmp;
      	if (m <= -1.05e+25) {
      		tmp = a / (k * k);
      	} else if (m <= 1350000000.0) {
      		tmp = a / (1.0 + (k * k));
      	} else {
      		tmp = a * (k * (k * 99.0));
      	}
      	return tmp;
      }
      
      def code(a, k, m):
      	tmp = 0
      	if m <= -1.05e+25:
      		tmp = a / (k * k)
      	elif m <= 1350000000.0:
      		tmp = a / (1.0 + (k * k))
      	else:
      		tmp = a * (k * (k * 99.0))
      	return tmp
      
      function code(a, k, m)
      	tmp = 0.0
      	if (m <= -1.05e+25)
      		tmp = Float64(a / Float64(k * k));
      	elseif (m <= 1350000000.0)
      		tmp = Float64(a / Float64(1.0 + Float64(k * k)));
      	else
      		tmp = Float64(a * Float64(k * Float64(k * 99.0)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(a, k, m)
      	tmp = 0.0;
      	if (m <= -1.05e+25)
      		tmp = a / (k * k);
      	elseif (m <= 1350000000.0)
      		tmp = a / (1.0 + (k * k));
      	else
      		tmp = a * (k * (k * 99.0));
      	end
      	tmp_2 = tmp;
      end
      
      code[a_, k_, m_] := If[LessEqual[m, -1.05e+25], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1350000000.0], N[(a / N[(1.0 + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(k * N[(k * 99.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;m \leq -1.05 \cdot 10^{+25}:\\
      \;\;\;\;\frac{a}{k \cdot k}\\
      
      \mathbf{elif}\;m \leq 1350000000:\\
      \;\;\;\;\frac{a}{1 + k \cdot k}\\
      
      \mathbf{else}:\\
      \;\;\;\;a \cdot \left(k \cdot \left(k \cdot 99\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if m < -1.05e25

        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-+.f6435.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. Simplified35.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-*.f6457.7%

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

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

        if -1.05e25 < m < 1.35e9

        1. Initial program 95.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-+.f6495.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. Simplified95.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-+.f6491.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. Simplified91.3%

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

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

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

        if 1.35e9 < m

        1. Initial program 76.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-+.f6476.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. Simplified76.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.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. Simplified3.0%

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

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

            \[\leadsto \frac{1}{1 + k \cdot \left(k + 10\right)} \cdot \color{blue}{a} \]
          3. frac-2negN/A

            \[\leadsto \frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\left(1 + k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          4. metadata-evalN/A

            \[\leadsto \frac{-1}{\mathsf{neg}\left(\left(1 + k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          5. distribute-neg-inN/A

            \[\leadsto \frac{-1}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          6. metadata-evalN/A

            \[\leadsto \frac{-1}{-1 + \left(\mathsf{neg}\left(k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
          7. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(-10, \left(k \cdot 99\right)\right)\right)\right), a\right) \]
          8. *-lowering-*.f6429.8%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(-10, \mathsf{*.f64}\left(k, 99\right)\right)\right)\right), a\right) \]
        12. Simplified29.8%

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

          \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(99 \cdot {k}^{2}\right)}, a\right) \]
        14. Step-by-step derivation
          1. *-commutativeN/A

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

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

            \[\leadsto \mathsf{*.f64}\left(\left(k \cdot \left(k \cdot 99\right)\right), a\right) \]
          4. *-commutativeN/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \left(99 \cdot k\right)\right), a\right) \]
          6. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \left(k \cdot 99\right)\right), a\right) \]
          7. *-lowering-*.f6463.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, 99\right)\right), a\right) \]
        15. Simplified63.7%

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

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

      Alternative 11: 62.5% accurate, 6.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -100000000:\\ \;\;\;\;\frac{a}{k \cdot k}\\ \mathbf{elif}\;m \leq 1350000000:\\ \;\;\;\;\frac{a}{1 + k \cdot 10}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(k \cdot \left(k \cdot 99\right)\right)\\ \end{array} \end{array} \]
      (FPCore (a k m)
       :precision binary64
       (if (<= m -100000000.0)
         (/ a (* k k))
         (if (<= m 1350000000.0) (/ a (+ 1.0 (* k 10.0))) (* a (* k (* k 99.0))))))
      double code(double a, double k, double m) {
      	double tmp;
      	if (m <= -100000000.0) {
      		tmp = a / (k * k);
      	} else if (m <= 1350000000.0) {
      		tmp = a / (1.0 + (k * 10.0));
      	} else {
      		tmp = a * (k * (k * 99.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 <= (-100000000.0d0)) then
              tmp = a / (k * k)
          else if (m <= 1350000000.0d0) then
              tmp = a / (1.0d0 + (k * 10.0d0))
          else
              tmp = a * (k * (k * 99.0d0))
          end if
          code = tmp
      end function
      
      public static double code(double a, double k, double m) {
      	double tmp;
      	if (m <= -100000000.0) {
      		tmp = a / (k * k);
      	} else if (m <= 1350000000.0) {
      		tmp = a / (1.0 + (k * 10.0));
      	} else {
      		tmp = a * (k * (k * 99.0));
      	}
      	return tmp;
      }
      
      def code(a, k, m):
      	tmp = 0
      	if m <= -100000000.0:
      		tmp = a / (k * k)
      	elif m <= 1350000000.0:
      		tmp = a / (1.0 + (k * 10.0))
      	else:
      		tmp = a * (k * (k * 99.0))
      	return tmp
      
      function code(a, k, m)
      	tmp = 0.0
      	if (m <= -100000000.0)
      		tmp = Float64(a / Float64(k * k));
      	elseif (m <= 1350000000.0)
      		tmp = Float64(a / Float64(1.0 + Float64(k * 10.0)));
      	else
      		tmp = Float64(a * Float64(k * Float64(k * 99.0)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(a, k, m)
      	tmp = 0.0;
      	if (m <= -100000000.0)
      		tmp = a / (k * k);
      	elseif (m <= 1350000000.0)
      		tmp = a / (1.0 + (k * 10.0));
      	else
      		tmp = a * (k * (k * 99.0));
      	end
      	tmp_2 = tmp;
      end
      
      code[a_, k_, m_] := If[LessEqual[m, -100000000.0], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1350000000.0], N[(a / N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(k * N[(k * 99.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;m \leq -100000000:\\
      \;\;\;\;\frac{a}{k \cdot k}\\
      
      \mathbf{elif}\;m \leq 1350000000:\\
      \;\;\;\;\frac{a}{1 + k \cdot 10}\\
      
      \mathbf{else}:\\
      \;\;\;\;a \cdot \left(k \cdot \left(k \cdot 99\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if m < -1e8

        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.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. Simplified36.1%

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

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

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

        if -1e8 < m < 1.35e9

        1. Initial program 95.1%

          \[\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-+.f6495.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. Simplified95.1%

          \[\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 \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \color{blue}{\left(1 + 10 \cdot k\right)}\right) \]
        6. Step-by-step derivation
          1. *-commutativeN/A

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \left(-1 \cdot k\right) \cdot -10\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(\left(-1 \cdot k\right) \cdot -10\right)}\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(\left(k \cdot -1\right) \cdot -10\right)\right)\right) \]
          7. associate-*l*N/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(-1 \cdot -10\right)}\right)\right)\right) \]
          8. metadata-evalN/A

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

            \[\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}{10}\right)\right)\right) \]
        7. Simplified65.6%

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

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

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

          if 1.35e9 < m

          1. Initial program 76.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-+.f6476.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. Simplified76.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.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. Simplified3.0%

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

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

              \[\leadsto \frac{1}{1 + k \cdot \left(k + 10\right)} \cdot \color{blue}{a} \]
            3. frac-2negN/A

              \[\leadsto \frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\left(1 + k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
            4. metadata-evalN/A

              \[\leadsto \frac{-1}{\mathsf{neg}\left(\left(1 + k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
            5. distribute-neg-inN/A

              \[\leadsto \frac{-1}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
            6. metadata-evalN/A

              \[\leadsto \frac{-1}{-1 + \left(\mathsf{neg}\left(k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
            7. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(-10, \left(k \cdot 99\right)\right)\right)\right), a\right) \]
            8. *-lowering-*.f6429.8%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(-10, \mathsf{*.f64}\left(k, 99\right)\right)\right)\right), a\right) \]
          12. Simplified29.8%

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

            \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(99 \cdot {k}^{2}\right)}, a\right) \]
          14. Step-by-step derivation
            1. *-commutativeN/A

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

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

              \[\leadsto \mathsf{*.f64}\left(\left(k \cdot \left(k \cdot 99\right)\right), a\right) \]
            4. *-commutativeN/A

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \left(99 \cdot k\right)\right), a\right) \]
            6. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \left(k \cdot 99\right)\right), a\right) \]
            7. *-lowering-*.f6463.7%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, 99\right)\right), a\right) \]
          15. Simplified63.7%

            \[\leadsto \color{blue}{\left(k \cdot \left(k \cdot 99\right)\right)} \cdot a \]
        10. Recombined 3 regimes into one program.
        11. Final simplification61.5%

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

        Alternative 12: 58.3% accurate, 6.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -9 \cdot 10^{-9}:\\ \;\;\;\;\frac{a}{k \cdot k}\\ \mathbf{elif}\;m \leq 1350000000:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(k \cdot \left(k \cdot 99\right)\right)\\ \end{array} \end{array} \]
        (FPCore (a k m)
         :precision binary64
         (if (<= m -9e-9)
           (/ a (* k k))
           (if (<= m 1350000000.0) a (* a (* k (* k 99.0))))))
        double code(double a, double k, double m) {
        	double tmp;
        	if (m <= -9e-9) {
        		tmp = a / (k * k);
        	} else if (m <= 1350000000.0) {
        		tmp = a;
        	} else {
        		tmp = a * (k * (k * 99.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 <= (-9d-9)) then
                tmp = a / (k * k)
            else if (m <= 1350000000.0d0) then
                tmp = a
            else
                tmp = a * (k * (k * 99.0d0))
            end if
            code = tmp
        end function
        
        public static double code(double a, double k, double m) {
        	double tmp;
        	if (m <= -9e-9) {
        		tmp = a / (k * k);
        	} else if (m <= 1350000000.0) {
        		tmp = a;
        	} else {
        		tmp = a * (k * (k * 99.0));
        	}
        	return tmp;
        }
        
        def code(a, k, m):
        	tmp = 0
        	if m <= -9e-9:
        		tmp = a / (k * k)
        	elif m <= 1350000000.0:
        		tmp = a
        	else:
        		tmp = a * (k * (k * 99.0))
        	return tmp
        
        function code(a, k, m)
        	tmp = 0.0
        	if (m <= -9e-9)
        		tmp = Float64(a / Float64(k * k));
        	elseif (m <= 1350000000.0)
        		tmp = a;
        	else
        		tmp = Float64(a * Float64(k * Float64(k * 99.0)));
        	end
        	return tmp
        end
        
        function tmp_2 = code(a, k, m)
        	tmp = 0.0;
        	if (m <= -9e-9)
        		tmp = a / (k * k);
        	elseif (m <= 1350000000.0)
        		tmp = a;
        	else
        		tmp = a * (k * (k * 99.0));
        	end
        	tmp_2 = tmp;
        end
        
        code[a_, k_, m_] := If[LessEqual[m, -9e-9], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1350000000.0], a, N[(a * N[(k * N[(k * 99.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;m \leq -9 \cdot 10^{-9}:\\
        \;\;\;\;\frac{a}{k \cdot k}\\
        
        \mathbf{elif}\;m \leq 1350000000:\\
        \;\;\;\;a\\
        
        \mathbf{else}:\\
        \;\;\;\;a \cdot \left(k \cdot \left(k \cdot 99\right)\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if m < -8.99999999999999953e-9

          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-+.f6437.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. Simplified37.0%

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

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

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

          if -8.99999999999999953e-9 < m < 1.35e9

          1. Initial program 95.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-+.f6495.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. Simplified95.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-+.f6492.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. Simplified92.0%

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

              \[\leadsto \color{blue}{a} \]

            if 1.35e9 < m

            1. Initial program 76.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-+.f6476.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. Simplified76.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.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. Simplified3.0%

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

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

                \[\leadsto \frac{1}{1 + k \cdot \left(k + 10\right)} \cdot \color{blue}{a} \]
              3. frac-2negN/A

                \[\leadsto \frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\left(1 + k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
              4. metadata-evalN/A

                \[\leadsto \frac{-1}{\mathsf{neg}\left(\left(1 + k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
              5. distribute-neg-inN/A

                \[\leadsto \frac{-1}{\left(\mathsf{neg}\left(1\right)\right) + \left(\mathsf{neg}\left(k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
              6. metadata-evalN/A

                \[\leadsto \frac{-1}{-1 + \left(\mathsf{neg}\left(k \cdot \left(k + 10\right)\right)\right)} \cdot a \]
              7. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(-10, \left(k \cdot 99\right)\right)\right)\right), a\right) \]
              8. *-lowering-*.f6429.8%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(-10, \mathsf{*.f64}\left(k, 99\right)\right)\right)\right), a\right) \]
            12. Simplified29.8%

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

              \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(99 \cdot {k}^{2}\right)}, a\right) \]
            14. Step-by-step derivation
              1. *-commutativeN/A

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

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

                \[\leadsto \mathsf{*.f64}\left(\left(k \cdot \left(k \cdot 99\right)\right), a\right) \]
              4. *-commutativeN/A

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \left(99 \cdot k\right)\right), a\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \left(k \cdot 99\right)\right), a\right) \]
              7. *-lowering-*.f6463.7%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, 99\right)\right), a\right) \]
            15. Simplified63.7%

              \[\leadsto \color{blue}{\left(k \cdot \left(k \cdot 99\right)\right)} \cdot a \]
          10. Recombined 3 regimes into one program.
          11. Final simplification58.4%

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

          Alternative 13: 46.3% accurate, 7.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{a}{k \cdot k}\\ \mathbf{if}\;k \leq 6.8 \cdot 10^{-277}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;k \leq 0.23:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
          (FPCore (a k m)
           :precision binary64
           (let* ((t_0 (/ a (* k k)))) (if (<= k 6.8e-277) t_0 (if (<= k 0.23) a t_0))))
          double code(double a, double k, double m) {
          	double t_0 = a / (k * k);
          	double tmp;
          	if (k <= 6.8e-277) {
          		tmp = t_0;
          	} else if (k <= 0.23) {
          		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 <= 6.8d-277) then
                  tmp = t_0
              else if (k <= 0.23d0) 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 <= 6.8e-277) {
          		tmp = t_0;
          	} else if (k <= 0.23) {
          		tmp = a;
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          def code(a, k, m):
          	t_0 = a / (k * k)
          	tmp = 0
          	if k <= 6.8e-277:
          		tmp = t_0
          	elif k <= 0.23:
          		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 <= 6.8e-277)
          		tmp = t_0;
          	elseif (k <= 0.23)
          		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 <= 6.8e-277)
          		tmp = t_0;
          	elseif (k <= 0.23)
          		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, 6.8e-277], t$95$0, If[LessEqual[k, 0.23], a, t$95$0]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := \frac{a}{k \cdot k}\\
          \mathbf{if}\;k \leq 6.8 \cdot 10^{-277}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;k \leq 0.23:\\
          \;\;\;\;a\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if k < 6.79999999999999964e-277 or 0.23000000000000001 < k

            1. Initial program 85.3%

              \[\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-+.f6485.3%

                \[\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. Simplified85.3%

              \[\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.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. Simplified40.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-*.f6442.0%

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

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

            if 6.79999999999999964e-277 < k < 0.23000000000000001

            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-+.f6459.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. Simplified59.1%

              \[\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. Simplified57.9%

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

            Alternative 14: 20.5% 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.3%

              \[\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.3%

                \[\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.3%

              \[\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-+.f6446.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. Simplified46.8%

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

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

              Reproduce

              ?
              herbie shell --seed 2024138 
              (FPCore (a k m)
                :name "Falkner and Boettcher, Appendix A"
                :precision binary64
                (/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))