Falkner and Boettcher, Appendix A

Percentage Accurate: 90.3% → 97.7%
Time: 14.9s
Alternatives: 16
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 90.3% 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.7% 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 2 \cdot 10^{+270}:\\ \;\;\;\;a \cdot \frac{{k}^{m}}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (a k m)
 :precision binary64
 (let* ((t_0 (* a (pow k m))))
   (if (<= (/ t_0 (+ (+ 1.0 (* k 10.0)) (* k k))) 2e+270)
     (* a (/ (pow k m) (+ 1.0 (* k (+ k 10.0)))))
     t_0)))
double code(double a, double k, double m) {
	double t_0 = a * pow(k, m);
	double tmp;
	if ((t_0 / ((1.0 + (k * 10.0)) + (k * k))) <= 2e+270) {
		tmp = a * (pow(k, m) / (1.0 + (k * (k + 10.0))));
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(a, k, m)
    real(8), intent (in) :: a
    real(8), intent (in) :: k
    real(8), intent (in) :: m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = a * (k ** m)
    if ((t_0 / ((1.0d0 + (k * 10.0d0)) + (k * k))) <= 2d+270) then
        tmp = a * ((k ** m) / (1.0d0 + (k * (k + 10.0d0))))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double a, double k, double m) {
	double t_0 = a * Math.pow(k, m);
	double tmp;
	if ((t_0 / ((1.0 + (k * 10.0)) + (k * k))) <= 2e+270) {
		tmp = a * (Math.pow(k, m) / (1.0 + (k * (k + 10.0))));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(a, k, m):
	t_0 = a * math.pow(k, m)
	tmp = 0
	if (t_0 / ((1.0 + (k * 10.0)) + (k * k))) <= 2e+270:
		tmp = a * (math.pow(k, m) / (1.0 + (k * (k + 10.0))))
	else:
		tmp = t_0
	return tmp
function code(a, k, m)
	t_0 = Float64(a * (k ^ m))
	tmp = 0.0
	if (Float64(t_0 / Float64(Float64(1.0 + Float64(k * 10.0)) + Float64(k * k))) <= 2e+270)
		tmp = Float64(a * Float64((k ^ m) / Float64(1.0 + Float64(k * Float64(k + 10.0)))));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(a, k, m)
	t_0 = a * (k ^ m);
	tmp = 0.0;
	if ((t_0 / ((1.0 + (k * 10.0)) + (k * k))) <= 2e+270)
		tmp = a * ((k ^ m) / (1.0 + (k * (k + 10.0))));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[a_, k_, m_] := Block[{t$95$0 = N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$0 / N[(N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+270], N[(a * N[(N[Power[k, m], $MachinePrecision] / N[(1.0 + N[(k * 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}\;\frac{t\_0}{\left(1 + k \cdot 10\right) + k \cdot k} \leq 2 \cdot 10^{+270}:\\
\;\;\;\;a \cdot \frac{{k}^{m}}{1 + k \cdot \left(k + 10\right)}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\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))) < 2.0000000000000001e270

    1. Initial program 98.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-+.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(k, \color{blue}{10}\right)\right)\right)\right) \]
    3. Simplified98.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. 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-+.f6498.0%

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

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

    if 2.0000000000000001e270 < (/.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 60.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-+.f6460.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. Simplified60.3%

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

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

Alternative 2: 96.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := a \cdot {k}^{m}\\
\mathbf{if}\;m \leq -2.5 \cdot 10^{-10}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;m \leq 2.2 \cdot 10^{-15}:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if m < -2.50000000000000016e-10 or 2.19999999999999986e-15 < m

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.50000000000000016e-10 < m < 2.19999999999999986e-15

    1. Initial program 94.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-+.f6494.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. Simplified94.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. distribute-lft-inN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

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

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

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

Alternative 3: 96.7% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

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

      \[\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 7.4999999999999996e-14 < k

    1. Initial program 83.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-+.f6483.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. Simplified83.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 inf

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {\left(e^{\mathsf{neg}\left(\left(\mathsf{neg}\left(\log k\right)\right)\right)}\right)}^{m}\right), \left({k}^{2}\right)\right) \]
      7. remove-double-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {\left(e^{\log k}\right)}^{m}\right), \left({k}^{2}\right)\right) \]
      8. rem-exp-logN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(k, \left(m - 2\right)\right), a\right) \]
      7. --lowering--.f6495.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(k, \mathsf{\_.f64}\left(m, 2\right)\right), a\right) \]
    9. Applied egg-rr95.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 7.5 \cdot 10^{-14}:\\ \;\;\;\;a \cdot {k}^{m}\\ \mathbf{else}:\\ \;\;\;\;a \cdot {k}^{\left(m - 2\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 66.9% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -112000000:\\ \;\;\;\;\frac{a - \frac{a}{k} \cdot \left(10 + \frac{-99}{k}\right)}{k \cdot k}\\ \mathbf{elif}\;m \leq 0.15:\\ \;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{1 + \frac{1 + \frac{1}{k \cdot k} \cdot \left(\frac{1000}{k} + -100\right)}{k} \cdot \frac{k}{\frac{1}{k \cdot k + \left(100 - k \cdot -10\right)}}}\\ \end{array} \end{array} \]
(FPCore (a k m)
 :precision binary64
 (if (<= m -112000000.0)
   (/ (- a (* (/ a k) (+ 10.0 (/ -99.0 k)))) (* k k))
   (if (<= m 0.15)
     (/ a (+ 1.0 (* k (+ k 10.0))))
     (/
      a
      (+
       1.0
       (*
        (/ (+ 1.0 (* (/ 1.0 (* k k)) (+ (/ 1000.0 k) -100.0))) k)
        (/ k (/ 1.0 (+ (* k k) (- 100.0 (* k -10.0)))))))))))
double code(double a, double k, double m) {
	double tmp;
	if (m <= -112000000.0) {
		tmp = (a - ((a / k) * (10.0 + (-99.0 / k)))) / (k * k);
	} else if (m <= 0.15) {
		tmp = a / (1.0 + (k * (k + 10.0)));
	} else {
		tmp = a / (1.0 + (((1.0 + ((1.0 / (k * k)) * ((1000.0 / k) + -100.0))) / k) * (k / (1.0 / ((k * k) + (100.0 - (k * -10.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 <= (-112000000.0d0)) then
        tmp = (a - ((a / k) * (10.0d0 + ((-99.0d0) / k)))) / (k * k)
    else if (m <= 0.15d0) then
        tmp = a / (1.0d0 + (k * (k + 10.0d0)))
    else
        tmp = a / (1.0d0 + (((1.0d0 + ((1.0d0 / (k * k)) * ((1000.0d0 / k) + (-100.0d0)))) / k) * (k / (1.0d0 / ((k * k) + (100.0d0 - (k * (-10.0d0))))))))
    end if
    code = tmp
end function
public static double code(double a, double k, double m) {
	double tmp;
	if (m <= -112000000.0) {
		tmp = (a - ((a / k) * (10.0 + (-99.0 / k)))) / (k * k);
	} else if (m <= 0.15) {
		tmp = a / (1.0 + (k * (k + 10.0)));
	} else {
		tmp = a / (1.0 + (((1.0 + ((1.0 / (k * k)) * ((1000.0 / k) + -100.0))) / k) * (k / (1.0 / ((k * k) + (100.0 - (k * -10.0)))))));
	}
	return tmp;
}
def code(a, k, m):
	tmp = 0
	if m <= -112000000.0:
		tmp = (a - ((a / k) * (10.0 + (-99.0 / k)))) / (k * k)
	elif m <= 0.15:
		tmp = a / (1.0 + (k * (k + 10.0)))
	else:
		tmp = a / (1.0 + (((1.0 + ((1.0 / (k * k)) * ((1000.0 / k) + -100.0))) / k) * (k / (1.0 / ((k * k) + (100.0 - (k * -10.0)))))))
	return tmp
function code(a, k, m)
	tmp = 0.0
	if (m <= -112000000.0)
		tmp = Float64(Float64(a - Float64(Float64(a / k) * Float64(10.0 + Float64(-99.0 / k)))) / Float64(k * k));
	elseif (m <= 0.15)
		tmp = Float64(a / Float64(1.0 + Float64(k * Float64(k + 10.0))));
	else
		tmp = Float64(a / Float64(1.0 + Float64(Float64(Float64(1.0 + Float64(Float64(1.0 / Float64(k * k)) * Float64(Float64(1000.0 / k) + -100.0))) / k) * Float64(k / Float64(1.0 / Float64(Float64(k * k) + Float64(100.0 - Float64(k * -10.0))))))));
	end
	return tmp
end
function tmp_2 = code(a, k, m)
	tmp = 0.0;
	if (m <= -112000000.0)
		tmp = (a - ((a / k) * (10.0 + (-99.0 / k)))) / (k * k);
	elseif (m <= 0.15)
		tmp = a / (1.0 + (k * (k + 10.0)));
	else
		tmp = a / (1.0 + (((1.0 + ((1.0 / (k * k)) * ((1000.0 / k) + -100.0))) / k) * (k / (1.0 / ((k * k) + (100.0 - (k * -10.0)))))));
	end
	tmp_2 = tmp;
end
code[a_, k_, m_] := If[LessEqual[m, -112000000.0], 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, 0.15], N[(a / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a / N[(1.0 + N[(N[(N[(1.0 + N[(N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(1000.0 / k), $MachinePrecision] + -100.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] * N[(k / N[(1.0 / N[(N[(k * k), $MachinePrecision] + N[(100.0 - N[(k * -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;m \leq -112000000:\\
\;\;\;\;\frac{a - \frac{a}{k} \cdot \left(10 + \frac{-99}{k}\right)}{k \cdot k}\\

\mathbf{elif}\;m \leq 0.15:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{a}{1 + \frac{1 + \frac{1}{k \cdot k} \cdot \left(\frac{1000}{k} + -100\right)}{k} \cdot \frac{k}{\frac{1}{k \cdot k + \left(100 - k \cdot -10\right)}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if m < -1.12e8

    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. *-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 + 10\right) \cdot \color{blue}{k}\right)\right)\right) \]
      2. flip3-+N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(\left(\left({k}^{3} + {10}^{3}\right) \cdot \frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}\right) \cdot k\right)\right)\right) \]
      4. 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(\left({k}^{3} + {10}^{3}\right) \cdot \color{blue}{\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)} \cdot k\right)}\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, \mathsf{*.f64}\left(\left({k}^{3} + {10}^{3}\right), \color{blue}{\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)} \cdot k\right)}\right)\right)\right) \]
      6. +-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(\mathsf{+.f64}\left(\left({k}^{3}\right), \left({10}^{3}\right)\right), \left(\color{blue}{\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}} \cdot k\right)\right)\right)\right) \]
      7. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right), \left(\frac{1}{\color{blue}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}} \cdot k\right)\right)\right)\right) \]
      11. *-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(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right), \mathsf{*.f64}\left(\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}\right), \color{blue}{k}\right)\right)\right)\right) \]
    6. Applied egg-rr73.0%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\left({k}^{3}\right), 1000\right)\right), \left(100 + k \cdot \left(k - 10\right)\right)\right)\right)\right) \]
      7. cube-multN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left({k}^{2}\right)\right), 1000\right)\right), \left(100 + k \cdot \left(k - 10\right)\right)\right)\right)\right) \]
      10. unpow2N/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right)\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, \color{blue}{\left(k - 10\right)}\right)\right)\right)\right)\right) \]
      14. sub-negN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right)\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, \left(k + -10\right)\right)\right)\right)\right)\right) \]
      16. +-lowering-+.f6413.5%

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

      \[\leadsto \color{blue}{\frac{a}{1 + \frac{k \cdot \left(k \cdot \left(k \cdot k\right) + 1000\right)}{100 + k \cdot \left(k + -10\right)}}} \]
    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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

    if -1.12e8 < m < 0.149999999999999994

    1. Initial program 94.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-+.f6494.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. Simplified94.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. distribute-lft-inN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

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

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

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

    if 0.149999999999999994 < m

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\frac{\left(k \cdot k - 10 \cdot 10\right) \cdot k}{\left(k \cdot \left(k \cdot k\right) - 1000\right) \cdot \frac{\color{blue}{1}}{k \cdot k + \left(-10 \cdot -10 - k \cdot -10\right)}}\right)\right)\right) \]
      12. times-fracN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\left(1 + \frac{1000}{{k}^{3}}\right) - 100 \cdot \frac{1}{{k}^{2}}\right), k\right), \mathsf{/.f64}\left(\color{blue}{k}, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{\_.f64}\left(100, \mathsf{*.f64}\left(k, -10\right)\right)\right)\right)\right)\right)\right)\right) \]
    12. Simplified37.3%

      \[\leadsto \frac{a}{1 + \color{blue}{\frac{1 + \frac{1}{k \cdot k} \cdot \left(\frac{1000}{k} + -100\right)}{k}} \cdot \frac{k}{\frac{1}{k \cdot k + \left(100 - k \cdot -10\right)}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification62.4%

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

Alternative 5: 65.8% accurate, 3.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -112000000:\\ \;\;\;\;\frac{a - \frac{a}{k} \cdot \left(10 + \frac{-99}{k}\right)}{k \cdot k}\\ \mathbf{elif}\;m \leq 0.28:\\ \;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{1 + \frac{k}{\frac{1}{k \cdot k + \left(100 - k \cdot -10\right)}} \cdot \frac{1 + \frac{-100}{k \cdot k}}{k}}\\ \end{array} \end{array} \]
(FPCore (a k m)
 :precision binary64
 (if (<= m -112000000.0)
   (/ (- a (* (/ a k) (+ 10.0 (/ -99.0 k)))) (* k k))
   (if (<= m 0.28)
     (/ a (+ 1.0 (* k (+ k 10.0))))
     (/
      a
      (+
       1.0
       (*
        (/ k (/ 1.0 (+ (* k k) (- 100.0 (* k -10.0)))))
        (/ (+ 1.0 (/ -100.0 (* k k))) k)))))))
double code(double a, double k, double m) {
	double tmp;
	if (m <= -112000000.0) {
		tmp = (a - ((a / k) * (10.0 + (-99.0 / k)))) / (k * k);
	} else if (m <= 0.28) {
		tmp = a / (1.0 + (k * (k + 10.0)));
	} else {
		tmp = a / (1.0 + ((k / (1.0 / ((k * k) + (100.0 - (k * -10.0))))) * ((1.0 + (-100.0 / (k * k))) / k)));
	}
	return tmp;
}
real(8) function code(a, k, m)
    real(8), intent (in) :: a
    real(8), intent (in) :: k
    real(8), intent (in) :: m
    real(8) :: tmp
    if (m <= (-112000000.0d0)) then
        tmp = (a - ((a / k) * (10.0d0 + ((-99.0d0) / k)))) / (k * k)
    else if (m <= 0.28d0) then
        tmp = a / (1.0d0 + (k * (k + 10.0d0)))
    else
        tmp = a / (1.0d0 + ((k / (1.0d0 / ((k * k) + (100.0d0 - (k * (-10.0d0)))))) * ((1.0d0 + ((-100.0d0) / (k * k))) / k)))
    end if
    code = tmp
end function
public static double code(double a, double k, double m) {
	double tmp;
	if (m <= -112000000.0) {
		tmp = (a - ((a / k) * (10.0 + (-99.0 / k)))) / (k * k);
	} else if (m <= 0.28) {
		tmp = a / (1.0 + (k * (k + 10.0)));
	} else {
		tmp = a / (1.0 + ((k / (1.0 / ((k * k) + (100.0 - (k * -10.0))))) * ((1.0 + (-100.0 / (k * k))) / k)));
	}
	return tmp;
}
def code(a, k, m):
	tmp = 0
	if m <= -112000000.0:
		tmp = (a - ((a / k) * (10.0 + (-99.0 / k)))) / (k * k)
	elif m <= 0.28:
		tmp = a / (1.0 + (k * (k + 10.0)))
	else:
		tmp = a / (1.0 + ((k / (1.0 / ((k * k) + (100.0 - (k * -10.0))))) * ((1.0 + (-100.0 / (k * k))) / k)))
	return tmp
function code(a, k, m)
	tmp = 0.0
	if (m <= -112000000.0)
		tmp = Float64(Float64(a - Float64(Float64(a / k) * Float64(10.0 + Float64(-99.0 / k)))) / Float64(k * k));
	elseif (m <= 0.28)
		tmp = Float64(a / Float64(1.0 + Float64(k * Float64(k + 10.0))));
	else
		tmp = Float64(a / Float64(1.0 + Float64(Float64(k / Float64(1.0 / Float64(Float64(k * k) + Float64(100.0 - Float64(k * -10.0))))) * Float64(Float64(1.0 + Float64(-100.0 / Float64(k * k))) / k))));
	end
	return tmp
end
function tmp_2 = code(a, k, m)
	tmp = 0.0;
	if (m <= -112000000.0)
		tmp = (a - ((a / k) * (10.0 + (-99.0 / k)))) / (k * k);
	elseif (m <= 0.28)
		tmp = a / (1.0 + (k * (k + 10.0)));
	else
		tmp = a / (1.0 + ((k / (1.0 / ((k * k) + (100.0 - (k * -10.0))))) * ((1.0 + (-100.0 / (k * k))) / k)));
	end
	tmp_2 = tmp;
end
code[a_, k_, m_] := If[LessEqual[m, -112000000.0], 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, 0.28], N[(a / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a / N[(1.0 + N[(N[(k / N[(1.0 / N[(N[(k * k), $MachinePrecision] + N[(100.0 - N[(k * -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[(-100.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;m \leq -112000000:\\
\;\;\;\;\frac{a - \frac{a}{k} \cdot \left(10 + \frac{-99}{k}\right)}{k \cdot k}\\

\mathbf{elif}\;m \leq 0.28:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{a}{1 + \frac{k}{\frac{1}{k \cdot k + \left(100 - k \cdot -10\right)}} \cdot \frac{1 + \frac{-100}{k \cdot k}}{k}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if m < -1.12e8

    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. *-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 + 10\right) \cdot \color{blue}{k}\right)\right)\right) \]
      2. flip3-+N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(\left(\left({k}^{3} + {10}^{3}\right) \cdot \frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}\right) \cdot k\right)\right)\right) \]
      4. 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(\left({k}^{3} + {10}^{3}\right) \cdot \color{blue}{\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)} \cdot k\right)}\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, \mathsf{*.f64}\left(\left({k}^{3} + {10}^{3}\right), \color{blue}{\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)} \cdot k\right)}\right)\right)\right) \]
      6. +-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(\mathsf{+.f64}\left(\left({k}^{3}\right), \left({10}^{3}\right)\right), \left(\color{blue}{\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}} \cdot k\right)\right)\right)\right) \]
      7. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right), \left(\frac{1}{\color{blue}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}} \cdot k\right)\right)\right)\right) \]
      11. *-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(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right), \mathsf{*.f64}\left(\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}\right), \color{blue}{k}\right)\right)\right)\right) \]
    6. Applied egg-rr73.0%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\left({k}^{3}\right), 1000\right)\right), \left(100 + k \cdot \left(k - 10\right)\right)\right)\right)\right) \]
      7. cube-multN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left({k}^{2}\right)\right), 1000\right)\right), \left(100 + k \cdot \left(k - 10\right)\right)\right)\right)\right) \]
      10. unpow2N/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right)\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, \color{blue}{\left(k - 10\right)}\right)\right)\right)\right)\right) \]
      14. sub-negN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right)\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, \left(k + -10\right)\right)\right)\right)\right)\right) \]
      16. +-lowering-+.f6413.5%

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

      \[\leadsto \color{blue}{\frac{a}{1 + \frac{k \cdot \left(k \cdot \left(k \cdot k\right) + 1000\right)}{100 + k \cdot \left(k + -10\right)}}} \]
    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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

    if -1.12e8 < m < 0.28000000000000003

    1. Initial program 94.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-+.f6494.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. Simplified94.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. distribute-lft-inN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

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

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

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

    if 0.28000000000000003 < m

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\frac{\left(k \cdot k - 10 \cdot 10\right) \cdot k}{\left(k \cdot \left(k \cdot k\right) - 1000\right) \cdot \frac{\color{blue}{1}}{k \cdot k + \left(-10 \cdot -10 - k \cdot -10\right)}}\right)\right)\right) \]
      12. times-fracN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \left(\mathsf{neg}\left(\frac{100}{{k}^{2}}\right)\right)\right), k\right), \mathsf{/.f64}\left(k, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{\_.f64}\left(100, \mathsf{*.f64}\left(k, -10\right)\right)\right)\right)\right)\right)\right)\right) \]
      6. distribute-neg-fracN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{\mathsf{neg}\left(100\right)}{{k}^{2}}\right)\right), k\right), \mathsf{/.f64}\left(k, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{\_.f64}\left(100, \mathsf{*.f64}\left(k, -10\right)\right)\right)\right)\right)\right)\right)\right) \]
      7. metadata-evalN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(-100, \left({k}^{2}\right)\right)\right), k\right), \mathsf{/.f64}\left(k, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{\_.f64}\left(100, \mathsf{*.f64}\left(k, -10\right)\right)\right)\right)\right)\right)\right)\right) \]
      9. unpow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(-100, \mathsf{*.f64}\left(k, k\right)\right)\right), k\right), \mathsf{/.f64}\left(k, \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{\_.f64}\left(100, \mathsf{*.f64}\left(k, -10\right)\right)\right)\right)\right)\right)\right)\right) \]
    12. Simplified35.7%

      \[\leadsto \frac{a}{1 + \color{blue}{\frac{1 + \frac{-100}{k \cdot k}}{k}} \cdot \frac{k}{\frac{1}{k \cdot k + \left(100 - k \cdot -10\right)}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.9%

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

Alternative 6: 65.4% accurate, 3.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -112000000:\\ \;\;\;\;\frac{a - \frac{a}{k} \cdot \left(10 + \frac{-99}{k}\right)}{k \cdot k}\\ \mathbf{elif}\;m \leq 0.9:\\ \;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{1 + k \cdot \left(k \cdot \left(1 + \frac{10 + \frac{-1000}{k \cdot k}}{k}\right)\right)}\\ \end{array} \end{array} \]
(FPCore (a k m)
 :precision binary64
 (if (<= m -112000000.0)
   (/ (- a (* (/ a k) (+ 10.0 (/ -99.0 k)))) (* k k))
   (if (<= m 0.9)
     (/ a (+ 1.0 (* k (+ k 10.0))))
     (/ a (+ 1.0 (* k (* k (+ 1.0 (/ (+ 10.0 (/ -1000.0 (* k k))) k)))))))))
double code(double a, double k, double m) {
	double tmp;
	if (m <= -112000000.0) {
		tmp = (a - ((a / k) * (10.0 + (-99.0 / k)))) / (k * k);
	} else if (m <= 0.9) {
		tmp = a / (1.0 + (k * (k + 10.0)));
	} else {
		tmp = a / (1.0 + (k * (k * (1.0 + ((10.0 + (-1000.0 / (k * k))) / k)))));
	}
	return tmp;
}
real(8) function code(a, k, m)
    real(8), intent (in) :: a
    real(8), intent (in) :: k
    real(8), intent (in) :: m
    real(8) :: tmp
    if (m <= (-112000000.0d0)) then
        tmp = (a - ((a / k) * (10.0d0 + ((-99.0d0) / k)))) / (k * k)
    else if (m <= 0.9d0) then
        tmp = a / (1.0d0 + (k * (k + 10.0d0)))
    else
        tmp = a / (1.0d0 + (k * (k * (1.0d0 + ((10.0d0 + ((-1000.0d0) / (k * k))) / k)))))
    end if
    code = tmp
end function
public static double code(double a, double k, double m) {
	double tmp;
	if (m <= -112000000.0) {
		tmp = (a - ((a / k) * (10.0 + (-99.0 / k)))) / (k * k);
	} else if (m <= 0.9) {
		tmp = a / (1.0 + (k * (k + 10.0)));
	} else {
		tmp = a / (1.0 + (k * (k * (1.0 + ((10.0 + (-1000.0 / (k * k))) / k)))));
	}
	return tmp;
}
def code(a, k, m):
	tmp = 0
	if m <= -112000000.0:
		tmp = (a - ((a / k) * (10.0 + (-99.0 / k)))) / (k * k)
	elif m <= 0.9:
		tmp = a / (1.0 + (k * (k + 10.0)))
	else:
		tmp = a / (1.0 + (k * (k * (1.0 + ((10.0 + (-1000.0 / (k * k))) / k)))))
	return tmp
function code(a, k, m)
	tmp = 0.0
	if (m <= -112000000.0)
		tmp = Float64(Float64(a - Float64(Float64(a / k) * Float64(10.0 + Float64(-99.0 / k)))) / Float64(k * k));
	elseif (m <= 0.9)
		tmp = Float64(a / Float64(1.0 + Float64(k * Float64(k + 10.0))));
	else
		tmp = Float64(a / Float64(1.0 + Float64(k * Float64(k * Float64(1.0 + Float64(Float64(10.0 + Float64(-1000.0 / Float64(k * k))) / k))))));
	end
	return tmp
end
function tmp_2 = code(a, k, m)
	tmp = 0.0;
	if (m <= -112000000.0)
		tmp = (a - ((a / k) * (10.0 + (-99.0 / k)))) / (k * k);
	elseif (m <= 0.9)
		tmp = a / (1.0 + (k * (k + 10.0)));
	else
		tmp = a / (1.0 + (k * (k * (1.0 + ((10.0 + (-1000.0 / (k * k))) / k)))));
	end
	tmp_2 = tmp;
end
code[a_, k_, m_] := If[LessEqual[m, -112000000.0], 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, 0.9], N[(a / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a / N[(1.0 + N[(k * N[(k * N[(1.0 + N[(N[(10.0 + N[(-1000.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;m \leq -112000000:\\
\;\;\;\;\frac{a - \frac{a}{k} \cdot \left(10 + \frac{-99}{k}\right)}{k \cdot k}\\

\mathbf{elif}\;m \leq 0.9:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k \cdot \left(1 + \frac{10 + \frac{-1000}{k \cdot k}}{k}\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if m < -1.12e8

    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. *-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 + 10\right) \cdot \color{blue}{k}\right)\right)\right) \]
      2. flip3-+N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(\left(\left({k}^{3} + {10}^{3}\right) \cdot \frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}\right) \cdot k\right)\right)\right) \]
      4. 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(\left({k}^{3} + {10}^{3}\right) \cdot \color{blue}{\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)} \cdot k\right)}\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, \mathsf{*.f64}\left(\left({k}^{3} + {10}^{3}\right), \color{blue}{\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)} \cdot k\right)}\right)\right)\right) \]
      6. +-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(\mathsf{+.f64}\left(\left({k}^{3}\right), \left({10}^{3}\right)\right), \left(\color{blue}{\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}} \cdot k\right)\right)\right)\right) \]
      7. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right), \left(\frac{1}{\color{blue}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}} \cdot k\right)\right)\right)\right) \]
      11. *-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(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right), \mathsf{*.f64}\left(\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}\right), \color{blue}{k}\right)\right)\right)\right) \]
    6. Applied egg-rr73.0%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\left({k}^{3}\right), 1000\right)\right), \left(100 + k \cdot \left(k - 10\right)\right)\right)\right)\right) \]
      7. cube-multN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left({k}^{2}\right)\right), 1000\right)\right), \left(100 + k \cdot \left(k - 10\right)\right)\right)\right)\right) \]
      10. unpow2N/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right)\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, \color{blue}{\left(k - 10\right)}\right)\right)\right)\right)\right) \]
      14. sub-negN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right)\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, \left(k + -10\right)\right)\right)\right)\right)\right) \]
      16. +-lowering-+.f6413.5%

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

      \[\leadsto \color{blue}{\frac{a}{1 + \frac{k \cdot \left(k \cdot \left(k \cdot k\right) + 1000\right)}{100 + k \cdot \left(k + -10\right)}}} \]
    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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

    if -1.12e8 < m < 0.900000000000000022

    1. Initial program 94.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-+.f6494.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. Simplified94.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. distribute-lft-inN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

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

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

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

    if 0.900000000000000022 < m

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-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 + 10\right) \cdot \color{blue}{k}\right)\right)\right) \]
      2. flip3-+N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(\left(\left({k}^{3} + {10}^{3}\right) \cdot \frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}\right) \cdot k\right)\right)\right) \]
      4. 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(\left({k}^{3} + {10}^{3}\right) \cdot \color{blue}{\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)} \cdot k\right)}\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, \mathsf{*.f64}\left(\left({k}^{3} + {10}^{3}\right), \color{blue}{\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)} \cdot k\right)}\right)\right)\right) \]
      6. +-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(\mathsf{+.f64}\left(\left({k}^{3}\right), \left({10}^{3}\right)\right), \left(\color{blue}{\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}} \cdot k\right)\right)\right)\right) \]
      7. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right), \left(\frac{1}{\color{blue}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}} \cdot k\right)\right)\right)\right) \]
      11. *-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(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right), \mathsf{*.f64}\left(\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}\right), \color{blue}{k}\right)\right)\right)\right) \]
    6. Applied egg-rr68.9%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\left({k}^{3}\right), 1000\right)\right), \left(100 + k \cdot \left(k - 10\right)\right)\right)\right)\right) \]
      7. cube-multN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left({k}^{2}\right)\right), 1000\right)\right), \left(100 + k \cdot \left(k - 10\right)\right)\right)\right)\right) \]
      10. unpow2N/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right)\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, \color{blue}{\left(k - 10\right)}\right)\right)\right)\right)\right) \]
      14. sub-negN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right)\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, \left(k + -10\right)\right)\right)\right)\right)\right) \]
      16. +-lowering-+.f642.5%

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

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

      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\color{blue}{\left({k}^{4}\right)}, \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, -10\right)\right)\right)\right)\right)\right) \]
    11. Step-by-step derivation
      1. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left({k}^{\left(3 + 1\right)}\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, -10\right)\right)\right)\right)\right)\right) \]
      2. pow-plusN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \left({k}^{3}\right)\right), \mathsf{+.f64}\left(\color{blue}{100}, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, -10\right)\right)\right)\right)\right)\right) \]
      5. cube-multN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left({k}^{2}\right)\right)\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, -10\right)\right)\right)\right)\right)\right) \]
      8. unpow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, -10\right)\right)\right)\right)\right)\right) \]
    12. Simplified2.5%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{a}{1 + \color{blue}{k \cdot \left(k \cdot \left(1 + \frac{10 + \frac{-1000}{k \cdot k}}{k}\right)\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.7%

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

Alternative 7: 61.7% accurate, 5.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;m \leq -112000000:\\
\;\;\;\;\frac{a - \frac{a}{k} \cdot \left(10 + \frac{-99}{k}\right)}{k \cdot k}\\

\mathbf{elif}\;m \leq 0.086:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if m < -1.12e8

    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. *-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 + 10\right) \cdot \color{blue}{k}\right)\right)\right) \]
      2. flip3-+N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(\left(\left({k}^{3} + {10}^{3}\right) \cdot \frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}\right) \cdot k\right)\right)\right) \]
      4. 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(\left({k}^{3} + {10}^{3}\right) \cdot \color{blue}{\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)} \cdot k\right)}\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, \mathsf{*.f64}\left(\left({k}^{3} + {10}^{3}\right), \color{blue}{\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)} \cdot k\right)}\right)\right)\right) \]
      6. +-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(\mathsf{+.f64}\left(\left({k}^{3}\right), \left({10}^{3}\right)\right), \left(\color{blue}{\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}} \cdot k\right)\right)\right)\right) \]
      7. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right), \left(\frac{1}{\color{blue}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}} \cdot k\right)\right)\right)\right) \]
      11. *-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(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right), \mathsf{*.f64}\left(\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}\right), \color{blue}{k}\right)\right)\right)\right) \]
    6. Applied egg-rr73.0%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\left({k}^{3}\right), 1000\right)\right), \left(100 + k \cdot \left(k - 10\right)\right)\right)\right)\right) \]
      7. cube-multN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left({k}^{2}\right)\right), 1000\right)\right), \left(100 + k \cdot \left(k - 10\right)\right)\right)\right)\right) \]
      10. unpow2N/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right)\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, \color{blue}{\left(k - 10\right)}\right)\right)\right)\right)\right) \]
      14. sub-negN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right)\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, \left(k + -10\right)\right)\right)\right)\right)\right) \]
      16. +-lowering-+.f6413.5%

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

      \[\leadsto \color{blue}{\frac{a}{1 + \frac{k \cdot \left(k \cdot \left(k \cdot k\right) + 1000\right)}{100 + k \cdot \left(k + -10\right)}}} \]
    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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

    if -1.12e8 < m < 0.085999999999999993

    1. Initial program 94.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-+.f6494.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. Simplified94.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. distribute-lft-inN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

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

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

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

    if 0.085999999999999993 < m

    1. Initial program 74.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-+.f6474.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. Simplified74.7%

      \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-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 + 10\right) \cdot \color{blue}{k}\right)\right)\right) \]
      2. flip3-+N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(\left(\left({k}^{3} + {10}^{3}\right) \cdot \frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}\right) \cdot k\right)\right)\right) \]
      4. 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(\left({k}^{3} + {10}^{3}\right) \cdot \color{blue}{\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)} \cdot k\right)}\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, \mathsf{*.f64}\left(\left({k}^{3} + {10}^{3}\right), \color{blue}{\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)} \cdot k\right)}\right)\right)\right) \]
      6. +-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(\mathsf{+.f64}\left(\left({k}^{3}\right), \left({10}^{3}\right)\right), \left(\color{blue}{\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}} \cdot k\right)\right)\right)\right) \]
      7. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right), \left(\frac{1}{\color{blue}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}} \cdot k\right)\right)\right)\right) \]
      11. *-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(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right), \mathsf{*.f64}\left(\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}\right), \color{blue}{k}\right)\right)\right)\right) \]
    6. Applied egg-rr69.2%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\left({k}^{3}\right), 1000\right)\right), \left(100 + k \cdot \left(k - 10\right)\right)\right)\right)\right) \]
      7. cube-multN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left({k}^{2}\right)\right), 1000\right)\right), \left(100 + k \cdot \left(k - 10\right)\right)\right)\right)\right) \]
      10. unpow2N/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right)\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, \color{blue}{\left(k - 10\right)}\right)\right)\right)\right)\right) \]
      14. sub-negN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right)\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, \left(k + -10\right)\right)\right)\right)\right)\right) \]
      16. +-lowering-+.f642.5%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \left(-10 \cdot a + \left(-1 \cdot k\right) \cdot \color{blue}{\left(a + -100 \cdot a\right)}\right)\right)\right) \]
      7. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(-10, \mathsf{*.f64}\left(k, \color{blue}{\left(-100 + 1\right)}\right)\right)\right)\right)\right) \]
      16. metadata-eval25.3%

        \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(-10, \mathsf{*.f64}\left(k, -99\right)\right)\right)\right)\right) \]
    12. Simplified25.3%

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

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

Alternative 8: 60.2% accurate, 5.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;m \leq -112000000:\\
\;\;\;\;a \cdot \frac{1}{k \cdot k}\\

\mathbf{elif}\;m \leq 0.086:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if m < -1.12e8

    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. distribute-lft-inN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.12e8 < m < 0.085999999999999993

    1. Initial program 94.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-+.f6494.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. Simplified94.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. distribute-lft-inN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

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

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

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

    if 0.085999999999999993 < m

    1. Initial program 74.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-+.f6474.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. Simplified74.7%

      \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-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 + 10\right) \cdot \color{blue}{k}\right)\right)\right) \]
      2. flip3-+N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(\left(\left({k}^{3} + {10}^{3}\right) \cdot \frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}\right) \cdot k\right)\right)\right) \]
      4. 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(\left({k}^{3} + {10}^{3}\right) \cdot \color{blue}{\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)} \cdot k\right)}\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, \mathsf{*.f64}\left(\left({k}^{3} + {10}^{3}\right), \color{blue}{\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)} \cdot k\right)}\right)\right)\right) \]
      6. +-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(\mathsf{+.f64}\left(\left({k}^{3}\right), \left({10}^{3}\right)\right), \left(\color{blue}{\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}} \cdot k\right)\right)\right)\right) \]
      7. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right), \left(\frac{1}{\color{blue}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}} \cdot k\right)\right)\right)\right) \]
      11. *-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(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right), \mathsf{*.f64}\left(\left(\frac{1}{k \cdot k + \left(10 \cdot 10 - k \cdot 10\right)}\right), \color{blue}{k}\right)\right)\right)\right) \]
    6. Applied egg-rr69.2%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\left({k}^{3}\right), 1000\right)\right), \left(100 + k \cdot \left(k - 10\right)\right)\right)\right)\right) \]
      7. cube-multN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left({k}^{2}\right)\right), 1000\right)\right), \left(100 + k \cdot \left(k - 10\right)\right)\right)\right)\right) \]
      10. unpow2N/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right)\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, \color{blue}{\left(k - 10\right)}\right)\right)\right)\right)\right) \]
      14. sub-negN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), 1000\right)\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, \left(k + -10\right)\right)\right)\right)\right)\right) \]
      16. +-lowering-+.f642.5%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \left(-10 \cdot a + \left(-1 \cdot k\right) \cdot \color{blue}{\left(a + -100 \cdot a\right)}\right)\right)\right) \]
      7. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(-10, \mathsf{*.f64}\left(k, \color{blue}{\left(-100 + 1\right)}\right)\right)\right)\right)\right) \]
      16. metadata-eval25.3%

        \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(-10, \mathsf{*.f64}\left(k, -99\right)\right)\right)\right)\right) \]
    12. Simplified25.3%

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

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

Alternative 9: 54.1% accurate, 6.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;m \leq -112000000:\\
\;\;\;\;a \cdot \frac{1}{k \cdot k}\\

\mathbf{elif}\;m \leq 4.4 \cdot 10^{+18}:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\

\mathbf{else}:\\
\;\;\;\;a + a \cdot \left(k \cdot -10\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if m < -1.12e8

    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. distribute-lft-inN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.12e8 < m < 4.4e18

    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. distribute-lft-inN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

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

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

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

    if 4.4e18 < m

    1. Initial program 74.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-+.f6474.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. Simplified74.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. distribute-lft-inN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 53.4% accurate, 6.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;m \leq -112000000:\\
\;\;\;\;a \cdot \frac{1}{k \cdot k}\\

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

\mathbf{else}:\\
\;\;\;\;a + a \cdot \left(k \cdot -10\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if m < -1.12e8

    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. distribute-lft-inN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.12e8 < m < 5.9e18

    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. distribute-lft-inN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

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

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

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

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

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

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

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

    if 5.9e18 < m

    1. Initial program 74.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-+.f6474.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. Simplified74.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. distribute-lft-inN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 46.8% accurate, 6.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;k \leq -4.7 \cdot 10^{-303}:\\
\;\;\;\;a \cdot \frac{1}{k \cdot k}\\

\mathbf{elif}\;k \leq 235000:\\
\;\;\;\;\frac{a}{1 + k \cdot 10}\\

\mathbf{else}:\\
\;\;\;\;\frac{a}{k \cdot \left(k + 10\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < -4.6999999999999997e-303

    1. Initial program 85.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-+.f6485.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. Simplified85.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. distribute-lft-inN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.6999999999999997e-303 < k < 235000

    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. distribute-lft-inN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(10 \cdot 1\right) \cdot k\right)\right) \]
      2. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 235000 < k

    1. Initial program 82.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-+.f6482.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. Simplified82.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. distribute-lft-inN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right) \]
      9. +-lowering-+.f6455.7%

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

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

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

Alternative 12: 46.8% accurate, 6.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;k \leq -4.7 \cdot 10^{-303}:\\
\;\;\;\;a \cdot \frac{1}{k \cdot k}\\

\mathbf{elif}\;k \leq 0.074:\\
\;\;\;\;a + a \cdot \left(k \cdot -10\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{a}{k \cdot \left(k + 10\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < -4.6999999999999997e-303

    1. Initial program 85.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-+.f6485.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. Simplified85.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. distribute-lft-inN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.6999999999999997e-303 < k < 0.0739999999999999963

    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. distribute-lft-inN/A

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{\left(10 \cdot \frac{1}{k}\right)} \cdot k\right)\right)\right)\right) \]
      21. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot 1\right)\right)\right)\right) \]
      23. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right)\right) \]
    7. Simplified42.3%

      \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
    8. Taylor expanded in k around 0

      \[\leadsto \color{blue}{a + -10 \cdot \left(a \cdot k\right)} \]
    9. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(a, \color{blue}{\left(-10 \cdot \left(a \cdot k\right)\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(a, \left(\left(a \cdot k\right) \cdot \color{blue}{-10}\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(a, \left(a \cdot \color{blue}{\left(k \cdot -10\right)}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(a, \left(a \cdot \left(-10 \cdot \color{blue}{k}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(a, \color{blue}{\left(-10 \cdot k\right)}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(a, \left(k \cdot \color{blue}{-10}\right)\right)\right) \]
      7. *-lowering-*.f6442.3%

        \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{-10}\right)\right)\right) \]
    10. Simplified42.3%

      \[\leadsto \color{blue}{a + a \cdot \left(k \cdot -10\right)} \]

    if 0.0739999999999999963 < k

    1. Initial program 83.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-+.f6483.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. Simplified83.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. distribute-lft-inN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot 10 + \color{blue}{k \cdot k}\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot \left(\frac{1}{k} \cdot k\right)\right) + k \cdot k\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(\left(10 \cdot \frac{1}{k}\right) \cdot k\right) + k \cdot k\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(\left(10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k + \color{blue}{k} \cdot k\right)\right)\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot \left(k \cdot k\right) + \color{blue}{k} \cdot k\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + {k}^{\color{blue}{2}}\right)\right)\right) \]
      10. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + 1 \cdot \color{blue}{{k}^{2}}\right)\right)\right) \]
      11. distribute-rgt-inN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + {k}^{2} \cdot \color{blue}{\left(10 \cdot \frac{1}{k} + 1\right)}\right)\right) \]
      12. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + {k}^{2} \cdot \left(1 + \color{blue}{10 \cdot \frac{1}{k}}\right)\right)\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right) \]
      14. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(k \cdot k\right) \cdot \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right)\right) \]
      15. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right)\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right)}\right)\right)\right) \]
      18. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right)\right)\right) \]
      19. distribute-rgt-inN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
      20. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{\left(10 \cdot \frac{1}{k}\right)} \cdot k\right)\right)\right)\right) \]
      21. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot 1\right)\right)\right)\right) \]
      23. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right)\right) \]
    7. Simplified54.5%

      \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
    8. Taylor expanded in k around inf

      \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right) \]
    9. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(\left(k \cdot k\right) \cdot \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{\left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{\left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right) \]
      4. distribute-rgt-inN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right) \]
      5. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \left(k + \color{blue}{\left(10 \cdot \frac{1}{k}\right)} \cdot k\right)\right)\right) \]
      6. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right) \]
      7. lft-mult-inverseN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \left(k + 10 \cdot 1\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right) \]
      9. +-lowering-+.f6454.5%

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right) \]
    10. Simplified54.5%

      \[\leadsto \frac{a}{\color{blue}{k \cdot \left(k + 10\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification42.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -4.7 \cdot 10^{-303}:\\ \;\;\;\;a \cdot \frac{1}{k \cdot k}\\ \mathbf{elif}\;k \leq 0.074:\\ \;\;\;\;a + a \cdot \left(k \cdot -10\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{k \cdot \left(k + 10\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 46.6% accurate, 6.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := a \cdot \frac{1}{k \cdot k}\\ \mathbf{if}\;k \leq -4.7 \cdot 10^{-303}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;k \leq 0.1:\\ \;\;\;\;a + a \cdot \left(k \cdot -10\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (a k m)
 :precision binary64
 (let* ((t_0 (* a (/ 1.0 (* k k)))))
   (if (<= k -4.7e-303) t_0 (if (<= k 0.1) (+ a (* a (* k -10.0))) t_0))))
double code(double a, double k, double m) {
	double t_0 = a * (1.0 / (k * k));
	double tmp;
	if (k <= -4.7e-303) {
		tmp = t_0;
	} else if (k <= 0.1) {
		tmp = a + (a * (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 * (1.0d0 / (k * k))
    if (k <= (-4.7d-303)) then
        tmp = t_0
    else if (k <= 0.1d0) then
        tmp = a + (a * (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 * (1.0 / (k * k));
	double tmp;
	if (k <= -4.7e-303) {
		tmp = t_0;
	} else if (k <= 0.1) {
		tmp = a + (a * (k * -10.0));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(a, k, m):
	t_0 = a * (1.0 / (k * k))
	tmp = 0
	if k <= -4.7e-303:
		tmp = t_0
	elif k <= 0.1:
		tmp = a + (a * (k * -10.0))
	else:
		tmp = t_0
	return tmp
function code(a, k, m)
	t_0 = Float64(a * Float64(1.0 / Float64(k * k)))
	tmp = 0.0
	if (k <= -4.7e-303)
		tmp = t_0;
	elseif (k <= 0.1)
		tmp = Float64(a + Float64(a * Float64(k * -10.0)));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(a, k, m)
	t_0 = a * (1.0 / (k * k));
	tmp = 0.0;
	if (k <= -4.7e-303)
		tmp = t_0;
	elseif (k <= 0.1)
		tmp = a + (a * (k * -10.0));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[a_, k_, m_] := Block[{t$95$0 = N[(a * N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -4.7e-303], t$95$0, If[LessEqual[k, 0.1], N[(a + N[(a * N[(k * -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := a \cdot \frac{1}{k \cdot k}\\
\mathbf{if}\;k \leq -4.7 \cdot 10^{-303}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;k \leq 0.1:\\
\;\;\;\;a + a \cdot \left(k \cdot -10\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < -4.6999999999999997e-303 or 0.10000000000000001 < k

    1. Initial program 84.4%

      \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
      3. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
      4. associate-+l+N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      6. distribute-rgt-outN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
      8. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
      9. +-lowering-+.f6484.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
    3. Simplified84.4%

      \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in m around 0

      \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
      2. distribute-lft-inN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot 10 + \color{blue}{k \cdot k}\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot \left(\frac{1}{k} \cdot k\right)\right) + k \cdot k\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(\left(10 \cdot \frac{1}{k}\right) \cdot k\right) + k \cdot k\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(\left(10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k + \color{blue}{k} \cdot k\right)\right)\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot \left(k \cdot k\right) + \color{blue}{k} \cdot k\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + {k}^{\color{blue}{2}}\right)\right)\right) \]
      10. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + 1 \cdot \color{blue}{{k}^{2}}\right)\right)\right) \]
      11. distribute-rgt-inN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + {k}^{2} \cdot \color{blue}{\left(10 \cdot \frac{1}{k} + 1\right)}\right)\right) \]
      12. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + {k}^{2} \cdot \left(1 + \color{blue}{10 \cdot \frac{1}{k}}\right)\right)\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right) \]
      14. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(k \cdot k\right) \cdot \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right)\right) \]
      15. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right)\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right)}\right)\right)\right) \]
      18. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right)\right)\right) \]
      19. distribute-rgt-inN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
      20. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{\left(10 \cdot \frac{1}{k}\right)} \cdot k\right)\right)\right)\right) \]
      21. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot 1\right)\right)\right)\right) \]
      23. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right)\right) \]
    7. Simplified37.9%

      \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
    8. Taylor expanded in k around inf

      \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
    9. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
      2. *-lowering-*.f6441.0%

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
    10. Simplified41.0%

      \[\leadsto \frac{a}{\color{blue}{k \cdot k}} \]
    11. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{k \cdot k}{a}}} \]
      2. associate-/r/N/A

        \[\leadsto \frac{1}{k \cdot k} \cdot \color{blue}{a} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{k \cdot k}\right), \color{blue}{a}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(k \cdot k\right)\right), a\right) \]
      5. *-lowering-*.f6441.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(k, k\right)\right), a\right) \]
    12. Applied egg-rr41.6%

      \[\leadsto \color{blue}{\frac{1}{k \cdot k} \cdot a} \]

    if -4.6999999999999997e-303 < k < 0.10000000000000001

    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. distribute-lft-inN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot 10 + \color{blue}{k \cdot k}\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot \left(\frac{1}{k} \cdot k\right)\right) + k \cdot k\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(\left(10 \cdot \frac{1}{k}\right) \cdot k\right) + k \cdot k\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(\left(10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k + \color{blue}{k} \cdot k\right)\right)\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot \left(k \cdot k\right) + \color{blue}{k} \cdot k\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + {k}^{\color{blue}{2}}\right)\right)\right) \]
      10. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + 1 \cdot \color{blue}{{k}^{2}}\right)\right)\right) \]
      11. distribute-rgt-inN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + {k}^{2} \cdot \color{blue}{\left(10 \cdot \frac{1}{k} + 1\right)}\right)\right) \]
      12. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + {k}^{2} \cdot \left(1 + \color{blue}{10 \cdot \frac{1}{k}}\right)\right)\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right) \]
      14. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(k \cdot k\right) \cdot \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right)\right) \]
      15. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right)\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right)}\right)\right)\right) \]
      18. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right)\right)\right) \]
      19. distribute-rgt-inN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
      20. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{\left(10 \cdot \frac{1}{k}\right)} \cdot k\right)\right)\right)\right) \]
      21. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot 1\right)\right)\right)\right) \]
      23. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right)\right) \]
    7. Simplified42.3%

      \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
    8. Taylor expanded in k around 0

      \[\leadsto \color{blue}{a + -10 \cdot \left(a \cdot k\right)} \]
    9. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(a, \color{blue}{\left(-10 \cdot \left(a \cdot k\right)\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(a, \left(\left(a \cdot k\right) \cdot \color{blue}{-10}\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{+.f64}\left(a, \left(a \cdot \color{blue}{\left(k \cdot -10\right)}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(a, \left(a \cdot \left(-10 \cdot \color{blue}{k}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(a, \color{blue}{\left(-10 \cdot k\right)}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(a, \left(k \cdot \color{blue}{-10}\right)\right)\right) \]
      7. *-lowering-*.f6442.3%

        \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{-10}\right)\right)\right) \]
    10. Simplified42.3%

      \[\leadsto \color{blue}{a + a \cdot \left(k \cdot -10\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification41.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -4.7 \cdot 10^{-303}:\\ \;\;\;\;a \cdot \frac{1}{k \cdot k}\\ \mathbf{elif}\;k \leq 0.1:\\ \;\;\;\;a + a \cdot \left(k \cdot -10\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{1}{k \cdot k}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 46.4% accurate, 6.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := a \cdot \frac{1}{k \cdot k}\\ \mathbf{if}\;k \leq -4.7 \cdot 10^{-303}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;k \leq 235000:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (a k m)
 :precision binary64
 (let* ((t_0 (* a (/ 1.0 (* k k)))))
   (if (<= k -4.7e-303) t_0 (if (<= k 235000.0) a t_0))))
double code(double a, double k, double m) {
	double t_0 = a * (1.0 / (k * k));
	double tmp;
	if (k <= -4.7e-303) {
		tmp = t_0;
	} else if (k <= 235000.0) {
		tmp = a;
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(a, k, m)
    real(8), intent (in) :: a
    real(8), intent (in) :: k
    real(8), intent (in) :: m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = a * (1.0d0 / (k * k))
    if (k <= (-4.7d-303)) then
        tmp = t_0
    else if (k <= 235000.0d0) then
        tmp = a
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double a, double k, double m) {
	double t_0 = a * (1.0 / (k * k));
	double tmp;
	if (k <= -4.7e-303) {
		tmp = t_0;
	} else if (k <= 235000.0) {
		tmp = a;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(a, k, m):
	t_0 = a * (1.0 / (k * k))
	tmp = 0
	if k <= -4.7e-303:
		tmp = t_0
	elif k <= 235000.0:
		tmp = a
	else:
		tmp = t_0
	return tmp
function code(a, k, m)
	t_0 = Float64(a * Float64(1.0 / Float64(k * k)))
	tmp = 0.0
	if (k <= -4.7e-303)
		tmp = t_0;
	elseif (k <= 235000.0)
		tmp = a;
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(a, k, m)
	t_0 = a * (1.0 / (k * k));
	tmp = 0.0;
	if (k <= -4.7e-303)
		tmp = t_0;
	elseif (k <= 235000.0)
		tmp = a;
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[a_, k_, m_] := Block[{t$95$0 = N[(a * N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -4.7e-303], t$95$0, If[LessEqual[k, 235000.0], a, t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := a \cdot \frac{1}{k \cdot k}\\
\mathbf{if}\;k \leq -4.7 \cdot 10^{-303}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;k \leq 235000:\\
\;\;\;\;a\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < -4.6999999999999997e-303 or 235000 < k

    1. Initial program 84.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-+.f6484.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. Simplified84.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. distribute-lft-inN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot 10 + \color{blue}{k \cdot k}\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot \left(\frac{1}{k} \cdot k\right)\right) + k \cdot k\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(\left(10 \cdot \frac{1}{k}\right) \cdot k\right) + k \cdot k\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(\left(10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k + \color{blue}{k} \cdot k\right)\right)\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot \left(k \cdot k\right) + \color{blue}{k} \cdot k\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + {k}^{\color{blue}{2}}\right)\right)\right) \]
      10. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + 1 \cdot \color{blue}{{k}^{2}}\right)\right)\right) \]
      11. distribute-rgt-inN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + {k}^{2} \cdot \color{blue}{\left(10 \cdot \frac{1}{k} + 1\right)}\right)\right) \]
      12. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + {k}^{2} \cdot \left(1 + \color{blue}{10 \cdot \frac{1}{k}}\right)\right)\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right) \]
      14. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(k \cdot k\right) \cdot \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right)\right) \]
      15. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right)\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right)}\right)\right)\right) \]
      18. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right)\right)\right) \]
      19. distribute-rgt-inN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
      20. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{\left(10 \cdot \frac{1}{k}\right)} \cdot k\right)\right)\right)\right) \]
      21. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot 1\right)\right)\right)\right) \]
      23. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right)\right) \]
    7. Simplified38.4%

      \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
    8. Taylor expanded in k around inf

      \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
    9. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
      2. *-lowering-*.f6441.5%

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
    10. Simplified41.5%

      \[\leadsto \frac{a}{\color{blue}{k \cdot k}} \]
    11. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{k \cdot k}{a}}} \]
      2. associate-/r/N/A

        \[\leadsto \frac{1}{k \cdot k} \cdot \color{blue}{a} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{k \cdot k}\right), \color{blue}{a}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(k \cdot k\right)\right), a\right) \]
      5. *-lowering-*.f6442.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(k, k\right)\right), a\right) \]
    12. Applied egg-rr42.0%

      \[\leadsto \color{blue}{\frac{1}{k \cdot k} \cdot a} \]

    if -4.6999999999999997e-303 < k < 235000

    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. distribute-lft-inN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot 10 + \color{blue}{k \cdot k}\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
      4. lft-mult-inverseN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot \left(\frac{1}{k} \cdot k\right)\right) + k \cdot k\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(\left(10 \cdot \frac{1}{k}\right) \cdot k\right) + k \cdot k\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(\left(10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k + \color{blue}{k} \cdot k\right)\right)\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot \left(k \cdot k\right) + \color{blue}{k} \cdot k\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + {k}^{\color{blue}{2}}\right)\right)\right) \]
      10. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + 1 \cdot \color{blue}{{k}^{2}}\right)\right)\right) \]
      11. distribute-rgt-inN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + {k}^{2} \cdot \color{blue}{\left(10 \cdot \frac{1}{k} + 1\right)}\right)\right) \]
      12. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + {k}^{2} \cdot \left(1 + \color{blue}{10 \cdot \frac{1}{k}}\right)\right)\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right) \]
      14. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(k \cdot k\right) \cdot \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right)\right) \]
      15. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right)\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right)}\right)\right)\right) \]
      18. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right)\right)\right) \]
      19. distribute-rgt-inN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
      20. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{\left(10 \cdot \frac{1}{k}\right)} \cdot k\right)\right)\right)\right) \]
      21. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
      22. lft-mult-inverseN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot 1\right)\right)\right)\right) \]
      23. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right)\right) \]
    7. Simplified41.4%

      \[\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. Simplified41.3%

        \[\leadsto \color{blue}{a} \]
    10. Recombined 2 regimes into one program.
    11. Final simplification41.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -4.7 \cdot 10^{-303}:\\ \;\;\;\;a \cdot \frac{1}{k \cdot k}\\ \mathbf{elif}\;k \leq 235000:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{1}{k \cdot k}\\ \end{array} \]
    12. Add Preprocessing

    Alternative 15: 46.4% accurate, 7.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{a}{k \cdot k}\\ \mathbf{if}\;k \leq -4.7 \cdot 10^{-303}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;k \leq 235000:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (a k m)
     :precision binary64
     (let* ((t_0 (/ a (* k k))))
       (if (<= k -4.7e-303) t_0 (if (<= k 235000.0) a t_0))))
    double code(double a, double k, double m) {
    	double t_0 = a / (k * k);
    	double tmp;
    	if (k <= -4.7e-303) {
    		tmp = t_0;
    	} else if (k <= 235000.0) {
    		tmp = a;
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    real(8) function code(a, k, m)
        real(8), intent (in) :: a
        real(8), intent (in) :: k
        real(8), intent (in) :: m
        real(8) :: t_0
        real(8) :: tmp
        t_0 = a / (k * k)
        if (k <= (-4.7d-303)) then
            tmp = t_0
        else if (k <= 235000.0d0) then
            tmp = a
        else
            tmp = t_0
        end if
        code = tmp
    end function
    
    public static double code(double a, double k, double m) {
    	double t_0 = a / (k * k);
    	double tmp;
    	if (k <= -4.7e-303) {
    		tmp = t_0;
    	} else if (k <= 235000.0) {
    		tmp = a;
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(a, k, m):
    	t_0 = a / (k * k)
    	tmp = 0
    	if k <= -4.7e-303:
    		tmp = t_0
    	elif k <= 235000.0:
    		tmp = a
    	else:
    		tmp = t_0
    	return tmp
    
    function code(a, k, m)
    	t_0 = Float64(a / Float64(k * k))
    	tmp = 0.0
    	if (k <= -4.7e-303)
    		tmp = t_0;
    	elseif (k <= 235000.0)
    		tmp = a;
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, k, m)
    	t_0 = a / (k * k);
    	tmp = 0.0;
    	if (k <= -4.7e-303)
    		tmp = t_0;
    	elseif (k <= 235000.0)
    		tmp = a;
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, k_, m_] := Block[{t$95$0 = N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -4.7e-303], t$95$0, If[LessEqual[k, 235000.0], a, t$95$0]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \frac{a}{k \cdot k}\\
    \mathbf{if}\;k \leq -4.7 \cdot 10^{-303}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;k \leq 235000:\\
    \;\;\;\;a\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if k < -4.6999999999999997e-303 or 235000 < k

      1. Initial program 84.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-+.f6484.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. Simplified84.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. distribute-lft-inN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot 10 + \color{blue}{k \cdot k}\right)\right)\right) \]
        3. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
        4. lft-mult-inverseN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot \left(\frac{1}{k} \cdot k\right)\right) + k \cdot k\right)\right)\right) \]
        5. associate-*l*N/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(\left(10 \cdot \frac{1}{k}\right) \cdot k\right) + k \cdot k\right)\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(\left(10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k + \color{blue}{k} \cdot k\right)\right)\right) \]
        7. associate-*r*N/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot \left(k \cdot k\right) + \color{blue}{k} \cdot k\right)\right)\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
        9. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + {k}^{\color{blue}{2}}\right)\right)\right) \]
        10. *-lft-identityN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + 1 \cdot \color{blue}{{k}^{2}}\right)\right)\right) \]
        11. distribute-rgt-inN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + {k}^{2} \cdot \color{blue}{\left(10 \cdot \frac{1}{k} + 1\right)}\right)\right) \]
        12. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + {k}^{2} \cdot \left(1 + \color{blue}{10 \cdot \frac{1}{k}}\right)\right)\right) \]
        13. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right) \]
        14. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(k \cdot k\right) \cdot \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right)\right) \]
        15. associate-*l*N/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right)\right) \]
        16. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
        17. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right)}\right)\right)\right) \]
        18. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right)\right)\right) \]
        19. distribute-rgt-inN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
        20. *-lft-identityN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{\left(10 \cdot \frac{1}{k}\right)} \cdot k\right)\right)\right)\right) \]
        21. associate-*l*N/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
        22. lft-mult-inverseN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot 1\right)\right)\right)\right) \]
        23. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right)\right) \]
      7. Simplified38.4%

        \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
      8. Taylor expanded in k around inf

        \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
      9. Step-by-step derivation
        1. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
        2. *-lowering-*.f6441.5%

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
      10. Simplified41.5%

        \[\leadsto \frac{a}{\color{blue}{k \cdot k}} \]

      if -4.6999999999999997e-303 < k < 235000

      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. distribute-lft-inN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot 10 + \color{blue}{k \cdot k}\right)\right)\right) \]
        3. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
        4. lft-mult-inverseN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot \left(\frac{1}{k} \cdot k\right)\right) + k \cdot k\right)\right)\right) \]
        5. associate-*l*N/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(\left(10 \cdot \frac{1}{k}\right) \cdot k\right) + k \cdot k\right)\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(\left(10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k + \color{blue}{k} \cdot k\right)\right)\right) \]
        7. associate-*r*N/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot \left(k \cdot k\right) + \color{blue}{k} \cdot k\right)\right)\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
        9. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + {k}^{\color{blue}{2}}\right)\right)\right) \]
        10. *-lft-identityN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + 1 \cdot \color{blue}{{k}^{2}}\right)\right)\right) \]
        11. distribute-rgt-inN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + {k}^{2} \cdot \color{blue}{\left(10 \cdot \frac{1}{k} + 1\right)}\right)\right) \]
        12. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + {k}^{2} \cdot \left(1 + \color{blue}{10 \cdot \frac{1}{k}}\right)\right)\right) \]
        13. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right) \]
        14. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(k \cdot k\right) \cdot \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right)\right) \]
        15. associate-*l*N/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right)\right) \]
        16. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
        17. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right)}\right)\right)\right) \]
        18. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right)\right)\right) \]
        19. distribute-rgt-inN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
        20. *-lft-identityN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{\left(10 \cdot \frac{1}{k}\right)} \cdot k\right)\right)\right)\right) \]
        21. associate-*l*N/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
        22. lft-mult-inverseN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot 1\right)\right)\right)\right) \]
        23. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right)\right) \]
      7. Simplified41.4%

        \[\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. Simplified41.3%

          \[\leadsto \color{blue}{a} \]
      10. Recombined 2 regimes into one program.
      11. Add Preprocessing

      Alternative 16: 19.9% accurate, 114.0× speedup?

      \[\begin{array}{l} \\ a \end{array} \]
      (FPCore (a k m) :precision binary64 a)
      double code(double a, double k, double m) {
      	return a;
      }
      
      real(8) function code(a, k, m)
          real(8), intent (in) :: a
          real(8), intent (in) :: k
          real(8), intent (in) :: m
          code = a
      end function
      
      public static double code(double a, double k, double m) {
      	return a;
      }
      
      def code(a, k, m):
      	return a
      
      function code(a, k, m)
      	return a
      end
      
      function tmp = code(a, k, m)
      	tmp = a;
      end
      
      code[a_, k_, m_] := a
      
      \begin{array}{l}
      
      \\
      a
      \end{array}
      
      Derivation
      1. Initial program 89.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-+.f6489.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. Simplified89.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. distribute-lft-inN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot 10 + \color{blue}{k \cdot k}\right)\right)\right) \]
        3. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot 1\right) + k \cdot k\right)\right)\right) \]
        4. lft-mult-inverseN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(10 \cdot \left(\frac{1}{k} \cdot k\right)\right) + k \cdot k\right)\right)\right) \]
        5. associate-*l*N/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(k \cdot \left(\left(10 \cdot \frac{1}{k}\right) \cdot k\right) + k \cdot k\right)\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(\left(10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k + \color{blue}{k} \cdot k\right)\right)\right) \]
        7. associate-*r*N/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot \left(k \cdot k\right) + \color{blue}{k} \cdot k\right)\right)\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + k \cdot k\right)\right)\right) \]
        9. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + {k}^{\color{blue}{2}}\right)\right)\right) \]
        10. *-lft-identityN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \left(\left(10 \cdot \frac{1}{k}\right) \cdot {k}^{2} + 1 \cdot \color{blue}{{k}^{2}}\right)\right)\right) \]
        11. distribute-rgt-inN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + {k}^{2} \cdot \color{blue}{\left(10 \cdot \frac{1}{k} + 1\right)}\right)\right) \]
        12. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(a, \left(1 + {k}^{2} \cdot \left(1 + \color{blue}{10 \cdot \frac{1}{k}}\right)\right)\right) \]
        13. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right) \]
        14. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(k \cdot k\right) \cdot \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right)\right) \]
        15. associate-*l*N/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right)\right) \]
        16. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
        17. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right)}\right)\right)\right) \]
        18. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right)\right)\right) \]
        19. distribute-rgt-inN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
        20. *-lft-identityN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{\left(10 \cdot \frac{1}{k}\right)} \cdot k\right)\right)\right)\right) \]
        21. associate-*l*N/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot \color{blue}{\left(\frac{1}{k} \cdot k\right)}\right)\right)\right)\right) \]
        22. lft-mult-inverseN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10 \cdot 1\right)\right)\right)\right) \]
        23. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right)\right) \]
      7. Simplified39.4%

        \[\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. Simplified16.7%

          \[\leadsto \color{blue}{a} \]
        2. Add Preprocessing

        Reproduce

        ?
        herbie shell --seed 2024191 
        (FPCore (a k m)
          :name "Falkner and Boettcher, Appendix A"
          :precision binary64
          (/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))