Falkner and Boettcher, Appendix A

Percentage Accurate: 89.9% → 96.6%
Time: 14.0s
Alternatives: 18
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 18 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: 96.6% accurate, 0.5× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{a\_m \cdot {k}^{m}}{\left(1 + k \cdot 10\right) + k \cdot k} \leq 2 \cdot 10^{+63}:\\ \;\;\;\;\frac{a\_m}{\frac{1 + k \cdot \left(k + 10\right)}{{k}^{m}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{a\_m}{{k}^{\left(0 - m\right)}}\\ \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) a)
(FPCore (a_s a_m k m)
 :precision binary64
 (*
  a_s
  (if (<= (/ (* a_m (pow k m)) (+ (+ 1.0 (* k 10.0)) (* k k))) 2e+63)
    (/ a_m (/ (+ 1.0 (* k (+ k 10.0))) (pow k m)))
    (/ a_m (pow k (- 0.0 m))))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
double code(double a_s, double a_m, double k, double m) {
	double tmp;
	if (((a_m * pow(k, m)) / ((1.0 + (k * 10.0)) + (k * k))) <= 2e+63) {
		tmp = a_m / ((1.0 + (k * (k + 10.0))) / pow(k, m));
	} else {
		tmp = a_m / pow(k, (0.0 - m));
	}
	return a_s * tmp;
}
a\_m = abs(a)
a\_s = copysign(1.0d0, a)
real(8) function code(a_s, a_m, k, m)
    real(8), intent (in) :: a_s
    real(8), intent (in) :: a_m
    real(8), intent (in) :: k
    real(8), intent (in) :: m
    real(8) :: tmp
    if (((a_m * (k ** m)) / ((1.0d0 + (k * 10.0d0)) + (k * k))) <= 2d+63) then
        tmp = a_m / ((1.0d0 + (k * (k + 10.0d0))) / (k ** m))
    else
        tmp = a_m / (k ** (0.0d0 - m))
    end if
    code = a_s * tmp
end function
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
public static double code(double a_s, double a_m, double k, double m) {
	double tmp;
	if (((a_m * Math.pow(k, m)) / ((1.0 + (k * 10.0)) + (k * k))) <= 2e+63) {
		tmp = a_m / ((1.0 + (k * (k + 10.0))) / Math.pow(k, m));
	} else {
		tmp = a_m / Math.pow(k, (0.0 - m));
	}
	return a_s * tmp;
}
a\_m = math.fabs(a)
a\_s = math.copysign(1.0, a)
def code(a_s, a_m, k, m):
	tmp = 0
	if ((a_m * math.pow(k, m)) / ((1.0 + (k * 10.0)) + (k * k))) <= 2e+63:
		tmp = a_m / ((1.0 + (k * (k + 10.0))) / math.pow(k, m))
	else:
		tmp = a_m / math.pow(k, (0.0 - m))
	return a_s * tmp
a\_m = abs(a)
a\_s = copysign(1.0, a)
function code(a_s, a_m, k, m)
	tmp = 0.0
	if (Float64(Float64(a_m * (k ^ m)) / Float64(Float64(1.0 + Float64(k * 10.0)) + Float64(k * k))) <= 2e+63)
		tmp = Float64(a_m / Float64(Float64(1.0 + Float64(k * Float64(k + 10.0))) / (k ^ m)));
	else
		tmp = Float64(a_m / (k ^ Float64(0.0 - m)));
	end
	return Float64(a_s * tmp)
end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
function tmp_2 = code(a_s, a_m, k, m)
	tmp = 0.0;
	if (((a_m * (k ^ m)) / ((1.0 + (k * 10.0)) + (k * k))) <= 2e+63)
		tmp = a_m / ((1.0 + (k * (k + 10.0))) / (k ^ m));
	else
		tmp = a_m / (k ^ (0.0 - m));
	end
	tmp_2 = a_s * tmp;
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[N[(N[(a$95$m * N[Power[k, m], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+63], N[(a$95$m / N[(N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[k, m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a$95$m / N[Power[k, N[(0.0 - m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 64.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(a, \left({\left({k}^{-1}\right)}^{m}\right)\right) \]
        5. pow-powN/A

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(k, \mathsf{neg.f64}\left(m\right)\right)\right) \]
      5. Applied egg-rr100.0%

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

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

    Alternative 2: 96.7% accurate, 1.0× speedup?

    \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -22000000000:\\ \;\;\;\;a\_m \cdot {k}^{m}\\ \mathbf{elif}\;m \leq 7.5 \cdot 10^{-17}:\\ \;\;\;\;\frac{a\_m}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{a\_m}{{k}^{\left(0 - m\right)}}\\ \end{array} \end{array} \]
    a\_m = (fabs.f64 a)
    a\_s = (copysign.f64 #s(literal 1 binary64) a)
    (FPCore (a_s a_m k m)
     :precision binary64
     (*
      a_s
      (if (<= m -22000000000.0)
        (* a_m (pow k m))
        (if (<= m 7.5e-17)
          (/ a_m (+ 1.0 (* k (+ k 10.0))))
          (/ a_m (pow k (- 0.0 m)))))))
    a\_m = fabs(a);
    a\_s = copysign(1.0, a);
    double code(double a_s, double a_m, double k, double m) {
    	double tmp;
    	if (m <= -22000000000.0) {
    		tmp = a_m * pow(k, m);
    	} else if (m <= 7.5e-17) {
    		tmp = a_m / (1.0 + (k * (k + 10.0)));
    	} else {
    		tmp = a_m / pow(k, (0.0 - m));
    	}
    	return a_s * tmp;
    }
    
    a\_m = abs(a)
    a\_s = copysign(1.0d0, a)
    real(8) function code(a_s, a_m, k, m)
        real(8), intent (in) :: a_s
        real(8), intent (in) :: a_m
        real(8), intent (in) :: k
        real(8), intent (in) :: m
        real(8) :: tmp
        if (m <= (-22000000000.0d0)) then
            tmp = a_m * (k ** m)
        else if (m <= 7.5d-17) then
            tmp = a_m / (1.0d0 + (k * (k + 10.0d0)))
        else
            tmp = a_m / (k ** (0.0d0 - m))
        end if
        code = a_s * tmp
    end function
    
    a\_m = Math.abs(a);
    a\_s = Math.copySign(1.0, a);
    public static double code(double a_s, double a_m, double k, double m) {
    	double tmp;
    	if (m <= -22000000000.0) {
    		tmp = a_m * Math.pow(k, m);
    	} else if (m <= 7.5e-17) {
    		tmp = a_m / (1.0 + (k * (k + 10.0)));
    	} else {
    		tmp = a_m / Math.pow(k, (0.0 - m));
    	}
    	return a_s * tmp;
    }
    
    a\_m = math.fabs(a)
    a\_s = math.copysign(1.0, a)
    def code(a_s, a_m, k, m):
    	tmp = 0
    	if m <= -22000000000.0:
    		tmp = a_m * math.pow(k, m)
    	elif m <= 7.5e-17:
    		tmp = a_m / (1.0 + (k * (k + 10.0)))
    	else:
    		tmp = a_m / math.pow(k, (0.0 - m))
    	return a_s * tmp
    
    a\_m = abs(a)
    a\_s = copysign(1.0, a)
    function code(a_s, a_m, k, m)
    	tmp = 0.0
    	if (m <= -22000000000.0)
    		tmp = Float64(a_m * (k ^ m));
    	elseif (m <= 7.5e-17)
    		tmp = Float64(a_m / Float64(1.0 + Float64(k * Float64(k + 10.0))));
    	else
    		tmp = Float64(a_m / (k ^ Float64(0.0 - m)));
    	end
    	return Float64(a_s * tmp)
    end
    
    a\_m = abs(a);
    a\_s = sign(a) * abs(1.0);
    function tmp_2 = code(a_s, a_m, k, m)
    	tmp = 0.0;
    	if (m <= -22000000000.0)
    		tmp = a_m * (k ^ m);
    	elseif (m <= 7.5e-17)
    		tmp = a_m / (1.0 + (k * (k + 10.0)));
    	else
    		tmp = a_m / (k ^ (0.0 - m));
    	end
    	tmp_2 = a_s * tmp;
    end
    
    a\_m = N[Abs[a], $MachinePrecision]
    a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, -22000000000.0], N[(a$95$m * N[Power[k, m], $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 7.5e-17], N[(a$95$m / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a$95$m / N[Power[k, N[(0.0 - m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
    
    \begin{array}{l}
    a\_m = \left|a\right|
    \\
    a\_s = \mathsf{copysign}\left(1, a\right)
    
    \\
    a\_s \cdot \begin{array}{l}
    \mathbf{if}\;m \leq -22000000000:\\
    \;\;\;\;a\_m \cdot {k}^{m}\\
    
    \mathbf{elif}\;m \leq 7.5 \cdot 10^{-17}:\\
    \;\;\;\;\frac{a\_m}{1 + k \cdot \left(k + 10\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{a\_m}{{k}^{\left(0 - m\right)}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if m < -2.2e10

      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 -2.2e10 < m < 7.49999999999999984e-17

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 7.49999999999999984e-17 < m

      1. Initial program 77.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-+.f6477.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. Simplified77.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(\color{blue}{\left(a \cdot e^{-1 \cdot \left(m \cdot \log \left(\frac{1}{k}\right)\right)}\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right) \]
      6. Step-by-step derivation
        1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(a, \left({\left({k}^{-1}\right)}^{m}\right)\right) \]
          5. pow-powN/A

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(k, \mathsf{neg.f64}\left(m\right)\right)\right) \]
        5. Applied egg-rr100.0%

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

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

      Alternative 3: 96.7% accurate, 1.0× speedup?

      \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ \begin{array}{l} t_0 := a\_m \cdot {k}^{m}\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -22000000000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;m \leq 7.5 \cdot 10^{-17}:\\ \;\;\;\;\frac{a\_m}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \end{array} \]
      a\_m = (fabs.f64 a)
      a\_s = (copysign.f64 #s(literal 1 binary64) a)
      (FPCore (a_s a_m k m)
       :precision binary64
       (let* ((t_0 (* a_m (pow k m))))
         (*
          a_s
          (if (<= m -22000000000.0)
            t_0
            (if (<= m 7.5e-17) (/ a_m (+ 1.0 (* k (+ k 10.0)))) t_0)))))
      a\_m = fabs(a);
      a\_s = copysign(1.0, a);
      double code(double a_s, double a_m, double k, double m) {
      	double t_0 = a_m * pow(k, m);
      	double tmp;
      	if (m <= -22000000000.0) {
      		tmp = t_0;
      	} else if (m <= 7.5e-17) {
      		tmp = a_m / (1.0 + (k * (k + 10.0)));
      	} else {
      		tmp = t_0;
      	}
      	return a_s * tmp;
      }
      
      a\_m = abs(a)
      a\_s = copysign(1.0d0, a)
      real(8) function code(a_s, a_m, k, m)
          real(8), intent (in) :: a_s
          real(8), intent (in) :: a_m
          real(8), intent (in) :: k
          real(8), intent (in) :: m
          real(8) :: t_0
          real(8) :: tmp
          t_0 = a_m * (k ** m)
          if (m <= (-22000000000.0d0)) then
              tmp = t_0
          else if (m <= 7.5d-17) then
              tmp = a_m / (1.0d0 + (k * (k + 10.0d0)))
          else
              tmp = t_0
          end if
          code = a_s * tmp
      end function
      
      a\_m = Math.abs(a);
      a\_s = Math.copySign(1.0, a);
      public static double code(double a_s, double a_m, double k, double m) {
      	double t_0 = a_m * Math.pow(k, m);
      	double tmp;
      	if (m <= -22000000000.0) {
      		tmp = t_0;
      	} else if (m <= 7.5e-17) {
      		tmp = a_m / (1.0 + (k * (k + 10.0)));
      	} else {
      		tmp = t_0;
      	}
      	return a_s * tmp;
      }
      
      a\_m = math.fabs(a)
      a\_s = math.copysign(1.0, a)
      def code(a_s, a_m, k, m):
      	t_0 = a_m * math.pow(k, m)
      	tmp = 0
      	if m <= -22000000000.0:
      		tmp = t_0
      	elif m <= 7.5e-17:
      		tmp = a_m / (1.0 + (k * (k + 10.0)))
      	else:
      		tmp = t_0
      	return a_s * tmp
      
      a\_m = abs(a)
      a\_s = copysign(1.0, a)
      function code(a_s, a_m, k, m)
      	t_0 = Float64(a_m * (k ^ m))
      	tmp = 0.0
      	if (m <= -22000000000.0)
      		tmp = t_0;
      	elseif (m <= 7.5e-17)
      		tmp = Float64(a_m / Float64(1.0 + Float64(k * Float64(k + 10.0))));
      	else
      		tmp = t_0;
      	end
      	return Float64(a_s * tmp)
      end
      
      a\_m = abs(a);
      a\_s = sign(a) * abs(1.0);
      function tmp_2 = code(a_s, a_m, k, m)
      	t_0 = a_m * (k ^ m);
      	tmp = 0.0;
      	if (m <= -22000000000.0)
      		tmp = t_0;
      	elseif (m <= 7.5e-17)
      		tmp = a_m / (1.0 + (k * (k + 10.0)));
      	else
      		tmp = t_0;
      	end
      	tmp_2 = a_s * tmp;
      end
      
      a\_m = N[Abs[a], $MachinePrecision]
      a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[a$95$s_, a$95$m_, k_, m_] := Block[{t$95$0 = N[(a$95$m * N[Power[k, m], $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[m, -22000000000.0], t$95$0, If[LessEqual[m, 7.5e-17], N[(a$95$m / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]), $MachinePrecision]]
      
      \begin{array}{l}
      a\_m = \left|a\right|
      \\
      a\_s = \mathsf{copysign}\left(1, a\right)
      
      \\
      \begin{array}{l}
      t_0 := a\_m \cdot {k}^{m}\\
      a\_s \cdot \begin{array}{l}
      \mathbf{if}\;m \leq -22000000000:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;m \leq 7.5 \cdot 10^{-17}:\\
      \;\;\;\;\frac{a\_m}{1 + k \cdot \left(k + 10\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if m < -2.2e10 or 7.49999999999999984e-17 < m

        1. Initial program 88.1%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \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 -2.2e10 < m < 7.49999999999999984e-17

        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 4: 99.2% accurate, 1.0× speedup?

      \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1:\\ \;\;\;\;\frac{a\_m}{{k}^{\left(0 - m\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{a\_m \cdot {k}^{m}}{k}}{k}\\ \end{array} \end{array} \]
      a\_m = (fabs.f64 a)
      a\_s = (copysign.f64 #s(literal 1 binary64) a)
      (FPCore (a_s a_m k m)
       :precision binary64
       (*
        a_s
        (if (<= k 1.0) (/ a_m (pow k (- 0.0 m))) (/ (/ (* a_m (pow k m)) k) k))))
      a\_m = fabs(a);
      a\_s = copysign(1.0, a);
      double code(double a_s, double a_m, double k, double m) {
      	double tmp;
      	if (k <= 1.0) {
      		tmp = a_m / pow(k, (0.0 - m));
      	} else {
      		tmp = ((a_m * pow(k, m)) / k) / k;
      	}
      	return a_s * tmp;
      }
      
      a\_m = abs(a)
      a\_s = copysign(1.0d0, a)
      real(8) function code(a_s, a_m, k, m)
          real(8), intent (in) :: a_s
          real(8), intent (in) :: a_m
          real(8), intent (in) :: k
          real(8), intent (in) :: m
          real(8) :: tmp
          if (k <= 1.0d0) then
              tmp = a_m / (k ** (0.0d0 - m))
          else
              tmp = ((a_m * (k ** m)) / k) / k
          end if
          code = a_s * tmp
      end function
      
      a\_m = Math.abs(a);
      a\_s = Math.copySign(1.0, a);
      public static double code(double a_s, double a_m, double k, double m) {
      	double tmp;
      	if (k <= 1.0) {
      		tmp = a_m / Math.pow(k, (0.0 - m));
      	} else {
      		tmp = ((a_m * Math.pow(k, m)) / k) / k;
      	}
      	return a_s * tmp;
      }
      
      a\_m = math.fabs(a)
      a\_s = math.copysign(1.0, a)
      def code(a_s, a_m, k, m):
      	tmp = 0
      	if k <= 1.0:
      		tmp = a_m / math.pow(k, (0.0 - m))
      	else:
      		tmp = ((a_m * math.pow(k, m)) / k) / k
      	return a_s * tmp
      
      a\_m = abs(a)
      a\_s = copysign(1.0, a)
      function code(a_s, a_m, k, m)
      	tmp = 0.0
      	if (k <= 1.0)
      		tmp = Float64(a_m / (k ^ Float64(0.0 - m)));
      	else
      		tmp = Float64(Float64(Float64(a_m * (k ^ m)) / k) / k);
      	end
      	return Float64(a_s * tmp)
      end
      
      a\_m = abs(a);
      a\_s = sign(a) * abs(1.0);
      function tmp_2 = code(a_s, a_m, k, m)
      	tmp = 0.0;
      	if (k <= 1.0)
      		tmp = a_m / (k ^ (0.0 - m));
      	else
      		tmp = ((a_m * (k ^ m)) / k) / k;
      	end
      	tmp_2 = a_s * tmp;
      end
      
      a\_m = N[Abs[a], $MachinePrecision]
      a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[k, 1.0], N[(a$95$m / N[Power[k, N[(0.0 - m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(a$95$m * N[Power[k, m], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] / k), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      a\_m = \left|a\right|
      \\
      a\_s = \mathsf{copysign}\left(1, a\right)
      
      \\
      a\_s \cdot \begin{array}{l}
      \mathbf{if}\;k \leq 1:\\
      \;\;\;\;\frac{a\_m}{{k}^{\left(0 - m\right)}}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\frac{a\_m \cdot {k}^{m}}{k}}{k}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if k < 1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{/.f64}\left(a, \left({\left({k}^{-1}\right)}^{m}\right)\right) \]
            5. pow-powN/A

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

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

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

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

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(k, \left(\mathsf{neg}\left(m\right)\right)\right)\right) \]
            2. neg-lowering-neg.f6498.9%

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

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

          if 1 < k

          1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
          4. Add Preprocessing
          5. Taylor expanded in k around 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-*.f6485.9%

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

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

            \[\leadsto \color{blue}{\frac{\frac{a \cdot {k}^{m}}{k}}{k}} \]
        10. Recombined 2 regimes into one program.
        11. Final simplification99.1%

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

        Alternative 5: 97.2% accurate, 1.0× speedup?

        \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1:\\ \;\;\;\;\frac{a\_m}{{k}^{\left(0 - m\right)}}\\ \mathbf{else}:\\ \;\;\;\;a\_m \cdot {k}^{\left(m - 2\right)}\\ \end{array} \end{array} \]
        a\_m = (fabs.f64 a)
        a\_s = (copysign.f64 #s(literal 1 binary64) a)
        (FPCore (a_s a_m k m)
         :precision binary64
         (* a_s (if (<= k 1.0) (/ a_m (pow k (- 0.0 m))) (* a_m (pow k (- m 2.0))))))
        a\_m = fabs(a);
        a\_s = copysign(1.0, a);
        double code(double a_s, double a_m, double k, double m) {
        	double tmp;
        	if (k <= 1.0) {
        		tmp = a_m / pow(k, (0.0 - m));
        	} else {
        		tmp = a_m * pow(k, (m - 2.0));
        	}
        	return a_s * tmp;
        }
        
        a\_m = abs(a)
        a\_s = copysign(1.0d0, a)
        real(8) function code(a_s, a_m, k, m)
            real(8), intent (in) :: a_s
            real(8), intent (in) :: a_m
            real(8), intent (in) :: k
            real(8), intent (in) :: m
            real(8) :: tmp
            if (k <= 1.0d0) then
                tmp = a_m / (k ** (0.0d0 - m))
            else
                tmp = a_m * (k ** (m - 2.0d0))
            end if
            code = a_s * tmp
        end function
        
        a\_m = Math.abs(a);
        a\_s = Math.copySign(1.0, a);
        public static double code(double a_s, double a_m, double k, double m) {
        	double tmp;
        	if (k <= 1.0) {
        		tmp = a_m / Math.pow(k, (0.0 - m));
        	} else {
        		tmp = a_m * Math.pow(k, (m - 2.0));
        	}
        	return a_s * tmp;
        }
        
        a\_m = math.fabs(a)
        a\_s = math.copysign(1.0, a)
        def code(a_s, a_m, k, m):
        	tmp = 0
        	if k <= 1.0:
        		tmp = a_m / math.pow(k, (0.0 - m))
        	else:
        		tmp = a_m * math.pow(k, (m - 2.0))
        	return a_s * tmp
        
        a\_m = abs(a)
        a\_s = copysign(1.0, a)
        function code(a_s, a_m, k, m)
        	tmp = 0.0
        	if (k <= 1.0)
        		tmp = Float64(a_m / (k ^ Float64(0.0 - m)));
        	else
        		tmp = Float64(a_m * (k ^ Float64(m - 2.0)));
        	end
        	return Float64(a_s * tmp)
        end
        
        a\_m = abs(a);
        a\_s = sign(a) * abs(1.0);
        function tmp_2 = code(a_s, a_m, k, m)
        	tmp = 0.0;
        	if (k <= 1.0)
        		tmp = a_m / (k ^ (0.0 - m));
        	else
        		tmp = a_m * (k ^ (m - 2.0));
        	end
        	tmp_2 = a_s * tmp;
        end
        
        a\_m = N[Abs[a], $MachinePrecision]
        a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
        code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[k, 1.0], N[(a$95$m / N[Power[k, N[(0.0 - m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(a$95$m * N[Power[k, N[(m - 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
        
        \begin{array}{l}
        a\_m = \left|a\right|
        \\
        a\_s = \mathsf{copysign}\left(1, a\right)
        
        \\
        a\_s \cdot \begin{array}{l}
        \mathbf{if}\;k \leq 1:\\
        \;\;\;\;\frac{a\_m}{{k}^{\left(0 - m\right)}}\\
        
        \mathbf{else}:\\
        \;\;\;\;a\_m \cdot {k}^{\left(m - 2\right)}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if k < 1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \left({\left({k}^{-1}\right)}^{m}\right)\right) \]
              5. pow-powN/A

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{pow.f64}\left(k, \left(\mathsf{neg}\left(m\right)\right)\right)\right) \]
              2. neg-lowering-neg.f6498.9%

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

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

            if 1 < k

            1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
            4. Add Preprocessing
            5. Taylor expanded in k around 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-*.f6485.9%

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

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

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

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

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

          Alternative 6: 70.6% accurate, 2.0× speedup?

          \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ \begin{array}{l} t_0 := k \cdot \left(k \cdot k\right)\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -22000000000:\\ \;\;\;\;\frac{a\_m \cdot \frac{99}{k \cdot k}}{k \cdot k}\\ \mathbf{elif}\;m \leq 0.68:\\ \;\;\;\;\frac{a\_m}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{a\_m}{1 + \frac{\frac{1000 + \frac{1000000}{t\_0}}{t\_0} - -1}{t\_0} \cdot \frac{k \cdot \left(k \cdot k + -100\right)}{\frac{1}{\left(k \cdot k + 100\right) - k \cdot -10}}}\\ \end{array} \end{array} \end{array} \]
          a\_m = (fabs.f64 a)
          a\_s = (copysign.f64 #s(literal 1 binary64) a)
          (FPCore (a_s a_m k m)
           :precision binary64
           (let* ((t_0 (* k (* k k))))
             (*
              a_s
              (if (<= m -22000000000.0)
                (/ (* a_m (/ 99.0 (* k k))) (* k k))
                (if (<= m 0.68)
                  (/ a_m (+ 1.0 (* k (+ k 10.0))))
                  (/
                   a_m
                   (+
                    1.0
                    (*
                     (/ (- (/ (+ 1000.0 (/ 1000000.0 t_0)) t_0) -1.0) t_0)
                     (/
                      (* k (+ (* k k) -100.0))
                      (/ 1.0 (- (+ (* k k) 100.0) (* k -10.0))))))))))))
          a\_m = fabs(a);
          a\_s = copysign(1.0, a);
          double code(double a_s, double a_m, double k, double m) {
          	double t_0 = k * (k * k);
          	double tmp;
          	if (m <= -22000000000.0) {
          		tmp = (a_m * (99.0 / (k * k))) / (k * k);
          	} else if (m <= 0.68) {
          		tmp = a_m / (1.0 + (k * (k + 10.0)));
          	} else {
          		tmp = a_m / (1.0 + (((((1000.0 + (1000000.0 / t_0)) / t_0) - -1.0) / t_0) * ((k * ((k * k) + -100.0)) / (1.0 / (((k * k) + 100.0) - (k * -10.0))))));
          	}
          	return a_s * tmp;
          }
          
          a\_m = abs(a)
          a\_s = copysign(1.0d0, a)
          real(8) function code(a_s, a_m, k, m)
              real(8), intent (in) :: a_s
              real(8), intent (in) :: a_m
              real(8), intent (in) :: k
              real(8), intent (in) :: m
              real(8) :: t_0
              real(8) :: tmp
              t_0 = k * (k * k)
              if (m <= (-22000000000.0d0)) then
                  tmp = (a_m * (99.0d0 / (k * k))) / (k * k)
              else if (m <= 0.68d0) then
                  tmp = a_m / (1.0d0 + (k * (k + 10.0d0)))
              else
                  tmp = a_m / (1.0d0 + (((((1000.0d0 + (1000000.0d0 / t_0)) / t_0) - (-1.0d0)) / t_0) * ((k * ((k * k) + (-100.0d0))) / (1.0d0 / (((k * k) + 100.0d0) - (k * (-10.0d0)))))))
              end if
              code = a_s * tmp
          end function
          
          a\_m = Math.abs(a);
          a\_s = Math.copySign(1.0, a);
          public static double code(double a_s, double a_m, double k, double m) {
          	double t_0 = k * (k * k);
          	double tmp;
          	if (m <= -22000000000.0) {
          		tmp = (a_m * (99.0 / (k * k))) / (k * k);
          	} else if (m <= 0.68) {
          		tmp = a_m / (1.0 + (k * (k + 10.0)));
          	} else {
          		tmp = a_m / (1.0 + (((((1000.0 + (1000000.0 / t_0)) / t_0) - -1.0) / t_0) * ((k * ((k * k) + -100.0)) / (1.0 / (((k * k) + 100.0) - (k * -10.0))))));
          	}
          	return a_s * tmp;
          }
          
          a\_m = math.fabs(a)
          a\_s = math.copysign(1.0, a)
          def code(a_s, a_m, k, m):
          	t_0 = k * (k * k)
          	tmp = 0
          	if m <= -22000000000.0:
          		tmp = (a_m * (99.0 / (k * k))) / (k * k)
          	elif m <= 0.68:
          		tmp = a_m / (1.0 + (k * (k + 10.0)))
          	else:
          		tmp = a_m / (1.0 + (((((1000.0 + (1000000.0 / t_0)) / t_0) - -1.0) / t_0) * ((k * ((k * k) + -100.0)) / (1.0 / (((k * k) + 100.0) - (k * -10.0))))))
          	return a_s * tmp
          
          a\_m = abs(a)
          a\_s = copysign(1.0, a)
          function code(a_s, a_m, k, m)
          	t_0 = Float64(k * Float64(k * k))
          	tmp = 0.0
          	if (m <= -22000000000.0)
          		tmp = Float64(Float64(a_m * Float64(99.0 / Float64(k * k))) / Float64(k * k));
          	elseif (m <= 0.68)
          		tmp = Float64(a_m / Float64(1.0 + Float64(k * Float64(k + 10.0))));
          	else
          		tmp = Float64(a_m / Float64(1.0 + Float64(Float64(Float64(Float64(Float64(1000.0 + Float64(1000000.0 / t_0)) / t_0) - -1.0) / t_0) * Float64(Float64(k * Float64(Float64(k * k) + -100.0)) / Float64(1.0 / Float64(Float64(Float64(k * k) + 100.0) - Float64(k * -10.0)))))));
          	end
          	return Float64(a_s * tmp)
          end
          
          a\_m = abs(a);
          a\_s = sign(a) * abs(1.0);
          function tmp_2 = code(a_s, a_m, k, m)
          	t_0 = k * (k * k);
          	tmp = 0.0;
          	if (m <= -22000000000.0)
          		tmp = (a_m * (99.0 / (k * k))) / (k * k);
          	elseif (m <= 0.68)
          		tmp = a_m / (1.0 + (k * (k + 10.0)));
          	else
          		tmp = a_m / (1.0 + (((((1000.0 + (1000000.0 / t_0)) / t_0) - -1.0) / t_0) * ((k * ((k * k) + -100.0)) / (1.0 / (((k * k) + 100.0) - (k * -10.0))))));
          	end
          	tmp_2 = a_s * tmp;
          end
          
          a\_m = N[Abs[a], $MachinePrecision]
          a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[a$95$s_, a$95$m_, k_, m_] := Block[{t$95$0 = N[(k * N[(k * k), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[m, -22000000000.0], N[(N[(a$95$m * N[(99.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 0.68], N[(a$95$m / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a$95$m / N[(1.0 + N[(N[(N[(N[(N[(1000.0 + N[(1000000.0 / t$95$0), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] - -1.0), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(k * N[(N[(k * k), $MachinePrecision] + -100.0), $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(N[(N[(k * k), $MachinePrecision] + 100.0), $MachinePrecision] - N[(k * -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
          
          \begin{array}{l}
          a\_m = \left|a\right|
          \\
          a\_s = \mathsf{copysign}\left(1, a\right)
          
          \\
          \begin{array}{l}
          t_0 := k \cdot \left(k \cdot k\right)\\
          a\_s \cdot \begin{array}{l}
          \mathbf{if}\;m \leq -22000000000:\\
          \;\;\;\;\frac{a\_m \cdot \frac{99}{k \cdot k}}{k \cdot k}\\
          
          \mathbf{elif}\;m \leq 0.68:\\
          \;\;\;\;\frac{a\_m}{1 + k \cdot \left(k + 10\right)}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{a\_m}{1 + \frac{\frac{1000 + \frac{1000000}{t\_0}}{t\_0} - -1}{t\_0} \cdot \frac{k \cdot \left(k \cdot k + -100\right)}{\frac{1}{\left(k \cdot k + 100\right) - k \cdot -10}}}\\
          
          
          \end{array}
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if m < -2.2e10

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{a - \frac{a \cdot 10 + \frac{a \cdot -99}{k}}{k}}{k \cdot k}} \]
            11. Taylor expanded in k around 0

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

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

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left(\frac{99 \cdot 1}{{k}^{2}}\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
              8. metadata-evalN/A

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

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

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

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

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

            if -2.2e10 < m < 0.680000000000000049

            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.9%

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

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

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

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

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

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

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

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

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

            if 0.680000000000000049 < m

            1. Initial program 76.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 7: 69.9% accurate, 2.3× speedup?

          \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ \begin{array}{l} t_0 := k \cdot \left(k \cdot k\right)\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -22000000000:\\ \;\;\;\;\frac{a\_m \cdot \frac{99}{k \cdot k}}{k \cdot k}\\ \mathbf{elif}\;m \leq 1.2:\\ \;\;\;\;\frac{a\_m}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{a\_m}{1 + \frac{k \cdot \left(k \cdot k + -100\right)}{\frac{1}{\left(k \cdot k + 100\right) - k \cdot -10}} \cdot \frac{1 + \frac{1000}{t\_0}}{t\_0}}\\ \end{array} \end{array} \end{array} \]
          a\_m = (fabs.f64 a)
          a\_s = (copysign.f64 #s(literal 1 binary64) a)
          (FPCore (a_s a_m k m)
           :precision binary64
           (let* ((t_0 (* k (* k k))))
             (*
              a_s
              (if (<= m -22000000000.0)
                (/ (* a_m (/ 99.0 (* k k))) (* k k))
                (if (<= m 1.2)
                  (/ a_m (+ 1.0 (* k (+ k 10.0))))
                  (/
                   a_m
                   (+
                    1.0
                    (*
                     (/
                      (* k (+ (* k k) -100.0))
                      (/ 1.0 (- (+ (* k k) 100.0) (* k -10.0))))
                     (/ (+ 1.0 (/ 1000.0 t_0)) t_0)))))))))
          a\_m = fabs(a);
          a\_s = copysign(1.0, a);
          double code(double a_s, double a_m, double k, double m) {
          	double t_0 = k * (k * k);
          	double tmp;
          	if (m <= -22000000000.0) {
          		tmp = (a_m * (99.0 / (k * k))) / (k * k);
          	} else if (m <= 1.2) {
          		tmp = a_m / (1.0 + (k * (k + 10.0)));
          	} else {
          		tmp = a_m / (1.0 + (((k * ((k * k) + -100.0)) / (1.0 / (((k * k) + 100.0) - (k * -10.0)))) * ((1.0 + (1000.0 / t_0)) / t_0)));
          	}
          	return a_s * tmp;
          }
          
          a\_m = abs(a)
          a\_s = copysign(1.0d0, a)
          real(8) function code(a_s, a_m, k, m)
              real(8), intent (in) :: a_s
              real(8), intent (in) :: a_m
              real(8), intent (in) :: k
              real(8), intent (in) :: m
              real(8) :: t_0
              real(8) :: tmp
              t_0 = k * (k * k)
              if (m <= (-22000000000.0d0)) then
                  tmp = (a_m * (99.0d0 / (k * k))) / (k * k)
              else if (m <= 1.2d0) then
                  tmp = a_m / (1.0d0 + (k * (k + 10.0d0)))
              else
                  tmp = a_m / (1.0d0 + (((k * ((k * k) + (-100.0d0))) / (1.0d0 / (((k * k) + 100.0d0) - (k * (-10.0d0))))) * ((1.0d0 + (1000.0d0 / t_0)) / t_0)))
              end if
              code = a_s * tmp
          end function
          
          a\_m = Math.abs(a);
          a\_s = Math.copySign(1.0, a);
          public static double code(double a_s, double a_m, double k, double m) {
          	double t_0 = k * (k * k);
          	double tmp;
          	if (m <= -22000000000.0) {
          		tmp = (a_m * (99.0 / (k * k))) / (k * k);
          	} else if (m <= 1.2) {
          		tmp = a_m / (1.0 + (k * (k + 10.0)));
          	} else {
          		tmp = a_m / (1.0 + (((k * ((k * k) + -100.0)) / (1.0 / (((k * k) + 100.0) - (k * -10.0)))) * ((1.0 + (1000.0 / t_0)) / t_0)));
          	}
          	return a_s * tmp;
          }
          
          a\_m = math.fabs(a)
          a\_s = math.copysign(1.0, a)
          def code(a_s, a_m, k, m):
          	t_0 = k * (k * k)
          	tmp = 0
          	if m <= -22000000000.0:
          		tmp = (a_m * (99.0 / (k * k))) / (k * k)
          	elif m <= 1.2:
          		tmp = a_m / (1.0 + (k * (k + 10.0)))
          	else:
          		tmp = a_m / (1.0 + (((k * ((k * k) + -100.0)) / (1.0 / (((k * k) + 100.0) - (k * -10.0)))) * ((1.0 + (1000.0 / t_0)) / t_0)))
          	return a_s * tmp
          
          a\_m = abs(a)
          a\_s = copysign(1.0, a)
          function code(a_s, a_m, k, m)
          	t_0 = Float64(k * Float64(k * k))
          	tmp = 0.0
          	if (m <= -22000000000.0)
          		tmp = Float64(Float64(a_m * Float64(99.0 / Float64(k * k))) / Float64(k * k));
          	elseif (m <= 1.2)
          		tmp = Float64(a_m / Float64(1.0 + Float64(k * Float64(k + 10.0))));
          	else
          		tmp = Float64(a_m / Float64(1.0 + Float64(Float64(Float64(k * Float64(Float64(k * k) + -100.0)) / Float64(1.0 / Float64(Float64(Float64(k * k) + 100.0) - Float64(k * -10.0)))) * Float64(Float64(1.0 + Float64(1000.0 / t_0)) / t_0))));
          	end
          	return Float64(a_s * tmp)
          end
          
          a\_m = abs(a);
          a\_s = sign(a) * abs(1.0);
          function tmp_2 = code(a_s, a_m, k, m)
          	t_0 = k * (k * k);
          	tmp = 0.0;
          	if (m <= -22000000000.0)
          		tmp = (a_m * (99.0 / (k * k))) / (k * k);
          	elseif (m <= 1.2)
          		tmp = a_m / (1.0 + (k * (k + 10.0)));
          	else
          		tmp = a_m / (1.0 + (((k * ((k * k) + -100.0)) / (1.0 / (((k * k) + 100.0) - (k * -10.0)))) * ((1.0 + (1000.0 / t_0)) / t_0)));
          	end
          	tmp_2 = a_s * tmp;
          end
          
          a\_m = N[Abs[a], $MachinePrecision]
          a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[a$95$s_, a$95$m_, k_, m_] := Block[{t$95$0 = N[(k * N[(k * k), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[m, -22000000000.0], N[(N[(a$95$m * N[(99.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.2], N[(a$95$m / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a$95$m / N[(1.0 + N[(N[(N[(k * N[(N[(k * k), $MachinePrecision] + -100.0), $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(N[(N[(k * k), $MachinePrecision] + 100.0), $MachinePrecision] - N[(k * -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[(1000.0 / t$95$0), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
          
          \begin{array}{l}
          a\_m = \left|a\right|
          \\
          a\_s = \mathsf{copysign}\left(1, a\right)
          
          \\
          \begin{array}{l}
          t_0 := k \cdot \left(k \cdot k\right)\\
          a\_s \cdot \begin{array}{l}
          \mathbf{if}\;m \leq -22000000000:\\
          \;\;\;\;\frac{a\_m \cdot \frac{99}{k \cdot k}}{k \cdot k}\\
          
          \mathbf{elif}\;m \leq 1.2:\\
          \;\;\;\;\frac{a\_m}{1 + k \cdot \left(k + 10\right)}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{a\_m}{1 + \frac{k \cdot \left(k \cdot k + -100\right)}{\frac{1}{\left(k \cdot k + 100\right) - k \cdot -10}} \cdot \frac{1 + \frac{1000}{t\_0}}{t\_0}}\\
          
          
          \end{array}
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if m < -2.2e10

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{a - \frac{a \cdot 10 + \frac{a \cdot -99}{k}}{k}}{k \cdot k}} \]
            11. Taylor expanded in k around 0

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

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

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left(\frac{99 \cdot 1}{{k}^{2}}\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
              8. metadata-evalN/A

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

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

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

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

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

            if -2.2e10 < m < 1.19999999999999996

            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.9%

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

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

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

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

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

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

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

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

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

            if 1.19999999999999996 < m

            1. Initial program 76.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 8: 67.5% accurate, 2.8× speedup?

          \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -22000000000:\\ \;\;\;\;\frac{a\_m \cdot \frac{99}{k \cdot k}}{k \cdot k}\\ \mathbf{elif}\;m \leq 170000000000:\\ \;\;\;\;\frac{a\_m}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{a\_m}{1 + \frac{k \cdot \left(k \cdot k + -100\right)}{\frac{1}{\left(k \cdot k + 100\right) - k \cdot -10}} \cdot \frac{1}{k \cdot \left(k \cdot k\right)}}\\ \end{array} \end{array} \]
          a\_m = (fabs.f64 a)
          a\_s = (copysign.f64 #s(literal 1 binary64) a)
          (FPCore (a_s a_m k m)
           :precision binary64
           (*
            a_s
            (if (<= m -22000000000.0)
              (/ (* a_m (/ 99.0 (* k k))) (* k k))
              (if (<= m 170000000000.0)
                (/ a_m (+ 1.0 (* k (+ k 10.0))))
                (/
                 a_m
                 (+
                  1.0
                  (*
                   (/ (* k (+ (* k k) -100.0)) (/ 1.0 (- (+ (* k k) 100.0) (* k -10.0))))
                   (/ 1.0 (* k (* k k))))))))))
          a\_m = fabs(a);
          a\_s = copysign(1.0, a);
          double code(double a_s, double a_m, double k, double m) {
          	double tmp;
          	if (m <= -22000000000.0) {
          		tmp = (a_m * (99.0 / (k * k))) / (k * k);
          	} else if (m <= 170000000000.0) {
          		tmp = a_m / (1.0 + (k * (k + 10.0)));
          	} else {
          		tmp = a_m / (1.0 + (((k * ((k * k) + -100.0)) / (1.0 / (((k * k) + 100.0) - (k * -10.0)))) * (1.0 / (k * (k * k)))));
          	}
          	return a_s * tmp;
          }
          
          a\_m = abs(a)
          a\_s = copysign(1.0d0, a)
          real(8) function code(a_s, a_m, k, m)
              real(8), intent (in) :: a_s
              real(8), intent (in) :: a_m
              real(8), intent (in) :: k
              real(8), intent (in) :: m
              real(8) :: tmp
              if (m <= (-22000000000.0d0)) then
                  tmp = (a_m * (99.0d0 / (k * k))) / (k * k)
              else if (m <= 170000000000.0d0) then
                  tmp = a_m / (1.0d0 + (k * (k + 10.0d0)))
              else
                  tmp = a_m / (1.0d0 + (((k * ((k * k) + (-100.0d0))) / (1.0d0 / (((k * k) + 100.0d0) - (k * (-10.0d0))))) * (1.0d0 / (k * (k * k)))))
              end if
              code = a_s * tmp
          end function
          
          a\_m = Math.abs(a);
          a\_s = Math.copySign(1.0, a);
          public static double code(double a_s, double a_m, double k, double m) {
          	double tmp;
          	if (m <= -22000000000.0) {
          		tmp = (a_m * (99.0 / (k * k))) / (k * k);
          	} else if (m <= 170000000000.0) {
          		tmp = a_m / (1.0 + (k * (k + 10.0)));
          	} else {
          		tmp = a_m / (1.0 + (((k * ((k * k) + -100.0)) / (1.0 / (((k * k) + 100.0) - (k * -10.0)))) * (1.0 / (k * (k * k)))));
          	}
          	return a_s * tmp;
          }
          
          a\_m = math.fabs(a)
          a\_s = math.copysign(1.0, a)
          def code(a_s, a_m, k, m):
          	tmp = 0
          	if m <= -22000000000.0:
          		tmp = (a_m * (99.0 / (k * k))) / (k * k)
          	elif m <= 170000000000.0:
          		tmp = a_m / (1.0 + (k * (k + 10.0)))
          	else:
          		tmp = a_m / (1.0 + (((k * ((k * k) + -100.0)) / (1.0 / (((k * k) + 100.0) - (k * -10.0)))) * (1.0 / (k * (k * k)))))
          	return a_s * tmp
          
          a\_m = abs(a)
          a\_s = copysign(1.0, a)
          function code(a_s, a_m, k, m)
          	tmp = 0.0
          	if (m <= -22000000000.0)
          		tmp = Float64(Float64(a_m * Float64(99.0 / Float64(k * k))) / Float64(k * k));
          	elseif (m <= 170000000000.0)
          		tmp = Float64(a_m / Float64(1.0 + Float64(k * Float64(k + 10.0))));
          	else
          		tmp = Float64(a_m / Float64(1.0 + Float64(Float64(Float64(k * Float64(Float64(k * k) + -100.0)) / Float64(1.0 / Float64(Float64(Float64(k * k) + 100.0) - Float64(k * -10.0)))) * Float64(1.0 / Float64(k * Float64(k * k))))));
          	end
          	return Float64(a_s * tmp)
          end
          
          a\_m = abs(a);
          a\_s = sign(a) * abs(1.0);
          function tmp_2 = code(a_s, a_m, k, m)
          	tmp = 0.0;
          	if (m <= -22000000000.0)
          		tmp = (a_m * (99.0 / (k * k))) / (k * k);
          	elseif (m <= 170000000000.0)
          		tmp = a_m / (1.0 + (k * (k + 10.0)));
          	else
          		tmp = a_m / (1.0 + (((k * ((k * k) + -100.0)) / (1.0 / (((k * k) + 100.0) - (k * -10.0)))) * (1.0 / (k * (k * k)))));
          	end
          	tmp_2 = a_s * tmp;
          end
          
          a\_m = N[Abs[a], $MachinePrecision]
          a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, -22000000000.0], N[(N[(a$95$m * N[(99.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 170000000000.0], N[(a$95$m / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a$95$m / N[(1.0 + N[(N[(N[(k * N[(N[(k * k), $MachinePrecision] + -100.0), $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(N[(N[(k * k), $MachinePrecision] + 100.0), $MachinePrecision] - N[(k * -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(k * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
          
          \begin{array}{l}
          a\_m = \left|a\right|
          \\
          a\_s = \mathsf{copysign}\left(1, a\right)
          
          \\
          a\_s \cdot \begin{array}{l}
          \mathbf{if}\;m \leq -22000000000:\\
          \;\;\;\;\frac{a\_m \cdot \frac{99}{k \cdot k}}{k \cdot k}\\
          
          \mathbf{elif}\;m \leq 170000000000:\\
          \;\;\;\;\frac{a\_m}{1 + k \cdot \left(k + 10\right)}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{a\_m}{1 + \frac{k \cdot \left(k \cdot k + -100\right)}{\frac{1}{\left(k \cdot k + 100\right) - k \cdot -10}} \cdot \frac{1}{k \cdot \left(k \cdot k\right)}}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if m < -2.2e10

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{a - \frac{a \cdot 10 + \frac{a \cdot -99}{k}}{k}}{k \cdot k}} \]
            11. Taylor expanded in k around 0

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

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

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left(\frac{99 \cdot 1}{{k}^{2}}\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
              8. metadata-evalN/A

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

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

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

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

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

            if -2.2e10 < m < 1.7e11

            1. Initial program 98.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-+.f6498.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. Simplified98.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-+.f6496.1%

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

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

            if 1.7e11 < m

            1. Initial program 77.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 9: 64.8% accurate, 4.9× speedup?

          \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -22000000000:\\ \;\;\;\;\frac{a\_m \cdot \frac{99}{k \cdot k}}{k \cdot k}\\ \mathbf{elif}\;m \leq 1.18 \cdot 10^{-5}:\\ \;\;\;\;\frac{a\_m}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{else}:\\ \;\;\;\;a\_m + k \cdot \left(a\_m \cdot -10 + a\_m \cdot \left(k \cdot 99\right)\right)\\ \end{array} \end{array} \]
          a\_m = (fabs.f64 a)
          a\_s = (copysign.f64 #s(literal 1 binary64) a)
          (FPCore (a_s a_m k m)
           :precision binary64
           (*
            a_s
            (if (<= m -22000000000.0)
              (/ (* a_m (/ 99.0 (* k k))) (* k k))
              (if (<= m 1.18e-5)
                (/ a_m (+ 1.0 (* k (+ k 10.0))))
                (+ a_m (* k (+ (* a_m -10.0) (* a_m (* k 99.0)))))))))
          a\_m = fabs(a);
          a\_s = copysign(1.0, a);
          double code(double a_s, double a_m, double k, double m) {
          	double tmp;
          	if (m <= -22000000000.0) {
          		tmp = (a_m * (99.0 / (k * k))) / (k * k);
          	} else if (m <= 1.18e-5) {
          		tmp = a_m / (1.0 + (k * (k + 10.0)));
          	} else {
          		tmp = a_m + (k * ((a_m * -10.0) + (a_m * (k * 99.0))));
          	}
          	return a_s * tmp;
          }
          
          a\_m = abs(a)
          a\_s = copysign(1.0d0, a)
          real(8) function code(a_s, a_m, k, m)
              real(8), intent (in) :: a_s
              real(8), intent (in) :: a_m
              real(8), intent (in) :: k
              real(8), intent (in) :: m
              real(8) :: tmp
              if (m <= (-22000000000.0d0)) then
                  tmp = (a_m * (99.0d0 / (k * k))) / (k * k)
              else if (m <= 1.18d-5) then
                  tmp = a_m / (1.0d0 + (k * (k + 10.0d0)))
              else
                  tmp = a_m + (k * ((a_m * (-10.0d0)) + (a_m * (k * 99.0d0))))
              end if
              code = a_s * tmp
          end function
          
          a\_m = Math.abs(a);
          a\_s = Math.copySign(1.0, a);
          public static double code(double a_s, double a_m, double k, double m) {
          	double tmp;
          	if (m <= -22000000000.0) {
          		tmp = (a_m * (99.0 / (k * k))) / (k * k);
          	} else if (m <= 1.18e-5) {
          		tmp = a_m / (1.0 + (k * (k + 10.0)));
          	} else {
          		tmp = a_m + (k * ((a_m * -10.0) + (a_m * (k * 99.0))));
          	}
          	return a_s * tmp;
          }
          
          a\_m = math.fabs(a)
          a\_s = math.copysign(1.0, a)
          def code(a_s, a_m, k, m):
          	tmp = 0
          	if m <= -22000000000.0:
          		tmp = (a_m * (99.0 / (k * k))) / (k * k)
          	elif m <= 1.18e-5:
          		tmp = a_m / (1.0 + (k * (k + 10.0)))
          	else:
          		tmp = a_m + (k * ((a_m * -10.0) + (a_m * (k * 99.0))))
          	return a_s * tmp
          
          a\_m = abs(a)
          a\_s = copysign(1.0, a)
          function code(a_s, a_m, k, m)
          	tmp = 0.0
          	if (m <= -22000000000.0)
          		tmp = Float64(Float64(a_m * Float64(99.0 / Float64(k * k))) / Float64(k * k));
          	elseif (m <= 1.18e-5)
          		tmp = Float64(a_m / Float64(1.0 + Float64(k * Float64(k + 10.0))));
          	else
          		tmp = Float64(a_m + Float64(k * Float64(Float64(a_m * -10.0) + Float64(a_m * Float64(k * 99.0)))));
          	end
          	return Float64(a_s * tmp)
          end
          
          a\_m = abs(a);
          a\_s = sign(a) * abs(1.0);
          function tmp_2 = code(a_s, a_m, k, m)
          	tmp = 0.0;
          	if (m <= -22000000000.0)
          		tmp = (a_m * (99.0 / (k * k))) / (k * k);
          	elseif (m <= 1.18e-5)
          		tmp = a_m / (1.0 + (k * (k + 10.0)));
          	else
          		tmp = a_m + (k * ((a_m * -10.0) + (a_m * (k * 99.0))));
          	end
          	tmp_2 = a_s * tmp;
          end
          
          a\_m = N[Abs[a], $MachinePrecision]
          a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, -22000000000.0], N[(N[(a$95$m * N[(99.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.18e-5], N[(a$95$m / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a$95$m + N[(k * N[(N[(a$95$m * -10.0), $MachinePrecision] + N[(a$95$m * N[(k * 99.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
          
          \begin{array}{l}
          a\_m = \left|a\right|
          \\
          a\_s = \mathsf{copysign}\left(1, a\right)
          
          \\
          a\_s \cdot \begin{array}{l}
          \mathbf{if}\;m \leq -22000000000:\\
          \;\;\;\;\frac{a\_m \cdot \frac{99}{k \cdot k}}{k \cdot k}\\
          
          \mathbf{elif}\;m \leq 1.18 \cdot 10^{-5}:\\
          \;\;\;\;\frac{a\_m}{1 + k \cdot \left(k + 10\right)}\\
          
          \mathbf{else}:\\
          \;\;\;\;a\_m + k \cdot \left(a\_m \cdot -10 + a\_m \cdot \left(k \cdot 99\right)\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if m < -2.2e10

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{a - \frac{a \cdot 10 + \frac{a \cdot -99}{k}}{k}}{k \cdot k}} \]
            11. Taylor expanded in k around 0

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

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

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left(\frac{99 \cdot 1}{{k}^{2}}\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
              8. metadata-evalN/A

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

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

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

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

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

            if -2.2e10 < m < 1.18000000000000005e-5

            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.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. Simplified98.9%

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

            if 1.18000000000000005e-5 < m

            1. Initial program 76.7%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
            4. Add Preprocessing
            5. Taylor expanded in 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.2%

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k - \color{blue}{-10}, 1\right)\right)\right) \]
              5. fma-defineN/A

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{k \cdot \left(k \cdot k + -100\right)}{k + -10} + 1\right)\right) \]
              11. clear-numN/A

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

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

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

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

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

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

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

                \[\leadsto a + \left(\left(k \cdot \left(-1 \cdot a + \left(\mathsf{neg}\left(-100 \cdot a\right)\right)\right)\right) \cdot k + \left(-10 \cdot a\right) \cdot k\right) \]
              4. mul-1-negN/A

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

                \[\leadsto a + \left(\left(k \cdot \left(\mathsf{neg}\left(\left(a + -100 \cdot a\right)\right)\right)\right) \cdot k + \left(-10 \cdot a\right) \cdot k\right) \]
              6. distribute-rgt-neg-inN/A

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

                \[\leadsto a + \left(\left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right)\right) \cdot k + \left(\color{blue}{-10} \cdot a\right) \cdot k\right) \]
              8. distribute-rgt-inN/A

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

                \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) + \left(\mathsf{neg}\left(10\right)\right) \cdot a\right) \]
              10. cancel-sign-sub-invN/A

                \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - \color{blue}{10 \cdot a}\right) \]
              11. +-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) \]
              12. *-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) \]
              13. 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) \]
            12. Simplified26.6%

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

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

          Alternative 10: 57.5% accurate, 6.0× speedup?

          \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -22000000000:\\ \;\;\;\;\frac{a\_m \cdot \frac{99}{k \cdot k}}{k \cdot k}\\ \mathbf{elif}\;m \leq 1.55 \cdot 10^{+44}:\\ \;\;\;\;\frac{a\_m}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{else}:\\ \;\;\;\;a\_m + a\_m \cdot \left(k \cdot -10\right)\\ \end{array} \end{array} \]
          a\_m = (fabs.f64 a)
          a\_s = (copysign.f64 #s(literal 1 binary64) a)
          (FPCore (a_s a_m k m)
           :precision binary64
           (*
            a_s
            (if (<= m -22000000000.0)
              (/ (* a_m (/ 99.0 (* k k))) (* k k))
              (if (<= m 1.55e+44)
                (/ a_m (+ 1.0 (* k (+ k 10.0))))
                (+ a_m (* a_m (* k -10.0)))))))
          a\_m = fabs(a);
          a\_s = copysign(1.0, a);
          double code(double a_s, double a_m, double k, double m) {
          	double tmp;
          	if (m <= -22000000000.0) {
          		tmp = (a_m * (99.0 / (k * k))) / (k * k);
          	} else if (m <= 1.55e+44) {
          		tmp = a_m / (1.0 + (k * (k + 10.0)));
          	} else {
          		tmp = a_m + (a_m * (k * -10.0));
          	}
          	return a_s * tmp;
          }
          
          a\_m = abs(a)
          a\_s = copysign(1.0d0, a)
          real(8) function code(a_s, a_m, k, m)
              real(8), intent (in) :: a_s
              real(8), intent (in) :: a_m
              real(8), intent (in) :: k
              real(8), intent (in) :: m
              real(8) :: tmp
              if (m <= (-22000000000.0d0)) then
                  tmp = (a_m * (99.0d0 / (k * k))) / (k * k)
              else if (m <= 1.55d+44) then
                  tmp = a_m / (1.0d0 + (k * (k + 10.0d0)))
              else
                  tmp = a_m + (a_m * (k * (-10.0d0)))
              end if
              code = a_s * tmp
          end function
          
          a\_m = Math.abs(a);
          a\_s = Math.copySign(1.0, a);
          public static double code(double a_s, double a_m, double k, double m) {
          	double tmp;
          	if (m <= -22000000000.0) {
          		tmp = (a_m * (99.0 / (k * k))) / (k * k);
          	} else if (m <= 1.55e+44) {
          		tmp = a_m / (1.0 + (k * (k + 10.0)));
          	} else {
          		tmp = a_m + (a_m * (k * -10.0));
          	}
          	return a_s * tmp;
          }
          
          a\_m = math.fabs(a)
          a\_s = math.copysign(1.0, a)
          def code(a_s, a_m, k, m):
          	tmp = 0
          	if m <= -22000000000.0:
          		tmp = (a_m * (99.0 / (k * k))) / (k * k)
          	elif m <= 1.55e+44:
          		tmp = a_m / (1.0 + (k * (k + 10.0)))
          	else:
          		tmp = a_m + (a_m * (k * -10.0))
          	return a_s * tmp
          
          a\_m = abs(a)
          a\_s = copysign(1.0, a)
          function code(a_s, a_m, k, m)
          	tmp = 0.0
          	if (m <= -22000000000.0)
          		tmp = Float64(Float64(a_m * Float64(99.0 / Float64(k * k))) / Float64(k * k));
          	elseif (m <= 1.55e+44)
          		tmp = Float64(a_m / Float64(1.0 + Float64(k * Float64(k + 10.0))));
          	else
          		tmp = Float64(a_m + Float64(a_m * Float64(k * -10.0)));
          	end
          	return Float64(a_s * tmp)
          end
          
          a\_m = abs(a);
          a\_s = sign(a) * abs(1.0);
          function tmp_2 = code(a_s, a_m, k, m)
          	tmp = 0.0;
          	if (m <= -22000000000.0)
          		tmp = (a_m * (99.0 / (k * k))) / (k * k);
          	elseif (m <= 1.55e+44)
          		tmp = a_m / (1.0 + (k * (k + 10.0)));
          	else
          		tmp = a_m + (a_m * (k * -10.0));
          	end
          	tmp_2 = a_s * tmp;
          end
          
          a\_m = N[Abs[a], $MachinePrecision]
          a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, -22000000000.0], N[(N[(a$95$m * N[(99.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.55e+44], N[(a$95$m / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a$95$m + N[(a$95$m * N[(k * -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
          
          \begin{array}{l}
          a\_m = \left|a\right|
          \\
          a\_s = \mathsf{copysign}\left(1, a\right)
          
          \\
          a\_s \cdot \begin{array}{l}
          \mathbf{if}\;m \leq -22000000000:\\
          \;\;\;\;\frac{a\_m \cdot \frac{99}{k \cdot k}}{k \cdot k}\\
          
          \mathbf{elif}\;m \leq 1.55 \cdot 10^{+44}:\\
          \;\;\;\;\frac{a\_m}{1 + k \cdot \left(k + 10\right)}\\
          
          \mathbf{else}:\\
          \;\;\;\;a\_m + a\_m \cdot \left(k \cdot -10\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if m < -2.2e10

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{a - \frac{a \cdot 10 + \frac{a \cdot -99}{k}}{k}}{k \cdot k}} \]
            11. Taylor expanded in k around 0

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

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

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left(\frac{99 \cdot 1}{{k}^{2}}\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
              8. metadata-evalN/A

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

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

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

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

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

            if -2.2e10 < m < 1.54999999999999998e44

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

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

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

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

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

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

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

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

            if 1.54999999999999998e44 < m

            1. Initial program 76.6%

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

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

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

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

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

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

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

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

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

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

              \[\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-+.f642.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. Simplified2.8%

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k - \color{blue}{-10}, 1\right)\right)\right) \]
              5. fma-defineN/A

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{k \cdot \left(k \cdot k + -100\right)}{k + -10} + 1\right)\right) \]
              11. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 11: 53.6% accurate, 6.0× speedup?

          \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -22000000000:\\ \;\;\;\;\frac{a\_m}{k \cdot k}\\ \mathbf{elif}\;m \leq 1.38 \cdot 10^{+42}:\\ \;\;\;\;\frac{a\_m}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{else}:\\ \;\;\;\;a\_m + a\_m \cdot \left(k \cdot -10\right)\\ \end{array} \end{array} \]
          a\_m = (fabs.f64 a)
          a\_s = (copysign.f64 #s(literal 1 binary64) a)
          (FPCore (a_s a_m k m)
           :precision binary64
           (*
            a_s
            (if (<= m -22000000000.0)
              (/ a_m (* k k))
              (if (<= m 1.38e+42)
                (/ a_m (+ 1.0 (* k (+ k 10.0))))
                (+ a_m (* a_m (* k -10.0)))))))
          a\_m = fabs(a);
          a\_s = copysign(1.0, a);
          double code(double a_s, double a_m, double k, double m) {
          	double tmp;
          	if (m <= -22000000000.0) {
          		tmp = a_m / (k * k);
          	} else if (m <= 1.38e+42) {
          		tmp = a_m / (1.0 + (k * (k + 10.0)));
          	} else {
          		tmp = a_m + (a_m * (k * -10.0));
          	}
          	return a_s * tmp;
          }
          
          a\_m = abs(a)
          a\_s = copysign(1.0d0, a)
          real(8) function code(a_s, a_m, k, m)
              real(8), intent (in) :: a_s
              real(8), intent (in) :: a_m
              real(8), intent (in) :: k
              real(8), intent (in) :: m
              real(8) :: tmp
              if (m <= (-22000000000.0d0)) then
                  tmp = a_m / (k * k)
              else if (m <= 1.38d+42) then
                  tmp = a_m / (1.0d0 + (k * (k + 10.0d0)))
              else
                  tmp = a_m + (a_m * (k * (-10.0d0)))
              end if
              code = a_s * tmp
          end function
          
          a\_m = Math.abs(a);
          a\_s = Math.copySign(1.0, a);
          public static double code(double a_s, double a_m, double k, double m) {
          	double tmp;
          	if (m <= -22000000000.0) {
          		tmp = a_m / (k * k);
          	} else if (m <= 1.38e+42) {
          		tmp = a_m / (1.0 + (k * (k + 10.0)));
          	} else {
          		tmp = a_m + (a_m * (k * -10.0));
          	}
          	return a_s * tmp;
          }
          
          a\_m = math.fabs(a)
          a\_s = math.copysign(1.0, a)
          def code(a_s, a_m, k, m):
          	tmp = 0
          	if m <= -22000000000.0:
          		tmp = a_m / (k * k)
          	elif m <= 1.38e+42:
          		tmp = a_m / (1.0 + (k * (k + 10.0)))
          	else:
          		tmp = a_m + (a_m * (k * -10.0))
          	return a_s * tmp
          
          a\_m = abs(a)
          a\_s = copysign(1.0, a)
          function code(a_s, a_m, k, m)
          	tmp = 0.0
          	if (m <= -22000000000.0)
          		tmp = Float64(a_m / Float64(k * k));
          	elseif (m <= 1.38e+42)
          		tmp = Float64(a_m / Float64(1.0 + Float64(k * Float64(k + 10.0))));
          	else
          		tmp = Float64(a_m + Float64(a_m * Float64(k * -10.0)));
          	end
          	return Float64(a_s * tmp)
          end
          
          a\_m = abs(a);
          a\_s = sign(a) * abs(1.0);
          function tmp_2 = code(a_s, a_m, k, m)
          	tmp = 0.0;
          	if (m <= -22000000000.0)
          		tmp = a_m / (k * k);
          	elseif (m <= 1.38e+42)
          		tmp = a_m / (1.0 + (k * (k + 10.0)));
          	else
          		tmp = a_m + (a_m * (k * -10.0));
          	end
          	tmp_2 = a_s * tmp;
          end
          
          a\_m = N[Abs[a], $MachinePrecision]
          a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, -22000000000.0], N[(a$95$m / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.38e+42], N[(a$95$m / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a$95$m + N[(a$95$m * N[(k * -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
          
          \begin{array}{l}
          a\_m = \left|a\right|
          \\
          a\_s = \mathsf{copysign}\left(1, a\right)
          
          \\
          a\_s \cdot \begin{array}{l}
          \mathbf{if}\;m \leq -22000000000:\\
          \;\;\;\;\frac{a\_m}{k \cdot k}\\
          
          \mathbf{elif}\;m \leq 1.38 \cdot 10^{+42}:\\
          \;\;\;\;\frac{a\_m}{1 + k \cdot \left(k + 10\right)}\\
          
          \mathbf{else}:\\
          \;\;\;\;a\_m + a\_m \cdot \left(k \cdot -10\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if m < -2.2e10

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -2.2e10 < m < 1.3800000000000001e42

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

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

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

            if 1.3800000000000001e42 < m

            1. Initial program 76.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k - \color{blue}{-10}, 1\right)\right)\right) \]
              5. fma-defineN/A

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{k \cdot \left(k \cdot k + -100\right)}{k + -10} + 1\right)\right) \]
              11. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 12: 52.9% accurate, 6.7× speedup?

          \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -22000000000:\\ \;\;\;\;\frac{a\_m}{k \cdot k}\\ \mathbf{elif}\;m \leq 2.2 \cdot 10^{+44}:\\ \;\;\;\;\frac{a\_m}{1 + k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;a\_m + a\_m \cdot \left(k \cdot -10\right)\\ \end{array} \end{array} \]
          a\_m = (fabs.f64 a)
          a\_s = (copysign.f64 #s(literal 1 binary64) a)
          (FPCore (a_s a_m k m)
           :precision binary64
           (*
            a_s
            (if (<= m -22000000000.0)
              (/ a_m (* k k))
              (if (<= m 2.2e+44) (/ a_m (+ 1.0 (* k k))) (+ a_m (* a_m (* k -10.0)))))))
          a\_m = fabs(a);
          a\_s = copysign(1.0, a);
          double code(double a_s, double a_m, double k, double m) {
          	double tmp;
          	if (m <= -22000000000.0) {
          		tmp = a_m / (k * k);
          	} else if (m <= 2.2e+44) {
          		tmp = a_m / (1.0 + (k * k));
          	} else {
          		tmp = a_m + (a_m * (k * -10.0));
          	}
          	return a_s * tmp;
          }
          
          a\_m = abs(a)
          a\_s = copysign(1.0d0, a)
          real(8) function code(a_s, a_m, k, m)
              real(8), intent (in) :: a_s
              real(8), intent (in) :: a_m
              real(8), intent (in) :: k
              real(8), intent (in) :: m
              real(8) :: tmp
              if (m <= (-22000000000.0d0)) then
                  tmp = a_m / (k * k)
              else if (m <= 2.2d+44) then
                  tmp = a_m / (1.0d0 + (k * k))
              else
                  tmp = a_m + (a_m * (k * (-10.0d0)))
              end if
              code = a_s * tmp
          end function
          
          a\_m = Math.abs(a);
          a\_s = Math.copySign(1.0, a);
          public static double code(double a_s, double a_m, double k, double m) {
          	double tmp;
          	if (m <= -22000000000.0) {
          		tmp = a_m / (k * k);
          	} else if (m <= 2.2e+44) {
          		tmp = a_m / (1.0 + (k * k));
          	} else {
          		tmp = a_m + (a_m * (k * -10.0));
          	}
          	return a_s * tmp;
          }
          
          a\_m = math.fabs(a)
          a\_s = math.copysign(1.0, a)
          def code(a_s, a_m, k, m):
          	tmp = 0
          	if m <= -22000000000.0:
          		tmp = a_m / (k * k)
          	elif m <= 2.2e+44:
          		tmp = a_m / (1.0 + (k * k))
          	else:
          		tmp = a_m + (a_m * (k * -10.0))
          	return a_s * tmp
          
          a\_m = abs(a)
          a\_s = copysign(1.0, a)
          function code(a_s, a_m, k, m)
          	tmp = 0.0
          	if (m <= -22000000000.0)
          		tmp = Float64(a_m / Float64(k * k));
          	elseif (m <= 2.2e+44)
          		tmp = Float64(a_m / Float64(1.0 + Float64(k * k)));
          	else
          		tmp = Float64(a_m + Float64(a_m * Float64(k * -10.0)));
          	end
          	return Float64(a_s * tmp)
          end
          
          a\_m = abs(a);
          a\_s = sign(a) * abs(1.0);
          function tmp_2 = code(a_s, a_m, k, m)
          	tmp = 0.0;
          	if (m <= -22000000000.0)
          		tmp = a_m / (k * k);
          	elseif (m <= 2.2e+44)
          		tmp = a_m / (1.0 + (k * k));
          	else
          		tmp = a_m + (a_m * (k * -10.0));
          	end
          	tmp_2 = a_s * tmp;
          end
          
          a\_m = N[Abs[a], $MachinePrecision]
          a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, -22000000000.0], N[(a$95$m / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 2.2e+44], N[(a$95$m / N[(1.0 + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a$95$m + N[(a$95$m * N[(k * -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
          
          \begin{array}{l}
          a\_m = \left|a\right|
          \\
          a\_s = \mathsf{copysign}\left(1, a\right)
          
          \\
          a\_s \cdot \begin{array}{l}
          \mathbf{if}\;m \leq -22000000000:\\
          \;\;\;\;\frac{a\_m}{k \cdot k}\\
          
          \mathbf{elif}\;m \leq 2.2 \cdot 10^{+44}:\\
          \;\;\;\;\frac{a\_m}{1 + k \cdot k}\\
          
          \mathbf{else}:\\
          \;\;\;\;a\_m + a\_m \cdot \left(k \cdot -10\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if m < -2.2e10

            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -2.2e10 < m < 2.19999999999999996e44

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

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

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

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

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

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

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

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

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

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

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

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

            if 2.19999999999999996e44 < m

            1. Initial program 76.6%

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

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

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

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

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

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

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

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

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

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

              \[\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-+.f642.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. Simplified2.8%

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k - \color{blue}{-10}, 1\right)\right)\right) \]
              5. fma-defineN/A

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{k \cdot \left(k \cdot k + -100\right)}{k + -10} + 1\right)\right) \]
              11. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 13: 42.8% accurate, 6.7× speedup?

          \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -1.02 \cdot 10^{-84}:\\ \;\;\;\;\frac{a\_m}{k \cdot k}\\ \mathbf{elif}\;m \leq 1.8 \cdot 10^{+44}:\\ \;\;\;\;\frac{a\_m}{1 + k \cdot 10}\\ \mathbf{else}:\\ \;\;\;\;a\_m + a\_m \cdot \left(k \cdot -10\right)\\ \end{array} \end{array} \]
          a\_m = (fabs.f64 a)
          a\_s = (copysign.f64 #s(literal 1 binary64) a)
          (FPCore (a_s a_m k m)
           :precision binary64
           (*
            a_s
            (if (<= m -1.02e-84)
              (/ a_m (* k k))
              (if (<= m 1.8e+44)
                (/ a_m (+ 1.0 (* k 10.0)))
                (+ a_m (* a_m (* k -10.0)))))))
          a\_m = fabs(a);
          a\_s = copysign(1.0, a);
          double code(double a_s, double a_m, double k, double m) {
          	double tmp;
          	if (m <= -1.02e-84) {
          		tmp = a_m / (k * k);
          	} else if (m <= 1.8e+44) {
          		tmp = a_m / (1.0 + (k * 10.0));
          	} else {
          		tmp = a_m + (a_m * (k * -10.0));
          	}
          	return a_s * tmp;
          }
          
          a\_m = abs(a)
          a\_s = copysign(1.0d0, a)
          real(8) function code(a_s, a_m, k, m)
              real(8), intent (in) :: a_s
              real(8), intent (in) :: a_m
              real(8), intent (in) :: k
              real(8), intent (in) :: m
              real(8) :: tmp
              if (m <= (-1.02d-84)) then
                  tmp = a_m / (k * k)
              else if (m <= 1.8d+44) then
                  tmp = a_m / (1.0d0 + (k * 10.0d0))
              else
                  tmp = a_m + (a_m * (k * (-10.0d0)))
              end if
              code = a_s * tmp
          end function
          
          a\_m = Math.abs(a);
          a\_s = Math.copySign(1.0, a);
          public static double code(double a_s, double a_m, double k, double m) {
          	double tmp;
          	if (m <= -1.02e-84) {
          		tmp = a_m / (k * k);
          	} else if (m <= 1.8e+44) {
          		tmp = a_m / (1.0 + (k * 10.0));
          	} else {
          		tmp = a_m + (a_m * (k * -10.0));
          	}
          	return a_s * tmp;
          }
          
          a\_m = math.fabs(a)
          a\_s = math.copysign(1.0, a)
          def code(a_s, a_m, k, m):
          	tmp = 0
          	if m <= -1.02e-84:
          		tmp = a_m / (k * k)
          	elif m <= 1.8e+44:
          		tmp = a_m / (1.0 + (k * 10.0))
          	else:
          		tmp = a_m + (a_m * (k * -10.0))
          	return a_s * tmp
          
          a\_m = abs(a)
          a\_s = copysign(1.0, a)
          function code(a_s, a_m, k, m)
          	tmp = 0.0
          	if (m <= -1.02e-84)
          		tmp = Float64(a_m / Float64(k * k));
          	elseif (m <= 1.8e+44)
          		tmp = Float64(a_m / Float64(1.0 + Float64(k * 10.0)));
          	else
          		tmp = Float64(a_m + Float64(a_m * Float64(k * -10.0)));
          	end
          	return Float64(a_s * tmp)
          end
          
          a\_m = abs(a);
          a\_s = sign(a) * abs(1.0);
          function tmp_2 = code(a_s, a_m, k, m)
          	tmp = 0.0;
          	if (m <= -1.02e-84)
          		tmp = a_m / (k * k);
          	elseif (m <= 1.8e+44)
          		tmp = a_m / (1.0 + (k * 10.0));
          	else
          		tmp = a_m + (a_m * (k * -10.0));
          	end
          	tmp_2 = a_s * tmp;
          end
          
          a\_m = N[Abs[a], $MachinePrecision]
          a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, -1.02e-84], N[(a$95$m / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.8e+44], N[(a$95$m / N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a$95$m + N[(a$95$m * N[(k * -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
          
          \begin{array}{l}
          a\_m = \left|a\right|
          \\
          a\_s = \mathsf{copysign}\left(1, a\right)
          
          \\
          a\_s \cdot \begin{array}{l}
          \mathbf{if}\;m \leq -1.02 \cdot 10^{-84}:\\
          \;\;\;\;\frac{a\_m}{k \cdot k}\\
          
          \mathbf{elif}\;m \leq 1.8 \cdot 10^{+44}:\\
          \;\;\;\;\frac{a\_m}{1 + k \cdot 10}\\
          
          \mathbf{else}:\\
          \;\;\;\;a\_m + a\_m \cdot \left(k \cdot -10\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if m < -1.02000000000000004e-84

            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-+.f6440.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. Simplified40.6%

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

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

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

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

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

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

            if -1.02000000000000004e-84 < m < 1.8e44

            1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

              \[\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-+.f6489.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. Simplified89.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-*.f6470.7%

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

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

            if 1.8e44 < m

            1. Initial program 76.6%

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

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

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

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

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

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

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

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

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

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

              \[\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-+.f642.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. Simplified2.8%

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k - \color{blue}{-10}, 1\right)\right)\right) \]
              5. fma-defineN/A

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{k \cdot \left(k \cdot k + -100\right)}{k + -10} + 1\right)\right) \]
              11. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 14: 46.7% accurate, 6.7× speedup?

          \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq -8.5 \cdot 10^{-286}:\\ \;\;\;\;\frac{a\_m}{k \cdot k}\\ \mathbf{elif}\;k \leq 0.075:\\ \;\;\;\;a\_m + a\_m \cdot \left(k \cdot -10\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{a\_m}{k \cdot \left(k + 10\right)}\\ \end{array} \end{array} \]
          a\_m = (fabs.f64 a)
          a\_s = (copysign.f64 #s(literal 1 binary64) a)
          (FPCore (a_s a_m k m)
           :precision binary64
           (*
            a_s
            (if (<= k -8.5e-286)
              (/ a_m (* k k))
              (if (<= k 0.075) (+ a_m (* a_m (* k -10.0))) (/ a_m (* k (+ k 10.0)))))))
          a\_m = fabs(a);
          a\_s = copysign(1.0, a);
          double code(double a_s, double a_m, double k, double m) {
          	double tmp;
          	if (k <= -8.5e-286) {
          		tmp = a_m / (k * k);
          	} else if (k <= 0.075) {
          		tmp = a_m + (a_m * (k * -10.0));
          	} else {
          		tmp = a_m / (k * (k + 10.0));
          	}
          	return a_s * tmp;
          }
          
          a\_m = abs(a)
          a\_s = copysign(1.0d0, a)
          real(8) function code(a_s, a_m, k, m)
              real(8), intent (in) :: a_s
              real(8), intent (in) :: a_m
              real(8), intent (in) :: k
              real(8), intent (in) :: m
              real(8) :: tmp
              if (k <= (-8.5d-286)) then
                  tmp = a_m / (k * k)
              else if (k <= 0.075d0) then
                  tmp = a_m + (a_m * (k * (-10.0d0)))
              else
                  tmp = a_m / (k * (k + 10.0d0))
              end if
              code = a_s * tmp
          end function
          
          a\_m = Math.abs(a);
          a\_s = Math.copySign(1.0, a);
          public static double code(double a_s, double a_m, double k, double m) {
          	double tmp;
          	if (k <= -8.5e-286) {
          		tmp = a_m / (k * k);
          	} else if (k <= 0.075) {
          		tmp = a_m + (a_m * (k * -10.0));
          	} else {
          		tmp = a_m / (k * (k + 10.0));
          	}
          	return a_s * tmp;
          }
          
          a\_m = math.fabs(a)
          a\_s = math.copysign(1.0, a)
          def code(a_s, a_m, k, m):
          	tmp = 0
          	if k <= -8.5e-286:
          		tmp = a_m / (k * k)
          	elif k <= 0.075:
          		tmp = a_m + (a_m * (k * -10.0))
          	else:
          		tmp = a_m / (k * (k + 10.0))
          	return a_s * tmp
          
          a\_m = abs(a)
          a\_s = copysign(1.0, a)
          function code(a_s, a_m, k, m)
          	tmp = 0.0
          	if (k <= -8.5e-286)
          		tmp = Float64(a_m / Float64(k * k));
          	elseif (k <= 0.075)
          		tmp = Float64(a_m + Float64(a_m * Float64(k * -10.0)));
          	else
          		tmp = Float64(a_m / Float64(k * Float64(k + 10.0)));
          	end
          	return Float64(a_s * tmp)
          end
          
          a\_m = abs(a);
          a\_s = sign(a) * abs(1.0);
          function tmp_2 = code(a_s, a_m, k, m)
          	tmp = 0.0;
          	if (k <= -8.5e-286)
          		tmp = a_m / (k * k);
          	elseif (k <= 0.075)
          		tmp = a_m + (a_m * (k * -10.0));
          	else
          		tmp = a_m / (k * (k + 10.0));
          	end
          	tmp_2 = a_s * tmp;
          end
          
          a\_m = N[Abs[a], $MachinePrecision]
          a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[k, -8.5e-286], N[(a$95$m / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.075], N[(a$95$m + N[(a$95$m * N[(k * -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a$95$m / N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
          
          \begin{array}{l}
          a\_m = \left|a\right|
          \\
          a\_s = \mathsf{copysign}\left(1, a\right)
          
          \\
          a\_s \cdot \begin{array}{l}
          \mathbf{if}\;k \leq -8.5 \cdot 10^{-286}:\\
          \;\;\;\;\frac{a\_m}{k \cdot k}\\
          
          \mathbf{elif}\;k \leq 0.075:\\
          \;\;\;\;a\_m + a\_m \cdot \left(k \cdot -10\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{a\_m}{k \cdot \left(k + 10\right)}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if k < -8.4999999999999998e-286

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

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

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

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

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

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

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

            if -8.4999999999999998e-286 < k < 0.0749999999999999972

            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k - \color{blue}{-10}, 1\right)\right)\right) \]
              5. fma-defineN/A

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{k \cdot \left(k \cdot k + -100\right)}{k + -10} + 1\right)\right) \]
              11. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 0.0749999999999999972 < k

            1. Initial program 86.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-+.f6486.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. Simplified86.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-+.f6461.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. Simplified61.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 15: 46.5% accurate, 6.7× speedup?

          \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ \begin{array}{l} t_0 := \frac{a\_m}{k \cdot k}\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq -8.5 \cdot 10^{-286}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;k \leq 0.0076:\\ \;\;\;\;a\_m + a\_m \cdot \left(k \cdot -10\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \end{array} \]
          a\_m = (fabs.f64 a)
          a\_s = (copysign.f64 #s(literal 1 binary64) a)
          (FPCore (a_s a_m k m)
           :precision binary64
           (let* ((t_0 (/ a_m (* k k))))
             (*
              a_s
              (if (<= k -8.5e-286)
                t_0
                (if (<= k 0.0076) (+ a_m (* a_m (* k -10.0))) t_0)))))
          a\_m = fabs(a);
          a\_s = copysign(1.0, a);
          double code(double a_s, double a_m, double k, double m) {
          	double t_0 = a_m / (k * k);
          	double tmp;
          	if (k <= -8.5e-286) {
          		tmp = t_0;
          	} else if (k <= 0.0076) {
          		tmp = a_m + (a_m * (k * -10.0));
          	} else {
          		tmp = t_0;
          	}
          	return a_s * tmp;
          }
          
          a\_m = abs(a)
          a\_s = copysign(1.0d0, a)
          real(8) function code(a_s, a_m, k, m)
              real(8), intent (in) :: a_s
              real(8), intent (in) :: a_m
              real(8), intent (in) :: k
              real(8), intent (in) :: m
              real(8) :: t_0
              real(8) :: tmp
              t_0 = a_m / (k * k)
              if (k <= (-8.5d-286)) then
                  tmp = t_0
              else if (k <= 0.0076d0) then
                  tmp = a_m + (a_m * (k * (-10.0d0)))
              else
                  tmp = t_0
              end if
              code = a_s * tmp
          end function
          
          a\_m = Math.abs(a);
          a\_s = Math.copySign(1.0, a);
          public static double code(double a_s, double a_m, double k, double m) {
          	double t_0 = a_m / (k * k);
          	double tmp;
          	if (k <= -8.5e-286) {
          		tmp = t_0;
          	} else if (k <= 0.0076) {
          		tmp = a_m + (a_m * (k * -10.0));
          	} else {
          		tmp = t_0;
          	}
          	return a_s * tmp;
          }
          
          a\_m = math.fabs(a)
          a\_s = math.copysign(1.0, a)
          def code(a_s, a_m, k, m):
          	t_0 = a_m / (k * k)
          	tmp = 0
          	if k <= -8.5e-286:
          		tmp = t_0
          	elif k <= 0.0076:
          		tmp = a_m + (a_m * (k * -10.0))
          	else:
          		tmp = t_0
          	return a_s * tmp
          
          a\_m = abs(a)
          a\_s = copysign(1.0, a)
          function code(a_s, a_m, k, m)
          	t_0 = Float64(a_m / Float64(k * k))
          	tmp = 0.0
          	if (k <= -8.5e-286)
          		tmp = t_0;
          	elseif (k <= 0.0076)
          		tmp = Float64(a_m + Float64(a_m * Float64(k * -10.0)));
          	else
          		tmp = t_0;
          	end
          	return Float64(a_s * tmp)
          end
          
          a\_m = abs(a);
          a\_s = sign(a) * abs(1.0);
          function tmp_2 = code(a_s, a_m, k, m)
          	t_0 = a_m / (k * k);
          	tmp = 0.0;
          	if (k <= -8.5e-286)
          		tmp = t_0;
          	elseif (k <= 0.0076)
          		tmp = a_m + (a_m * (k * -10.0));
          	else
          		tmp = t_0;
          	end
          	tmp_2 = a_s * tmp;
          end
          
          a\_m = N[Abs[a], $MachinePrecision]
          a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[a$95$s_, a$95$m_, k_, m_] := Block[{t$95$0 = N[(a$95$m / N[(k * k), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[k, -8.5e-286], t$95$0, If[LessEqual[k, 0.0076], N[(a$95$m + N[(a$95$m * N[(k * -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]), $MachinePrecision]]
          
          \begin{array}{l}
          a\_m = \left|a\right|
          \\
          a\_s = \mathsf{copysign}\left(1, a\right)
          
          \\
          \begin{array}{l}
          t_0 := \frac{a\_m}{k \cdot k}\\
          a\_s \cdot \begin{array}{l}
          \mathbf{if}\;k \leq -8.5 \cdot 10^{-286}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;k \leq 0.0076:\\
          \;\;\;\;a\_m + a\_m \cdot \left(k \cdot -10\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if k < -8.4999999999999998e-286 or 0.00759999999999999998 < k

            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 m around 0

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
              4. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
              5. +-lowering-+.f6443.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. Simplified43.0%

              \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
            8. Taylor expanded in k around inf

              \[\leadsto \color{blue}{\frac{a}{{k}^{2}}} \]
            9. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
              2. unpow2N/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
              3. *-lowering-*.f6445.7%

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
            10. Simplified45.7%

              \[\leadsto \color{blue}{\frac{a}{k \cdot k}} \]

            if -8.4999999999999998e-286 < k < 0.00759999999999999998

            1. Initial program 99.9%

              \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
            2. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
              3. pow-lowering-pow.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
              4. associate-+l+N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
              5. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
              6. distribute-rgt-outN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
              8. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
              9. +-lowering-+.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-+.f6451.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. Simplified51.0%

              \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
            8. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(k + 10\right) + \color{blue}{1}\right)\right) \]
              2. fma-defineN/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \color{blue}{k + 10}, 1\right)\right)\right) \]
              3. metadata-evalN/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k + \left(\mathsf{neg}\left(-10\right)\right), 1\right)\right)\right) \]
              4. sub-negN/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k - \color{blue}{-10}, 1\right)\right)\right) \]
              5. fma-defineN/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(k - -10\right) + \color{blue}{1}\right)\right) \]
              6. flip--N/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \frac{k \cdot k - -10 \cdot -10}{k + -10} + 1\right)\right) \]
              7. sub-negN/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \frac{k \cdot k + \left(\mathsf{neg}\left(-10 \cdot -10\right)\right)}{k + -10} + 1\right)\right) \]
              8. metadata-evalN/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \frac{k \cdot k + \left(\mathsf{neg}\left(100\right)\right)}{k + -10} + 1\right)\right) \]
              9. metadata-evalN/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \frac{k \cdot k + -100}{k + -10} + 1\right)\right) \]
              10. associate-*r/N/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{k \cdot \left(k \cdot k + -100\right)}{k + -10} + 1\right)\right) \]
              11. clear-numN/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{1}{\frac{k + -10}{k \cdot \left(k \cdot k + -100\right)}} + 1\right)\right) \]
              12. flip-+N/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(\frac{\frac{1}{\frac{k + -10}{k \cdot \left(k \cdot k + -100\right)}} \cdot \frac{1}{\frac{k + -10}{k \cdot \left(k \cdot k + -100\right)}} - 1 \cdot 1}{\color{blue}{\frac{1}{\frac{k + -10}{k \cdot \left(k \cdot k + -100\right)}} - 1}}\right)\right) \]
              13. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{/.f64}\left(\left(\frac{1}{\frac{k + -10}{k \cdot \left(k \cdot k + -100\right)}} \cdot \frac{1}{\frac{k + -10}{k \cdot \left(k \cdot k + -100\right)}} - 1 \cdot 1\right), \color{blue}{\left(\frac{1}{\frac{k + -10}{k \cdot \left(k \cdot k + -100\right)}} - 1\right)}\right)\right) \]
            9. Applied egg-rr51.0%

              \[\leadsto \frac{a}{\color{blue}{\frac{\left(k \cdot \left(k + 10\right)\right) \cdot \left(k \cdot \left(k + 10\right)\right) - 1}{k \cdot \left(k + 10\right) - 1}}} \]
            10. Taylor expanded in k around 0

              \[\leadsto \color{blue}{a + -10 \cdot \left(a \cdot k\right)} \]
            11. Step-by-step derivation
              1. associate-*r*N/A

                \[\leadsto a + \left(-10 \cdot a\right) \cdot \color{blue}{k} \]
              2. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(a, \color{blue}{\left(\left(-10 \cdot a\right) \cdot k\right)}\right) \]
              3. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(a, \left(\left(a \cdot -10\right) \cdot k\right)\right) \]
              4. associate-*l*N/A

                \[\leadsto \mathsf{+.f64}\left(a, \left(a \cdot \color{blue}{\left(-10 \cdot k\right)}\right)\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(a, \color{blue}{\left(-10 \cdot k\right)}\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(a, \left(k \cdot \color{blue}{-10}\right)\right)\right) \]
              7. *-lowering-*.f6450.3%

                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{-10}\right)\right)\right) \]
            12. Simplified50.3%

              \[\leadsto \color{blue}{a + a \cdot \left(k \cdot -10\right)} \]
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 16: 46.3% accurate, 7.6× speedup?

          \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ \begin{array}{l} t_0 := \frac{a\_m}{k \cdot k}\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq -8.5 \cdot 10^{-286}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;k \leq 1:\\ \;\;\;\;a\_m\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \end{array} \]
          a\_m = (fabs.f64 a)
          a\_s = (copysign.f64 #s(literal 1 binary64) a)
          (FPCore (a_s a_m k m)
           :precision binary64
           (let* ((t_0 (/ a_m (* k k))))
             (* a_s (if (<= k -8.5e-286) t_0 (if (<= k 1.0) a_m t_0)))))
          a\_m = fabs(a);
          a\_s = copysign(1.0, a);
          double code(double a_s, double a_m, double k, double m) {
          	double t_0 = a_m / (k * k);
          	double tmp;
          	if (k <= -8.5e-286) {
          		tmp = t_0;
          	} else if (k <= 1.0) {
          		tmp = a_m;
          	} else {
          		tmp = t_0;
          	}
          	return a_s * tmp;
          }
          
          a\_m = abs(a)
          a\_s = copysign(1.0d0, a)
          real(8) function code(a_s, a_m, k, m)
              real(8), intent (in) :: a_s
              real(8), intent (in) :: a_m
              real(8), intent (in) :: k
              real(8), intent (in) :: m
              real(8) :: t_0
              real(8) :: tmp
              t_0 = a_m / (k * k)
              if (k <= (-8.5d-286)) then
                  tmp = t_0
              else if (k <= 1.0d0) then
                  tmp = a_m
              else
                  tmp = t_0
              end if
              code = a_s * tmp
          end function
          
          a\_m = Math.abs(a);
          a\_s = Math.copySign(1.0, a);
          public static double code(double a_s, double a_m, double k, double m) {
          	double t_0 = a_m / (k * k);
          	double tmp;
          	if (k <= -8.5e-286) {
          		tmp = t_0;
          	} else if (k <= 1.0) {
          		tmp = a_m;
          	} else {
          		tmp = t_0;
          	}
          	return a_s * tmp;
          }
          
          a\_m = math.fabs(a)
          a\_s = math.copysign(1.0, a)
          def code(a_s, a_m, k, m):
          	t_0 = a_m / (k * k)
          	tmp = 0
          	if k <= -8.5e-286:
          		tmp = t_0
          	elif k <= 1.0:
          		tmp = a_m
          	else:
          		tmp = t_0
          	return a_s * tmp
          
          a\_m = abs(a)
          a\_s = copysign(1.0, a)
          function code(a_s, a_m, k, m)
          	t_0 = Float64(a_m / Float64(k * k))
          	tmp = 0.0
          	if (k <= -8.5e-286)
          		tmp = t_0;
          	elseif (k <= 1.0)
          		tmp = a_m;
          	else
          		tmp = t_0;
          	end
          	return Float64(a_s * tmp)
          end
          
          a\_m = abs(a);
          a\_s = sign(a) * abs(1.0);
          function tmp_2 = code(a_s, a_m, k, m)
          	t_0 = a_m / (k * k);
          	tmp = 0.0;
          	if (k <= -8.5e-286)
          		tmp = t_0;
          	elseif (k <= 1.0)
          		tmp = a_m;
          	else
          		tmp = t_0;
          	end
          	tmp_2 = a_s * tmp;
          end
          
          a\_m = N[Abs[a], $MachinePrecision]
          a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[a$95$s_, a$95$m_, k_, m_] := Block[{t$95$0 = N[(a$95$m / N[(k * k), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[k, -8.5e-286], t$95$0, If[LessEqual[k, 1.0], a$95$m, t$95$0]]), $MachinePrecision]]
          
          \begin{array}{l}
          a\_m = \left|a\right|
          \\
          a\_s = \mathsf{copysign}\left(1, a\right)
          
          \\
          \begin{array}{l}
          t_0 := \frac{a\_m}{k \cdot k}\\
          a\_s \cdot \begin{array}{l}
          \mathbf{if}\;k \leq -8.5 \cdot 10^{-286}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;k \leq 1:\\
          \;\;\;\;a\_m\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if k < -8.4999999999999998e-286 or 1 < k

            1. Initial program 87.1%

              \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
            2. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
              3. pow-lowering-pow.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
              4. associate-+l+N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
              5. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
              6. distribute-rgt-outN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
              8. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
              9. +-lowering-+.f6487.1%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
            3. Simplified87.1%

              \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
            4. Add Preprocessing
            5. Taylor expanded in m around 0

              \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
            6. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
              2. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
              4. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
              5. +-lowering-+.f6442.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. Simplified42.6%

              \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
            8. Taylor expanded in k around inf

              \[\leadsto \color{blue}{\frac{a}{{k}^{2}}} \]
            9. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
              2. unpow2N/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
              3. *-lowering-*.f6445.9%

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
            10. Simplified45.9%

              \[\leadsto \color{blue}{\frac{a}{k \cdot k}} \]

            if -8.4999999999999998e-286 < k < 1

            1. Initial program 99.9%

              \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
            2. Step-by-step derivation
              1. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
              3. pow-lowering-pow.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
              4. associate-+l+N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
              5. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
              6. distribute-rgt-outN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
              8. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
              9. +-lowering-+.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-+.f6451.5%

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
            7. Simplified51.5%

              \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
            8. Taylor expanded in k around 0

              \[\leadsto \color{blue}{a} \]
            9. Step-by-step derivation
              1. Simplified49.5%

                \[\leadsto \color{blue}{a} \]
            10. Recombined 2 regimes into one program.
            11. Add Preprocessing

            Alternative 17: 27.6% accurate, 7.6× speedup?

            \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ \begin{array}{l} t_0 := \frac{a\_m}{k \cdot 10}\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq -2.52 \cdot 10^{+98}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;k \leq 0.1:\\ \;\;\;\;a\_m\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \end{array} \]
            a\_m = (fabs.f64 a)
            a\_s = (copysign.f64 #s(literal 1 binary64) a)
            (FPCore (a_s a_m k m)
             :precision binary64
             (let* ((t_0 (/ a_m (* k 10.0))))
               (* a_s (if (<= k -2.52e+98) t_0 (if (<= k 0.1) a_m t_0)))))
            a\_m = fabs(a);
            a\_s = copysign(1.0, a);
            double code(double a_s, double a_m, double k, double m) {
            	double t_0 = a_m / (k * 10.0);
            	double tmp;
            	if (k <= -2.52e+98) {
            		tmp = t_0;
            	} else if (k <= 0.1) {
            		tmp = a_m;
            	} else {
            		tmp = t_0;
            	}
            	return a_s * tmp;
            }
            
            a\_m = abs(a)
            a\_s = copysign(1.0d0, a)
            real(8) function code(a_s, a_m, k, m)
                real(8), intent (in) :: a_s
                real(8), intent (in) :: a_m
                real(8), intent (in) :: k
                real(8), intent (in) :: m
                real(8) :: t_0
                real(8) :: tmp
                t_0 = a_m / (k * 10.0d0)
                if (k <= (-2.52d+98)) then
                    tmp = t_0
                else if (k <= 0.1d0) then
                    tmp = a_m
                else
                    tmp = t_0
                end if
                code = a_s * tmp
            end function
            
            a\_m = Math.abs(a);
            a\_s = Math.copySign(1.0, a);
            public static double code(double a_s, double a_m, double k, double m) {
            	double t_0 = a_m / (k * 10.0);
            	double tmp;
            	if (k <= -2.52e+98) {
            		tmp = t_0;
            	} else if (k <= 0.1) {
            		tmp = a_m;
            	} else {
            		tmp = t_0;
            	}
            	return a_s * tmp;
            }
            
            a\_m = math.fabs(a)
            a\_s = math.copysign(1.0, a)
            def code(a_s, a_m, k, m):
            	t_0 = a_m / (k * 10.0)
            	tmp = 0
            	if k <= -2.52e+98:
            		tmp = t_0
            	elif k <= 0.1:
            		tmp = a_m
            	else:
            		tmp = t_0
            	return a_s * tmp
            
            a\_m = abs(a)
            a\_s = copysign(1.0, a)
            function code(a_s, a_m, k, m)
            	t_0 = Float64(a_m / Float64(k * 10.0))
            	tmp = 0.0
            	if (k <= -2.52e+98)
            		tmp = t_0;
            	elseif (k <= 0.1)
            		tmp = a_m;
            	else
            		tmp = t_0;
            	end
            	return Float64(a_s * tmp)
            end
            
            a\_m = abs(a);
            a\_s = sign(a) * abs(1.0);
            function tmp_2 = code(a_s, a_m, k, m)
            	t_0 = a_m / (k * 10.0);
            	tmp = 0.0;
            	if (k <= -2.52e+98)
            		tmp = t_0;
            	elseif (k <= 0.1)
            		tmp = a_m;
            	else
            		tmp = t_0;
            	end
            	tmp_2 = a_s * tmp;
            end
            
            a\_m = N[Abs[a], $MachinePrecision]
            a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[a$95$s_, a$95$m_, k_, m_] := Block[{t$95$0 = N[(a$95$m / N[(k * 10.0), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[k, -2.52e+98], t$95$0, If[LessEqual[k, 0.1], a$95$m, t$95$0]]), $MachinePrecision]]
            
            \begin{array}{l}
            a\_m = \left|a\right|
            \\
            a\_s = \mathsf{copysign}\left(1, a\right)
            
            \\
            \begin{array}{l}
            t_0 := \frac{a\_m}{k \cdot 10}\\
            a\_s \cdot \begin{array}{l}
            \mathbf{if}\;k \leq -2.52 \cdot 10^{+98}:\\
            \;\;\;\;t\_0\\
            
            \mathbf{elif}\;k \leq 0.1:\\
            \;\;\;\;a\_m\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_0\\
            
            
            \end{array}
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if k < -2.51999999999999999e98 or 0.10000000000000001 < k

              1. Initial program 82.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-+.f6482.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. Simplified82.2%

                \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
              4. Add Preprocessing
              5. Taylor expanded in m around 0

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
              6. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                4. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                5. +-lowering-+.f6458.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. Simplified58.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, \color{blue}{\left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right) \]
              9. Step-by-step derivation
                1. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(\left({k}^{2}\right), \color{blue}{\left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right) \]
                2. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(\left(k \cdot k\right), \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right) \]
                4. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot \frac{1}{k}\right)}\right)\right)\right) \]
                5. associate-*r/N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(1, \left(\frac{10 \cdot 1}{\color{blue}{k}}\right)\right)\right)\right) \]
                6. metadata-evalN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(1, \left(\frac{10}{k}\right)\right)\right)\right) \]
                7. /-lowering-/.f6457.6%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(10, \color{blue}{k}\right)\right)\right)\right) \]
              10. Simplified57.6%

                \[\leadsto \frac{a}{\color{blue}{\left(k \cdot k\right) \cdot \left(1 + \frac{10}{k}\right)}} \]
              11. Taylor expanded in k around 0

                \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(10 \cdot k\right)}\right) \]
              12. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{10}\right)\right) \]
                2. *-lowering-*.f6428.6%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{10}\right)\right) \]
              13. Simplified28.6%

                \[\leadsto \frac{a}{\color{blue}{k \cdot 10}} \]

              if -2.51999999999999999e98 < k < 0.10000000000000001

              1. Initial program 100.0%

                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
              2. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                3. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                4. associate-+l+N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                8. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f64100.0%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified100.0%

                \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
              4. Add Preprocessing
              5. Taylor expanded in m around 0

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
              6. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                2. +-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.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. Simplified36.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. Simplified35.7%

                  \[\leadsto \color{blue}{a} \]
              10. Recombined 2 regimes into one program.
              11. Add Preprocessing

              Alternative 18: 19.7% accurate, 114.0× speedup?

              \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot a\_m \end{array} \]
              a\_m = (fabs.f64 a)
              a\_s = (copysign.f64 #s(literal 1 binary64) a)
              (FPCore (a_s a_m k m) :precision binary64 (* a_s a_m))
              a\_m = fabs(a);
              a\_s = copysign(1.0, a);
              double code(double a_s, double a_m, double k, double m) {
              	return a_s * a_m;
              }
              
              a\_m = abs(a)
              a\_s = copysign(1.0d0, a)
              real(8) function code(a_s, a_m, k, m)
                  real(8), intent (in) :: a_s
                  real(8), intent (in) :: a_m
                  real(8), intent (in) :: k
                  real(8), intent (in) :: m
                  code = a_s * a_m
              end function
              
              a\_m = Math.abs(a);
              a\_s = Math.copySign(1.0, a);
              public static double code(double a_s, double a_m, double k, double m) {
              	return a_s * a_m;
              }
              
              a\_m = math.fabs(a)
              a\_s = math.copysign(1.0, a)
              def code(a_s, a_m, k, m):
              	return a_s * a_m
              
              a\_m = abs(a)
              a\_s = copysign(1.0, a)
              function code(a_s, a_m, k, m)
              	return Float64(a_s * a_m)
              end
              
              a\_m = abs(a);
              a\_s = sign(a) * abs(1.0);
              function tmp = code(a_s, a_m, k, m)
              	tmp = a_s * a_m;
              end
              
              a\_m = N[Abs[a], $MachinePrecision]
              a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
              code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * a$95$m), $MachinePrecision]
              
              \begin{array}{l}
              a\_m = \left|a\right|
              \\
              a\_s = \mathsf{copysign}\left(1, a\right)
              
              \\
              a\_s \cdot a\_m
              \end{array}
              
              Derivation
              1. Initial program 92.1%

                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
              2. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                3. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                4. associate-+l+N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                8. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6492.1%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified92.1%

                \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
              4. Add Preprocessing
              5. Taylor expanded in m around 0

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
              6. Step-by-step derivation
                1. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                2. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left(k \cdot \left(10 + k\right)\right)}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                4. +-commutativeN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                5. +-lowering-+.f6446.1%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              7. Simplified46.1%

                \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
              8. Taylor expanded in k around 0

                \[\leadsto \color{blue}{a} \]
              9. Step-by-step derivation
                1. Simplified21.9%

                  \[\leadsto \color{blue}{a} \]
                2. Add Preprocessing

                Reproduce

                ?
                herbie shell --seed 2024139 
                (FPCore (a k m)
                  :name "Falkner and Boettcher, Appendix A"
                  :precision binary64
                  (/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))