Falkner and Boettcher, Appendix A

Percentage Accurate: 90.2% → 99.0%
Time: 13.6s
Alternatives: 15
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 15 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.2% 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: 99.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_0 := a \cdot {k}^{m}\\
\mathbf{if}\;m \leq -5 \cdot 10^{-15}:\\
\;\;\;\;\frac{t\_0}{1 + k \cdot 10}\\

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

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot 10\right)\right)\right) \]
      9. *-lowering-*.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, \color{blue}{10}\right)\right)\right) \]
    7. Simplified100.0%

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

    if -4.99999999999999999e-15 < m < 1.21999999999999994e-14

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.21999999999999994e-14 < m

    1. Initial program 85.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-+.f6485.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. Simplified85.2%

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

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

      \[\leadsto \color{blue}{a \cdot {k}^{m}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 2: 97.3% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 96.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-+.f6496.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. Simplified96.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.f6499.4%

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

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

    if 5.4000000000000002e-33 < k

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 99.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := a \cdot {k}^{m}\\ \mathbf{if}\;m \leq -5 \cdot 10^{-15}:\\ \;\;\;\;\frac{t\_0}{1 + k \cdot 10}\\ \mathbf{elif}\;m \leq 1.22 \cdot 10^{-14}:\\ \;\;\;\;\frac{1}{\frac{1}{a} + k \cdot \left(\frac{k}{a} + \frac{10}{a}\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (a k m)
 :precision binary64
 (let* ((t_0 (* a (pow k m))))
   (if (<= m -5e-15)
     (/ t_0 (+ 1.0 (* k 10.0)))
     (if (<= m 1.22e-14)
       (/ 1.0 (+ (/ 1.0 a) (* k (+ (/ k a) (/ 10.0 a)))))
       t_0))))
double code(double a, double k, double m) {
	double t_0 = a * pow(k, m);
	double tmp;
	if (m <= -5e-15) {
		tmp = t_0 / (1.0 + (k * 10.0));
	} else if (m <= 1.22e-14) {
		tmp = 1.0 / ((1.0 / a) + (k * ((k / a) + (10.0 / 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 ** m)
    if (m <= (-5d-15)) then
        tmp = t_0 / (1.0d0 + (k * 10.0d0))
    else if (m <= 1.22d-14) then
        tmp = 1.0d0 / ((1.0d0 / a) + (k * ((k / a) + (10.0d0 / 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 * Math.pow(k, m);
	double tmp;
	if (m <= -5e-15) {
		tmp = t_0 / (1.0 + (k * 10.0));
	} else if (m <= 1.22e-14) {
		tmp = 1.0 / ((1.0 / a) + (k * ((k / a) + (10.0 / a))));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(a, k, m):
	t_0 = a * math.pow(k, m)
	tmp = 0
	if m <= -5e-15:
		tmp = t_0 / (1.0 + (k * 10.0))
	elif m <= 1.22e-14:
		tmp = 1.0 / ((1.0 / a) + (k * ((k / a) + (10.0 / a))))
	else:
		tmp = t_0
	return tmp
function code(a, k, m)
	t_0 = Float64(a * (k ^ m))
	tmp = 0.0
	if (m <= -5e-15)
		tmp = Float64(t_0 / Float64(1.0 + Float64(k * 10.0)));
	elseif (m <= 1.22e-14)
		tmp = Float64(1.0 / Float64(Float64(1.0 / a) + Float64(k * Float64(Float64(k / a) + Float64(10.0 / a)))));
	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 <= -5e-15)
		tmp = t_0 / (1.0 + (k * 10.0));
	elseif (m <= 1.22e-14)
		tmp = 1.0 / ((1.0 / a) + (k * ((k / a) + (10.0 / a))));
	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, -5e-15], N[(t$95$0 / N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.22e-14], N[(1.0 / N[(N[(1.0 / a), $MachinePrecision] + N[(k * N[(N[(k / a), $MachinePrecision] + N[(10.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := a \cdot {k}^{m}\\
\mathbf{if}\;m \leq -5 \cdot 10^{-15}:\\
\;\;\;\;\frac{t\_0}{1 + k \cdot 10}\\

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

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot 10\right)\right)\right) \]
      9. *-lowering-*.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, \color{blue}{10}\right)\right)\right) \]
    7. Simplified100.0%

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

    if -4.99999999999999999e-15 < m < 1.21999999999999994e-14

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.21999999999999994e-14 < m

    1. Initial program 85.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-+.f6485.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. Simplified85.2%

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

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

      \[\leadsto \color{blue}{a \cdot {k}^{m}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.2%

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

Alternative 4: 98.9% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if m < -2.20000000000000008e-4 or 1.21999999999999994e-14 < m

    1. Initial program 92.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-+.f6492.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. Simplified92.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.f6499.3%

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

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

    if -2.20000000000000008e-4 < m < 1.21999999999999994e-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. Step-by-step derivation
      1. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 79.5% accurate, 4.6× speedup?

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

\\
\begin{array}{l}
t_0 := k \cdot \left(k \cdot k\right)\\
\mathbf{if}\;m \leq -0.215:\\
\;\;\;\;\frac{a \cdot 99}{k \cdot t\_0}\\

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

\mathbf{else}:\\
\;\;\;\;a \cdot \left(t\_0 \cdot 10^{-5}\right)\\


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 99\right), \left({\color{blue}{k}}^{4}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 99\right), \left({k}^{\left(3 + \color{blue}{1}\right)}\right)\right) \]
      6. pow-plusN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 99\right), \mathsf{*.f64}\left(\left({k}^{3}\right), \color{blue}{k}\right)\right) \]
      8. cube-multN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 99\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \left(k \cdot k\right)\right), k\right)\right) \]
      12. *-lowering-*.f6473.6%

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

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

    if -0.214999999999999997 < m < 0.27000000000000002

    1. Initial program 92.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-+.f6492.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. Simplified92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.27000000000000002 < m

    1. Initial program 85.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-+.f6485.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. Simplified85.1%

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

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

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

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

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

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

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

      \[\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. 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) \]
      5. associate-/r/N/A

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1000}{{k}^{3}} + \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(k, k\right)}, \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, 10\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(\left(\frac{1000}{{k}^{3}}\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(k, k\right)}, \mathsf{+.f64}\left(100, \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(\mathsf{/.f64}\left(1000, \left({k}^{3}\right)\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{k}, k\right), \mathsf{+.f64}\left(100, \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(\mathsf{/.f64}\left(1000, \left(k \cdot \left(k \cdot k\right)\right)\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \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(\mathsf{/.f64}\left(1000, \left(k \cdot {k}^{2}\right)\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \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(\mathsf{/.f64}\left(1000, \mathsf{*.f64}\left(k, \left({k}^{2}\right)\right)\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \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(\mathsf{/.f64}\left(1000, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, 10\right)\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1000, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right), \mathsf{+.f64}\left(1, \left(\frac{\mathsf{neg}\left(100\right)}{{k}^{2}}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, 10\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(\mathsf{/.f64}\left(1000, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right), \mathsf{+.f64}\left(1, \left(\frac{-100}{{k}^{2}}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, 10\right)\right)\right)\right)\right)\right) \]
      16. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{100000}, \color{blue}{\left({k}^{3}\right)}\right)\right) \]
      6. cube-multN/A

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

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

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

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{100000}, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{k}\right)\right)\right)\right) \]
      10. *-lowering-*.f6462.6%

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{100000}, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    15. Simplified62.6%

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

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

Alternative 6: 77.8% accurate, 6.0× speedup?

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

\\
\begin{array}{l}
t_0 := k \cdot \left(k \cdot k\right)\\
\mathbf{if}\;m \leq -0.18:\\
\;\;\;\;\frac{a \cdot 99}{k \cdot t\_0}\\

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

\mathbf{else}:\\
\;\;\;\;a \cdot \left(t\_0 \cdot 10^{-5}\right)\\


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 99\right), \left({\color{blue}{k}}^{4}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 99\right), \left({k}^{\left(3 + \color{blue}{1}\right)}\right)\right) \]
      6. pow-plusN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 99\right), \mathsf{*.f64}\left(\left({k}^{3}\right), \color{blue}{k}\right)\right) \]
      8. cube-multN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, 99\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, \left(k \cdot k\right)\right), k\right)\right) \]
      12. *-lowering-*.f6473.6%

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

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

    if -0.17999999999999999 < m < 0.75

    1. Initial program 92.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-+.f6492.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. Simplified92.9%

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

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

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

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

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

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

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

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

    if 0.75 < m

    1. Initial program 85.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-+.f6485.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. Simplified85.1%

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

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

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

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

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

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

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

      \[\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. 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) \]
      5. associate-/r/N/A

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1000}{{k}^{3}} + \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(k, k\right)}, \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, 10\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(\left(\frac{1000}{{k}^{3}}\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(k, k\right)}, \mathsf{+.f64}\left(100, \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(\mathsf{/.f64}\left(1000, \left({k}^{3}\right)\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{k}, k\right), \mathsf{+.f64}\left(100, \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(\mathsf{/.f64}\left(1000, \left(k \cdot \left(k \cdot k\right)\right)\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \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(\mathsf{/.f64}\left(1000, \left(k \cdot {k}^{2}\right)\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \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(\mathsf{/.f64}\left(1000, \mathsf{*.f64}\left(k, \left({k}^{2}\right)\right)\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \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(\mathsf{/.f64}\left(1000, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, 10\right)\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1000, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right), \mathsf{+.f64}\left(1, \left(\frac{\mathsf{neg}\left(100\right)}{{k}^{2}}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, 10\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(\mathsf{/.f64}\left(1000, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right), \mathsf{+.f64}\left(1, \left(\frac{-100}{{k}^{2}}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, 10\right)\right)\right)\right)\right)\right) \]
      16. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{100000}, \color{blue}{\left({k}^{3}\right)}\right)\right) \]
      6. cube-multN/A

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

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

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

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{100000}, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{k}\right)\right)\right)\right) \]
      10. *-lowering-*.f6462.6%

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{100000}, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    15. Simplified62.6%

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

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

Alternative 7: 72.3% accurate, 6.0× speedup?

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

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
    7. Simplified33.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-*.f6453.7%

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

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

    if -0.20000000000000001 < m < 0.680000000000000049

    1. Initial program 92.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-+.f6492.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. Simplified92.9%

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

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

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

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

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

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

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

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

    if 0.680000000000000049 < m

    1. Initial program 85.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-+.f6485.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. Simplified85.1%

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

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

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

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

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

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

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

      \[\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. 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) \]
      5. associate-/r/N/A

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1000}{{k}^{3}} + \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(k, k\right)}, \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, 10\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(\left(\frac{1000}{{k}^{3}}\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(k, k\right)}, \mathsf{+.f64}\left(100, \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(\mathsf{/.f64}\left(1000, \left({k}^{3}\right)\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{k}, k\right), \mathsf{+.f64}\left(100, \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(\mathsf{/.f64}\left(1000, \left(k \cdot \left(k \cdot k\right)\right)\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \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(\mathsf{/.f64}\left(1000, \left(k \cdot {k}^{2}\right)\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \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(\mathsf{/.f64}\left(1000, \mathsf{*.f64}\left(k, \left({k}^{2}\right)\right)\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \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(\mathsf{/.f64}\left(1000, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, 10\right)\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1000, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right), \mathsf{+.f64}\left(1, \left(\frac{\mathsf{neg}\left(100\right)}{{k}^{2}}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, 10\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(\mathsf{/.f64}\left(1000, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right), \mathsf{+.f64}\left(1, \left(\frac{-100}{{k}^{2}}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, 10\right)\right)\right)\right)\right)\right) \]
      16. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{100000}, \color{blue}{\left({k}^{3}\right)}\right)\right) \]
      6. cube-multN/A

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

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

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

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{100000}, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{k}\right)\right)\right)\right) \]
      10. *-lowering-*.f6462.6%

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{100000}, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    15. Simplified62.6%

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

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

Alternative 8: 71.5% accurate, 6.0× speedup?

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

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

\mathbf{elif}\;m \leq 0.9:\\
\;\;\;\;\frac{a}{1 + k \cdot k}\\

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
    7. Simplified33.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-*.f6453.7%

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

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

    if -0.17999999999999999 < m < 0.900000000000000022

    1. Initial program 92.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-+.f6492.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. Simplified92.9%

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
    7. Simplified92.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, \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-*.f6491.5%

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

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

    if 0.900000000000000022 < m

    1. Initial program 85.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-+.f6485.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. Simplified85.1%

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

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

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

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

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

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

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

      \[\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. 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) \]
      5. associate-/r/N/A

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1000}{{k}^{3}} + \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(k, k\right)}, \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, 10\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(\left(\frac{1000}{{k}^{3}}\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(k, k\right)}, \mathsf{+.f64}\left(100, \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(\mathsf{/.f64}\left(1000, \left({k}^{3}\right)\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\color{blue}{k}, k\right), \mathsf{+.f64}\left(100, \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(\mathsf{/.f64}\left(1000, \left(k \cdot \left(k \cdot k\right)\right)\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \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(\mathsf{/.f64}\left(1000, \left(k \cdot {k}^{2}\right)\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \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(\mathsf{/.f64}\left(1000, \mathsf{*.f64}\left(k, \left({k}^{2}\right)\right)\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \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(\mathsf{/.f64}\left(1000, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right), \left(1 - 100 \cdot \frac{1}{{k}^{2}}\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, 10\right)\right)\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(1000, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right), \mathsf{+.f64}\left(1, \left(\frac{\mathsf{neg}\left(100\right)}{{k}^{2}}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, 10\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(\mathsf{/.f64}\left(1000, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right), \mathsf{+.f64}\left(1, \left(\frac{-100}{{k}^{2}}\right)\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(100, \mathsf{*.f64}\left(k, 10\right)\right)\right)\right)\right)\right) \]
      16. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{100000}, \color{blue}{\left({k}^{3}\right)}\right)\right) \]
      6. cube-multN/A

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

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

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

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{100000}, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{k}\right)\right)\right)\right) \]
      10. *-lowering-*.f6462.6%

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\frac{1}{100000}, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    15. Simplified62.6%

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

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

Alternative 9: 72.4% accurate, 6.7× speedup?

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

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

\mathbf{elif}\;m \leq 1:\\
\;\;\;\;\frac{a}{1 + k \cdot k}\\

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
    7. Simplified33.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-*.f6453.7%

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

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

    if -0.225000000000000006 < m < 1

    1. Initial program 92.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-+.f6492.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. Simplified92.9%

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
    7. Simplified92.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, \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-*.f6491.5%

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

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

    if 1 < m

    1. Initial program 85.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-+.f6485.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. Simplified85.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 61.9% accurate, 6.7× speedup?

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

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

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

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


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

    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. Taylor expanded in m around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, k\right), a\right)\right) \]
    12. Simplified55.5%

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

    if -1.81999999999999993e-87 < m < 0.23999999999999999

    1. Initial program 93.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-+.f6493.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. Simplified93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.23999999999999999 < m

    1. Initial program 85.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-+.f6485.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. Simplified85.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 45.4% accurate, 7.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{a}{k \cdot k}\\ \mathbf{if}\;k \leq 1.85 \cdot 10^{-285}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;k \leq 9.2 \cdot 10^{-15}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (a k m)
 :precision binary64
 (let* ((t_0 (/ a (* k k))))
   (if (<= k 1.85e-285) t_0 (if (<= k 9.2e-15) a t_0))))
double code(double a, double k, double m) {
	double t_0 = a / (k * k);
	double tmp;
	if (k <= 1.85e-285) {
		tmp = t_0;
	} else if (k <= 9.2e-15) {
		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 <= 1.85d-285) then
        tmp = t_0
    else if (k <= 9.2d-15) 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 <= 1.85e-285) {
		tmp = t_0;
	} else if (k <= 9.2e-15) {
		tmp = a;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(a, k, m):
	t_0 = a / (k * k)
	tmp = 0
	if k <= 1.85e-285:
		tmp = t_0
	elif k <= 9.2e-15:
		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 <= 1.85e-285)
		tmp = t_0;
	elseif (k <= 9.2e-15)
		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 <= 1.85e-285)
		tmp = t_0;
	elseif (k <= 9.2e-15)
		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, 1.85e-285], t$95$0, If[LessEqual[k, 9.2e-15], a, t$95$0]]]
\begin{array}{l}

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

\mathbf{elif}\;k \leq 9.2 \cdot 10^{-15}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 1.8499999999999999e-285 or 9.19999999999999961e-15 < k

    1. Initial program 88.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-+.f6488.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. Simplified88.7%

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(a, \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-*.f6446.0%

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

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

    if 1.8499999999999999e-285 < k < 9.19999999999999961e-15

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 12: 55.7% accurate, 9.5× speedup?

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

      1. Initial program 96.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-+.f6496.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. Simplified96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(k \cdot k\right), a\right)\right) \]
        3. *-lowering-*.f6452.6%

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, k\right), a\right)\right) \]
      12. Simplified52.6%

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

      if 1.21999999999999994e-14 < m

      1. Initial program 85.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-+.f6485.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. Simplified85.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, 99\right)\right), \left(a \cdot \color{blue}{-10}\right)\right)\right)\right) \]
        16. *-lowering-*.f6424.4%

          \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, 99\right)\right), \mathsf{*.f64}\left(a, \color{blue}{-10}\right)\right)\right)\right) \]
      12. Simplified24.4%

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

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

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

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

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

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

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

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

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

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

    Alternative 13: 55.7% accurate, 9.5× speedup?

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

      1. Initial program 96.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-+.f6496.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. Simplified96.2%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(a, \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-*.f6452.6%

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

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

      if 1.21999999999999994e-14 < m

      1. Initial program 85.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-+.f6485.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. Simplified85.2%

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{1 + k \cdot \left(k + 10\right)}{a}\right)}\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(1 + k \cdot \left(k + 10\right)\right), \color{blue}{a}\right)\right) \]
        4. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \left(k \cdot \left(k + 10\right)\right)\right), a\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right), a\right)\right) \]
        6. +-lowering-+.f644.3%

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right), a\right)\right) \]
      9. Applied egg-rr4.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{1 + k \cdot \left(k + 10\right)}{a}}} \]
      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. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right)\right), \color{blue}{\left(-10 \cdot a\right)}\right)\right)\right) \]
        6. mul-1-negN/A

          \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(k \cdot \left(a + -100 \cdot a\right)\right)\right), \left(\color{blue}{-10} \cdot a\right)\right)\right)\right) \]
        7. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\left(k \cdot \left(\mathsf{neg}\left(\left(a + -100 \cdot a\right)\right)\right)\right), \left(\color{blue}{-10} \cdot a\right)\right)\right)\right) \]
        8. distribute-rgt1-inN/A

          \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\left(k \cdot \left(\mathsf{neg}\left(\left(-100 + 1\right) \cdot a\right)\right)\right), \left(-10 \cdot a\right)\right)\right)\right) \]
        9. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\left(k \cdot \left(\mathsf{neg}\left(-99 \cdot a\right)\right)\right), \left(-10 \cdot a\right)\right)\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left(\mathsf{neg}\left(-99 \cdot a\right)\right)\right), \left(\color{blue}{-10} \cdot a\right)\right)\right)\right) \]
        11. distribute-lft-neg-inN/A

          \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left(\left(\mathsf{neg}\left(-99\right)\right) \cdot a\right)\right), \left(-10 \cdot a\right)\right)\right)\right) \]
        12. metadata-evalN/A

          \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left(99 \cdot a\right)\right), \left(-10 \cdot a\right)\right)\right)\right) \]
        13. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left(a \cdot 99\right)\right), \left(-10 \cdot a\right)\right)\right)\right) \]
        14. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, 99\right)\right), \left(-10 \cdot a\right)\right)\right)\right) \]
        15. *-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, 99\right)\right), \left(a \cdot \color{blue}{-10}\right)\right)\right)\right) \]
        16. *-lowering-*.f6424.4%

          \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, 99\right)\right), \mathsf{*.f64}\left(a, \color{blue}{-10}\right)\right)\right)\right) \]
      12. Simplified24.4%

        \[\leadsto \color{blue}{a + k \cdot \left(k \cdot \left(a \cdot 99\right) + a \cdot -10\right)} \]
      13. Taylor expanded in k around inf

        \[\leadsto \color{blue}{99 \cdot \left(a \cdot {k}^{2}\right)} \]
      14. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \left(a \cdot {k}^{2}\right) \cdot \color{blue}{99} \]
        2. associate-*l*N/A

          \[\leadsto a \cdot \color{blue}{\left({k}^{2} \cdot 99\right)} \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(a, \color{blue}{\left({k}^{2} \cdot 99\right)}\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left({k}^{2}\right), \color{blue}{99}\right)\right) \]
        5. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left(k \cdot k\right), 99\right)\right) \]
        6. *-lowering-*.f6459.9%

          \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), 99\right)\right) \]
      15. Simplified59.9%

        \[\leadsto \color{blue}{a \cdot \left(\left(k \cdot k\right) \cdot 99\right)} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification55.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;m \leq 1.22 \cdot 10^{-14}:\\ \;\;\;\;\frac{a}{k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(99 \cdot \left(k \cdot k\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 14: 26.6% accurate, 11.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -9.2 \cdot 10^{-51}:\\ \;\;\;\;\frac{a}{k \cdot 10}\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
    (FPCore (a k m) :precision binary64 (if (<= m -9.2e-51) (/ a (* k 10.0)) a))
    double code(double a, double k, double m) {
    	double tmp;
    	if (m <= -9.2e-51) {
    		tmp = a / (k * 10.0);
    	} else {
    		tmp = a;
    	}
    	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 <= (-9.2d-51)) then
            tmp = a / (k * 10.0d0)
        else
            tmp = a
        end if
        code = tmp
    end function
    
    public static double code(double a, double k, double m) {
    	double tmp;
    	if (m <= -9.2e-51) {
    		tmp = a / (k * 10.0);
    	} else {
    		tmp = a;
    	}
    	return tmp;
    }
    
    def code(a, k, m):
    	tmp = 0
    	if m <= -9.2e-51:
    		tmp = a / (k * 10.0)
    	else:
    		tmp = a
    	return tmp
    
    function code(a, k, m)
    	tmp = 0.0
    	if (m <= -9.2e-51)
    		tmp = Float64(a / Float64(k * 10.0));
    	else
    		tmp = a;
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, k, m)
    	tmp = 0.0;
    	if (m <= -9.2e-51)
    		tmp = a / (k * 10.0);
    	else
    		tmp = a;
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, k_, m_] := If[LessEqual[m, -9.2e-51], N[(a / N[(k * 10.0), $MachinePrecision]), $MachinePrecision], a]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;m \leq -9.2 \cdot 10^{-51}:\\
    \;\;\;\;\frac{a}{k \cdot 10}\\
    
    \mathbf{else}:\\
    \;\;\;\;a\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if m < -9.20000000000000007e-51

      1. Initial program 98.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-+.f6498.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. Simplified98.9%

        \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
      4. Add Preprocessing
      5. Taylor expanded in k around 0

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \color{blue}{\left(1 + 10 \cdot k\right)}\right) \]
      6. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + k \cdot \color{blue}{10}\right)\right) \]
        2. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + k \cdot \left(-1 \cdot \color{blue}{-10}\right)\right)\right) \]
        3. associate-*l*N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \left(k \cdot -1\right) \cdot \color{blue}{-10}\right)\right) \]
        4. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \left(-1 \cdot k\right) \cdot -10\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\left(-1 \cdot k\right) \cdot -10\right)}\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(\left(k \cdot -1\right) \cdot -10\right)\right)\right) \]
        7. associate-*l*N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(-1 \cdot -10\right)}\right)\right)\right) \]
        8. metadata-evalN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot 10\right)\right)\right) \]
        9. *-lowering-*.f6494.7%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{10}\right)\right)\right) \]
      7. Simplified94.7%

        \[\leadsto \frac{a \cdot {k}^{m}}{\color{blue}{1 + k \cdot 10}} \]
      8. Taylor expanded in k around inf

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \color{blue}{\left(10 \cdot k\right)}\right) \]
      9. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(k \cdot \color{blue}{10}\right)\right) \]
        2. *-lowering-*.f6475.5%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{*.f64}\left(k, \color{blue}{10}\right)\right) \]
      10. Simplified75.5%

        \[\leadsto \frac{a \cdot {k}^{m}}{\color{blue}{k \cdot 10}} \]
      11. Taylor expanded in m around 0

        \[\leadsto \mathsf{/.f64}\left(\color{blue}{a}, \mathsf{*.f64}\left(k, 10\right)\right) \]
      12. Step-by-step derivation
        1. Simplified20.1%

          \[\leadsto \frac{\color{blue}{a}}{k \cdot 10} \]

        if -9.20000000000000007e-51 < m

        1. Initial program 89.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-+.f6489.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. Simplified89.1%

          \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
        4. Add Preprocessing
        5. Taylor expanded in m around 0

          \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
        6. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
          4. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
          5. +-lowering-+.f6446.6%

            \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
        7. Simplified46.6%

          \[\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. Simplified25.1%

            \[\leadsto \color{blue}{a} \]
        10. Recombined 2 regimes into one program.
        11. Add Preprocessing

        Alternative 15: 20.6% 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 92.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-+.f6492.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. Simplified92.4%

          \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
        4. Add Preprocessing
        5. Taylor expanded in m around 0

          \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
        6. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
          4. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
          5. +-lowering-+.f6443.6%

            \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
        7. Simplified43.6%

          \[\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. Simplified18.1%

            \[\leadsto \color{blue}{a} \]
          2. Add Preprocessing

          Reproduce

          ?
          herbie shell --seed 2024150 
          (FPCore (a k m)
            :name "Falkner and Boettcher, Appendix A"
            :precision binary64
            (/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))