Falkner and Boettcher, Appendix A

Percentage Accurate: 89.9% → 98.9%
Time: 11.8s
Alternatives: 13
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 13 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: 89.9% 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: 98.9% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.00000000000000008e-5 < m < 1.3e-13

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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-+.f6494.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-rr94.0%

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

      \[\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) \]
    11. Step-by-step derivation
      1. +-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) \]
      2. +-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) \]
      3. /-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) \]
      4. *-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) \]
      5. +-commutativeN/A

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

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

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

    if 1.3e-13 < m

    1. Initial program 75.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-+.f6475.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. Simplified75.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 inf

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := a \cdot {k}^{m}\\ \mathbf{if}\;m \leq -0.002:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;m \leq 0.0285:\\ \;\;\;\;\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.002)
     t_0
     (if (<= m 0.0285)
       (/ 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.002) {
		tmp = t_0;
	} else if (m <= 0.0285) {
		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.002d0)) then
        tmp = t_0
    else if (m <= 0.0285d0) 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.002) {
		tmp = t_0;
	} else if (m <= 0.0285) {
		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.002:
		tmp = t_0
	elif m <= 0.0285:
		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.002)
		tmp = t_0;
	elseif (m <= 0.0285)
		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.002)
		tmp = t_0;
	elseif (m <= 0.0285)
		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.002], t$95$0, If[LessEqual[m, 0.0285], 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.002:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;m \leq 0.0285:\\
\;\;\;\;\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 < -2e-3 or 0.028500000000000001 < m

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

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

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

    if -2e-3 < m < 0.028500000000000001

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\color{blue}{\frac{1 + k \cdot \left(k + 10\right)}{a}}} \]
      2. /-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-+.f6493.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), a\right)\right) \]
    9. Applied egg-rr93.8%

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

      \[\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) \]
    11. Step-by-step derivation
      1. +-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) \]
      2. +-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) \]
      3. /-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) \]
      4. *-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) \]
      5. +-commutativeN/A

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

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

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

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

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


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

    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 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 0.23999999999999999 < k

    1. Initial program 81.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 75.8% accurate, 4.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;m \leq -4.5 \cdot 10^{+18}:\\
\;\;\;\;\frac{a - \frac{a \cdot 10 + \frac{a \cdot -99}{k}}{k}}{k \cdot k}\\

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

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{a + -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. Simplified63.0%

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

    if -4.5e18 < m < 0.67000000000000004

    1. Initial program 95.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-+.f6495.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. Simplified95.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-+.f6492.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. Simplified92.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-+.f6491.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), a\right)\right) \]
    9. Applied egg-rr91.5%

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

      \[\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) \]
    11. Step-by-step derivation
      1. +-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) \]
      2. +-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) \]
      3. /-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) \]
      4. *-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) \]
      5. +-commutativeN/A

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

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

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

    if 0.67000000000000004 < m

    1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
    8. 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)} \]
    9. 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. distribute-lft-neg-inN/A

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

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

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

        \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left(99 \cdot a\right)\right), \left(\color{blue}{-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.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) \]
    10. Simplified23.4%

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

      \[\leadsto \color{blue}{99 \cdot \left(a \cdot {k}^{2}\right)} \]
    12. 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-*.f6466.9%

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), 99\right)\right) \]
    13. Simplified66.9%

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

Alternative 5: 74.2% accurate, 4.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;m \leq -4.5 \cdot 10^{+18}:\\
\;\;\;\;\frac{a}{k \cdot k}\\

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

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


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

    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 inf

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

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

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

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

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

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

      if -4.5e18 < m < 1.1200000000000001

      1. Initial program 95.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-+.f6495.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. Simplified95.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-+.f6492.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. Simplified92.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-+.f6491.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), a\right)\right) \]
      9. Applied egg-rr91.5%

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

        \[\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) \]
      11. Step-by-step derivation
        1. +-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) \]
        2. +-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) \]
        3. /-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) \]
        4. *-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) \]
        5. +-commutativeN/A

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

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

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

      if 1.1200000000000001 < m

      1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
      8. 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)} \]
      9. 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. distribute-lft-neg-inN/A

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

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

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

          \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left(99 \cdot a\right)\right), \left(\color{blue}{-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.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) \]
      10. Simplified23.4%

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

        \[\leadsto \color{blue}{99 \cdot \left(a \cdot {k}^{2}\right)} \]
      12. 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-*.f6466.9%

          \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), 99\right)\right) \]
      13. Simplified66.9%

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

    Alternative 6: 58.0% accurate, 5.2× speedup?

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

      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 inf

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

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

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

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

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

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

        if -1.85000000000000004e-25 < m < 1.32e-101

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{a}{k}\right)}, k\right) \]
        12. Step-by-step derivation
          1. /-lowering-/.f6455.5%

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

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

        if 1.32e-101 < m < 0.23599999999999999

        1. Initial program 99.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-+.f6499.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. Simplified99.8%

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{a} \]
        9. Step-by-step derivation
          1. Simplified68.4%

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

          if 0.23599999999999999 < m

          1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
          8. 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)} \]
          9. 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. distribute-lft-neg-inN/A

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

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

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

              \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left(99 \cdot a\right)\right), \left(\color{blue}{-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.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) \]
          10. Simplified23.4%

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

            \[\leadsto \color{blue}{99 \cdot \left(a \cdot {k}^{2}\right)} \]
          12. 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-*.f6466.9%

              \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), 99\right)\right) \]
          13. Simplified66.9%

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

        Alternative 7: 72.4% accurate, 5.4× speedup?

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

          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 inf

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

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

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

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

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

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

            if -4.5e18 < m < 0.97999999999999998

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

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

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

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

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

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

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

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

            if 0.97999999999999998 < m

            1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
            8. 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)} \]
            9. 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. distribute-lft-neg-inN/A

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

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

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

                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left(99 \cdot a\right)\right), \left(\color{blue}{-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.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) \]
            10. Simplified23.4%

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

              \[\leadsto \color{blue}{99 \cdot \left(a \cdot {k}^{2}\right)} \]
            12. 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-*.f6466.9%

                \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), 99\right)\right) \]
            13. Simplified66.9%

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

          Alternative 8: 72.4% accurate, 6.0× speedup?

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

            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 inf

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

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

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

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

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

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

              if -4.5e18 < m < 1.30000000000000004

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

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

              if 1.30000000000000004 < m

              1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
              8. 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)} \]
              9. 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. distribute-lft-neg-inN/A

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

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

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

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left(99 \cdot a\right)\right), \left(\color{blue}{-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.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) \]
              10. Simplified23.4%

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

                \[\leadsto \color{blue}{99 \cdot \left(a \cdot {k}^{2}\right)} \]
              12. 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-*.f6466.9%

                  \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), 99\right)\right) \]
              13. Simplified66.9%

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

            Alternative 9: 71.5% accurate, 6.7× speedup?

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

              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 inf

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

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

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

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

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

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

                if -4.5e18 < m < 0.839999999999999969

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

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

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

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

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

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

                if 0.839999999999999969 < m

                1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                8. 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)} \]
                9. 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. distribute-lft-neg-inN/A

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

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

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

                    \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left(99 \cdot a\right)\right), \left(\color{blue}{-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.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) \]
                10. Simplified23.4%

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

                  \[\leadsto \color{blue}{99 \cdot \left(a \cdot {k}^{2}\right)} \]
                12. 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-*.f6466.9%

                    \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), 99\right)\right) \]
                13. Simplified66.9%

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

              Alternative 10: 61.8% accurate, 6.7× speedup?

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

                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 inf

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

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

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

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

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

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

                  if -3.49999999999999991e-48 < m < 1.75

                  1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                  8. 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-*.f6469.0%

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

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

                  if 1.75 < m

                  1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                  8. 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)} \]
                  9. 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. distribute-lft-neg-inN/A

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

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

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

                      \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left(99 \cdot a\right)\right), \left(\color{blue}{-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.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) \]
                  10. Simplified23.4%

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

                    \[\leadsto \color{blue}{99 \cdot \left(a \cdot {k}^{2}\right)} \]
                  12. 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-*.f6466.9%

                      \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), 99\right)\right) \]
                  13. Simplified66.9%

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

                Alternative 11: 47.4% accurate, 7.6× speedup?

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

                  1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 1.11999999999999994e-307 < k < 0.23999999999999999

                    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-+.f6455.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. Simplified55.0%

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

                      \[\leadsto \color{blue}{a} \]
                    9. Step-by-step derivation
                      1. Simplified54.0%

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

                      if 0.23999999999999999 < k

                      1. Initial program 81.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{a}{k}\right)}, k\right) \]
                      12. Step-by-step derivation
                        1. /-lowering-/.f6465.7%

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, k\right), k\right) \]
                      13. Simplified65.7%

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

                    Alternative 12: 46.5% accurate, 7.6× speedup?

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

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

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

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

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

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

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

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

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

                        if 2.2000000000000002e-308 < k < 0.23999999999999999

                        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-+.f6455.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. Simplified55.0%

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

                          \[\leadsto \color{blue}{a} \]
                        9. Step-by-step derivation
                          1. Simplified54.0%

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

                        Alternative 13: 19.4% accurate, 114.0× speedup?

                        \[\begin{array}{l} \\ a \end{array} \]
                        (FPCore (a k m) :precision binary64 a)
                        double code(double a, double k, double m) {
                        	return a;
                        }
                        
                        real(8) function code(a, k, m)
                            real(8), intent (in) :: a
                            real(8), intent (in) :: k
                            real(8), intent (in) :: m
                            code = a
                        end function
                        
                        public static double code(double a, double k, double m) {
                        	return a;
                        }
                        
                        def code(a, k, m):
                        	return a
                        
                        function code(a, k, m)
                        	return a
                        end
                        
                        function tmp = code(a, k, m)
                        	tmp = a;
                        end
                        
                        code[a_, k_, m_] := a
                        
                        \begin{array}{l}
                        
                        \\
                        a
                        \end{array}
                        
                        Derivation
                        1. Initial program 90.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-+.f6490.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. Simplified90.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-+.f6450.9%

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

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

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

                          Reproduce

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