Falkner and Boettcher, Appendix A

Percentage Accurate: 90.0% → 97.8%
Time: 10.0s
Alternatives: 14
Speedup: 1.1×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 90.0% accurate, 1.0× speedup?

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

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

Alternative 1: 97.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {k}^{m} \cdot a\\ \mathbf{if}\;\frac{t\_0}{k \cdot k + \left(10 \cdot k + 1\right)} \leq \infty:\\ \;\;\;\;\frac{t\_0}{\mathsf{fma}\left(k, k, \mathsf{fma}\left(k, 10, 1\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(99, k, -10\right), k, 1\right) \cdot a\\ \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))) INFINITY)
     (/ t_0 (fma k k (fma k 10.0 1.0)))
     (* (fma (fma 99.0 k -10.0) k 1.0) a))))
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))) <= ((double) INFINITY)) {
		tmp = t_0 / fma(k, k, fma(k, 10.0, 1.0));
	} else {
		tmp = fma(fma(99.0, k, -10.0), k, 1.0) * a;
	}
	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))) <= Inf)
		tmp = Float64(t_0 / fma(k, k, fma(k, 10.0, 1.0)));
	else
		tmp = Float64(fma(fma(99.0, k, -10.0), k, 1.0) * a);
	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], Infinity], N[(t$95$0 / N[(k * k + N[(k * 10.0 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(99.0 * k + -10.0), $MachinePrecision] * k + 1.0), $MachinePrecision] * a), $MachinePrecision]]]
\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 \infty:\\
\;\;\;\;\frac{t\_0}{\mathsf{fma}\left(k, k, \mathsf{fma}\left(k, 10, 1\right)\right)}\\

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


\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))) < +inf.0

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 2: 48.1% accurate, 0.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{a}{k \cdot k}\\ t_1 := \frac{{k}^{m} \cdot a}{k \cdot k + \left(10 \cdot k + 1\right)}\\ t_2 := \mathsf{fma}\left(\mathsf{fma}\left(99, k, -10\right), k, 1\right) \cdot a\\ \mathbf{if}\;t\_1 \leq 2 \cdot 10^{-288}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+291}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
      (FPCore (a k m)
       :precision binary64
       (let* ((t_0 (/ a (* k k)))
              (t_1 (/ (* (pow k m) a) (+ (* k k) (+ (* 10.0 k) 1.0))))
              (t_2 (* (fma (fma 99.0 k -10.0) k 1.0) a)))
         (if (<= t_1 2e-288)
           t_0
           (if (<= t_1 5e+291) t_2 (if (<= t_1 INFINITY) t_0 t_2)))))
      double code(double a, double k, double m) {
      	double t_0 = a / (k * k);
      	double t_1 = (pow(k, m) * a) / ((k * k) + ((10.0 * k) + 1.0));
      	double t_2 = fma(fma(99.0, k, -10.0), k, 1.0) * a;
      	double tmp;
      	if (t_1 <= 2e-288) {
      		tmp = t_0;
      	} else if (t_1 <= 5e+291) {
      		tmp = t_2;
      	} else if (t_1 <= ((double) INFINITY)) {
      		tmp = t_0;
      	} else {
      		tmp = t_2;
      	}
      	return tmp;
      }
      
      function code(a, k, m)
      	t_0 = Float64(a / Float64(k * k))
      	t_1 = Float64(Float64((k ^ m) * a) / Float64(Float64(k * k) + Float64(Float64(10.0 * k) + 1.0)))
      	t_2 = Float64(fma(fma(99.0, k, -10.0), k, 1.0) * a)
      	tmp = 0.0
      	if (t_1 <= 2e-288)
      		tmp = t_0;
      	elseif (t_1 <= 5e+291)
      		tmp = t_2;
      	elseif (t_1 <= Inf)
      		tmp = t_0;
      	else
      		tmp = t_2;
      	end
      	return tmp
      end
      
      code[a_, k_, m_] := Block[{t$95$0 = N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(N[(N[(99.0 * k + -10.0), $MachinePrecision] * k + 1.0), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[t$95$1, 2e-288], t$95$0, If[LessEqual[t$95$1, 5e+291], t$95$2, If[LessEqual[t$95$1, Infinity], t$95$0, t$95$2]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \frac{a}{k \cdot k}\\
      t_1 := \frac{{k}^{m} \cdot a}{k \cdot k + \left(10 \cdot k + 1\right)}\\
      t_2 := \mathsf{fma}\left(\mathsf{fma}\left(99, k, -10\right), k, 1\right) \cdot a\\
      \mathbf{if}\;t\_1 \leq 2 \cdot 10^{-288}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+291}:\\
      \;\;\;\;t\_2\\
      
      \mathbf{elif}\;t\_1 \leq \infty:\\
      \;\;\;\;t\_0\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_2\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k))) < 2.00000000000000012e-288 or 5.0000000000000001e291 < (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k))) < +inf.0

        1. Initial program 97.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 rewrites41.5%

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

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

          if 2.00000000000000012e-288 < (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k))) < 5.0000000000000001e291 or +inf.0 < (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k)))

          1. Initial program 49.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 3: 97.8% accurate, 0.5× speedup?

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

              1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 4: 97.2% accurate, 1.1× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := {k}^{m} \cdot a\\ \mathbf{if}\;m \leq -6.8 \cdot 10^{-6}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;m \leq 2.55 \cdot 10^{-6}:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(k, k, \mathsf{fma}\left(10, k, 1\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                (FPCore (a k m)
                 :precision binary64
                 (let* ((t_0 (* (pow k m) a)))
                   (if (<= m -6.8e-6)
                     t_0
                     (if (<= m 2.55e-6) (/ a (fma k k (fma 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 <= -6.8e-6) {
                		tmp = t_0;
                	} else if (m <= 2.55e-6) {
                		tmp = a / fma(k, k, fma(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 <= -6.8e-6)
                		tmp = t_0;
                	elseif (m <= 2.55e-6)
                		tmp = Float64(a / fma(k, k, fma(10.0, 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, -6.8e-6], t$95$0, If[LessEqual[m, 2.55e-6], N[(a / N[(k * k + N[(10.0 * k + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := {k}^{m} \cdot a\\
                \mathbf{if}\;m \leq -6.8 \cdot 10^{-6}:\\
                \;\;\;\;t\_0\\
                
                \mathbf{elif}\;m \leq 2.55 \cdot 10^{-6}:\\
                \;\;\;\;\frac{a}{\mathsf{fma}\left(k, k, \mathsf{fma}\left(10, k, 1\right)\right)}\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_0\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if m < -6.80000000000000012e-6 or 2.5500000000000001e-6 < m

                  1. Initial program 86.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.f64100.0

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

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

                  if -6.80000000000000012e-6 < m < 2.5500000000000001e-6

                  1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 5: 72.3% accurate, 3.0× speedup?

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

                    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 rewrites33.0%

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

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

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

                          \[\leadsto \frac{a - \frac{a}{k} \cdot \left(\frac{-99}{k} - -10\right)}{\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 rewrites67.0%

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

                          if -0.26000000000000001 < m < 1.1000000000000001

                          1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 1.1000000000000001 < m

                            1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto a + \color{blue}{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 rewrites30.1%

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

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

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

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

                              Alternative 6: 68.6% accurate, 3.2× speedup?

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

                                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 rewrites33.0%

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

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

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

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

                                    if -0.26000000000000001 < m < 1.1000000000000001

                                    1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if 1.1000000000000001 < m

                                      1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto a + \color{blue}{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 rewrites30.1%

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

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

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

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

                                        Alternative 7: 69.5% accurate, 3.7× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -0.26:\\ \;\;\;\;\frac{1}{\frac{k \cdot k}{a}}\\ \mathbf{elif}\;m \leq 1.1:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(k, k, \mathsf{fma}\left(10, k, 1\right)\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.26)
                                           (/ 1.0 (/ (* k k) a))
                                           (if (<= m 1.1) (/ a (fma k k (fma 10.0 k 1.0))) (* (* (* k a) k) 99.0))))
                                        double code(double a, double k, double m) {
                                        	double tmp;
                                        	if (m <= -0.26) {
                                        		tmp = 1.0 / ((k * k) / a);
                                        	} else if (m <= 1.1) {
                                        		tmp = a / fma(k, k, fma(10.0, k, 1.0));
                                        	} else {
                                        		tmp = ((k * a) * k) * 99.0;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        function code(a, k, m)
                                        	tmp = 0.0
                                        	if (m <= -0.26)
                                        		tmp = Float64(1.0 / Float64(Float64(k * k) / a));
                                        	elseif (m <= 1.1)
                                        		tmp = Float64(a / fma(k, k, fma(10.0, 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.26], N[(1.0 / N[(N[(k * k), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.1], N[(a / N[(k * k + N[(10.0 * k + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(k * a), $MachinePrecision] * k), $MachinePrecision] * 99.0), $MachinePrecision]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        \mathbf{if}\;m \leq -0.26:\\
                                        \;\;\;\;\frac{1}{\frac{k \cdot k}{a}}\\
                                        
                                        \mathbf{elif}\;m \leq 1.1:\\
                                        \;\;\;\;\frac{a}{\mathsf{fma}\left(k, k, \mathsf{fma}\left(10, k, 1\right)\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.26000000000000001

                                          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 rewrites33.0%

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

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

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

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

                                              if -0.26000000000000001 < m < 1.1000000000000001

                                              1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                if 1.1000000000000001 < m

                                                1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto a + \color{blue}{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 rewrites30.1%

                                                    \[\leadsto \mathsf{fma}\left(a \cdot \mathsf{fma}\left(-k, -99, -10\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 rewrites47.0%

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

                                                  Alternative 8: 69.1% accurate, 3.7× speedup?

                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -3.5 \cdot 10^{+14}:\\ \;\;\;\;\frac{a}{k \cdot k}\\ \mathbf{elif}\;m \leq 1.1:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(k, k, \mathsf{fma}\left(10, k, 1\right)\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 -3.5e+14)
                                                     (/ a (* k k))
                                                     (if (<= m 1.1) (/ a (fma k k (fma 10.0 k 1.0))) (* (* (* k a) k) 99.0))))
                                                  double code(double a, double k, double m) {
                                                  	double tmp;
                                                  	if (m <= -3.5e+14) {
                                                  		tmp = a / (k * k);
                                                  	} else if (m <= 1.1) {
                                                  		tmp = a / fma(k, k, fma(10.0, k, 1.0));
                                                  	} else {
                                                  		tmp = ((k * a) * k) * 99.0;
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  function code(a, k, m)
                                                  	tmp = 0.0
                                                  	if (m <= -3.5e+14)
                                                  		tmp = Float64(a / Float64(k * k));
                                                  	elseif (m <= 1.1)
                                                  		tmp = Float64(a / fma(k, k, fma(10.0, k, 1.0)));
                                                  	else
                                                  		tmp = Float64(Float64(Float64(k * a) * k) * 99.0);
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  code[a_, k_, m_] := If[LessEqual[m, -3.5e+14], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.1], N[(a / N[(k * k + N[(10.0 * k + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(k * a), $MachinePrecision] * k), $MachinePrecision] * 99.0), $MachinePrecision]]]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  \begin{array}{l}
                                                  \mathbf{if}\;m \leq -3.5 \cdot 10^{+14}:\\
                                                  \;\;\;\;\frac{a}{k \cdot k}\\
                                                  
                                                  \mathbf{elif}\;m \leq 1.1:\\
                                                  \;\;\;\;\frac{a}{\mathsf{fma}\left(k, k, \mathsf{fma}\left(10, k, 1\right)\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 < -3.5e14

                                                    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      if -3.5e14 < m < 1.1000000000000001

                                                      1. Initial program 93.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 rewrites89.9%

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

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

                                                        if 1.1000000000000001 < m

                                                        1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto a + \color{blue}{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 rewrites30.1%

                                                            \[\leadsto \mathsf{fma}\left(a \cdot \mathsf{fma}\left(-k, -99, -10\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 rewrites47.0%

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

                                                          Alternative 9: 53.4% accurate, 3.8× speedup?

                                                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{a}{k \cdot k}\\ \mathbf{if}\;m \leq -4.5 \cdot 10^{-17}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;m \leq -2.8 \cdot 10^{-182}:\\ \;\;\;\;1 \cdot a\\ \mathbf{elif}\;m \leq 1.1:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\left(\left(k \cdot a\right) \cdot k\right) \cdot 99\\ \end{array} \end{array} \]
                                                          (FPCore (a k m)
                                                           :precision binary64
                                                           (let* ((t_0 (/ a (* k k))))
                                                             (if (<= m -4.5e-17)
                                                               t_0
                                                               (if (<= m -2.8e-182)
                                                                 (* 1.0 a)
                                                                 (if (<= m 1.1) t_0 (* (* (* k a) k) 99.0))))))
                                                          double code(double a, double k, double m) {
                                                          	double t_0 = a / (k * k);
                                                          	double tmp;
                                                          	if (m <= -4.5e-17) {
                                                          		tmp = t_0;
                                                          	} else if (m <= -2.8e-182) {
                                                          		tmp = 1.0 * a;
                                                          	} else if (m <= 1.1) {
                                                          		tmp = t_0;
                                                          	} 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) :: t_0
                                                              real(8) :: tmp
                                                              t_0 = a / (k * k)
                                                              if (m <= (-4.5d-17)) then
                                                                  tmp = t_0
                                                              else if (m <= (-2.8d-182)) then
                                                                  tmp = 1.0d0 * a
                                                              else if (m <= 1.1d0) then
                                                                  tmp = t_0
                                                              else
                                                                  tmp = ((k * a) * k) * 99.0d0
                                                              end if
                                                              code = tmp
                                                          end function
                                                          
                                                          public static double code(double a, double k, double m) {
                                                          	double t_0 = a / (k * k);
                                                          	double tmp;
                                                          	if (m <= -4.5e-17) {
                                                          		tmp = t_0;
                                                          	} else if (m <= -2.8e-182) {
                                                          		tmp = 1.0 * a;
                                                          	} else if (m <= 1.1) {
                                                          		tmp = t_0;
                                                          	} else {
                                                          		tmp = ((k * a) * k) * 99.0;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          def code(a, k, m):
                                                          	t_0 = a / (k * k)
                                                          	tmp = 0
                                                          	if m <= -4.5e-17:
                                                          		tmp = t_0
                                                          	elif m <= -2.8e-182:
                                                          		tmp = 1.0 * a
                                                          	elif m <= 1.1:
                                                          		tmp = t_0
                                                          	else:
                                                          		tmp = ((k * a) * k) * 99.0
                                                          	return tmp
                                                          
                                                          function code(a, k, m)
                                                          	t_0 = Float64(a / Float64(k * k))
                                                          	tmp = 0.0
                                                          	if (m <= -4.5e-17)
                                                          		tmp = t_0;
                                                          	elseif (m <= -2.8e-182)
                                                          		tmp = Float64(1.0 * a);
                                                          	elseif (m <= 1.1)
                                                          		tmp = t_0;
                                                          	else
                                                          		tmp = Float64(Float64(Float64(k * a) * k) * 99.0);
                                                          	end
                                                          	return tmp
                                                          end
                                                          
                                                          function tmp_2 = code(a, k, m)
                                                          	t_0 = a / (k * k);
                                                          	tmp = 0.0;
                                                          	if (m <= -4.5e-17)
                                                          		tmp = t_0;
                                                          	elseif (m <= -2.8e-182)
                                                          		tmp = 1.0 * a;
                                                          	elseif (m <= 1.1)
                                                          		tmp = t_0;
                                                          	else
                                                          		tmp = ((k * a) * k) * 99.0;
                                                          	end
                                                          	tmp_2 = tmp;
                                                          end
                                                          
                                                          code[a_, k_, m_] := Block[{t$95$0 = N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[m, -4.5e-17], t$95$0, If[LessEqual[m, -2.8e-182], N[(1.0 * a), $MachinePrecision], If[LessEqual[m, 1.1], t$95$0, N[(N[(N[(k * a), $MachinePrecision] * k), $MachinePrecision] * 99.0), $MachinePrecision]]]]]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \begin{array}{l}
                                                          t_0 := \frac{a}{k \cdot k}\\
                                                          \mathbf{if}\;m \leq -4.5 \cdot 10^{-17}:\\
                                                          \;\;\;\;t\_0\\
                                                          
                                                          \mathbf{elif}\;m \leq -2.8 \cdot 10^{-182}:\\
                                                          \;\;\;\;1 \cdot a\\
                                                          
                                                          \mathbf{elif}\;m \leq 1.1:\\
                                                          \;\;\;\;t\_0\\
                                                          
                                                          \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 < -4.49999999999999978e-17 or -2.79999999999999993e-182 < m < 1.1000000000000001

                                                            1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              if -4.49999999999999978e-17 < m < -2.79999999999999993e-182

                                                              1. Initial program 95.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.f6472.4

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

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

                                                                  \[\leadsto 1 \cdot a \]

                                                                if 1.1000000000000001 < m

                                                                1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  \[\leadsto a + \color{blue}{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 rewrites30.1%

                                                                    \[\leadsto \mathsf{fma}\left(a \cdot \mathsf{fma}\left(-k, -99, -10\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 rewrites47.0%

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

                                                                  Alternative 10: 69.1% accurate, 4.1× speedup?

                                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -3.5 \cdot 10^{+14}:\\ \;\;\;\;\frac{a}{k \cdot k}\\ \mathbf{elif}\;m \leq 1.1:\\ \;\;\;\;\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 -3.5e+14)
                                                                     (/ a (* k k))
                                                                     (if (<= m 1.1) (/ 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 <= -3.5e+14) {
                                                                  		tmp = a / (k * k);
                                                                  	} else if (m <= 1.1) {
                                                                  		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 <= -3.5e+14)
                                                                  		tmp = Float64(a / Float64(k * k));
                                                                  	elseif (m <= 1.1)
                                                                  		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, -3.5e+14], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.1], 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 -3.5 \cdot 10^{+14}:\\
                                                                  \;\;\;\;\frac{a}{k \cdot k}\\
                                                                  
                                                                  \mathbf{elif}\;m \leq 1.1:\\
                                                                  \;\;\;\;\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 < -3.5e14

                                                                    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      if -3.5e14 < m < 1.1000000000000001

                                                                      1. Initial program 93.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 rewrites89.9%

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

                                                                      if 1.1000000000000001 < m

                                                                      1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        \[\leadsto a + \color{blue}{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 rewrites30.1%

                                                                          \[\leadsto \mathsf{fma}\left(a \cdot \mathsf{fma}\left(-k, -99, -10\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 rewrites47.0%

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

                                                                        Alternative 11: 68.6% accurate, 4.5× speedup?

                                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -0.28:\\ \;\;\;\;\frac{a}{k \cdot k}\\ \mathbf{elif}\;m \leq 1.1:\\ \;\;\;\;\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.28)
                                                                           (/ a (* k k))
                                                                           (if (<= m 1.1) (/ a (fma k k 1.0)) (* (* (* k a) k) 99.0))))
                                                                        double code(double a, double k, double m) {
                                                                        	double tmp;
                                                                        	if (m <= -0.28) {
                                                                        		tmp = a / (k * k);
                                                                        	} else if (m <= 1.1) {
                                                                        		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.28)
                                                                        		tmp = Float64(a / Float64(k * k));
                                                                        	elseif (m <= 1.1)
                                                                        		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.28], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.1], 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.28:\\
                                                                        \;\;\;\;\frac{a}{k \cdot k}\\
                                                                        
                                                                        \mathbf{elif}\;m \leq 1.1:\\
                                                                        \;\;\;\;\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.28000000000000003

                                                                          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 rewrites33.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 rewrites59.4%

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

                                                                            if -0.28000000000000003 < m < 1.1000000000000001

                                                                            1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                if 1.1000000000000001 < m

                                                                                1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  \[\leadsto a + \color{blue}{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 rewrites30.1%

                                                                                    \[\leadsto \mathsf{fma}\left(a \cdot \mathsf{fma}\left(-k, -99, -10\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 rewrites47.0%

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

                                                                                  Alternative 12: 36.4% accurate, 6.1× speedup?

                                                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq 0.58:\\ \;\;\;\;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.58) (* 1.0 a) (* (* (* k a) k) 99.0)))
                                                                                  double code(double a, double k, double m) {
                                                                                  	double tmp;
                                                                                  	if (m <= 0.58) {
                                                                                  		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.58d0) 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.58) {
                                                                                  		tmp = 1.0 * a;
                                                                                  	} else {
                                                                                  		tmp = ((k * a) * k) * 99.0;
                                                                                  	}
                                                                                  	return tmp;
                                                                                  }
                                                                                  
                                                                                  def code(a, k, m):
                                                                                  	tmp = 0
                                                                                  	if m <= 0.58:
                                                                                  		tmp = 1.0 * a
                                                                                  	else:
                                                                                  		tmp = ((k * a) * k) * 99.0
                                                                                  	return tmp
                                                                                  
                                                                                  function code(a, k, m)
                                                                                  	tmp = 0.0
                                                                                  	if (m <= 0.58)
                                                                                  		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.58)
                                                                                  		tmp = 1.0 * a;
                                                                                  	else
                                                                                  		tmp = ((k * a) * k) * 99.0;
                                                                                  	end
                                                                                  	tmp_2 = tmp;
                                                                                  end
                                                                                  
                                                                                  code[a_, k_, m_] := If[LessEqual[m, 0.58], 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.58:\\
                                                                                  \;\;\;\;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.57999999999999996

                                                                                    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 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.5

                                                                                        \[\leadsto \color{blue}{{k}^{m}} \cdot a \]
                                                                                    5. Applied rewrites74.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 rewrites25.7%

                                                                                        \[\leadsto 1 \cdot a \]

                                                                                      if 0.57999999999999996 < m

                                                                                      1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                        \[\leadsto a + \color{blue}{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 rewrites30.1%

                                                                                          \[\leadsto \mathsf{fma}\left(a \cdot \mathsf{fma}\left(-k, -99, -10\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 rewrites47.0%

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

                                                                                        Alternative 13: 24.9% accurate, 7.9× speedup?

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

                                                                                          1. Initial program 94.4%

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

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

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

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

                                                                                              \[\leadsto \color{blue}{{k}^{m}} \cdot a \]
                                                                                          5. Applied rewrites75.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 rewrites24.8%

                                                                                              \[\leadsto 1 \cdot a \]

                                                                                            if 3.4999999999999999e40 < 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 m around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                              Alternative 14: 20.4% 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.7%

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

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

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

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

                                                                                                Reproduce

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