Falkner and Boettcher, Appendix A

Percentage Accurate: 91.0% → 97.8%
Time: 9.9s
Alternatives: 17
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 17 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: 91.0% accurate, 1.0× speedup?

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

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

Alternative 1: 97.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {k}^{m} \cdot a\\ \mathbf{if}\;\frac{t\_0}{k \cdot k - \left(-1 - 10 \cdot k\right)} \leq 2 \cdot 10^{+249}:\\ \;\;\;\;\frac{{k}^{m}}{\mathsf{fma}\left(10 + k, k, 1\right)} \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (a k m)
 :precision binary64
 (let* ((t_0 (* (pow k m) a)))
   (if (<= (/ t_0 (- (* k k) (- -1.0 (* 10.0 k)))) 2e+249)
     (* (/ (pow k m) (fma (+ 10.0 k) k 1.0)) a)
     t_0)))
double code(double a, double k, double m) {
	double t_0 = pow(k, m) * a;
	double tmp;
	if ((t_0 / ((k * k) - (-1.0 - (10.0 * k)))) <= 2e+249) {
		tmp = (pow(k, m) / fma((10.0 + k), k, 1.0)) * a;
	} else {
		tmp = t_0;
	}
	return tmp;
}
function code(a, k, m)
	t_0 = Float64((k ^ m) * a)
	tmp = 0.0
	if (Float64(t_0 / Float64(Float64(k * k) - Float64(-1.0 - Float64(10.0 * k)))) <= 2e+249)
		tmp = Float64(Float64((k ^ m) / fma(Float64(10.0 + k), k, 1.0)) * a);
	else
		tmp = t_0;
	end
	return tmp
end
code[a_, k_, m_] := Block[{t$95$0 = N[(N[Power[k, m], $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[N[(t$95$0 / N[(N[(k * k), $MachinePrecision] - N[(-1.0 - N[(10.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+249], N[(N[(N[Power[k, m], $MachinePrecision] / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], t$95$0]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {k}^{m} \cdot a\\
\mathbf{if}\;\frac{t\_0}{k \cdot k - \left(-1 - 10 \cdot k\right)} \leq 2 \cdot 10^{+249}:\\
\;\;\;\;\frac{{k}^{m}}{\mathsf{fma}\left(10 + k, k, 1\right)} \cdot a\\

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


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

    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 \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.2

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

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

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

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

    1. Initial program 64.9%

      \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
    2. 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-/.f6464.9

        \[\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-+.f6464.9

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

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

      \[\leadsto \color{blue}{{k}^{m}} \cdot a \]
    6. Step-by-step derivation
      1. lower-pow.f64100.0

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)} \leq 2 \cdot 10^{+249}:\\ \;\;\;\;\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 2: 58.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)}\\ \mathbf{if}\;t\_0 \leq 10^{-299}:\\ \;\;\;\;\frac{1}{\frac{\mathsf{fma}\left(\left(-100 + k \cdot k\right) \cdot k, \frac{\frac{\frac{100}{k} + 10}{k} - -1}{k}, 1\right)}{a}}\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+277}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(10 + k, k, 1\right)} \cdot a\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\frac{a - \left(\frac{-99}{k} - -10\right) \cdot \frac{a}{k}}{k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\ \end{array} \end{array} \]
(FPCore (a k m)
 :precision binary64
 (let* ((t_0 (/ (* (pow k m) a) (- (* k k) (- -1.0 (* 10.0 k))))))
   (if (<= t_0 1e-299)
     (/
      1.0
      (/
       (fma
        (* (+ -100.0 (* k k)) k)
        (/ (- (/ (+ (/ 100.0 k) 10.0) k) -1.0) k)
        1.0)
       a))
     (if (<= t_0 2e+277)
       (* (/ 1.0 (fma (+ 10.0 k) k 1.0)) a)
       (if (<= t_0 INFINITY)
         (/ (- a (* (- (/ -99.0 k) -10.0) (/ a k))) (* k k))
         (fma (* (fma (- k) -99.0 -10.0) a) k a))))))
double code(double a, double k, double m) {
	double t_0 = (pow(k, m) * a) / ((k * k) - (-1.0 - (10.0 * k)));
	double tmp;
	if (t_0 <= 1e-299) {
		tmp = 1.0 / (fma(((-100.0 + (k * k)) * k), (((((100.0 / k) + 10.0) / k) - -1.0) / k), 1.0) / a);
	} else if (t_0 <= 2e+277) {
		tmp = (1.0 / fma((10.0 + k), k, 1.0)) * a;
	} else if (t_0 <= ((double) INFINITY)) {
		tmp = (a - (((-99.0 / k) - -10.0) * (a / k))) / (k * k);
	} else {
		tmp = fma((fma(-k, -99.0, -10.0) * a), k, a);
	}
	return tmp;
}
function code(a, k, m)
	t_0 = Float64(Float64((k ^ m) * a) / Float64(Float64(k * k) - Float64(-1.0 - Float64(10.0 * k))))
	tmp = 0.0
	if (t_0 <= 1e-299)
		tmp = Float64(1.0 / Float64(fma(Float64(Float64(-100.0 + Float64(k * k)) * k), Float64(Float64(Float64(Float64(Float64(100.0 / k) + 10.0) / k) - -1.0) / k), 1.0) / a));
	elseif (t_0 <= 2e+277)
		tmp = Float64(Float64(1.0 / fma(Float64(10.0 + k), k, 1.0)) * a);
	elseif (t_0 <= Inf)
		tmp = Float64(Float64(a - Float64(Float64(Float64(-99.0 / k) - -10.0) * Float64(a / k))) / Float64(k * k));
	else
		tmp = fma(Float64(fma(Float64(-k), -99.0, -10.0) * a), k, a);
	end
	return tmp
end
code[a_, k_, m_] := Block[{t$95$0 = N[(N[(N[Power[k, m], $MachinePrecision] * a), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] - N[(-1.0 - N[(10.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 1e-299], N[(1.0 / N[(N[(N[(N[(-100.0 + N[(k * k), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] * N[(N[(N[(N[(N[(100.0 / k), $MachinePrecision] + 10.0), $MachinePrecision] / k), $MachinePrecision] - -1.0), $MachinePrecision] / k), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+277], N[(N[(1.0 / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(N[(a - N[(N[(N[(-99.0 / k), $MachinePrecision] - -10.0), $MachinePrecision] * N[(a / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision], N[(N[(N[((-k) * -99.0 + -10.0), $MachinePrecision] * a), $MachinePrecision] * k + a), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)}\\
\mathbf{if}\;t\_0 \leq 10^{-299}:\\
\;\;\;\;\frac{1}{\frac{\mathsf{fma}\left(\left(-100 + k \cdot k\right) \cdot k, \frac{\frac{\frac{100}{k} + 10}{k} - -1}{k}, 1\right)}{a}}\\

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

\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;\frac{a - \left(\frac{-99}{k} - -10\right) \cdot \frac{a}{k}}{k \cdot k}\\

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


\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.99999999999999992e-300

    1. Initial program 96.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
    6. Step-by-step derivation
      1. Applied rewrites41.1%

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

        \[\leadsto \frac{a}{\mathsf{fma}\left(\left(-\left(100 - k \cdot k\right)\right) \cdot \left(-1 \cdot \frac{-1 \cdot \frac{10 + 100 \cdot \frac{1}{k}}{k} - 1}{k}\right), k, 1\right)} \]
      3. Step-by-step derivation
        1. Applied rewrites53.6%

          \[\leadsto \frac{a}{\mathsf{fma}\left(\left(-\left(100 - k \cdot k\right)\right) \cdot \frac{-1 - \frac{\frac{100}{k} + 10}{k}}{-k}, k, 1\right)} \]
        2. Step-by-step derivation
          1. Applied rewrites56.8%

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

          if 9.99999999999999992e-300 < (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k))) < 2.00000000000000001e277

          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 \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-/.f6499.9

              \[\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-+.f6499.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 2.00000000000000001e277 < (/.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
          6. 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}}} \]
          7. Step-by-step derivation
            1. Applied rewrites61.2%

              \[\leadsto \frac{a - \frac{a}{k} \cdot \left(\frac{-99}{k} - -10\right)}{\color{blue}{k \cdot 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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + 1} \]
              16. 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}{k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)} \]
            7. Step-by-step derivation
              1. Applied rewrites71.6%

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

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

            Alternative 3: 58.9% accurate, 0.3× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)}\\ \mathbf{if}\;t\_0 \leq 10^{-299}:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(\left(-100 + k \cdot k\right) \cdot k, \frac{\frac{\frac{100}{k} + 10}{k} - -1}{k}, 1\right)}\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+277}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(10 + k, k, 1\right)} \cdot a\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\frac{a - \left(\frac{-99}{k} - -10\right) \cdot \frac{a}{k}}{k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\ \end{array} \end{array} \]
            (FPCore (a k m)
             :precision binary64
             (let* ((t_0 (/ (* (pow k m) a) (- (* k k) (- -1.0 (* 10.0 k))))))
               (if (<= t_0 1e-299)
                 (/
                  a
                  (fma
                   (* (+ -100.0 (* k k)) k)
                   (/ (- (/ (+ (/ 100.0 k) 10.0) k) -1.0) k)
                   1.0))
                 (if (<= t_0 2e+277)
                   (* (/ 1.0 (fma (+ 10.0 k) k 1.0)) a)
                   (if (<= t_0 INFINITY)
                     (/ (- a (* (- (/ -99.0 k) -10.0) (/ a k))) (* k k))
                     (fma (* (fma (- k) -99.0 -10.0) a) k a))))))
            double code(double a, double k, double m) {
            	double t_0 = (pow(k, m) * a) / ((k * k) - (-1.0 - (10.0 * k)));
            	double tmp;
            	if (t_0 <= 1e-299) {
            		tmp = a / fma(((-100.0 + (k * k)) * k), (((((100.0 / k) + 10.0) / k) - -1.0) / k), 1.0);
            	} else if (t_0 <= 2e+277) {
            		tmp = (1.0 / fma((10.0 + k), k, 1.0)) * a;
            	} else if (t_0 <= ((double) INFINITY)) {
            		tmp = (a - (((-99.0 / k) - -10.0) * (a / k))) / (k * k);
            	} else {
            		tmp = fma((fma(-k, -99.0, -10.0) * a), k, a);
            	}
            	return tmp;
            }
            
            function code(a, k, m)
            	t_0 = Float64(Float64((k ^ m) * a) / Float64(Float64(k * k) - Float64(-1.0 - Float64(10.0 * k))))
            	tmp = 0.0
            	if (t_0 <= 1e-299)
            		tmp = Float64(a / fma(Float64(Float64(-100.0 + Float64(k * k)) * k), Float64(Float64(Float64(Float64(Float64(100.0 / k) + 10.0) / k) - -1.0) / k), 1.0));
            	elseif (t_0 <= 2e+277)
            		tmp = Float64(Float64(1.0 / fma(Float64(10.0 + k), k, 1.0)) * a);
            	elseif (t_0 <= Inf)
            		tmp = Float64(Float64(a - Float64(Float64(Float64(-99.0 / k) - -10.0) * Float64(a / k))) / Float64(k * k));
            	else
            		tmp = fma(Float64(fma(Float64(-k), -99.0, -10.0) * a), k, a);
            	end
            	return tmp
            end
            
            code[a_, k_, m_] := Block[{t$95$0 = N[(N[(N[Power[k, m], $MachinePrecision] * a), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] - N[(-1.0 - N[(10.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 1e-299], N[(a / N[(N[(N[(-100.0 + N[(k * k), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] * N[(N[(N[(N[(N[(100.0 / k), $MachinePrecision] + 10.0), $MachinePrecision] / k), $MachinePrecision] - -1.0), $MachinePrecision] / k), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+277], N[(N[(1.0 / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(N[(a - N[(N[(N[(-99.0 / k), $MachinePrecision] - -10.0), $MachinePrecision] * N[(a / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision], N[(N[(N[((-k) * -99.0 + -10.0), $MachinePrecision] * a), $MachinePrecision] * k + a), $MachinePrecision]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := \frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)}\\
            \mathbf{if}\;t\_0 \leq 10^{-299}:\\
            \;\;\;\;\frac{a}{\mathsf{fma}\left(\left(-100 + k \cdot k\right) \cdot k, \frac{\frac{\frac{100}{k} + 10}{k} - -1}{k}, 1\right)}\\
            
            \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+277}:\\
            \;\;\;\;\frac{1}{\mathsf{fma}\left(10 + k, k, 1\right)} \cdot a\\
            
            \mathbf{elif}\;t\_0 \leq \infty:\\
            \;\;\;\;\frac{a - \left(\frac{-99}{k} - -10\right) \cdot \frac{a}{k}}{k \cdot k}\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\
            
            
            \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.99999999999999992e-300

              1. Initial program 96.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
              6. Step-by-step derivation
                1. Applied rewrites41.1%

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

                  \[\leadsto \frac{a}{\mathsf{fma}\left(\left(-\left(100 - k \cdot k\right)\right) \cdot \left(-1 \cdot \frac{-1 \cdot \frac{10 + 100 \cdot \frac{1}{k}}{k} - 1}{k}\right), k, 1\right)} \]
                3. Step-by-step derivation
                  1. Applied rewrites53.6%

                    \[\leadsto \frac{a}{\mathsf{fma}\left(\left(-\left(100 - k \cdot k\right)\right) \cdot \frac{-1 - \frac{\frac{100}{k} + 10}{k}}{-k}, k, 1\right)} \]
                  2. Step-by-step derivation
                    1. Applied rewrites56.8%

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

                    if 9.99999999999999992e-300 < (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k))) < 2.00000000000000001e277

                    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 \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-/.f6499.9

                        \[\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-+.f6499.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 2.00000000000000001e277 < (/.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                    6. 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}}} \]
                    7. Step-by-step derivation
                      1. Applied rewrites61.2%

                        \[\leadsto \frac{a - \frac{a}{k} \cdot \left(\frac{-99}{k} - -10\right)}{\color{blue}{k \cdot 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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + 1} \]
                        16. 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}{k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)} \]
                      7. Step-by-step derivation
                        1. Applied rewrites71.6%

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

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

                      Alternative 4: 55.6% accurate, 0.3× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)}\\ \mathbf{if}\;t\_0 \leq 10^{-299}:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(\frac{\frac{10}{k} - -1}{k} \cdot \left(k \cdot k - 100\right), k, 1\right)}\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+277}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(10 + k, k, 1\right)} \cdot a\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\frac{a - \left(\frac{-99}{k} - -10\right) \cdot \frac{a}{k}}{k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\ \end{array} \end{array} \]
                      (FPCore (a k m)
                       :precision binary64
                       (let* ((t_0 (/ (* (pow k m) a) (- (* k k) (- -1.0 (* 10.0 k))))))
                         (if (<= t_0 1e-299)
                           (/ a (fma (* (/ (- (/ 10.0 k) -1.0) k) (- (* k k) 100.0)) k 1.0))
                           (if (<= t_0 2e+277)
                             (* (/ 1.0 (fma (+ 10.0 k) k 1.0)) a)
                             (if (<= t_0 INFINITY)
                               (/ (- a (* (- (/ -99.0 k) -10.0) (/ a k))) (* k k))
                               (fma (* (fma (- k) -99.0 -10.0) a) k a))))))
                      double code(double a, double k, double m) {
                      	double t_0 = (pow(k, m) * a) / ((k * k) - (-1.0 - (10.0 * k)));
                      	double tmp;
                      	if (t_0 <= 1e-299) {
                      		tmp = a / fma(((((10.0 / k) - -1.0) / k) * ((k * k) - 100.0)), k, 1.0);
                      	} else if (t_0 <= 2e+277) {
                      		tmp = (1.0 / fma((10.0 + k), k, 1.0)) * a;
                      	} else if (t_0 <= ((double) INFINITY)) {
                      		tmp = (a - (((-99.0 / k) - -10.0) * (a / k))) / (k * k);
                      	} else {
                      		tmp = fma((fma(-k, -99.0, -10.0) * a), k, a);
                      	}
                      	return tmp;
                      }
                      
                      function code(a, k, m)
                      	t_0 = Float64(Float64((k ^ m) * a) / Float64(Float64(k * k) - Float64(-1.0 - Float64(10.0 * k))))
                      	tmp = 0.0
                      	if (t_0 <= 1e-299)
                      		tmp = Float64(a / fma(Float64(Float64(Float64(Float64(10.0 / k) - -1.0) / k) * Float64(Float64(k * k) - 100.0)), k, 1.0));
                      	elseif (t_0 <= 2e+277)
                      		tmp = Float64(Float64(1.0 / fma(Float64(10.0 + k), k, 1.0)) * a);
                      	elseif (t_0 <= Inf)
                      		tmp = Float64(Float64(a - Float64(Float64(Float64(-99.0 / k) - -10.0) * Float64(a / k))) / Float64(k * k));
                      	else
                      		tmp = fma(Float64(fma(Float64(-k), -99.0, -10.0) * a), k, a);
                      	end
                      	return tmp
                      end
                      
                      code[a_, k_, m_] := Block[{t$95$0 = N[(N[(N[Power[k, m], $MachinePrecision] * a), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] - N[(-1.0 - N[(10.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 1e-299], N[(a / N[(N[(N[(N[(N[(10.0 / k), $MachinePrecision] - -1.0), $MachinePrecision] / k), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] - 100.0), $MachinePrecision]), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+277], N[(N[(1.0 / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(N[(a - N[(N[(N[(-99.0 / k), $MachinePrecision] - -10.0), $MachinePrecision] * N[(a / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision], N[(N[(N[((-k) * -99.0 + -10.0), $MachinePrecision] * a), $MachinePrecision] * k + a), $MachinePrecision]]]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_0 := \frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)}\\
                      \mathbf{if}\;t\_0 \leq 10^{-299}:\\
                      \;\;\;\;\frac{a}{\mathsf{fma}\left(\frac{\frac{10}{k} - -1}{k} \cdot \left(k \cdot k - 100\right), k, 1\right)}\\
                      
                      \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+277}:\\
                      \;\;\;\;\frac{1}{\mathsf{fma}\left(10 + k, k, 1\right)} \cdot a\\
                      
                      \mathbf{elif}\;t\_0 \leq \infty:\\
                      \;\;\;\;\frac{a - \left(\frac{-99}{k} - -10\right) \cdot \frac{a}{k}}{k \cdot k}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\
                      
                      
                      \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.99999999999999992e-300

                        1. Initial program 96.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                        6. Step-by-step derivation
                          1. Applied rewrites41.1%

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

                            \[\leadsto \frac{a}{\mathsf{fma}\left(\left(-\left(100 - k \cdot k\right)\right) \cdot \frac{1 + 10 \cdot \frac{1}{k}}{k}, k, 1\right)} \]
                          3. Step-by-step derivation
                            1. Applied rewrites47.9%

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

                            if 9.99999999999999992e-300 < (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k))) < 2.00000000000000001e277

                            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 \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-/.f6499.9

                                \[\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-+.f6499.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 2.00000000000000001e277 < (/.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \color{blue}{\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                            6. 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}}} \]
                            7. Step-by-step derivation
                              1. Applied rewrites61.2%

                                \[\leadsto \frac{a - \frac{a}{k} \cdot \left(\frac{-99}{k} - -10\right)}{\color{blue}{k \cdot 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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + 1} \]
                                16. 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}{k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)} \]
                              7. Step-by-step derivation
                                1. Applied rewrites71.6%

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

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

                              Alternative 5: 56.6% accurate, 0.3× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)}\\ \mathbf{if}\;t\_0 \leq 0:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.0001, k, -0.001\right), k, -0.01\right), k, -0.1\right) \cdot \left(k \cdot k - 100\right), k, 1\right)}\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+277}:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\frac{a - \left(\frac{-99}{k} - -10\right) \cdot \frac{a}{k}}{k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\ \end{array} \end{array} \]
                              (FPCore (a k m)
                               :precision binary64
                               (let* ((t_0 (/ (* (pow k m) a) (- (* k k) (- -1.0 (* 10.0 k))))))
                                 (if (<= t_0 0.0)
                                   (/
                                    a
                                    (fma
                                     (* (fma (fma (fma -0.0001 k -0.001) k -0.01) k -0.1) (- (* k k) 100.0))
                                     k
                                     1.0))
                                   (if (<= t_0 2e+277)
                                     (/ a (fma (+ 10.0 k) k 1.0))
                                     (if (<= t_0 INFINITY)
                                       (/ (- a (* (- (/ -99.0 k) -10.0) (/ a k))) (* k k))
                                       (fma (* (fma (- k) -99.0 -10.0) a) k a))))))
                              double code(double a, double k, double m) {
                              	double t_0 = (pow(k, m) * a) / ((k * k) - (-1.0 - (10.0 * k)));
                              	double tmp;
                              	if (t_0 <= 0.0) {
                              		tmp = a / fma((fma(fma(fma(-0.0001, k, -0.001), k, -0.01), k, -0.1) * ((k * k) - 100.0)), k, 1.0);
                              	} else if (t_0 <= 2e+277) {
                              		tmp = a / fma((10.0 + k), k, 1.0);
                              	} else if (t_0 <= ((double) INFINITY)) {
                              		tmp = (a - (((-99.0 / k) - -10.0) * (a / k))) / (k * k);
                              	} else {
                              		tmp = fma((fma(-k, -99.0, -10.0) * a), k, a);
                              	}
                              	return tmp;
                              }
                              
                              function code(a, k, m)
                              	t_0 = Float64(Float64((k ^ m) * a) / Float64(Float64(k * k) - Float64(-1.0 - Float64(10.0 * k))))
                              	tmp = 0.0
                              	if (t_0 <= 0.0)
                              		tmp = Float64(a / fma(Float64(fma(fma(fma(-0.0001, k, -0.001), k, -0.01), k, -0.1) * Float64(Float64(k * k) - 100.0)), k, 1.0));
                              	elseif (t_0 <= 2e+277)
                              		tmp = Float64(a / fma(Float64(10.0 + k), k, 1.0));
                              	elseif (t_0 <= Inf)
                              		tmp = Float64(Float64(a - Float64(Float64(Float64(-99.0 / k) - -10.0) * Float64(a / k))) / Float64(k * k));
                              	else
                              		tmp = fma(Float64(fma(Float64(-k), -99.0, -10.0) * a), k, a);
                              	end
                              	return tmp
                              end
                              
                              code[a_, k_, m_] := Block[{t$95$0 = N[(N[(N[Power[k, m], $MachinePrecision] * a), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] - N[(-1.0 - N[(10.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(a / N[(N[(N[(N[(N[(-0.0001 * k + -0.001), $MachinePrecision] * k + -0.01), $MachinePrecision] * k + -0.1), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] - 100.0), $MachinePrecision]), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+277], N[(a / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(N[(a - N[(N[(N[(-99.0 / k), $MachinePrecision] - -10.0), $MachinePrecision] * N[(a / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision], N[(N[(N[((-k) * -99.0 + -10.0), $MachinePrecision] * a), $MachinePrecision] * k + a), $MachinePrecision]]]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              t_0 := \frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)}\\
                              \mathbf{if}\;t\_0 \leq 0:\\
                              \;\;\;\;\frac{a}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.0001, k, -0.001\right), k, -0.01\right), k, -0.1\right) \cdot \left(k \cdot k - 100\right), k, 1\right)}\\
                              
                              \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+277}:\\
                              \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\
                              
                              \mathbf{elif}\;t\_0 \leq \infty:\\
                              \;\;\;\;\frac{a - \left(\frac{-99}{k} - -10\right) \cdot \frac{a}{k}}{k \cdot k}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\
                              
                              
                              \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))) < 0.0

                                1. Initial program 96.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \color{blue}{\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                                6. Step-by-step derivation
                                  1. Applied rewrites41.1%

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

                                    \[\leadsto \frac{a}{\mathsf{fma}\left(\left(-\left(100 - k \cdot k\right)\right) \cdot \left(k \cdot \left(k \cdot \left(\frac{-1}{10000} \cdot k - \frac{1}{1000}\right) - \frac{1}{100}\right) - \frac{1}{10}\right), k, 1\right)} \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites45.7%

                                      \[\leadsto \frac{a}{\mathsf{fma}\left(\left(-\left(100 - k \cdot k\right)\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.0001, k, -0.001\right), k, -0.01\right), k, -0.1\right), k, 1\right)} \]

                                    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))) < 2.00000000000000001e277

                                    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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if 2.00000000000000001e277 < (/.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \color{blue}{\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                                    6. 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}}} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites61.2%

                                        \[\leadsto \frac{a - \frac{a}{k} \cdot \left(\frac{-99}{k} - -10\right)}{\color{blue}{k \cdot 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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + 1} \]
                                        16. 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}{k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)} \]
                                      7. Step-by-step derivation
                                        1. Applied rewrites71.6%

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

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)} \leq 0:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.0001, k, -0.001\right), k, -0.01\right), k, -0.1\right) \cdot \left(k \cdot k - 100\right), k, 1\right)}\\ \mathbf{elif}\;\frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)} \leq 2 \cdot 10^{+277}:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{elif}\;\frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)} \leq \infty:\\ \;\;\;\;\frac{a - \left(\frac{-99}{k} - -10\right) \cdot \frac{a}{k}}{k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\ \end{array} \]
                                      10. Add Preprocessing

                                      Alternative 6: 56.2% accurate, 0.3× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)}\\ \mathbf{if}\;t\_0 \leq 0:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.001, k, -0.01\right), k, -0.1\right) \cdot \mathsf{fma}\left(k, k, -100\right), k, 1\right)}\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+277}:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\frac{a - \left(\frac{-99}{k} - -10\right) \cdot \frac{a}{k}}{k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\ \end{array} \end{array} \]
                                      (FPCore (a k m)
                                       :precision binary64
                                       (let* ((t_0 (/ (* (pow k m) a) (- (* k k) (- -1.0 (* 10.0 k))))))
                                         (if (<= t_0 0.0)
                                           (/ a (fma (* (fma (fma -0.001 k -0.01) k -0.1) (fma k k -100.0)) k 1.0))
                                           (if (<= t_0 2e+277)
                                             (/ a (fma (+ 10.0 k) k 1.0))
                                             (if (<= t_0 INFINITY)
                                               (/ (- a (* (- (/ -99.0 k) -10.0) (/ a k))) (* k k))
                                               (fma (* (fma (- k) -99.0 -10.0) a) k a))))))
                                      double code(double a, double k, double m) {
                                      	double t_0 = (pow(k, m) * a) / ((k * k) - (-1.0 - (10.0 * k)));
                                      	double tmp;
                                      	if (t_0 <= 0.0) {
                                      		tmp = a / fma((fma(fma(-0.001, k, -0.01), k, -0.1) * fma(k, k, -100.0)), k, 1.0);
                                      	} else if (t_0 <= 2e+277) {
                                      		tmp = a / fma((10.0 + k), k, 1.0);
                                      	} else if (t_0 <= ((double) INFINITY)) {
                                      		tmp = (a - (((-99.0 / k) - -10.0) * (a / k))) / (k * k);
                                      	} else {
                                      		tmp = fma((fma(-k, -99.0, -10.0) * a), k, a);
                                      	}
                                      	return tmp;
                                      }
                                      
                                      function code(a, k, m)
                                      	t_0 = Float64(Float64((k ^ m) * a) / Float64(Float64(k * k) - Float64(-1.0 - Float64(10.0 * k))))
                                      	tmp = 0.0
                                      	if (t_0 <= 0.0)
                                      		tmp = Float64(a / fma(Float64(fma(fma(-0.001, k, -0.01), k, -0.1) * fma(k, k, -100.0)), k, 1.0));
                                      	elseif (t_0 <= 2e+277)
                                      		tmp = Float64(a / fma(Float64(10.0 + k), k, 1.0));
                                      	elseif (t_0 <= Inf)
                                      		tmp = Float64(Float64(a - Float64(Float64(Float64(-99.0 / k) - -10.0) * Float64(a / k))) / Float64(k * k));
                                      	else
                                      		tmp = fma(Float64(fma(Float64(-k), -99.0, -10.0) * a), k, a);
                                      	end
                                      	return tmp
                                      end
                                      
                                      code[a_, k_, m_] := Block[{t$95$0 = N[(N[(N[Power[k, m], $MachinePrecision] * a), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] - N[(-1.0 - N[(10.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(a / N[(N[(N[(N[(-0.001 * k + -0.01), $MachinePrecision] * k + -0.1), $MachinePrecision] * N[(k * k + -100.0), $MachinePrecision]), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+277], N[(a / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(N[(a - N[(N[(N[(-99.0 / k), $MachinePrecision] - -10.0), $MachinePrecision] * N[(a / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision], N[(N[(N[((-k) * -99.0 + -10.0), $MachinePrecision] * a), $MachinePrecision] * k + a), $MachinePrecision]]]]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      t_0 := \frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)}\\
                                      \mathbf{if}\;t\_0 \leq 0:\\
                                      \;\;\;\;\frac{a}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.001, k, -0.01\right), k, -0.1\right) \cdot \mathsf{fma}\left(k, k, -100\right), k, 1\right)}\\
                                      
                                      \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+277}:\\
                                      \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\
                                      
                                      \mathbf{elif}\;t\_0 \leq \infty:\\
                                      \;\;\;\;\frac{a - \left(\frac{-99}{k} - -10\right) \cdot \frac{a}{k}}{k \cdot k}\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\
                                      
                                      
                                      \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))) < 0.0

                                        1. Initial program 96.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \color{blue}{\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                                        6. Step-by-step derivation
                                          1. Applied rewrites41.1%

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

                                            \[\leadsto \frac{a}{\mathsf{fma}\left(\left(-\left(100 - k \cdot k\right)\right) \cdot \left(k \cdot \left(\frac{-1}{1000} \cdot k - \frac{1}{100}\right) - \frac{1}{10}\right), k, 1\right)} \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites45.2%

                                              \[\leadsto \frac{a}{\mathsf{fma}\left(\left(-\left(100 - k \cdot k\right)\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(-0.001, k, -0.01\right), k, -0.1\right), k, 1\right)} \]
                                            2. Taylor expanded in k around 0

                                              \[\leadsto \frac{a}{\mathsf{fma}\left(\left({k}^{2} - 100\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{1000}, k, \frac{-1}{100}\right), k, \frac{-1}{10}\right), k, 1\right)} \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites45.2%

                                                \[\leadsto \frac{a}{\mathsf{fma}\left(\mathsf{fma}\left(k, k, -100\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(-0.001, k, -0.01\right), k, -0.1\right), k, 1\right)} \]

                                              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))) < 2.00000000000000001e277

                                              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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              if 2.00000000000000001e277 < (/.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \color{blue}{\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                                              6. 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}}} \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites61.2%

                                                  \[\leadsto \frac{a - \frac{a}{k} \cdot \left(\frac{-99}{k} - -10\right)}{\color{blue}{k \cdot 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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + 1} \]
                                                  16. 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}{k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)} \]
                                                7. Step-by-step derivation
                                                  1. Applied rewrites71.6%

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

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)} \leq 0:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.001, k, -0.01\right), k, -0.1\right) \cdot \mathsf{fma}\left(k, k, -100\right), k, 1\right)}\\ \mathbf{elif}\;\frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)} \leq 2 \cdot 10^{+277}:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{elif}\;\frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)} \leq \infty:\\ \;\;\;\;\frac{a - \left(\frac{-99}{k} - -10\right) \cdot \frac{a}{k}}{k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\ \end{array} \]
                                                10. Add Preprocessing

                                                Alternative 7: 55.3% accurate, 0.3× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)}\\ \mathbf{if}\;t\_0 \leq 0:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.001, k, -0.01\right), k, -0.1\right) \cdot \mathsf{fma}\left(k, k, -100\right), k, 1\right)}\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+277}:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\frac{1}{\frac{k \cdot k}{a}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\ \end{array} \end{array} \]
                                                (FPCore (a k m)
                                                 :precision binary64
                                                 (let* ((t_0 (/ (* (pow k m) a) (- (* k k) (- -1.0 (* 10.0 k))))))
                                                   (if (<= t_0 0.0)
                                                     (/ a (fma (* (fma (fma -0.001 k -0.01) k -0.1) (fma k k -100.0)) k 1.0))
                                                     (if (<= t_0 2e+277)
                                                       (/ a (fma (+ 10.0 k) k 1.0))
                                                       (if (<= t_0 INFINITY)
                                                         (/ 1.0 (/ (* k k) a))
                                                         (fma (* (fma (- k) -99.0 -10.0) a) k a))))))
                                                double code(double a, double k, double m) {
                                                	double t_0 = (pow(k, m) * a) / ((k * k) - (-1.0 - (10.0 * k)));
                                                	double tmp;
                                                	if (t_0 <= 0.0) {
                                                		tmp = a / fma((fma(fma(-0.001, k, -0.01), k, -0.1) * fma(k, k, -100.0)), k, 1.0);
                                                	} else if (t_0 <= 2e+277) {
                                                		tmp = a / fma((10.0 + k), k, 1.0);
                                                	} else if (t_0 <= ((double) INFINITY)) {
                                                		tmp = 1.0 / ((k * k) / a);
                                                	} else {
                                                		tmp = fma((fma(-k, -99.0, -10.0) * a), k, a);
                                                	}
                                                	return tmp;
                                                }
                                                
                                                function code(a, k, m)
                                                	t_0 = Float64(Float64((k ^ m) * a) / Float64(Float64(k * k) - Float64(-1.0 - Float64(10.0 * k))))
                                                	tmp = 0.0
                                                	if (t_0 <= 0.0)
                                                		tmp = Float64(a / fma(Float64(fma(fma(-0.001, k, -0.01), k, -0.1) * fma(k, k, -100.0)), k, 1.0));
                                                	elseif (t_0 <= 2e+277)
                                                		tmp = Float64(a / fma(Float64(10.0 + k), k, 1.0));
                                                	elseif (t_0 <= Inf)
                                                		tmp = Float64(1.0 / Float64(Float64(k * k) / a));
                                                	else
                                                		tmp = fma(Float64(fma(Float64(-k), -99.0, -10.0) * a), k, a);
                                                	end
                                                	return tmp
                                                end
                                                
                                                code[a_, k_, m_] := Block[{t$95$0 = N[(N[(N[Power[k, m], $MachinePrecision] * a), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] - N[(-1.0 - N[(10.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(a / N[(N[(N[(N[(-0.001 * k + -0.01), $MachinePrecision] * k + -0.1), $MachinePrecision] * N[(k * k + -100.0), $MachinePrecision]), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+277], N[(a / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(1.0 / N[(N[(k * k), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(N[((-k) * -99.0 + -10.0), $MachinePrecision] * a), $MachinePrecision] * k + a), $MachinePrecision]]]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                t_0 := \frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)}\\
                                                \mathbf{if}\;t\_0 \leq 0:\\
                                                \;\;\;\;\frac{a}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.001, k, -0.01\right), k, -0.1\right) \cdot \mathsf{fma}\left(k, k, -100\right), k, 1\right)}\\
                                                
                                                \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+277}:\\
                                                \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\
                                                
                                                \mathbf{elif}\;t\_0 \leq \infty:\\
                                                \;\;\;\;\frac{1}{\frac{k \cdot k}{a}}\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\
                                                
                                                
                                                \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))) < 0.0

                                                  1. Initial program 96.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \color{blue}{\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                                                  6. Step-by-step derivation
                                                    1. Applied rewrites41.1%

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

                                                      \[\leadsto \frac{a}{\mathsf{fma}\left(\left(-\left(100 - k \cdot k\right)\right) \cdot \left(k \cdot \left(\frac{-1}{1000} \cdot k - \frac{1}{100}\right) - \frac{1}{10}\right), k, 1\right)} \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites45.2%

                                                        \[\leadsto \frac{a}{\mathsf{fma}\left(\left(-\left(100 - k \cdot k\right)\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(-0.001, k, -0.01\right), k, -0.1\right), k, 1\right)} \]
                                                      2. Taylor expanded in k around 0

                                                        \[\leadsto \frac{a}{\mathsf{fma}\left(\left({k}^{2} - 100\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{1000}, k, \frac{-1}{100}\right), k, \frac{-1}{10}\right), k, 1\right)} \]
                                                      3. Step-by-step derivation
                                                        1. Applied rewrites45.2%

                                                          \[\leadsto \frac{a}{\mathsf{fma}\left(\mathsf{fma}\left(k, k, -100\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(-0.001, k, -0.01\right), k, -0.1\right), k, 1\right)} \]

                                                        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))) < 2.00000000000000001e277

                                                        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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        if 2.00000000000000001e277 < (/.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \color{blue}{\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                                                        6. Step-by-step derivation
                                                          1. Applied rewrites3.8%

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

                                                            \[\leadsto \frac{1}{\frac{{k}^{2}}{a}} \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites50.2%

                                                              \[\leadsto \frac{1}{\frac{k \cdot k}{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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + 1} \]
                                                              16. 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}{k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)} \]
                                                            7. Step-by-step derivation
                                                              1. Applied rewrites71.6%

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

                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)} \leq 0:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.001, k, -0.01\right), k, -0.1\right) \cdot \mathsf{fma}\left(k, k, -100\right), k, 1\right)}\\ \mathbf{elif}\;\frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)} \leq 2 \cdot 10^{+277}:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{elif}\;\frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)} \leq \infty:\\ \;\;\;\;\frac{1}{\frac{k \cdot k}{a}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\ \end{array} \]
                                                            10. Add Preprocessing

                                                            Alternative 8: 54.6% accurate, 0.3× speedup?

                                                            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)}\\ \mathbf{if}\;t\_0 \leq 0:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(\mathsf{fma}\left(-0.01, k, -0.1\right) \cdot \left(k \cdot k - 100\right), k, 1\right)}\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+277}:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\frac{1}{\frac{k \cdot k}{a}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\ \end{array} \end{array} \]
                                                            (FPCore (a k m)
                                                             :precision binary64
                                                             (let* ((t_0 (/ (* (pow k m) a) (- (* k k) (- -1.0 (* 10.0 k))))))
                                                               (if (<= t_0 0.0)
                                                                 (/ a (fma (* (fma -0.01 k -0.1) (- (* k k) 100.0)) k 1.0))
                                                                 (if (<= t_0 2e+277)
                                                                   (/ a (fma (+ 10.0 k) k 1.0))
                                                                   (if (<= t_0 INFINITY)
                                                                     (/ 1.0 (/ (* k k) a))
                                                                     (fma (* (fma (- k) -99.0 -10.0) a) k a))))))
                                                            double code(double a, double k, double m) {
                                                            	double t_0 = (pow(k, m) * a) / ((k * k) - (-1.0 - (10.0 * k)));
                                                            	double tmp;
                                                            	if (t_0 <= 0.0) {
                                                            		tmp = a / fma((fma(-0.01, k, -0.1) * ((k * k) - 100.0)), k, 1.0);
                                                            	} else if (t_0 <= 2e+277) {
                                                            		tmp = a / fma((10.0 + k), k, 1.0);
                                                            	} else if (t_0 <= ((double) INFINITY)) {
                                                            		tmp = 1.0 / ((k * k) / a);
                                                            	} else {
                                                            		tmp = fma((fma(-k, -99.0, -10.0) * a), k, a);
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            function code(a, k, m)
                                                            	t_0 = Float64(Float64((k ^ m) * a) / Float64(Float64(k * k) - Float64(-1.0 - Float64(10.0 * k))))
                                                            	tmp = 0.0
                                                            	if (t_0 <= 0.0)
                                                            		tmp = Float64(a / fma(Float64(fma(-0.01, k, -0.1) * Float64(Float64(k * k) - 100.0)), k, 1.0));
                                                            	elseif (t_0 <= 2e+277)
                                                            		tmp = Float64(a / fma(Float64(10.0 + k), k, 1.0));
                                                            	elseif (t_0 <= Inf)
                                                            		tmp = Float64(1.0 / Float64(Float64(k * k) / a));
                                                            	else
                                                            		tmp = fma(Float64(fma(Float64(-k), -99.0, -10.0) * a), k, a);
                                                            	end
                                                            	return tmp
                                                            end
                                                            
                                                            code[a_, k_, m_] := Block[{t$95$0 = N[(N[(N[Power[k, m], $MachinePrecision] * a), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] - N[(-1.0 - N[(10.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(a / N[(N[(N[(-0.01 * k + -0.1), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] - 100.0), $MachinePrecision]), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+277], N[(a / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(1.0 / N[(N[(k * k), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(N[((-k) * -99.0 + -10.0), $MachinePrecision] * a), $MachinePrecision] * k + a), $MachinePrecision]]]]]
                                                            
                                                            \begin{array}{l}
                                                            
                                                            \\
                                                            \begin{array}{l}
                                                            t_0 := \frac{{k}^{m} \cdot a}{k \cdot k - \left(-1 - 10 \cdot k\right)}\\
                                                            \mathbf{if}\;t\_0 \leq 0:\\
                                                            \;\;\;\;\frac{a}{\mathsf{fma}\left(\mathsf{fma}\left(-0.01, k, -0.1\right) \cdot \left(k \cdot k - 100\right), k, 1\right)}\\
                                                            
                                                            \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+277}:\\
                                                            \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\
                                                            
                                                            \mathbf{elif}\;t\_0 \leq \infty:\\
                                                            \;\;\;\;\frac{1}{\frac{k \cdot k}{a}}\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\
                                                            
                                                            
                                                            \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))) < 0.0

                                                              1. Initial program 96.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto \color{blue}{\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                                                              6. Step-by-step derivation
                                                                1. Applied rewrites41.1%

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

                                                                  \[\leadsto \frac{a}{\mathsf{fma}\left(\left(-\left(100 - k \cdot k\right)\right) \cdot \left(\frac{-1}{100} \cdot k - \frac{1}{10}\right), k, 1\right)} \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites42.3%

                                                                    \[\leadsto \frac{a}{\mathsf{fma}\left(\left(-\left(100 - k \cdot k\right)\right) \cdot \mathsf{fma}\left(-0.01, k, -0.1\right), k, 1\right)} \]

                                                                  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))) < 2.00000000000000001e277

                                                                  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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  if 2.00000000000000001e277 < (/.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                    \[\leadsto \color{blue}{\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                                                                  6. Step-by-step derivation
                                                                    1. Applied rewrites3.8%

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

                                                                      \[\leadsto \frac{1}{\frac{{k}^{2}}{a}} \]
                                                                    3. Step-by-step derivation
                                                                      1. Applied rewrites50.2%

                                                                        \[\leadsto \frac{1}{\frac{k \cdot k}{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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + 1} \]
                                                                        16. 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}{k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)} \]
                                                                      7. Step-by-step derivation
                                                                        1. Applied rewrites71.6%

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

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

                                                                      Alternative 9: 96.8% accurate, 1.1× speedup?

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

                                                                        1. Initial program 96.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 \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-/.f6496.9

                                                                            \[\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-+.f6496.9

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

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

                                                                          \[\leadsto \color{blue}{{k}^{m}} \cdot a \]
                                                                        6. Step-by-step derivation
                                                                          1. lower-pow.f64100.0

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

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

                                                                        if 3.8000000000000002e-15 < k

                                                                        1. Initial program 78.5%

                                                                          \[\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{a \cdot e^{-1 \cdot \left(m \cdot \log \left(\frac{1}{k}\right)\right)}}{{k}^{2}}} \]
                                                                        4. Step-by-step derivation
                                                                          1. *-commutativeN/A

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

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

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

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

                                                                            \[\leadsto \frac{a}{{k}^{2}} \cdot e^{\color{blue}{\left(-1 \cdot \log \left(\frac{1}{k}\right)\right) \cdot m}} \]
                                                                          6. exp-prodN/A

                                                                            \[\leadsto \frac{a}{{k}^{2}} \cdot \color{blue}{{\left(e^{-1 \cdot \log \left(\frac{1}{k}\right)}\right)}^{m}} \]
                                                                          7. neg-mul-1N/A

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

                                                                            \[\leadsto \frac{a}{{k}^{2}} \cdot {\left(e^{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log k\right)\right)}\right)}\right)}^{m} \]
                                                                          9. remove-double-negN/A

                                                                            \[\leadsto \frac{a}{{k}^{2}} \cdot {\left(e^{\color{blue}{\log k}}\right)}^{m} \]
                                                                          10. rem-exp-logN/A

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

                                                                            \[\leadsto \color{blue}{\frac{a}{{k}^{2}} \cdot {k}^{m}} \]
                                                                          12. unpow2N/A

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

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

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

                                                                            \[\leadsto \frac{\color{blue}{\frac{a}{k}}}{k} \cdot {k}^{m} \]
                                                                          16. lower-pow.f6487.4

                                                                            \[\leadsto \frac{\frac{a}{k}}{k} \cdot \color{blue}{{k}^{m}} \]
                                                                        5. Applied rewrites87.4%

                                                                          \[\leadsto \color{blue}{\frac{\frac{a}{k}}{k} \cdot {k}^{m}} \]
                                                                        6. Step-by-step derivation
                                                                          1. Applied rewrites91.2%

                                                                            \[\leadsto \frac{a}{k} \cdot \color{blue}{{k}^{\left(-1 + m\right)}} \]
                                                                        7. Recombined 2 regimes into one program.
                                                                        8. Final simplification96.7%

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

                                                                        Alternative 10: 97.3% accurate, 1.1× speedup?

                                                                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := {k}^{m} \cdot a\\ \mathbf{if}\;m \leq -1.25 \cdot 10^{-8}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;m \leq 3.5 \cdot 10^{-6}:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                                                                        (FPCore (a k m)
                                                                         :precision binary64
                                                                         (let* ((t_0 (* (pow k m) a)))
                                                                           (if (<= m -1.25e-8)
                                                                             t_0
                                                                             (if (<= m 3.5e-6) (/ a (fma (+ 10.0 k) k 1.0)) t_0))))
                                                                        double code(double a, double k, double m) {
                                                                        	double t_0 = pow(k, m) * a;
                                                                        	double tmp;
                                                                        	if (m <= -1.25e-8) {
                                                                        		tmp = t_0;
                                                                        	} else if (m <= 3.5e-6) {
                                                                        		tmp = a / fma((10.0 + k), k, 1.0);
                                                                        	} else {
                                                                        		tmp = t_0;
                                                                        	}
                                                                        	return tmp;
                                                                        }
                                                                        
                                                                        function code(a, k, m)
                                                                        	t_0 = Float64((k ^ m) * a)
                                                                        	tmp = 0.0
                                                                        	if (m <= -1.25e-8)
                                                                        		tmp = t_0;
                                                                        	elseif (m <= 3.5e-6)
                                                                        		tmp = Float64(a / fma(Float64(10.0 + k), k, 1.0));
                                                                        	else
                                                                        		tmp = t_0;
                                                                        	end
                                                                        	return tmp
                                                                        end
                                                                        
                                                                        code[a_, k_, m_] := Block[{t$95$0 = N[(N[Power[k, m], $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[m, -1.25e-8], t$95$0, If[LessEqual[m, 3.5e-6], N[(a / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                                                                        
                                                                        \begin{array}{l}
                                                                        
                                                                        \\
                                                                        \begin{array}{l}
                                                                        t_0 := {k}^{m} \cdot a\\
                                                                        \mathbf{if}\;m \leq -1.25 \cdot 10^{-8}:\\
                                                                        \;\;\;\;t\_0\\
                                                                        
                                                                        \mathbf{elif}\;m \leq 3.5 \cdot 10^{-6}:\\
                                                                        \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\
                                                                        
                                                                        \mathbf{else}:\\
                                                                        \;\;\;\;t\_0\\
                                                                        
                                                                        
                                                                        \end{array}
                                                                        \end{array}
                                                                        
                                                                        Derivation
                                                                        1. Split input into 2 regimes
                                                                        2. if m < -1.2499999999999999e-8 or 3.49999999999999995e-6 < m

                                                                          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 \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-/.f6488.7

                                                                              \[\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-+.f6488.7

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

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

                                                                            \[\leadsto \color{blue}{{k}^{m}} \cdot a \]
                                                                          6. Step-by-step derivation
                                                                            1. lower-pow.f64100.0

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

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

                                                                          if -1.2499999999999999e-8 < m < 3.49999999999999995e-6

                                                                          1. Initial program 92.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        Alternative 11: 60.7% accurate, 3.9× speedup?

                                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -2.35 \cdot 10^{-11}:\\ \;\;\;\;\frac{1}{\frac{k \cdot k}{a}}\\ \mathbf{elif}\;m \leq 2.4 \cdot 10^{-5}:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\ \end{array} \end{array} \]
                                                                        (FPCore (a k m)
                                                                         :precision binary64
                                                                         (if (<= m -2.35e-11)
                                                                           (/ 1.0 (/ (* k k) a))
                                                                           (if (<= m 2.4e-5)
                                                                             (/ a (fma (+ 10.0 k) k 1.0))
                                                                             (fma (* (fma (- k) -99.0 -10.0) a) k a))))
                                                                        double code(double a, double k, double m) {
                                                                        	double tmp;
                                                                        	if (m <= -2.35e-11) {
                                                                        		tmp = 1.0 / ((k * k) / a);
                                                                        	} else if (m <= 2.4e-5) {
                                                                        		tmp = a / fma((10.0 + k), k, 1.0);
                                                                        	} else {
                                                                        		tmp = fma((fma(-k, -99.0, -10.0) * a), k, a);
                                                                        	}
                                                                        	return tmp;
                                                                        }
                                                                        
                                                                        function code(a, k, m)
                                                                        	tmp = 0.0
                                                                        	if (m <= -2.35e-11)
                                                                        		tmp = Float64(1.0 / Float64(Float64(k * k) / a));
                                                                        	elseif (m <= 2.4e-5)
                                                                        		tmp = Float64(a / fma(Float64(10.0 + k), k, 1.0));
                                                                        	else
                                                                        		tmp = fma(Float64(fma(Float64(-k), -99.0, -10.0) * a), k, a);
                                                                        	end
                                                                        	return tmp
                                                                        end
                                                                        
                                                                        code[a_, k_, m_] := If[LessEqual[m, -2.35e-11], N[(1.0 / N[(N[(k * k), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 2.4e-5], N[(a / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[((-k) * -99.0 + -10.0), $MachinePrecision] * a), $MachinePrecision] * k + a), $MachinePrecision]]]
                                                                        
                                                                        \begin{array}{l}
                                                                        
                                                                        \\
                                                                        \begin{array}{l}
                                                                        \mathbf{if}\;m \leq -2.35 \cdot 10^{-11}:\\
                                                                        \;\;\;\;\frac{1}{\frac{k \cdot k}{a}}\\
                                                                        
                                                                        \mathbf{elif}\;m \leq 2.4 \cdot 10^{-5}:\\
                                                                        \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\
                                                                        
                                                                        \mathbf{else}:\\
                                                                        \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\
                                                                        
                                                                        
                                                                        \end{array}
                                                                        \end{array}
                                                                        
                                                                        Derivation
                                                                        1. Split input into 3 regimes
                                                                        2. if m < -2.34999999999999996e-11

                                                                          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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                            \[\leadsto \color{blue}{\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                                                                          6. Step-by-step derivation
                                                                            1. Applied rewrites32.4%

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

                                                                              \[\leadsto \frac{1}{\frac{{k}^{2}}{a}} \]
                                                                            3. Step-by-step derivation
                                                                              1. Applied rewrites61.1%

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

                                                                              if -2.34999999999999996e-11 < m < 2.4000000000000001e-5

                                                                              1. Initial program 92.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                              if 2.4000000000000001e-5 < m

                                                                              1. Initial program 77.3%

                                                                                \[\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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + 1} \]
                                                                                16. 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.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}{k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)} \]
                                                                              7. Step-by-step derivation
                                                                                1. Applied rewrites25.0%

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

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

                                                                              Alternative 12: 60.8% accurate, 4.1× speedup?

                                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -0.3:\\ \;\;\;\;\frac{a}{k \cdot k}\\ \mathbf{elif}\;m \leq 2.4 \cdot 10^{-5}:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\ \end{array} \end{array} \]
                                                                              (FPCore (a k m)
                                                                               :precision binary64
                                                                               (if (<= m -0.3)
                                                                                 (/ a (* k k))
                                                                                 (if (<= m 2.4e-5)
                                                                                   (/ a (fma (+ 10.0 k) k 1.0))
                                                                                   (fma (* (fma (- k) -99.0 -10.0) a) k a))))
                                                                              double code(double a, double k, double m) {
                                                                              	double tmp;
                                                                              	if (m <= -0.3) {
                                                                              		tmp = a / (k * k);
                                                                              	} else if (m <= 2.4e-5) {
                                                                              		tmp = a / fma((10.0 + k), k, 1.0);
                                                                              	} else {
                                                                              		tmp = fma((fma(-k, -99.0, -10.0) * a), k, a);
                                                                              	}
                                                                              	return tmp;
                                                                              }
                                                                              
                                                                              function code(a, k, m)
                                                                              	tmp = 0.0
                                                                              	if (m <= -0.3)
                                                                              		tmp = Float64(a / Float64(k * k));
                                                                              	elseif (m <= 2.4e-5)
                                                                              		tmp = Float64(a / fma(Float64(10.0 + k), k, 1.0));
                                                                              	else
                                                                              		tmp = fma(Float64(fma(Float64(-k), -99.0, -10.0) * a), k, a);
                                                                              	end
                                                                              	return tmp
                                                                              end
                                                                              
                                                                              code[a_, k_, m_] := If[LessEqual[m, -0.3], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 2.4e-5], N[(a / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[((-k) * -99.0 + -10.0), $MachinePrecision] * a), $MachinePrecision] * k + a), $MachinePrecision]]]
                                                                              
                                                                              \begin{array}{l}
                                                                              
                                                                              \\
                                                                              \begin{array}{l}
                                                                              \mathbf{if}\;m \leq -0.3:\\
                                                                              \;\;\;\;\frac{a}{k \cdot k}\\
                                                                              
                                                                              \mathbf{elif}\;m \leq 2.4 \cdot 10^{-5}:\\
                                                                              \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\
                                                                              
                                                                              \mathbf{else}:\\
                                                                              \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\
                                                                              
                                                                              
                                                                              \end{array}
                                                                              \end{array}
                                                                              
                                                                              Derivation
                                                                              1. Split input into 3 regimes
                                                                              2. if m < -0.299999999999999989

                                                                                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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                    \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + 1} \]
                                                                                  16. 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 rewrites32.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 rewrites3.2%

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

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

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

                                                                                    if -0.299999999999999989 < m < 2.4000000000000001e-5

                                                                                    1. Initial program 92.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                    if 2.4000000000000001e-5 < m

                                                                                    1. Initial program 77.3%

                                                                                      \[\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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                        \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + 1} \]
                                                                                      16. 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.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}{k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)} \]
                                                                                    7. Step-by-step derivation
                                                                                      1. Applied rewrites25.0%

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

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

                                                                                    Alternative 13: 50.7% accurate, 4.2× speedup?

                                                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -2 \cdot 10^{-11}:\\ \;\;\;\;\frac{a}{k \cdot k}\\ \mathbf{elif}\;m \leq 2.4 \cdot 10^{-5}:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(10, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\ \end{array} \end{array} \]
                                                                                    (FPCore (a k m)
                                                                                     :precision binary64
                                                                                     (if (<= m -2e-11)
                                                                                       (/ a (* k k))
                                                                                       (if (<= m 2.4e-5)
                                                                                         (/ a (fma 10.0 k 1.0))
                                                                                         (fma (* (fma (- k) -99.0 -10.0) a) k a))))
                                                                                    double code(double a, double k, double m) {
                                                                                    	double tmp;
                                                                                    	if (m <= -2e-11) {
                                                                                    		tmp = a / (k * k);
                                                                                    	} else if (m <= 2.4e-5) {
                                                                                    		tmp = a / fma(10.0, k, 1.0);
                                                                                    	} else {
                                                                                    		tmp = fma((fma(-k, -99.0, -10.0) * a), k, a);
                                                                                    	}
                                                                                    	return tmp;
                                                                                    }
                                                                                    
                                                                                    function code(a, k, m)
                                                                                    	tmp = 0.0
                                                                                    	if (m <= -2e-11)
                                                                                    		tmp = Float64(a / Float64(k * k));
                                                                                    	elseif (m <= 2.4e-5)
                                                                                    		tmp = Float64(a / fma(10.0, k, 1.0));
                                                                                    	else
                                                                                    		tmp = fma(Float64(fma(Float64(-k), -99.0, -10.0) * a), k, a);
                                                                                    	end
                                                                                    	return tmp
                                                                                    end
                                                                                    
                                                                                    code[a_, k_, m_] := If[LessEqual[m, -2e-11], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 2.4e-5], N[(a / N[(10.0 * k + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[((-k) * -99.0 + -10.0), $MachinePrecision] * a), $MachinePrecision] * k + a), $MachinePrecision]]]
                                                                                    
                                                                                    \begin{array}{l}
                                                                                    
                                                                                    \\
                                                                                    \begin{array}{l}
                                                                                    \mathbf{if}\;m \leq -2 \cdot 10^{-11}:\\
                                                                                    \;\;\;\;\frac{a}{k \cdot k}\\
                                                                                    
                                                                                    \mathbf{elif}\;m \leq 2.4 \cdot 10^{-5}:\\
                                                                                    \;\;\;\;\frac{a}{\mathsf{fma}\left(10, k, 1\right)}\\
                                                                                    
                                                                                    \mathbf{else}:\\
                                                                                    \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-k, -99, -10\right) \cdot a, k, a\right)\\
                                                                                    
                                                                                    
                                                                                    \end{array}
                                                                                    \end{array}
                                                                                    
                                                                                    Derivation
                                                                                    1. Split input into 3 regimes
                                                                                    2. if m < -1.99999999999999988e-11

                                                                                      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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                          if -1.99999999999999988e-11 < m < 2.4000000000000001e-5

                                                                                          1. Initial program 92.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                            if 2.4000000000000001e-5 < m

                                                                                            1. Initial program 77.3%

                                                                                              \[\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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + 1} \]
                                                                                              16. 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.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}{k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)} \]
                                                                                            7. Step-by-step derivation
                                                                                              1. Applied rewrites25.0%

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

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

                                                                                            Alternative 14: 48.7% accurate, 4.5× speedup?

                                                                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -2 \cdot 10^{-11}:\\ \;\;\;\;\frac{a}{k \cdot k}\\ \mathbf{elif}\;m \leq 52000000:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(10, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(-10 \cdot a\right) \cdot k\\ \end{array} \end{array} \]
                                                                                            (FPCore (a k m)
                                                                                             :precision binary64
                                                                                             (if (<= m -2e-11)
                                                                                               (/ a (* k k))
                                                                                               (if (<= m 52000000.0) (/ a (fma 10.0 k 1.0)) (* (* -10.0 a) k))))
                                                                                            double code(double a, double k, double m) {
                                                                                            	double tmp;
                                                                                            	if (m <= -2e-11) {
                                                                                            		tmp = a / (k * k);
                                                                                            	} else if (m <= 52000000.0) {
                                                                                            		tmp = a / fma(10.0, k, 1.0);
                                                                                            	} else {
                                                                                            		tmp = (-10.0 * a) * k;
                                                                                            	}
                                                                                            	return tmp;
                                                                                            }
                                                                                            
                                                                                            function code(a, k, m)
                                                                                            	tmp = 0.0
                                                                                            	if (m <= -2e-11)
                                                                                            		tmp = Float64(a / Float64(k * k));
                                                                                            	elseif (m <= 52000000.0)
                                                                                            		tmp = Float64(a / fma(10.0, k, 1.0));
                                                                                            	else
                                                                                            		tmp = Float64(Float64(-10.0 * a) * k);
                                                                                            	end
                                                                                            	return tmp
                                                                                            end
                                                                                            
                                                                                            code[a_, k_, m_] := If[LessEqual[m, -2e-11], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 52000000.0], N[(a / N[(10.0 * k + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(-10.0 * a), $MachinePrecision] * k), $MachinePrecision]]]
                                                                                            
                                                                                            \begin{array}{l}
                                                                                            
                                                                                            \\
                                                                                            \begin{array}{l}
                                                                                            \mathbf{if}\;m \leq -2 \cdot 10^{-11}:\\
                                                                                            \;\;\;\;\frac{a}{k \cdot k}\\
                                                                                            
                                                                                            \mathbf{elif}\;m \leq 52000000:\\
                                                                                            \;\;\;\;\frac{a}{\mathsf{fma}\left(10, k, 1\right)}\\
                                                                                            
                                                                                            \mathbf{else}:\\
                                                                                            \;\;\;\;\left(-10 \cdot a\right) \cdot k\\
                                                                                            
                                                                                            
                                                                                            \end{array}
                                                                                            \end{array}
                                                                                            
                                                                                            Derivation
                                                                                            1. Split input into 3 regimes
                                                                                            2. if m < -1.99999999999999988e-11

                                                                                              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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                  if -1.99999999999999988e-11 < m < 5.2e7

                                                                                                  1. Initial program 91.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                    if 5.2e7 < m

                                                                                                    1. Initial program 77.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                        \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + 1} \]
                                                                                                      16. 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 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(a \cdot k, \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 rewrites16.6%

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

                                                                                                      Alternative 15: 46.3% accurate, 4.6× speedup?

                                                                                                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{a}{k \cdot k}\\ \mathbf{if}\;k \leq 2.7 \cdot 10^{-281}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;k \leq 3.8 \cdot 10^{-15}:\\ \;\;\;\;\mathsf{fma}\left(-10, k, 1\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                                                                                                      (FPCore (a k m)
                                                                                                       :precision binary64
                                                                                                       (let* ((t_0 (/ a (* k k))))
                                                                                                         (if (<= k 2.7e-281) t_0 (if (<= k 3.8e-15) (* (fma -10.0 k 1.0) a) t_0))))
                                                                                                      double code(double a, double k, double m) {
                                                                                                      	double t_0 = a / (k * k);
                                                                                                      	double tmp;
                                                                                                      	if (k <= 2.7e-281) {
                                                                                                      		tmp = t_0;
                                                                                                      	} else if (k <= 3.8e-15) {
                                                                                                      		tmp = fma(-10.0, k, 1.0) * a;
                                                                                                      	} else {
                                                                                                      		tmp = t_0;
                                                                                                      	}
                                                                                                      	return tmp;
                                                                                                      }
                                                                                                      
                                                                                                      function code(a, k, m)
                                                                                                      	t_0 = Float64(a / Float64(k * k))
                                                                                                      	tmp = 0.0
                                                                                                      	if (k <= 2.7e-281)
                                                                                                      		tmp = t_0;
                                                                                                      	elseif (k <= 3.8e-15)
                                                                                                      		tmp = Float64(fma(-10.0, k, 1.0) * a);
                                                                                                      	else
                                                                                                      		tmp = t_0;
                                                                                                      	end
                                                                                                      	return tmp
                                                                                                      end
                                                                                                      
                                                                                                      code[a_, k_, m_] := Block[{t$95$0 = N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 2.7e-281], t$95$0, If[LessEqual[k, 3.8e-15], N[(N[(-10.0 * k + 1.0), $MachinePrecision] * a), $MachinePrecision], t$95$0]]]
                                                                                                      
                                                                                                      \begin{array}{l}
                                                                                                      
                                                                                                      \\
                                                                                                      \begin{array}{l}
                                                                                                      t_0 := \frac{a}{k \cdot k}\\
                                                                                                      \mathbf{if}\;k \leq 2.7 \cdot 10^{-281}:\\
                                                                                                      \;\;\;\;t\_0\\
                                                                                                      
                                                                                                      \mathbf{elif}\;k \leq 3.8 \cdot 10^{-15}:\\
                                                                                                      \;\;\;\;\mathsf{fma}\left(-10, k, 1\right) \cdot a\\
                                                                                                      
                                                                                                      \mathbf{else}:\\
                                                                                                      \;\;\;\;t\_0\\
                                                                                                      
                                                                                                      
                                                                                                      \end{array}
                                                                                                      \end{array}
                                                                                                      
                                                                                                      Derivation
                                                                                                      1. Split input into 2 regimes
                                                                                                      2. if k < 2.6999999999999999e-281 or 3.8000000000000002e-15 < k

                                                                                                        1. Initial program 85.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                            if 2.6999999999999999e-281 < k < 3.8000000000000002e-15

                                                                                                            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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                              Alternative 16: 25.1% accurate, 7.4× speedup?

                                                                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq 1550000:\\ \;\;\;\;\mathsf{fma}\left(-10, k, 1\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(-10 \cdot a\right) \cdot k\\ \end{array} \end{array} \]
                                                                                                              (FPCore (a k m)
                                                                                                               :precision binary64
                                                                                                               (if (<= m 1550000.0) (* (fma -10.0 k 1.0) a) (* (* -10.0 a) k)))
                                                                                                              double code(double a, double k, double m) {
                                                                                                              	double tmp;
                                                                                                              	if (m <= 1550000.0) {
                                                                                                              		tmp = fma(-10.0, k, 1.0) * a;
                                                                                                              	} else {
                                                                                                              		tmp = (-10.0 * a) * k;
                                                                                                              	}
                                                                                                              	return tmp;
                                                                                                              }
                                                                                                              
                                                                                                              function code(a, k, m)
                                                                                                              	tmp = 0.0
                                                                                                              	if (m <= 1550000.0)
                                                                                                              		tmp = Float64(fma(-10.0, k, 1.0) * a);
                                                                                                              	else
                                                                                                              		tmp = Float64(Float64(-10.0 * a) * k);
                                                                                                              	end
                                                                                                              	return tmp
                                                                                                              end
                                                                                                              
                                                                                                              code[a_, k_, m_] := If[LessEqual[m, 1550000.0], N[(N[(-10.0 * k + 1.0), $MachinePrecision] * a), $MachinePrecision], N[(N[(-10.0 * a), $MachinePrecision] * k), $MachinePrecision]]
                                                                                                              
                                                                                                              \begin{array}{l}
                                                                                                              
                                                                                                              \\
                                                                                                              \begin{array}{l}
                                                                                                              \mathbf{if}\;m \leq 1550000:\\
                                                                                                              \;\;\;\;\mathsf{fma}\left(-10, k, 1\right) \cdot a\\
                                                                                                              
                                                                                                              \mathbf{else}:\\
                                                                                                              \;\;\;\;\left(-10 \cdot a\right) \cdot k\\
                                                                                                              
                                                                                                              
                                                                                                              \end{array}
                                                                                                              \end{array}
                                                                                                              
                                                                                                              Derivation
                                                                                                              1. Split input into 2 regimes
                                                                                                              2. if m < 1.55e6

                                                                                                                1. Initial program 96.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                    if 1.55e6 < m

                                                                                                                    1. Initial program 77.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                        \[\leadsto \frac{a}{\color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right) \cdot k} + 1} \]
                                                                                                                      16. 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 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(a \cdot k, \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 rewrites16.6%

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

                                                                                                                      Alternative 17: 8.1% accurate, 12.2× speedup?

                                                                                                                      \[\begin{array}{l} \\ \left(-10 \cdot a\right) \cdot k \end{array} \]
                                                                                                                      (FPCore (a k m) :precision binary64 (* (* -10.0 a) k))
                                                                                                                      double code(double a, double k, double m) {
                                                                                                                      	return (-10.0 * a) * k;
                                                                                                                      }
                                                                                                                      
                                                                                                                      real(8) function code(a, k, m)
                                                                                                                          real(8), intent (in) :: a
                                                                                                                          real(8), intent (in) :: k
                                                                                                                          real(8), intent (in) :: m
                                                                                                                          code = ((-10.0d0) * a) * k
                                                                                                                      end function
                                                                                                                      
                                                                                                                      public static double code(double a, double k, double m) {
                                                                                                                      	return (-10.0 * a) * k;
                                                                                                                      }
                                                                                                                      
                                                                                                                      def code(a, k, m):
                                                                                                                      	return (-10.0 * a) * k
                                                                                                                      
                                                                                                                      function code(a, k, m)
                                                                                                                      	return Float64(Float64(-10.0 * a) * k)
                                                                                                                      end
                                                                                                                      
                                                                                                                      function tmp = code(a, k, m)
                                                                                                                      	tmp = (-10.0 * a) * k;
                                                                                                                      end
                                                                                                                      
                                                                                                                      code[a_, k_, m_] := N[(N[(-10.0 * a), $MachinePrecision] * k), $MachinePrecision]
                                                                                                                      
                                                                                                                      \begin{array}{l}
                                                                                                                      
                                                                                                                      \\
                                                                                                                      \left(-10 \cdot a\right) \cdot k
                                                                                                                      \end{array}
                                                                                                                      
                                                                                                                      Derivation
                                                                                                                      1. Initial program 90.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. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                          \[\leadsto \mathsf{fma}\left(a \cdot k, \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 rewrites7.0%

                                                                                                                            \[\leadsto \left(-10 \cdot a\right) \cdot k \]
                                                                                                                          2. Add Preprocessing

                                                                                                                          Reproduce

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