Falkner and Boettcher, Appendix A

Percentage Accurate: 90.2% → 99.9%
Time: 10.0s
Alternatives: 14
Speedup: 1.1×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 90.2% accurate, 1.0× speedup?

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

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

Alternative 1: 99.9% accurate, 0.3× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ \begin{array}{l} t_0 := {k}^{m} \cdot a\_m\\ t_1 := \frac{t\_0}{k \cdot k + \left(10 \cdot k + 1\right)}\\ t_2 := {\left(\frac{-1}{\frac{-1}{k}}\right)}^{m}\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq 0:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\frac{t\_2}{k}, -10, t\_2\right) \cdot a\_m}{k}}{k}\\ \mathbf{elif}\;t\_1 \leq 10^{+278}:\\ \;\;\;\;\frac{t\_0}{\mathsf{fma}\left(k, 10, \mathsf{fma}\left(k, k, 1\right)\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 (* (pow k m) a_m))
        (t_1 (/ t_0 (+ (* k k) (+ (* 10.0 k) 1.0))))
        (t_2 (pow (/ -1.0 (/ -1.0 k)) m)))
   (*
    a_s
    (if (<= t_1 0.0)
      (/ (/ (* (fma (/ t_2 k) -10.0 t_2) a_m) k) k)
      (if (<= t_1 1e+278) (/ t_0 (fma k 10.0 (fma k k 1.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 = pow(k, m) * a_m;
	double t_1 = t_0 / ((k * k) + ((10.0 * k) + 1.0));
	double t_2 = pow((-1.0 / (-1.0 / k)), m);
	double tmp;
	if (t_1 <= 0.0) {
		tmp = ((fma((t_2 / k), -10.0, t_2) * a_m) / k) / k;
	} else if (t_1 <= 1e+278) {
		tmp = t_0 / fma(k, 10.0, fma(k, k, 1.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((k ^ m) * a_m)
	t_1 = Float64(t_0 / Float64(Float64(k * k) + Float64(Float64(10.0 * k) + 1.0)))
	t_2 = Float64(-1.0 / Float64(-1.0 / k)) ^ m
	tmp = 0.0
	if (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(fma(Float64(t_2 / k), -10.0, t_2) * a_m) / k) / k);
	elseif (t_1 <= 1e+278)
		tmp = Float64(t_0 / fma(k, 10.0, fma(k, k, 1.0)));
	else
		tmp = t_0;
	end
	return Float64(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[(N[Power[k, m], $MachinePrecision] * a$95$m), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[(N[(k * k), $MachinePrecision] + N[(N[(10.0 * k), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(-1.0 / N[(-1.0 / k), $MachinePrecision]), $MachinePrecision], m], $MachinePrecision]}, N[(a$95$s * If[LessEqual[t$95$1, 0.0], N[(N[(N[(N[(N[(t$95$2 / k), $MachinePrecision] * -10.0 + t$95$2), $MachinePrecision] * a$95$m), $MachinePrecision] / k), $MachinePrecision] / k), $MachinePrecision], If[LessEqual[t$95$1, 1e+278], N[(t$95$0 / N[(k * 10.0 + N[(k * k + 1.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 := {k}^{m} \cdot a\_m\\
t_1 := \frac{t\_0}{k \cdot k + \left(10 \cdot k + 1\right)}\\
t_2 := {\left(\frac{-1}{\frac{-1}{k}}\right)}^{m}\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\frac{t\_2}{k}, -10, t\_2\right) \cdot a\_m}{k}}{k}\\

\mathbf{elif}\;t\_1 \leq 10^{+278}:\\
\;\;\;\;\frac{t\_0}{\mathsf{fma}\left(k, 10, \mathsf{fma}\left(k, k, 1\right)\right)}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 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))) < 0.0

    1. Initial program 97.4%

      \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
    2. Add Preprocessing
    3. Taylor expanded in k around -inf

      \[\leadsto \color{blue}{\frac{-10 \cdot \frac{a \cdot e^{m \cdot \left(\log -1 + -1 \cdot \log \left(\frac{-1}{k}\right)\right)}}{k} + a \cdot e^{m \cdot \left(\log -1 + -1 \cdot \log \left(\frac{-1}{k}\right)\right)}}{{k}^{2}}} \]
    4. Applied rewrites72.1%

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

    if 0.0 < (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k))) < 9.99999999999999964e277

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{a \cdot {k}^{m}}{\mathsf{fma}\left(k, 10, \color{blue}{k \cdot k} + 1\right)} \]
      10. lower-fma.f6499.9

        \[\leadsto \frac{a \cdot {k}^{m}}{\mathsf{fma}\left(k, 10, \color{blue}{\mathsf{fma}\left(k, k, 1\right)}\right)} \]
    4. Applied rewrites99.9%

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

    if 9.99999999999999964e277 < (/.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 51.0%

      \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
    2. Add Preprocessing
    3. Taylor expanded in k around 0

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

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

        \[\leadsto \color{blue}{{k}^{m} \cdot a} \]
      3. lower-pow.f64100.0

        \[\leadsto \color{blue}{{k}^{m}} \cdot a \]
    5. Applied rewrites100.0%

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

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

Alternative 2: 51.3% accurate, 0.3× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ \begin{array}{l} t_0 := \frac{{k}^{m} \cdot a\_m}{k \cdot k + \left(10 \cdot k + 1\right)}\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq 10^{-315}:\\ \;\;\;\;\frac{a\_m}{\left(10 + k\right) \cdot k}\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+295}:\\ \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10, k, 1\right)}\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\frac{a\_m}{k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(99, k, -10\right) \cdot a\_m, k, a\_m\right)\\ \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 (/ (* (pow k m) a_m) (+ (* k k) (+ (* 10.0 k) 1.0)))))
   (*
    a_s
    (if (<= t_0 1e-315)
      (/ a_m (* (+ 10.0 k) k))
      (if (<= t_0 5e+295)
        (/ a_m (fma 10.0 k 1.0))
        (if (<= t_0 INFINITY)
          (/ a_m (* k k))
          (fma (* (fma 99.0 k -10.0) a_m) k a_m)))))))
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 = (pow(k, m) * a_m) / ((k * k) + ((10.0 * k) + 1.0));
	double tmp;
	if (t_0 <= 1e-315) {
		tmp = a_m / ((10.0 + k) * k);
	} else if (t_0 <= 5e+295) {
		tmp = a_m / fma(10.0, k, 1.0);
	} else if (t_0 <= ((double) INFINITY)) {
		tmp = a_m / (k * k);
	} else {
		tmp = fma((fma(99.0, k, -10.0) * a_m), k, a_m);
	}
	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(Float64((k ^ m) * a_m) / Float64(Float64(k * k) + Float64(Float64(10.0 * k) + 1.0)))
	tmp = 0.0
	if (t_0 <= 1e-315)
		tmp = Float64(a_m / Float64(Float64(10.0 + k) * k));
	elseif (t_0 <= 5e+295)
		tmp = Float64(a_m / fma(10.0, k, 1.0));
	elseif (t_0 <= Inf)
		tmp = Float64(a_m / Float64(k * k));
	else
		tmp = fma(Float64(fma(99.0, k, -10.0) * a_m), k, a_m);
	end
	return Float64(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[(N[(N[Power[k, m], $MachinePrecision] * a$95$m), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] + N[(N[(10.0 * k), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[t$95$0, 1e-315], N[(a$95$m / N[(N[(10.0 + k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+295], N[(a$95$m / N[(10.0 * k + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(a$95$m / N[(k * k), $MachinePrecision]), $MachinePrecision], N[(N[(N[(99.0 * k + -10.0), $MachinePrecision] * a$95$m), $MachinePrecision] * k + a$95$m), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)

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

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+295}:\\
\;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10, k, 1\right)}\\

\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;\frac{a\_m}{k \cdot k}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(99, k, -10\right) \cdot a\_m, k, a\_m\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 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))) < 9.999999985e-316

    1. Initial program 97.4%

      \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
    2. Add Preprocessing
    3. Taylor expanded in m around 0

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

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

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

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

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

        \[\leadsto \frac{a}{{k}^{2} + \left(\color{blue}{\left(10 \cdot 1\right)} \cdot k + 1\right)} \]
      6. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + \frac{1}{{k}^{2}} \cdot {k}^{2}} \]
      18. lft-mult-inverseN/A

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

        \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k, k, 1\right)}} \]
    5. Applied rewrites46.2%

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

      \[\leadsto \frac{a}{{k}^{2} \cdot \color{blue}{\left(1 + 10 \cdot \frac{1}{k}\right)}} \]
    7. Step-by-step derivation
      1. Applied rewrites31.8%

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

      if 9.999999985e-316 < (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k))) < 4.99999999999999991e295

      1. Initial program 99.9%

        \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
      2. Add Preprocessing
      3. Taylor expanded in m around 0

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

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

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

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

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

          \[\leadsto \frac{a}{{k}^{2} + \left(\color{blue}{\left(10 \cdot 1\right)} \cdot k + 1\right)} \]
        6. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + \frac{1}{{k}^{2}} \cdot {k}^{2}} \]
        18. lft-mult-inverseN/A

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

          \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k, k, 1\right)}} \]
      5. Applied rewrites97.8%

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

        \[\leadsto \frac{a}{\mathsf{fma}\left(10, k, 1\right)} \]
      7. Step-by-step derivation
        1. Applied rewrites68.0%

          \[\leadsto \frac{a}{\mathsf{fma}\left(10, k, 1\right)} \]

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

        1. Initial program 100.0%

          \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
        2. Add Preprocessing
        3. Taylor expanded in m around 0

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

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

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

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

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

            \[\leadsto \frac{a}{{k}^{2} + \left(\color{blue}{\left(10 \cdot 1\right)} \cdot k + 1\right)} \]
          6. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + \frac{1}{{k}^{2}} \cdot {k}^{2}} \]
          18. lft-mult-inverseN/A

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

            \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k, k, 1\right)}} \]
        5. Applied rewrites2.9%

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

          \[\leadsto \frac{a}{{k}^{\color{blue}{2}}} \]
        7. Step-by-step derivation
          1. Applied rewrites43.0%

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

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

          1. Initial program 0.0%

            \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
          2. Add Preprocessing
          3. Taylor expanded in m around 0

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

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

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

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

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

              \[\leadsto \frac{a}{{k}^{2} + \left(\color{blue}{\left(10 \cdot 1\right)} \cdot k + 1\right)} \]
            6. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + \frac{1}{{k}^{2}} \cdot {k}^{2}} \]
            18. lft-mult-inverseN/A

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

              \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k, k, 1\right)}} \]
          5. Applied rewrites1.6%

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

            \[\leadsto a + \color{blue}{-10 \cdot \left(a \cdot k\right)} \]
          7. Step-by-step derivation
            1. Applied rewrites22.0%

              \[\leadsto \mathsf{fma}\left(k \cdot a, \color{blue}{-10}, a\right) \]
            2. Taylor expanded in k around 0

              \[\leadsto a + \color{blue}{k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)} \]
            3. Step-by-step derivation
              1. Applied rewrites77.1%

                \[\leadsto \mathsf{fma}\left(a \cdot \mathsf{fma}\left(99, k, -10\right), \color{blue}{k}, a\right) \]
            4. Recombined 4 regimes into one program.
            5. Final simplification40.6%

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

            Alternative 3: 51.2% accurate, 0.3× 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}\\ t_1 := \frac{{k}^{m} \cdot a\_m}{k \cdot k + \left(10 \cdot k + 1\right)}\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq 10^{-315}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+295}:\\ \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10, k, 1\right)}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(99, k, -10\right) \cdot a\_m, k, a\_m\right)\\ \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)))
                    (t_1 (/ (* (pow k m) a_m) (+ (* k k) (+ (* 10.0 k) 1.0)))))
               (*
                a_s
                (if (<= t_1 1e-315)
                  t_0
                  (if (<= t_1 5e+295)
                    (/ a_m (fma 10.0 k 1.0))
                    (if (<= t_1 INFINITY) t_0 (fma (* (fma 99.0 k -10.0) a_m) k a_m)))))))
            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 t_1 = (pow(k, m) * a_m) / ((k * k) + ((10.0 * k) + 1.0));
            	double tmp;
            	if (t_1 <= 1e-315) {
            		tmp = t_0;
            	} else if (t_1 <= 5e+295) {
            		tmp = a_m / fma(10.0, k, 1.0);
            	} else if (t_1 <= ((double) INFINITY)) {
            		tmp = t_0;
            	} else {
            		tmp = fma((fma(99.0, k, -10.0) * a_m), k, a_m);
            	}
            	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))
            	t_1 = Float64(Float64((k ^ m) * a_m) / Float64(Float64(k * k) + Float64(Float64(10.0 * k) + 1.0)))
            	tmp = 0.0
            	if (t_1 <= 1e-315)
            		tmp = t_0;
            	elseif (t_1 <= 5e+295)
            		tmp = Float64(a_m / fma(10.0, k, 1.0));
            	elseif (t_1 <= Inf)
            		tmp = t_0;
            	else
            		tmp = fma(Float64(fma(99.0, k, -10.0) * a_m), k, a_m);
            	end
            	return Float64(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]}, Block[{t$95$1 = N[(N[(N[Power[k, m], $MachinePrecision] * a$95$m), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] + N[(N[(10.0 * k), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[t$95$1, 1e-315], t$95$0, If[LessEqual[t$95$1, 5e+295], N[(a$95$m / N[(10.0 * k + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$0, N[(N[(N[(99.0 * k + -10.0), $MachinePrecision] * a$95$m), $MachinePrecision] * k + a$95$m), $MachinePrecision]]]]), $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}\\
            t_1 := \frac{{k}^{m} \cdot a\_m}{k \cdot k + \left(10 \cdot k + 1\right)}\\
            a\_s \cdot \begin{array}{l}
            \mathbf{if}\;t\_1 \leq 10^{-315}:\\
            \;\;\;\;t\_0\\
            
            \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+295}:\\
            \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10, k, 1\right)}\\
            
            \mathbf{elif}\;t\_1 \leq \infty:\\
            \;\;\;\;t\_0\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(99, k, -10\right) \cdot a\_m, k, a\_m\right)\\
            
            
            \end{array}
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 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))) < 9.999999985e-316 or 4.99999999999999991e295 < (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k))) < +inf.0

              1. Initial program 97.7%

                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
              2. Add Preprocessing
              3. Taylor expanded in m around 0

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

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

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

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

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

                  \[\leadsto \frac{a}{{k}^{2} + \left(\color{blue}{\left(10 \cdot 1\right)} \cdot k + 1\right)} \]
                6. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + \frac{1}{{k}^{2}} \cdot {k}^{2}} \]
                18. lft-mult-inverseN/A

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

                  \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k, k, 1\right)}} \]
              5. Applied rewrites41.2%

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

                \[\leadsto \frac{a}{{k}^{\color{blue}{2}}} \]
              7. Step-by-step derivation
                1. Applied rewrites36.1%

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

                if 9.999999985e-316 < (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k))) < 4.99999999999999991e295

                1. Initial program 99.9%

                  \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                2. Add Preprocessing
                3. Taylor expanded in m around 0

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

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

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

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

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

                    \[\leadsto \frac{a}{{k}^{2} + \left(\color{blue}{\left(10 \cdot 1\right)} \cdot k + 1\right)} \]
                  6. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + \frac{1}{{k}^{2}} \cdot {k}^{2}} \]
                  18. lft-mult-inverseN/A

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

                    \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k, k, 1\right)}} \]
                5. Applied rewrites97.8%

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

                  \[\leadsto \frac{a}{\mathsf{fma}\left(10, k, 1\right)} \]
                7. Step-by-step derivation
                  1. Applied rewrites68.0%

                    \[\leadsto \frac{a}{\mathsf{fma}\left(10, k, 1\right)} \]

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

                  1. Initial program 0.0%

                    \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                  2. Add Preprocessing
                  3. Taylor expanded in m around 0

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

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

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

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

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

                      \[\leadsto \frac{a}{{k}^{2} + \left(\color{blue}{\left(10 \cdot 1\right)} \cdot k + 1\right)} \]
                    6. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + \frac{1}{{k}^{2}} \cdot {k}^{2}} \]
                    18. lft-mult-inverseN/A

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

                      \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k, k, 1\right)}} \]
                  5. Applied rewrites1.6%

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

                    \[\leadsto a + \color{blue}{-10 \cdot \left(a \cdot k\right)} \]
                  7. Step-by-step derivation
                    1. Applied rewrites22.0%

                      \[\leadsto \mathsf{fma}\left(k \cdot a, \color{blue}{-10}, a\right) \]
                    2. Taylor expanded in k around 0

                      \[\leadsto a + \color{blue}{k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)} \]
                    3. Step-by-step derivation
                      1. Applied rewrites77.1%

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

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

                    Alternative 4: 50.9% accurate, 0.3× 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}\\ t_1 := \frac{{k}^{m} \cdot a\_m}{k \cdot k + \left(10 \cdot k + 1\right)}\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq 10^{-315}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+295}:\\ \;\;\;\;1 \cdot a\_m\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(99, k, -10\right) \cdot a\_m, k, a\_m\right)\\ \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)))
                            (t_1 (/ (* (pow k m) a_m) (+ (* k k) (+ (* 10.0 k) 1.0)))))
                       (*
                        a_s
                        (if (<= t_1 1e-315)
                          t_0
                          (if (<= t_1 5e+295)
                            (* 1.0 a_m)
                            (if (<= t_1 INFINITY) t_0 (fma (* (fma 99.0 k -10.0) a_m) k a_m)))))))
                    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 t_1 = (pow(k, m) * a_m) / ((k * k) + ((10.0 * k) + 1.0));
                    	double tmp;
                    	if (t_1 <= 1e-315) {
                    		tmp = t_0;
                    	} else if (t_1 <= 5e+295) {
                    		tmp = 1.0 * a_m;
                    	} else if (t_1 <= ((double) INFINITY)) {
                    		tmp = t_0;
                    	} else {
                    		tmp = fma((fma(99.0, k, -10.0) * a_m), k, a_m);
                    	}
                    	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))
                    	t_1 = Float64(Float64((k ^ m) * a_m) / Float64(Float64(k * k) + Float64(Float64(10.0 * k) + 1.0)))
                    	tmp = 0.0
                    	if (t_1 <= 1e-315)
                    		tmp = t_0;
                    	elseif (t_1 <= 5e+295)
                    		tmp = Float64(1.0 * a_m);
                    	elseif (t_1 <= Inf)
                    		tmp = t_0;
                    	else
                    		tmp = fma(Float64(fma(99.0, k, -10.0) * a_m), k, a_m);
                    	end
                    	return Float64(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]}, Block[{t$95$1 = N[(N[(N[Power[k, m], $MachinePrecision] * a$95$m), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] + N[(N[(10.0 * k), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[t$95$1, 1e-315], t$95$0, If[LessEqual[t$95$1, 5e+295], N[(1.0 * a$95$m), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$0, N[(N[(N[(99.0 * k + -10.0), $MachinePrecision] * a$95$m), $MachinePrecision] * k + a$95$m), $MachinePrecision]]]]), $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}\\
                    t_1 := \frac{{k}^{m} \cdot a\_m}{k \cdot k + \left(10 \cdot k + 1\right)}\\
                    a\_s \cdot \begin{array}{l}
                    \mathbf{if}\;t\_1 \leq 10^{-315}:\\
                    \;\;\;\;t\_0\\
                    
                    \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+295}:\\
                    \;\;\;\;1 \cdot a\_m\\
                    
                    \mathbf{elif}\;t\_1 \leq \infty:\\
                    \;\;\;\;t\_0\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(99, k, -10\right) \cdot a\_m, k, a\_m\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 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))) < 9.999999985e-316 or 4.99999999999999991e295 < (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k))) < +inf.0

                      1. Initial program 97.7%

                        \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                      2. Add Preprocessing
                      3. Taylor expanded in m around 0

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

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

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

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

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

                          \[\leadsto \frac{a}{{k}^{2} + \left(\color{blue}{\left(10 \cdot 1\right)} \cdot k + 1\right)} \]
                        6. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + \frac{1}{{k}^{2}} \cdot {k}^{2}} \]
                        18. lft-mult-inverseN/A

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

                          \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k, k, 1\right)}} \]
                      5. Applied rewrites41.2%

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

                        \[\leadsto \frac{a}{{k}^{\color{blue}{2}}} \]
                      7. Step-by-step derivation
                        1. Applied rewrites36.1%

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

                        if 9.999999985e-316 < (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k))) < 4.99999999999999991e295

                        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{a \cdot {k}^{m}}{\mathsf{fma}\left(k, 10, \color{blue}{k \cdot k} + 1\right)} \]
                          10. lower-fma.f6499.9

                            \[\leadsto \frac{a \cdot {k}^{m}}{\mathsf{fma}\left(k, 10, \color{blue}{\mathsf{fma}\left(k, k, 1\right)}\right)} \]
                        4. Applied rewrites99.9%

                          \[\leadsto \frac{a \cdot {k}^{m}}{\color{blue}{\mathsf{fma}\left(k, 10, \mathsf{fma}\left(k, k, 1\right)\right)}} \]
                        5. Step-by-step derivation
                          1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto {k}^{m} \cdot \frac{a}{\color{blue}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                        6. Applied rewrites99.6%

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

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

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

                            \[\leadsto \color{blue}{{k}^{m} \cdot a} \]
                          3. lower-pow.f6469.0

                            \[\leadsto \color{blue}{{k}^{m}} \cdot a \]
                        9. Applied rewrites69.0%

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

                          \[\leadsto 1 \cdot a \]
                        11. Step-by-step derivation
                          1. Applied rewrites66.9%

                            \[\leadsto 1 \cdot a \]

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

                          1. Initial program 0.0%

                            \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                          2. Add Preprocessing
                          3. Taylor expanded in m around 0

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

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

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

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

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

                              \[\leadsto \frac{a}{{k}^{2} + \left(\color{blue}{\left(10 \cdot 1\right)} \cdot k + 1\right)} \]
                            6. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + \frac{1}{{k}^{2}} \cdot {k}^{2}} \]
                            18. lft-mult-inverseN/A

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

                              \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k, k, 1\right)}} \]
                          5. Applied rewrites1.6%

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

                            \[\leadsto a + \color{blue}{-10 \cdot \left(a \cdot k\right)} \]
                          7. Step-by-step derivation
                            1. Applied rewrites22.0%

                              \[\leadsto \mathsf{fma}\left(k \cdot a, \color{blue}{-10}, a\right) \]
                            2. Taylor expanded in k around 0

                              \[\leadsto a + \color{blue}{k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)} \]
                            3. Step-by-step derivation
                              1. Applied rewrites77.1%

                                \[\leadsto \mathsf{fma}\left(a \cdot \mathsf{fma}\left(99, k, -10\right), \color{blue}{k}, a\right) \]
                            4. Recombined 3 regimes into one program.
                            5. Final simplification43.0%

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

                            Alternative 5: 97.8% accurate, 0.5× speedup?

                            \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ \begin{array}{l} t_0 := {k}^{m} \cdot a\_m\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{t\_0}{k \cdot k + \left(10 \cdot k + 1\right)} \leq 10^{+278}:\\ \;\;\;\;\frac{{k}^{m}}{\mathsf{fma}\left(10 + k, k, 1\right)} \cdot 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 (* (pow k m) a_m)))
                               (*
                                a_s
                                (if (<= (/ t_0 (+ (* k k) (+ (* 10.0 k) 1.0))) 1e+278)
                                  (* (/ (pow k m) (fma (+ 10.0 k) 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 = pow(k, m) * a_m;
                            	double tmp;
                            	if ((t_0 / ((k * k) + ((10.0 * k) + 1.0))) <= 1e+278) {
                            		tmp = (pow(k, m) / fma((10.0 + k), k, 1.0)) * 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((k ^ m) * a_m)
                            	tmp = 0.0
                            	if (Float64(t_0 / Float64(Float64(k * k) + Float64(Float64(10.0 * k) + 1.0))) <= 1e+278)
                            		tmp = Float64(Float64((k ^ m) / fma(Float64(10.0 + k), k, 1.0)) * a_m);
                            	else
                            		tmp = t_0;
                            	end
                            	return Float64(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[(N[Power[k, m], $MachinePrecision] * a$95$m), $MachinePrecision]}, N[(a$95$s * If[LessEqual[N[(t$95$0 / N[(N[(k * k), $MachinePrecision] + N[(N[(10.0 * k), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+278], N[(N[(N[Power[k, m], $MachinePrecision] / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision] * a$95$m), $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 := {k}^{m} \cdot a\_m\\
                            a\_s \cdot \begin{array}{l}
                            \mathbf{if}\;\frac{t\_0}{k \cdot k + \left(10 \cdot k + 1\right)} \leq 10^{+278}:\\
                            \;\;\;\;\frac{{k}^{m}}{\mathsf{fma}\left(10 + k, k, 1\right)} \cdot a\_m\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_0\\
                            
                            
                            \end{array}
                            \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))) < 9.99999999999999964e277

                              1. Initial program 97.7%

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

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

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

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

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

                                  \[\leadsto \color{blue}{\frac{{k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \cdot a} \]
                                6. lower-/.f6497.6

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

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

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

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

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

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

                                  \[\leadsto \frac{{k}^{m}}{\left(10 \cdot k + \color{blue}{k \cdot k}\right) + 1} \cdot a \]
                                13. distribute-rgt-outN/A

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

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

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

                                  \[\leadsto \frac{{k}^{m}}{\mathsf{fma}\left(\color{blue}{k + 10}, k, 1\right)} \cdot a \]
                                17. lower-+.f6497.6

                                  \[\leadsto \frac{{k}^{m}}{\mathsf{fma}\left(\color{blue}{k + 10}, k, 1\right)} \cdot a \]
                              4. Applied rewrites97.6%

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

                              if 9.99999999999999964e277 < (/.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 51.0%

                                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                              2. Add Preprocessing
                              3. Taylor expanded in k around 0

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

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

                                  \[\leadsto \color{blue}{{k}^{m} \cdot a} \]
                                3. lower-pow.f64100.0

                                  \[\leadsto \color{blue}{{k}^{m}} \cdot a \]
                              5. Applied rewrites100.0%

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

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

                            Alternative 6: 97.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 9.5 \cdot 10^{-6}:\\ \;\;\;\;\frac{a\_m}{\frac{\mathsf{fma}\left(10 + k, k, 1\right)}{{k}^{m}}}\\ \mathbf{else}:\\ \;\;\;\;{k}^{m} \cdot a\_m\\ \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 9.5e-6)
                                (/ a_m (/ (fma (+ 10.0 k) k 1.0) (pow k m)))
                                (* (pow k m) a_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 <= 9.5e-6) {
                            		tmp = a_m / (fma((10.0 + k), k, 1.0) / pow(k, m));
                            	} else {
                            		tmp = pow(k, m) * a_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 <= 9.5e-6)
                            		tmp = Float64(a_m / Float64(fma(Float64(10.0 + k), k, 1.0) / (k ^ m)));
                            	else
                            		tmp = Float64((k ^ m) * a_m);
                            	end
                            	return Float64(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, 9.5e-6], N[(a$95$m / N[(N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision] / N[Power[k, m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[k, m], $MachinePrecision] * a$95$m), $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 9.5 \cdot 10^{-6}:\\
                            \;\;\;\;\frac{a\_m}{\frac{\mathsf{fma}\left(10 + k, k, 1\right)}{{k}^{m}}}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;{k}^{m} \cdot a\_m\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if m < 9.5000000000000005e-6

                              1. Initial program 97.0%

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

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

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

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

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

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

                                  \[\leadsto \color{blue}{\frac{a}{\frac{\left(1 + 10 \cdot k\right) + k \cdot k}{{k}^{m}}}} \]
                                7. lower-/.f6497.0

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

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

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

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

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

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

                                  \[\leadsto \frac{a}{\frac{\left(10 \cdot k + \color{blue}{k \cdot k}\right) + 1}{{k}^{m}}} \]
                                14. distribute-rgt-outN/A

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

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

                                  \[\leadsto \frac{a}{\frac{\color{blue}{\mathsf{fma}\left(10 + k, k, 1\right)}}{{k}^{m}}} \]
                                17. +-commutativeN/A

                                  \[\leadsto \frac{a}{\frac{\mathsf{fma}\left(\color{blue}{k + 10}, k, 1\right)}{{k}^{m}}} \]
                                18. lower-+.f6497.0

                                  \[\leadsto \frac{a}{\frac{\mathsf{fma}\left(\color{blue}{k + 10}, k, 1\right)}{{k}^{m}}} \]
                              4. Applied rewrites97.0%

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

                              if 9.5000000000000005e-6 < m

                              1. Initial program 74.2%

                                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                              2. Add Preprocessing
                              3. Taylor expanded in k around 0

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

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

                                  \[\leadsto \color{blue}{{k}^{m} \cdot a} \]
                                3. lower-pow.f64100.0

                                  \[\leadsto \color{blue}{{k}^{m}} \cdot a \]
                              5. Applied rewrites100.0%

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

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

                            Alternative 7: 97.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 := {k}^{m} \cdot a\_m\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq 9.5 \cdot 10^{-6}:\\ \;\;\;\;\frac{t\_0}{\mathsf{fma}\left(k, 10, \mathsf{fma}\left(k, k, 1\right)\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 (* (pow k m) a_m)))
                               (* a_s (if (<= m 9.5e-6) (/ t_0 (fma k 10.0 (fma k k 1.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 = pow(k, m) * a_m;
                            	double tmp;
                            	if (m <= 9.5e-6) {
                            		tmp = t_0 / fma(k, 10.0, fma(k, k, 1.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((k ^ m) * a_m)
                            	tmp = 0.0
                            	if (m <= 9.5e-6)
                            		tmp = Float64(t_0 / fma(k, 10.0, fma(k, k, 1.0)));
                            	else
                            		tmp = t_0;
                            	end
                            	return Float64(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[(N[Power[k, m], $MachinePrecision] * a$95$m), $MachinePrecision]}, N[(a$95$s * If[LessEqual[m, 9.5e-6], N[(t$95$0 / N[(k * 10.0 + N[(k * k + 1.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 := {k}^{m} \cdot a\_m\\
                            a\_s \cdot \begin{array}{l}
                            \mathbf{if}\;m \leq 9.5 \cdot 10^{-6}:\\
                            \;\;\;\;\frac{t\_0}{\mathsf{fma}\left(k, 10, \mathsf{fma}\left(k, k, 1\right)\right)}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_0\\
                            
                            
                            \end{array}
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if m < 9.5000000000000005e-6

                              1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{a \cdot {k}^{m}}{\mathsf{fma}\left(k, 10, \color{blue}{k \cdot k} + 1\right)} \]
                                10. lower-fma.f6497.0

                                  \[\leadsto \frac{a \cdot {k}^{m}}{\mathsf{fma}\left(k, 10, \color{blue}{\mathsf{fma}\left(k, k, 1\right)}\right)} \]
                              4. Applied rewrites97.0%

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

                              if 9.5000000000000005e-6 < m

                              1. Initial program 74.2%

                                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                              2. Add Preprocessing
                              3. Taylor expanded in k around 0

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

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

                                  \[\leadsto \color{blue}{{k}^{m} \cdot a} \]
                                3. lower-pow.f64100.0

                                  \[\leadsto \color{blue}{{k}^{m}} \cdot a \]
                              5. Applied rewrites100.0%

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

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

                            Alternative 8: 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}\;m \leq -1.45 \cdot 10^{-11}:\\ \;\;\;\;\frac{{k}^{m}}{\frac{1}{a\_m}}\\ \mathbf{elif}\;m \leq 5.1 \cdot 10^{-10}:\\ \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;{k}^{m} \cdot a\_m\\ \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.45e-11)
                                (/ (pow k m) (/ 1.0 a_m))
                                (if (<= m 5.1e-10) (/ a_m (fma (+ 10.0 k) k 1.0)) (* (pow k m) a_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 <= -1.45e-11) {
                            		tmp = pow(k, m) / (1.0 / a_m);
                            	} else if (m <= 5.1e-10) {
                            		tmp = a_m / fma((10.0 + k), k, 1.0);
                            	} else {
                            		tmp = pow(k, m) * a_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 <= -1.45e-11)
                            		tmp = Float64((k ^ m) / Float64(1.0 / a_m));
                            	elseif (m <= 5.1e-10)
                            		tmp = Float64(a_m / fma(Float64(10.0 + k), k, 1.0));
                            	else
                            		tmp = Float64((k ^ m) * a_m);
                            	end
                            	return Float64(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.45e-11], N[(N[Power[k, m], $MachinePrecision] / N[(1.0 / a$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 5.1e-10], N[(a$95$m / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[Power[k, m], $MachinePrecision] * a$95$m), $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.45 \cdot 10^{-11}:\\
                            \;\;\;\;\frac{{k}^{m}}{\frac{1}{a\_m}}\\
                            
                            \mathbf{elif}\;m \leq 5.1 \cdot 10^{-10}:\\
                            \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10 + k, k, 1\right)}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;{k}^{m} \cdot a\_m\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if m < -1.45e-11

                              1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{a \cdot {k}^{m}}{\mathsf{fma}\left(k, 10, \color{blue}{k \cdot k} + 1\right)} \]
                                10. lower-fma.f64100.0

                                  \[\leadsto \frac{a \cdot {k}^{m}}{\mathsf{fma}\left(k, 10, \color{blue}{\mathsf{fma}\left(k, k, 1\right)}\right)} \]
                              4. Applied rewrites100.0%

                                \[\leadsto \frac{a \cdot {k}^{m}}{\color{blue}{\mathsf{fma}\left(k, 10, \mathsf{fma}\left(k, k, 1\right)\right)}} \]
                              5. Step-by-step derivation
                                1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto {k}^{m} \cdot \frac{a}{\color{blue}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                              6. Applied rewrites100.0%

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

                                \[\leadsto \frac{{k}^{m}}{\frac{\color{blue}{1}}{a}} \]
                              8. Step-by-step derivation
                                1. Applied rewrites100.0%

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

                                if -1.45e-11 < m < 5.09999999999999997e-10

                                1. Initial program 94.8%

                                  \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                                2. Add Preprocessing
                                3. Taylor expanded in m around 0

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

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

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

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

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

                                    \[\leadsto \frac{a}{{k}^{2} + \left(\color{blue}{\left(10 \cdot 1\right)} \cdot k + 1\right)} \]
                                  6. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + \frac{1}{{k}^{2}} \cdot {k}^{2}} \]
                                  18. lft-mult-inverseN/A

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

                                    \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k, k, 1\right)}} \]
                                5. Applied rewrites94.4%

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

                                if 5.09999999999999997e-10 < m

                                1. Initial program 74.2%

                                  \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                                2. Add Preprocessing
                                3. Taylor expanded in k around 0

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

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

                                    \[\leadsto \color{blue}{{k}^{m} \cdot a} \]
                                  3. lower-pow.f64100.0

                                    \[\leadsto \color{blue}{{k}^{m}} \cdot a \]
                                5. Applied rewrites100.0%

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

                              Alternative 9: 97.2% accurate, 1.1× speedup?

                              \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ \begin{array}{l} t_0 := {k}^{m} \cdot a\_m\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -1.45 \cdot 10^{-11}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;m \leq 5.1 \cdot 10^{-10}:\\ \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10 + k, k, 1\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 (* (pow k m) a_m)))
                                 (*
                                  a_s
                                  (if (<= m -1.45e-11)
                                    t_0
                                    (if (<= m 5.1e-10) (/ a_m (fma (+ 10.0 k) k 1.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 = pow(k, m) * a_m;
                              	double tmp;
                              	if (m <= -1.45e-11) {
                              		tmp = t_0;
                              	} else if (m <= 5.1e-10) {
                              		tmp = a_m / fma((10.0 + k), k, 1.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((k ^ m) * a_m)
                              	tmp = 0.0
                              	if (m <= -1.45e-11)
                              		tmp = t_0;
                              	elseif (m <= 5.1e-10)
                              		tmp = Float64(a_m / fma(Float64(10.0 + k), k, 1.0));
                              	else
                              		tmp = t_0;
                              	end
                              	return Float64(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[(N[Power[k, m], $MachinePrecision] * a$95$m), $MachinePrecision]}, N[(a$95$s * If[LessEqual[m, -1.45e-11], t$95$0, If[LessEqual[m, 5.1e-10], N[(a$95$m / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $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 := {k}^{m} \cdot a\_m\\
                              a\_s \cdot \begin{array}{l}
                              \mathbf{if}\;m \leq -1.45 \cdot 10^{-11}:\\
                              \;\;\;\;t\_0\\
                              
                              \mathbf{elif}\;m \leq 5.1 \cdot 10^{-10}:\\
                              \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10 + k, k, 1\right)}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;t\_0\\
                              
                              
                              \end{array}
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if m < -1.45e-11 or 5.09999999999999997e-10 < m

                                1. Initial program 85.4%

                                  \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                                2. Add Preprocessing
                                3. Taylor expanded in k around 0

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

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

                                    \[\leadsto \color{blue}{{k}^{m} \cdot a} \]
                                  3. lower-pow.f64100.0

                                    \[\leadsto \color{blue}{{k}^{m}} \cdot a \]
                                5. Applied rewrites100.0%

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

                                if -1.45e-11 < m < 5.09999999999999997e-10

                                1. Initial program 94.8%

                                  \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                                2. Add Preprocessing
                                3. Taylor expanded in m around 0

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

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

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

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

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

                                    \[\leadsto \frac{a}{{k}^{2} + \left(\color{blue}{\left(10 \cdot 1\right)} \cdot k + 1\right)} \]
                                  6. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + \frac{1}{{k}^{2}} \cdot {k}^{2}} \]
                                  18. lft-mult-inverseN/A

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

                                    \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k, k, 1\right)}} \]
                                5. Applied rewrites94.4%

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

                              Alternative 10: 62.3% accurate, 2.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}\;m \leq -0.21:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{a\_m}{k}, \frac{99}{k} + -10, a\_m\right)}{k \cdot k}\\ \mathbf{elif}\;m \leq 128000000:\\ \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(99, k, -10\right) \cdot a\_m, k, a\_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 -0.21)
                                  (/ (fma (/ a_m k) (+ (/ 99.0 k) -10.0) a_m) (* k k))
                                  (if (<= m 128000000.0)
                                    (/ a_m (fma (+ 10.0 k) k 1.0))
                                    (fma (* (fma 99.0 k -10.0) a_m) k a_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 <= -0.21) {
                              		tmp = fma((a_m / k), ((99.0 / k) + -10.0), a_m) / (k * k);
                              	} else if (m <= 128000000.0) {
                              		tmp = a_m / fma((10.0 + k), k, 1.0);
                              	} else {
                              		tmp = fma((fma(99.0, k, -10.0) * a_m), k, a_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 <= -0.21)
                              		tmp = Float64(fma(Float64(a_m / k), Float64(Float64(99.0 / k) + -10.0), a_m) / Float64(k * k));
                              	elseif (m <= 128000000.0)
                              		tmp = Float64(a_m / fma(Float64(10.0 + k), k, 1.0));
                              	else
                              		tmp = fma(Float64(fma(99.0, k, -10.0) * a_m), k, a_m);
                              	end
                              	return Float64(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, -0.21], N[(N[(N[(a$95$m / k), $MachinePrecision] * N[(N[(99.0 / k), $MachinePrecision] + -10.0), $MachinePrecision] + a$95$m), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 128000000.0], N[(a$95$m / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(99.0 * k + -10.0), $MachinePrecision] * a$95$m), $MachinePrecision] * k + a$95$m), $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 -0.21:\\
                              \;\;\;\;\frac{\mathsf{fma}\left(\frac{a\_m}{k}, \frac{99}{k} + -10, a\_m\right)}{k \cdot k}\\
                              
                              \mathbf{elif}\;m \leq 128000000:\\
                              \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10 + k, k, 1\right)}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(99, k, -10\right) \cdot a\_m, k, a\_m\right)\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if m < -0.209999999999999992

                                1. Initial program 100.0%

                                  \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                                2. Add Preprocessing
                                3. Taylor expanded in m around 0

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

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

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

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

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

                                    \[\leadsto \frac{a}{{k}^{2} + \left(\color{blue}{\left(10 \cdot 1\right)} \cdot k + 1\right)} \]
                                  6. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + \frac{1}{{k}^{2}} \cdot {k}^{2}} \]
                                  18. lft-mult-inverseN/A

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

                                    \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k, k, 1\right)}} \]
                                5. Applied rewrites28.2%

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

                                  \[\leadsto a + \color{blue}{-10 \cdot \left(a \cdot k\right)} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites3.7%

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

                                    \[\leadsto \frac{\left(a + -1 \cdot \frac{a + -100 \cdot a}{{k}^{2}}\right) - 10 \cdot \frac{a}{k}}{\color{blue}{{k}^{2}}} \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites68.2%

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

                                    if -0.209999999999999992 < m < 1.28e8

                                    1. Initial program 95.0%

                                      \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in m around 0

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

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

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

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

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

                                        \[\leadsto \frac{a}{{k}^{2} + \left(\color{blue}{\left(10 \cdot 1\right)} \cdot k + 1\right)} \]
                                      6. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + \frac{1}{{k}^{2}} \cdot {k}^{2}} \]
                                      18. lft-mult-inverseN/A

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

                                        \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k, k, 1\right)}} \]
                                    5. Applied rewrites91.5%

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

                                    if 1.28e8 < m

                                    1. Initial program 73.6%

                                      \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in m around 0

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

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

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

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

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

                                        \[\leadsto \frac{a}{{k}^{2} + \left(\color{blue}{\left(10 \cdot 1\right)} \cdot k + 1\right)} \]
                                      6. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + \frac{1}{{k}^{2}} \cdot {k}^{2}} \]
                                      18. lft-mult-inverseN/A

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

                                        \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k, k, 1\right)}} \]
                                    5. Applied rewrites3.0%

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

                                      \[\leadsto a + \color{blue}{-10 \cdot \left(a \cdot k\right)} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites9.5%

                                        \[\leadsto \mathsf{fma}\left(k \cdot a, \color{blue}{-10}, a\right) \]
                                      2. Taylor expanded in k around 0

                                        \[\leadsto a + \color{blue}{k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)} \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites28.6%

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

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;m \leq -0.21:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{a}{k}, \frac{99}{k} + -10, a\right)}{k \cdot k}\\ \mathbf{elif}\;m \leq 128000000:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(99, k, -10\right) \cdot a, k, a\right)\\ \end{array} \]
                                      6. Add Preprocessing

                                      Alternative 11: 60.5% accurate, 4.1× 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 -0.21:\\ \;\;\;\;\frac{a\_m}{k \cdot k}\\ \mathbf{elif}\;m \leq 128000000:\\ \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(99, k, -10\right) \cdot a\_m, k, a\_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 -0.21)
                                          (/ a_m (* k k))
                                          (if (<= m 128000000.0)
                                            (/ a_m (fma (+ 10.0 k) k 1.0))
                                            (fma (* (fma 99.0 k -10.0) a_m) k a_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 <= -0.21) {
                                      		tmp = a_m / (k * k);
                                      	} else if (m <= 128000000.0) {
                                      		tmp = a_m / fma((10.0 + k), k, 1.0);
                                      	} else {
                                      		tmp = fma((fma(99.0, k, -10.0) * a_m), k, a_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 <= -0.21)
                                      		tmp = Float64(a_m / Float64(k * k));
                                      	elseif (m <= 128000000.0)
                                      		tmp = Float64(a_m / fma(Float64(10.0 + k), k, 1.0));
                                      	else
                                      		tmp = fma(Float64(fma(99.0, k, -10.0) * a_m), k, a_m);
                                      	end
                                      	return Float64(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, -0.21], N[(a$95$m / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 128000000.0], N[(a$95$m / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(99.0 * k + -10.0), $MachinePrecision] * a$95$m), $MachinePrecision] * k + a$95$m), $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 -0.21:\\
                                      \;\;\;\;\frac{a\_m}{k \cdot k}\\
                                      
                                      \mathbf{elif}\;m \leq 128000000:\\
                                      \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10 + k, k, 1\right)}\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(99, k, -10\right) \cdot a\_m, k, a\_m\right)\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 3 regimes
                                      2. if m < -0.209999999999999992

                                        1. Initial program 100.0%

                                          \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                                        2. Add Preprocessing
                                        3. Taylor expanded in m around 0

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

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

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

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

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

                                            \[\leadsto \frac{a}{{k}^{2} + \left(\color{blue}{\left(10 \cdot 1\right)} \cdot k + 1\right)} \]
                                          6. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + \frac{1}{{k}^{2}} \cdot {k}^{2}} \]
                                          18. lft-mult-inverseN/A

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

                                            \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k, k, 1\right)}} \]
                                        5. Applied rewrites28.2%

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

                                          \[\leadsto \frac{a}{{k}^{\color{blue}{2}}} \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites57.2%

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

                                          if -0.209999999999999992 < m < 1.28e8

                                          1. Initial program 95.0%

                                            \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                                          2. Add Preprocessing
                                          3. Taylor expanded in m around 0

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

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

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

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

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

                                              \[\leadsto \frac{a}{{k}^{2} + \left(\color{blue}{\left(10 \cdot 1\right)} \cdot k + 1\right)} \]
                                            6. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + \frac{1}{{k}^{2}} \cdot {k}^{2}} \]
                                            18. lft-mult-inverseN/A

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

                                              \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k, k, 1\right)}} \]
                                          5. Applied rewrites91.5%

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

                                          if 1.28e8 < m

                                          1. Initial program 73.6%

                                            \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                                          2. Add Preprocessing
                                          3. Taylor expanded in m around 0

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

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

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

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

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

                                              \[\leadsto \frac{a}{{k}^{2} + \left(\color{blue}{\left(10 \cdot 1\right)} \cdot k + 1\right)} \]
                                            6. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + \frac{1}{{k}^{2}} \cdot {k}^{2}} \]
                                            18. lft-mult-inverseN/A

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

                                              \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k, k, 1\right)}} \]
                                          5. Applied rewrites3.0%

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

                                            \[\leadsto a + \color{blue}{-10 \cdot \left(a \cdot k\right)} \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites9.5%

                                              \[\leadsto \mathsf{fma}\left(k \cdot a, \color{blue}{-10}, a\right) \]
                                            2. Taylor expanded in k around 0

                                              \[\leadsto a + \color{blue}{k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)} \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites28.6%

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

                                              \[\leadsto \begin{array}{l} \mathbf{if}\;m \leq -0.21:\\ \;\;\;\;\frac{a}{k \cdot k}\\ \mathbf{elif}\;m \leq 128000000:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(99, k, -10\right) \cdot a, k, a\right)\\ \end{array} \]
                                            6. Add Preprocessing

                                            Alternative 12: 46.3% accurate, 4.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 -1.35 \cdot 10^{-303}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;k \leq 3.7 \cdot 10^{-9}:\\ \;\;\;\;\mathsf{fma}\left(-10 \cdot k, a\_m, a\_m\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 -1.35e-303)
                                                  t_0
                                                  (if (<= k 3.7e-9) (fma (* -10.0 k) a_m 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 <= -1.35e-303) {
                                            		tmp = t_0;
                                            	} else if (k <= 3.7e-9) {
                                            		tmp = fma((-10.0 * k), a_m, 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 <= -1.35e-303)
                                            		tmp = t_0;
                                            	elseif (k <= 3.7e-9)
                                            		tmp = fma(Float64(-10.0 * k), a_m, a_m);
                                            	else
                                            		tmp = t_0;
                                            	end
                                            	return Float64(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, -1.35e-303], t$95$0, If[LessEqual[k, 3.7e-9], N[(N[(-10.0 * k), $MachinePrecision] * a$95$m + a$95$m), $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 -1.35 \cdot 10^{-303}:\\
                                            \;\;\;\;t\_0\\
                                            
                                            \mathbf{elif}\;k \leq 3.7 \cdot 10^{-9}:\\
                                            \;\;\;\;\mathsf{fma}\left(-10 \cdot k, a\_m, a\_m\right)\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;t\_0\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 2 regimes
                                            2. if k < -1.34999999999999993e-303 or 3.7e-9 < k

                                              1. Initial program 82.1%

                                                \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                                              2. Add Preprocessing
                                              3. Taylor expanded in m around 0

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

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

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

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

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

                                                  \[\leadsto \frac{a}{{k}^{2} + \left(\color{blue}{\left(10 \cdot 1\right)} \cdot k + 1\right)} \]
                                                6. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + \frac{1}{{k}^{2}} \cdot {k}^{2}} \]
                                                18. lft-mult-inverseN/A

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

                                                  \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k, k, 1\right)}} \]
                                              5. Applied rewrites37.8%

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

                                                \[\leadsto \frac{a}{{k}^{\color{blue}{2}}} \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites45.8%

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

                                                if -1.34999999999999993e-303 < k < 3.7e-9

                                                1. Initial program 100.0%

                                                  \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                                                2. Add Preprocessing
                                                3. Taylor expanded in m around 0

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

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

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

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

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

                                                    \[\leadsto \frac{a}{{k}^{2} + \left(\color{blue}{\left(10 \cdot 1\right)} \cdot k + 1\right)} \]
                                                  6. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + \frac{1}{{k}^{2}} \cdot {k}^{2}} \]
                                                  18. lft-mult-inverseN/A

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

                                                    \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k, k, 1\right)}} \]
                                                5. Applied rewrites51.7%

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

                                                  \[\leadsto a + \color{blue}{-10 \cdot \left(a \cdot k\right)} \]
                                                7. Step-by-step derivation
                                                  1. Applied rewrites51.7%

                                                    \[\leadsto \mathsf{fma}\left(k \cdot a, \color{blue}{-10}, a\right) \]
                                                  2. Step-by-step derivation
                                                    1. Applied rewrites51.7%

                                                      \[\leadsto \mathsf{fma}\left(k \cdot -10, a, a\right) \]
                                                  3. Recombined 2 regimes into one program.
                                                  4. Final simplification48.0%

                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -1.35 \cdot 10^{-303}:\\ \;\;\;\;\frac{a}{k \cdot k}\\ \mathbf{elif}\;k \leq 3.7 \cdot 10^{-9}:\\ \;\;\;\;\mathsf{fma}\left(-10 \cdot k, a, a\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{k \cdot k}\\ \end{array} \]
                                                  5. Add Preprocessing

                                                  Alternative 13: 25.3% accurate, 7.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 92:\\ \;\;\;\;1 \cdot a\_m\\ \mathbf{else}:\\ \;\;\;\;\left(-10 \cdot a\_m\right) \cdot 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 (<= m 92.0) (* 1.0 a_m) (* (* -10.0 a_m) 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 <= 92.0) {
                                                  		tmp = 1.0 * a_m;
                                                  	} else {
                                                  		tmp = (-10.0 * a_m) * 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 <= 92.0d0) then
                                                          tmp = 1.0d0 * a_m
                                                      else
                                                          tmp = ((-10.0d0) * a_m) * 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 <= 92.0) {
                                                  		tmp = 1.0 * a_m;
                                                  	} else {
                                                  		tmp = (-10.0 * a_m) * 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 <= 92.0:
                                                  		tmp = 1.0 * a_m
                                                  	else:
                                                  		tmp = (-10.0 * a_m) * 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 <= 92.0)
                                                  		tmp = Float64(1.0 * a_m);
                                                  	else
                                                  		tmp = Float64(Float64(-10.0 * a_m) * 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 <= 92.0)
                                                  		tmp = 1.0 * a_m;
                                                  	else
                                                  		tmp = (-10.0 * a_m) * 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, 92.0], N[(1.0 * a$95$m), $MachinePrecision], N[(N[(-10.0 * a$95$m), $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}\;m \leq 92:\\
                                                  \;\;\;\;1 \cdot a\_m\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;\left(-10 \cdot a\_m\right) \cdot k\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 2 regimes
                                                  2. if m < 92

                                                    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \frac{a \cdot {k}^{m}}{\mathsf{fma}\left(k, 10, \color{blue}{k \cdot k} + 1\right)} \]
                                                      10. lower-fma.f6497.1

                                                        \[\leadsto \frac{a \cdot {k}^{m}}{\mathsf{fma}\left(k, 10, \color{blue}{\mathsf{fma}\left(k, k, 1\right)}\right)} \]
                                                    4. Applied rewrites97.1%

                                                      \[\leadsto \frac{a \cdot {k}^{m}}{\color{blue}{\mathsf{fma}\left(k, 10, \mathsf{fma}\left(k, k, 1\right)\right)}} \]
                                                    5. Step-by-step derivation
                                                      1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto {k}^{m} \cdot \frac{a}{\color{blue}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                                                    6. Applied rewrites96.5%

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

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

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

                                                        \[\leadsto \color{blue}{{k}^{m} \cdot a} \]
                                                      3. lower-pow.f6473.2

                                                        \[\leadsto \color{blue}{{k}^{m}} \cdot a \]
                                                    9. Applied rewrites73.2%

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

                                                      \[\leadsto 1 \cdot a \]
                                                    11. Step-by-step derivation
                                                      1. Applied rewrites31.6%

                                                        \[\leadsto 1 \cdot a \]

                                                      if 92 < m

                                                      1. Initial program 73.9%

                                                        \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                                                      2. Add Preprocessing
                                                      3. Taylor expanded in m around 0

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

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

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

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

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

                                                          \[\leadsto \frac{a}{{k}^{2} + \left(\color{blue}{\left(10 \cdot 1\right)} \cdot k + 1\right)} \]
                                                        6. lft-mult-inverseN/A

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + \frac{1}{{k}^{2}} \cdot {k}^{2}} \]
                                                        18. lft-mult-inverseN/A

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

                                                          \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k, k, 1\right)}} \]
                                                      5. Applied rewrites3.1%

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

                                                        \[\leadsto a + \color{blue}{-10 \cdot \left(a \cdot k\right)} \]
                                                      7. Step-by-step derivation
                                                        1. Applied rewrites9.5%

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

                                                          \[\leadsto -10 \cdot \left(a \cdot \color{blue}{k}\right) \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites22.3%

                                                            \[\leadsto \left(k \cdot a\right) \cdot -10 \]
                                                          2. Step-by-step derivation
                                                            1. Applied rewrites22.3%

                                                              \[\leadsto \left(-10 \cdot a\right) \cdot k \]
                                                          3. Recombined 2 regimes into one program.
                                                          4. Add Preprocessing

                                                          Alternative 14: 20.1% accurate, 22.3× speedup?

                                                          \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \left(1 \cdot a\_m\right) \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 (* 1.0 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 * (1.0 * 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 * (1.0d0 * 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 * (1.0 * 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 * (1.0 * a_m)
                                                          
                                                          a\_m = abs(a)
                                                          a\_s = copysign(1.0, a)
                                                          function code(a_s, a_m, k, m)
                                                          	return Float64(a_s * Float64(1.0 * 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 * (1.0 * 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 * N[(1.0 * a$95$m), $MachinePrecision]), $MachinePrecision]
                                                          
                                                          \begin{array}{l}
                                                          a\_m = \left|a\right|
                                                          \\
                                                          a\_s = \mathsf{copysign}\left(1, a\right)
                                                          
                                                          \\
                                                          a\_s \cdot \left(1 \cdot a\_m\right)
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto \frac{a \cdot {k}^{m}}{\mathsf{fma}\left(k, 10, \color{blue}{k \cdot k} + 1\right)} \]
                                                            10. lower-fma.f6488.7

                                                              \[\leadsto \frac{a \cdot {k}^{m}}{\mathsf{fma}\left(k, 10, \color{blue}{\mathsf{fma}\left(k, k, 1\right)}\right)} \]
                                                          4. Applied rewrites88.7%

                                                            \[\leadsto \frac{a \cdot {k}^{m}}{\color{blue}{\mathsf{fma}\left(k, 10, \mathsf{fma}\left(k, k, 1\right)\right)}} \]
                                                          5. Step-by-step derivation
                                                            1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto {k}^{m} \cdot \frac{a}{\color{blue}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                                                          6. Applied rewrites87.2%

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

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

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

                                                              \[\leadsto \color{blue}{{k}^{m} \cdot a} \]
                                                            3. lower-pow.f6482.8

                                                              \[\leadsto \color{blue}{{k}^{m}} \cdot a \]
                                                          9. Applied rewrites82.8%

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

                                                            \[\leadsto 1 \cdot a \]
                                                          11. Step-by-step derivation
                                                            1. Applied rewrites21.6%

                                                              \[\leadsto 1 \cdot a \]
                                                            2. Add Preprocessing

                                                            Reproduce

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