Falkner and Boettcher, Appendix A

Percentage Accurate: 89.8% → 96.5%
Time: 10.4s
Alternatives: 14
Speedup: 1.1×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 89.8% accurate, 1.0× speedup?

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

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

Alternative 1: 96.5% accurate, 0.4× speedup?

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

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

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


\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))) < 2e18

    1. Initial program 95.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e18 < (/.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 66.2%

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

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

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

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

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

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

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

Alternative 2: 95.4% 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(10 \cdot k + 1\right)} \leq 2 \cdot 10^{+18}:\\ \;\;\;\;\frac{{k}^{m}}{\frac{\mathsf{fma}\left(10 + k, k, 1\right)}{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) (+ (* 10.0 k) 1.0))) 2e+18)
     (/ (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) + ((10.0 * k) + 1.0))) <= 2e+18) {
		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(Float64(10.0 * k) + 1.0))) <= 2e+18)
		tmp = Float64((k ^ m) / Float64(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[(N[(10.0 * k), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+18], N[(N[Power[k, m], $MachinePrecision] / N[(N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision] / a), $MachinePrecision]), $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(10 \cdot k + 1\right)} \leq 2 \cdot 10^{+18}:\\
\;\;\;\;\frac{{k}^{m}}{\frac{\mathsf{fma}\left(10 + k, k, 1\right)}{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))) < 2e18

    1. Initial program 95.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e18 < (/.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 66.2%

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

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

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

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

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

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

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

Alternative 3: 97.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_0 := {k}^{\left(0.5 \cdot m\right)}\\
\mathbf{if}\;m \leq 2.4:\\
\;\;\;\;\frac{{k}^{m} \cdot a}{k \cdot k + \left(10 \cdot k + 1\right)}\\

\mathbf{else}:\\
\;\;\;\;\left(t\_0 \cdot a\right) \cdot t\_0\\


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

    1. Initial program 95.8%

      \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
    2. Add Preprocessing

    if 2.39999999999999991 < m

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {k}^{\left(\frac{1}{2} \cdot m\right)} \cdot \left({k}^{\color{blue}{\left(m \cdot \frac{1}{2}\right)}} \cdot a\right) \]
      8. lower-*.f64100.0

        \[\leadsto {k}^{\left(0.5 \cdot m\right)} \cdot \left({k}^{\color{blue}{\left(m \cdot 0.5\right)}} \cdot a\right) \]
    7. Applied rewrites100.0%

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

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

Alternative 4: 97.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {k}^{m} \cdot a\\ \mathbf{if}\;m \leq 0.00062:\\ \;\;\;\;\frac{t\_0}{k \cdot k + \left(10 \cdot 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 0.00062) (/ t_0 (+ (* k k) (+ (* 10.0 k) 1.0))) t_0)))
double code(double a, double k, double m) {
	double t_0 = pow(k, m) * a;
	double tmp;
	if (m <= 0.00062) {
		tmp = t_0 / ((k * k) + ((10.0 * k) + 1.0));
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(a, k, m)
    real(8), intent (in) :: a
    real(8), intent (in) :: k
    real(8), intent (in) :: m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (k ** m) * a
    if (m <= 0.00062d0) then
        tmp = t_0 / ((k * k) + ((10.0d0 * k) + 1.0d0))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double a, double k, double m) {
	double t_0 = Math.pow(k, m) * a;
	double tmp;
	if (m <= 0.00062) {
		tmp = t_0 / ((k * k) + ((10.0 * k) + 1.0));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(a, k, m):
	t_0 = math.pow(k, m) * a
	tmp = 0
	if m <= 0.00062:
		tmp = t_0 / ((k * k) + ((10.0 * 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 <= 0.00062)
		tmp = Float64(t_0 / Float64(Float64(k * k) + Float64(Float64(10.0 * k) + 1.0)));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(a, k, m)
	t_0 = (k ^ m) * a;
	tmp = 0.0;
	if (m <= 0.00062)
		tmp = t_0 / ((k * k) + ((10.0 * k) + 1.0));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[a_, k_, m_] := Block[{t$95$0 = N[(N[Power[k, m], $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[m, 0.00062], N[(t$95$0 / N[(N[(k * k), $MachinePrecision] + N[(N[(10.0 * k), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if m < 6.2e-4

    1. Initial program 95.7%

      \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
    2. Add Preprocessing

    if 6.2e-4 < m

    1. Initial program 75.6%

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

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

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

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

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

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

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

Alternative 5: 97.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {k}^{m} \cdot a\\ \mathbf{if}\;m \leq -7.5 \cdot 10^{-15}:\\ \;\;\;\;\frac{t\_0}{\mathsf{fma}\left(10, k, 1\right)}\\ \mathbf{elif}\;m \leq 7.8 \cdot 10^{-7}:\\ \;\;\;\;\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 -7.5e-15)
     (/ t_0 (fma 10.0 k 1.0))
     (if (<= m 7.8e-7) (/ 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 <= -7.5e-15) {
		tmp = t_0 / fma(10.0, k, 1.0);
	} else if (m <= 7.8e-7) {
		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 <= -7.5e-15)
		tmp = Float64(t_0 / fma(10.0, k, 1.0));
	elseif (m <= 7.8e-7)
		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, -7.5e-15], N[(t$95$0 / N[(10.0 * k + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 7.8e-7], 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 -7.5 \cdot 10^{-15}:\\
\;\;\;\;\frac{t\_0}{\mathsf{fma}\left(10, k, 1\right)}\\

\mathbf{elif}\;m \leq 7.8 \cdot 10^{-7}:\\
\;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if m < -7.4999999999999996e-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 k around 0

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

        \[\leadsto \frac{a \cdot {k}^{m}}{\color{blue}{10 \cdot k + 1}} \]
      2. lower-fma.f64100.0

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

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

    if -7.4999999999999996e-15 < m < 7.80000000000000049e-7

    1. Initial program 91.4%

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

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

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

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

    if 7.80000000000000049e-7 < m

    1. Initial program 75.6%

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

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

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

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

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

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

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

Alternative 6: 96.9% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {k}^{m} \cdot a\\ \mathbf{if}\;m \leq -7.5 \cdot 10^{-15}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;m \leq 7.8 \cdot 10^{-7}:\\ \;\;\;\;\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 -7.5e-15)
     t_0
     (if (<= m 7.8e-7) (/ 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 <= -7.5e-15) {
		tmp = t_0;
	} else if (m <= 7.8e-7) {
		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 <= -7.5e-15)
		tmp = t_0;
	elseif (m <= 7.8e-7)
		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, -7.5e-15], t$95$0, If[LessEqual[m, 7.8e-7], 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 -7.5 \cdot 10^{-15}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;m \leq 7.8 \cdot 10^{-7}:\\
\;\;\;\;\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 < -7.4999999999999996e-15 or 7.80000000000000049e-7 < m

    1. Initial program 86.5%

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

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

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

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

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

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

    if -7.4999999999999996e-15 < m < 7.80000000000000049e-7

    1. Initial program 91.4%

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

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

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

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

Alternative 7: 72.7% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -0.62:\\ \;\;\;\;\frac{99 \cdot \frac{a}{k \cdot k}}{k \cdot k}\\ \mathbf{elif}\;m \leq 0.95:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(k \cdot a\right) \cdot k\right) \cdot 99\\ \end{array} \end{array} \]
(FPCore (a k m)
 :precision binary64
 (if (<= m -0.62)
   (/ (* 99.0 (/ a (* k k))) (* k k))
   (if (<= m 0.95) (/ a (fma (+ 10.0 k) k 1.0)) (* (* (* k a) k) 99.0))))
double code(double a, double k, double m) {
	double tmp;
	if (m <= -0.62) {
		tmp = (99.0 * (a / (k * k))) / (k * k);
	} else if (m <= 0.95) {
		tmp = a / fma((10.0 + k), k, 1.0);
	} else {
		tmp = ((k * a) * k) * 99.0;
	}
	return tmp;
}
function code(a, k, m)
	tmp = 0.0
	if (m <= -0.62)
		tmp = Float64(Float64(99.0 * Float64(a / Float64(k * k))) / Float64(k * k));
	elseif (m <= 0.95)
		tmp = Float64(a / fma(Float64(10.0 + k), k, 1.0));
	else
		tmp = Float64(Float64(Float64(k * a) * k) * 99.0);
	end
	return tmp
end
code[a_, k_, m_] := If[LessEqual[m, -0.62], N[(N[(99.0 * N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 0.95], N[(a / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(k * a), $MachinePrecision] * k), $MachinePrecision] * 99.0), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;m \leq 0.95:\\
\;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\

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


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

    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 rewrites36.1%

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

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

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

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

        if -0.619999999999999996 < m < 0.94999999999999996

        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 rewrites90.2%

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

        if 0.94999999999999996 < m

        1. Initial program 75.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 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}{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 rewrites31.7%

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

            \[\leadsto 99 \cdot \left(a \cdot \color{blue}{{k}^{2}}\right) \]
          3. Step-by-step derivation
            1. Applied rewrites52.6%

              \[\leadsto \left(\left(k \cdot a\right) \cdot k\right) \cdot 99 \]
          4. Recombined 3 regimes into one program.
          5. Final simplification70.3%

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

          Alternative 8: 68.8% accurate, 4.1× speedup?

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

            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 rewrites36.1%

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

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

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

              if -0.650000000000000022 < m < 0.94999999999999996

              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 rewrites90.2%

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

              if 0.94999999999999996 < m

              1. Initial program 75.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 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}{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 rewrites31.7%

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

                  \[\leadsto 99 \cdot \left(a \cdot \color{blue}{{k}^{2}}\right) \]
                3. Step-by-step derivation
                  1. Applied rewrites52.6%

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

                Alternative 9: 68.0% accurate, 4.5× speedup?

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

                  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 rewrites36.1%

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

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

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

                    if -0.650000000000000022 < m < 0.94999999999999996

                    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 rewrites90.2%

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

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

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

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

                      if 0.94999999999999996 < m

                      1. Initial program 75.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 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}{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 rewrites31.7%

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

                          \[\leadsto 99 \cdot \left(a \cdot \color{blue}{{k}^{2}}\right) \]
                        3. Step-by-step derivation
                          1. Applied rewrites52.6%

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

                        Alternative 10: 54.0% accurate, 4.8× speedup?

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

                          1. Initial program 96.5%

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

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

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

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

                            if -7.50000000000000044e-226 < m < 0.5

                            1. Initial program 94.1%

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

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

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

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

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

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

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

                                \[\leadsto 1 \cdot a \]

                              if 0.5 < m

                              1. Initial program 75.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 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}{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 rewrites31.7%

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

                                  \[\leadsto 99 \cdot \left(a \cdot \color{blue}{{k}^{2}}\right) \]
                                3. Step-by-step derivation
                                  1. Applied rewrites52.6%

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

                                Alternative 11: 35.9% accurate, 6.1× speedup?

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

                                  1. Initial program 95.8%

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

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

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

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

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

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

                                    \[\leadsto 1 \cdot a \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites27.3%

                                      \[\leadsto 1 \cdot a \]

                                    if 0.5 < m

                                    1. Initial program 75.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 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}{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 rewrites31.7%

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

                                        \[\leadsto 99 \cdot \left(a \cdot \color{blue}{{k}^{2}}\right) \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites52.6%

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

                                      Alternative 12: 25.2% accurate, 7.4× speedup?

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

                                        1. Initial program 90.2%

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

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

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

                                              \[\leadsto \left(k \cdot a\right) \cdot -10 \]

                                            if 1.00000000000000004e-297 < k

                                            1. Initial program 86.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 rewrites53.1%

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

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

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

                                                \[\leadsto \mathsf{fma}\left(10 \cdot a, \color{blue}{k}, a\right) \]
                                            9. Recombined 2 regimes into one program.
                                            10. Add Preprocessing

                                            Alternative 13: 25.6% accurate, 7.9× speedup?

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

                                              1. Initial program 95.2%

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

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

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

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

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

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

                                                \[\leadsto 1 \cdot a \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites27.1%

                                                  \[\leadsto 1 \cdot a \]

                                                if 1550 < m

                                                1. Initial program 76.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 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 rewrites7.9%

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

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

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

                                                  Alternative 14: 20.0% accurate, 22.3× speedup?

                                                  \[\begin{array}{l} \\ 1 \cdot a \end{array} \]
                                                  (FPCore (a k m) :precision binary64 (* 1.0 a))
                                                  double code(double a, double k, double m) {
                                                  	return 1.0 * a;
                                                  }
                                                  
                                                  real(8) function code(a, k, m)
                                                      real(8), intent (in) :: a
                                                      real(8), intent (in) :: k
                                                      real(8), intent (in) :: m
                                                      code = 1.0d0 * a
                                                  end function
                                                  
                                                  public static double code(double a, double k, double m) {
                                                  	return 1.0 * a;
                                                  }
                                                  
                                                  def code(a, k, m):
                                                  	return 1.0 * a
                                                  
                                                  function code(a, k, m)
                                                  	return Float64(1.0 * a)
                                                  end
                                                  
                                                  function tmp = code(a, k, m)
                                                  	tmp = 1.0 * a;
                                                  end
                                                  
                                                  code[a_, k_, m_] := N[(1.0 * a), $MachinePrecision]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  1 \cdot a
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Initial program 88.0%

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

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

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

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

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

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

                                                    \[\leadsto 1 \cdot a \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites18.4%

                                                      \[\leadsto 1 \cdot a \]
                                                    2. Add Preprocessing

                                                    Reproduce

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