Falkner and Boettcher, Appendix A

Percentage Accurate: 90.4% → 98.0%
Time: 8.9s
Alternatives: 15
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 15 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.4% 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: 98.0% accurate, 0.4× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{a\_m \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \leq 5 \cdot 10^{+290}:\\ \;\;\;\;{k}^{m} \cdot \frac{a\_m}{\mathsf{fma}\left(k + 10, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{1}{{k}^{m} \cdot a\_m}\right)}^{-1}\\ \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) a)
(FPCore (a_s a_m k m)
 :precision binary64
 (*
  a_s
  (if (<= (/ (* a_m (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))) 5e+290)
    (* (pow k m) (/ a_m (fma (+ k 10.0) k 1.0)))
    (pow (/ 1.0 (* (pow k m) a_m)) -1.0))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
double code(double a_s, double a_m, double k, double m) {
	double tmp;
	if (((a_m * pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k))) <= 5e+290) {
		tmp = pow(k, m) * (a_m / fma((k + 10.0), k, 1.0));
	} else {
		tmp = pow((1.0 / (pow(k, m) * a_m)), -1.0);
	}
	return a_s * tmp;
}
a\_m = abs(a)
a\_s = copysign(1.0, a)
function code(a_s, a_m, k, m)
	tmp = 0.0
	if (Float64(Float64(a_m * (k ^ m)) / Float64(Float64(1.0 + Float64(10.0 * k)) + Float64(k * k))) <= 5e+290)
		tmp = Float64((k ^ m) * Float64(a_m / fma(Float64(k + 10.0), k, 1.0)));
	else
		tmp = Float64(1.0 / Float64((k ^ m) * a_m)) ^ -1.0;
	end
	return Float64(a_s * tmp)
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[N[(N[(a$95$m * N[Power[k, m], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 + N[(10.0 * k), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e+290], N[(N[Power[k, m], $MachinePrecision] * N[(a$95$m / N[(N[(k + 10.0), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(1.0 / N[(N[Power[k, m], $MachinePrecision] * a$95$m), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)

\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{a\_m \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \leq 5 \cdot 10^{+290}:\\
\;\;\;\;{k}^{m} \cdot \frac{a\_m}{\mathsf{fma}\left(k + 10, k, 1\right)}\\

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


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

    1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999998e290 < (/.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 63.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{\color{blue}{1}}{{k}^{m} \cdot a}} \]
    7. Recombined 2 regimes into one program.
    8. Final simplification96.5%

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

    Alternative 2: 75.4% accurate, 0.2× speedup?

    \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ \begin{array}{l} t_0 := \frac{a\_m \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq 0:\\ \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(\left(-\mathsf{fma}\left(k, k, -100\right)\right) \cdot \frac{\frac{-10 - \frac{\frac{1000}{k} + 100}{k}}{k} - 1}{k}, k, 1\right)}\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+307}:\\ \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\frac{\mathsf{fma}\left({k}^{-1}, \frac{99}{k} - 10, 1\right)}{k \cdot k} \cdot a\_m\\ \mathbf{else}:\\ \;\;\;\;\left(\left(k \cdot k\right) \cdot a\_m\right) \cdot 99\\ \end{array} \end{array} \end{array} \]
    a\_m = (fabs.f64 a)
    a\_s = (copysign.f64 #s(literal 1 binary64) a)
    (FPCore (a_s a_m k m)
     :precision binary64
     (let* ((t_0 (/ (* a_m (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k)))))
       (*
        a_s
        (if (<= t_0 0.0)
          (/
           a_m
           (fma
            (*
             (- (fma k k -100.0))
             (/ (- (/ (- -10.0 (/ (+ (/ 1000.0 k) 100.0) k)) k) 1.0) k))
            k
            1.0))
          (if (<= t_0 2e+307)
            (/ a_m (fma (+ 10.0 k) k 1.0))
            (if (<= t_0 INFINITY)
              (* (/ (fma (pow k -1.0) (- (/ 99.0 k) 10.0) 1.0) (* k k)) a_m)
              (* (* (* k k) a_m) 99.0)))))))
    a\_m = fabs(a);
    a\_s = copysign(1.0, a);
    double code(double a_s, double a_m, double k, double m) {
    	double t_0 = (a_m * pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k));
    	double tmp;
    	if (t_0 <= 0.0) {
    		tmp = a_m / fma((-fma(k, k, -100.0) * ((((-10.0 - (((1000.0 / k) + 100.0) / k)) / k) - 1.0) / k)), k, 1.0);
    	} else if (t_0 <= 2e+307) {
    		tmp = a_m / fma((10.0 + k), k, 1.0);
    	} else if (t_0 <= ((double) INFINITY)) {
    		tmp = (fma(pow(k, -1.0), ((99.0 / k) - 10.0), 1.0) / (k * k)) * a_m;
    	} else {
    		tmp = ((k * k) * a_m) * 99.0;
    	}
    	return a_s * tmp;
    }
    
    a\_m = abs(a)
    a\_s = copysign(1.0, a)
    function code(a_s, a_m, k, m)
    	t_0 = Float64(Float64(a_m * (k ^ m)) / Float64(Float64(1.0 + Float64(10.0 * k)) + Float64(k * k)))
    	tmp = 0.0
    	if (t_0 <= 0.0)
    		tmp = Float64(a_m / fma(Float64(Float64(-fma(k, k, -100.0)) * Float64(Float64(Float64(Float64(-10.0 - Float64(Float64(Float64(1000.0 / k) + 100.0) / k)) / k) - 1.0) / k)), k, 1.0));
    	elseif (t_0 <= 2e+307)
    		tmp = Float64(a_m / fma(Float64(10.0 + k), k, 1.0));
    	elseif (t_0 <= Inf)
    		tmp = Float64(Float64(fma((k ^ -1.0), Float64(Float64(99.0 / k) - 10.0), 1.0) / Float64(k * k)) * a_m);
    	else
    		tmp = Float64(Float64(Float64(k * k) * a_m) * 99.0);
    	end
    	return Float64(a_s * tmp)
    end
    
    a\_m = N[Abs[a], $MachinePrecision]
    a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[a$95$s_, a$95$m_, k_, m_] := Block[{t$95$0 = N[(N[(a$95$m * N[Power[k, m], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 + N[(10.0 * k), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[t$95$0, 0.0], N[(a$95$m / N[(N[((-N[(k * k + -100.0), $MachinePrecision]) * N[(N[(N[(N[(-10.0 - N[(N[(N[(1000.0 / k), $MachinePrecision] + 100.0), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] - 1.0), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+307], N[(a$95$m / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(N[(N[(N[Power[k, -1.0], $MachinePrecision] * N[(N[(99.0 / k), $MachinePrecision] - 10.0), $MachinePrecision] + 1.0), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * a$95$m), $MachinePrecision], N[(N[(N[(k * k), $MachinePrecision] * a$95$m), $MachinePrecision] * 99.0), $MachinePrecision]]]]), $MachinePrecision]]
    
    \begin{array}{l}
    a\_m = \left|a\right|
    \\
    a\_s = \mathsf{copysign}\left(1, a\right)
    
    \\
    \begin{array}{l}
    t_0 := \frac{a\_m \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}\\
    a\_s \cdot \begin{array}{l}
    \mathbf{if}\;t\_0 \leq 0:\\
    \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(\left(-\mathsf{fma}\left(k, k, -100\right)\right) \cdot \frac{\frac{-10 - \frac{\frac{1000}{k} + 100}{k}}{k} - 1}{k}, k, 1\right)}\\
    
    \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+307}:\\
    \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10 + k, k, 1\right)}\\
    
    \mathbf{elif}\;t\_0 \leq \infty:\\
    \;\;\;\;\frac{\mathsf{fma}\left({k}^{-1}, \frac{99}{k} - 10, 1\right)}{k \cdot k} \cdot a\_m\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\left(k \cdot k\right) \cdot a\_m\right) \cdot 99\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k))) < 0.0

      1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 3: 98.0% accurate, 0.5× speedup?

              \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{a\_m \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \leq 4 \cdot 10^{+280}:\\ \;\;\;\;{k}^{m} \cdot \frac{a\_m}{\mathsf{fma}\left(k + 10, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;{k}^{m} \cdot a\_m\\ \end{array} \end{array} \]
              a\_m = (fabs.f64 a)
              a\_s = (copysign.f64 #s(literal 1 binary64) a)
              (FPCore (a_s a_m k m)
               :precision binary64
               (*
                a_s
                (if (<= (/ (* a_m (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))) 4e+280)
                  (* (pow k m) (/ a_m (fma (+ k 10.0) k 1.0)))
                  (* (pow k m) a_m))))
              a\_m = fabs(a);
              a\_s = copysign(1.0, a);
              double code(double a_s, double a_m, double k, double m) {
              	double tmp;
              	if (((a_m * pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k))) <= 4e+280) {
              		tmp = pow(k, m) * (a_m / fma((k + 10.0), k, 1.0));
              	} else {
              		tmp = pow(k, m) * a_m;
              	}
              	return a_s * tmp;
              }
              
              a\_m = abs(a)
              a\_s = copysign(1.0, a)
              function code(a_s, a_m, k, m)
              	tmp = 0.0
              	if (Float64(Float64(a_m * (k ^ m)) / Float64(Float64(1.0 + Float64(10.0 * k)) + Float64(k * k))) <= 4e+280)
              		tmp = Float64((k ^ m) * Float64(a_m / fma(Float64(k + 10.0), k, 1.0)));
              	else
              		tmp = Float64((k ^ m) * a_m);
              	end
              	return Float64(a_s * tmp)
              end
              
              a\_m = N[Abs[a], $MachinePrecision]
              a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
              code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[N[(N[(a$95$m * N[Power[k, m], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 + N[(10.0 * k), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 4e+280], N[(N[Power[k, m], $MachinePrecision] * N[(a$95$m / N[(N[(k + 10.0), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[k, m], $MachinePrecision] * a$95$m), $MachinePrecision]]), $MachinePrecision]
              
              \begin{array}{l}
              a\_m = \left|a\right|
              \\
              a\_s = \mathsf{copysign}\left(1, a\right)
              
              \\
              a\_s \cdot \begin{array}{l}
              \mathbf{if}\;\frac{a\_m \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \leq 4 \cdot 10^{+280}:\\
              \;\;\;\;{k}^{m} \cdot \frac{a\_m}{\mathsf{fma}\left(k + 10, k, 1\right)}\\
              
              \mathbf{else}:\\
              \;\;\;\;{k}^{m} \cdot a\_m\\
              
              
              \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))) < 4.0000000000000001e280

                1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 4.0000000000000001e280 < (/.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 63.1%

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 4: 97.9% accurate, 0.5× speedup?

              \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{a\_m \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \leq \infty:\\ \;\;\;\;\frac{{k}^{m}}{\mathsf{fma}\left(k + 10, k, 1\right)} \cdot a\_m\\ \mathbf{else}:\\ \;\;\;\;\left(\left(k \cdot k\right) \cdot a\_m\right) \cdot 99\\ \end{array} \end{array} \]
              a\_m = (fabs.f64 a)
              a\_s = (copysign.f64 #s(literal 1 binary64) a)
              (FPCore (a_s a_m k m)
               :precision binary64
               (*
                a_s
                (if (<= (/ (* a_m (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))) INFINITY)
                  (* (/ (pow k m) (fma (+ k 10.0) k 1.0)) a_m)
                  (* (* (* k k) a_m) 99.0))))
              a\_m = fabs(a);
              a\_s = copysign(1.0, a);
              double code(double a_s, double a_m, double k, double m) {
              	double tmp;
              	if (((a_m * pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k))) <= ((double) INFINITY)) {
              		tmp = (pow(k, m) / fma((k + 10.0), k, 1.0)) * a_m;
              	} else {
              		tmp = ((k * k) * a_m) * 99.0;
              	}
              	return a_s * tmp;
              }
              
              a\_m = abs(a)
              a\_s = copysign(1.0, a)
              function code(a_s, a_m, k, m)
              	tmp = 0.0
              	if (Float64(Float64(a_m * (k ^ m)) / Float64(Float64(1.0 + Float64(10.0 * k)) + Float64(k * k))) <= Inf)
              		tmp = Float64(Float64((k ^ m) / fma(Float64(k + 10.0), k, 1.0)) * a_m);
              	else
              		tmp = Float64(Float64(Float64(k * k) * a_m) * 99.0);
              	end
              	return Float64(a_s * tmp)
              end
              
              a\_m = N[Abs[a], $MachinePrecision]
              a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
              code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[N[(N[(a$95$m * N[Power[k, m], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 + N[(10.0 * k), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[Power[k, m], $MachinePrecision] / N[(N[(k + 10.0), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision] * a$95$m), $MachinePrecision], N[(N[(N[(k * k), $MachinePrecision] * a$95$m), $MachinePrecision] * 99.0), $MachinePrecision]]), $MachinePrecision]
              
              \begin{array}{l}
              a\_m = \left|a\right|
              \\
              a\_s = \mathsf{copysign}\left(1, a\right)
              
              \\
              a\_s \cdot \begin{array}{l}
              \mathbf{if}\;\frac{a\_m \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \leq \infty:\\
              \;\;\;\;\frac{{k}^{m}}{\mathsf{fma}\left(k + 10, k, 1\right)} \cdot a\_m\\
              
              \mathbf{else}:\\
              \;\;\;\;\left(\left(k \cdot k\right) \cdot a\_m\right) \cdot 99\\
              
              
              \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 98.0%

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

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

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

                    \[\leadsto \color{blue}{a \cdot \frac{{k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}} \]
                  4. *-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-/.f6498.0

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

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

                  \[\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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 5: 74.1% accurate, 0.9× speedup?

                  \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -9.2 \cdot 10^{+16}:\\ \;\;\;\;\frac{\mathsf{fma}\left({k}^{-1}, \frac{99}{k} - 10, 1\right)}{k \cdot k} \cdot a\_m\\ \mathbf{elif}\;m \leq 1.35:\\ \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(k \cdot k\right) \cdot a\_m\right) \cdot 99\\ \end{array} \end{array} \]
                  a\_m = (fabs.f64 a)
                  a\_s = (copysign.f64 #s(literal 1 binary64) a)
                  (FPCore (a_s a_m k m)
                   :precision binary64
                   (*
                    a_s
                    (if (<= m -9.2e+16)
                      (* (/ (fma (pow k -1.0) (- (/ 99.0 k) 10.0) 1.0) (* k k)) a_m)
                      (if (<= m 1.35) (/ a_m (fma (+ 10.0 k) k 1.0)) (* (* (* k k) a_m) 99.0)))))
                  a\_m = fabs(a);
                  a\_s = copysign(1.0, a);
                  double code(double a_s, double a_m, double k, double m) {
                  	double tmp;
                  	if (m <= -9.2e+16) {
                  		tmp = (fma(pow(k, -1.0), ((99.0 / k) - 10.0), 1.0) / (k * k)) * a_m;
                  	} else if (m <= 1.35) {
                  		tmp = a_m / fma((10.0 + k), k, 1.0);
                  	} else {
                  		tmp = ((k * k) * a_m) * 99.0;
                  	}
                  	return a_s * tmp;
                  }
                  
                  a\_m = abs(a)
                  a\_s = copysign(1.0, a)
                  function code(a_s, a_m, k, m)
                  	tmp = 0.0
                  	if (m <= -9.2e+16)
                  		tmp = Float64(Float64(fma((k ^ -1.0), Float64(Float64(99.0 / k) - 10.0), 1.0) / Float64(k * k)) * a_m);
                  	elseif (m <= 1.35)
                  		tmp = Float64(a_m / fma(Float64(10.0 + k), k, 1.0));
                  	else
                  		tmp = Float64(Float64(Float64(k * k) * a_m) * 99.0);
                  	end
                  	return Float64(a_s * tmp)
                  end
                  
                  a\_m = N[Abs[a], $MachinePrecision]
                  a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                  code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, -9.2e+16], N[(N[(N[(N[Power[k, -1.0], $MachinePrecision] * N[(N[(99.0 / k), $MachinePrecision] - 10.0), $MachinePrecision] + 1.0), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * a$95$m), $MachinePrecision], If[LessEqual[m, 1.35], N[(a$95$m / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(k * k), $MachinePrecision] * a$95$m), $MachinePrecision] * 99.0), $MachinePrecision]]]), $MachinePrecision]
                  
                  \begin{array}{l}
                  a\_m = \left|a\right|
                  \\
                  a\_s = \mathsf{copysign}\left(1, a\right)
                  
                  \\
                  a\_s \cdot \begin{array}{l}
                  \mathbf{if}\;m \leq -9.2 \cdot 10^{+16}:\\
                  \;\;\;\;\frac{\mathsf{fma}\left({k}^{-1}, \frac{99}{k} - 10, 1\right)}{k \cdot k} \cdot a\_m\\
                  
                  \mathbf{elif}\;m \leq 1.35:\\
                  \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10 + k, k, 1\right)}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left(\left(k \cdot k\right) \cdot a\_m\right) \cdot 99\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if m < -9.2e16

                    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -9.2e16 < m < 1.3500000000000001

                      1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 1.3500000000000001 < m

                      1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 6: 97.4% accurate, 1.1× speedup?

                        \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -9.5 \cdot 10^{-6} \lor \neg \left(m \leq 0.000116\right):\\ \;\;\;\;{k}^{m} \cdot a\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \end{array} \end{array} \]
                        a\_m = (fabs.f64 a)
                        a\_s = (copysign.f64 #s(literal 1 binary64) a)
                        (FPCore (a_s a_m k m)
                         :precision binary64
                         (*
                          a_s
                          (if (or (<= m -9.5e-6) (not (<= m 0.000116)))
                            (* (pow k m) a_m)
                            (/ a_m (fma (+ 10.0 k) k 1.0)))))
                        a\_m = fabs(a);
                        a\_s = copysign(1.0, a);
                        double code(double a_s, double a_m, double k, double m) {
                        	double tmp;
                        	if ((m <= -9.5e-6) || !(m <= 0.000116)) {
                        		tmp = pow(k, m) * a_m;
                        	} else {
                        		tmp = a_m / fma((10.0 + k), k, 1.0);
                        	}
                        	return a_s * tmp;
                        }
                        
                        a\_m = abs(a)
                        a\_s = copysign(1.0, a)
                        function code(a_s, a_m, k, m)
                        	tmp = 0.0
                        	if ((m <= -9.5e-6) || !(m <= 0.000116))
                        		tmp = Float64((k ^ m) * a_m);
                        	else
                        		tmp = Float64(a_m / fma(Float64(10.0 + k), k, 1.0));
                        	end
                        	return Float64(a_s * tmp)
                        end
                        
                        a\_m = N[Abs[a], $MachinePrecision]
                        a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                        code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[Or[LessEqual[m, -9.5e-6], N[Not[LessEqual[m, 0.000116]], $MachinePrecision]], N[(N[Power[k, m], $MachinePrecision] * a$95$m), $MachinePrecision], N[(a$95$m / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                        
                        \begin{array}{l}
                        a\_m = \left|a\right|
                        \\
                        a\_s = \mathsf{copysign}\left(1, a\right)
                        
                        \\
                        a\_s \cdot \begin{array}{l}
                        \mathbf{if}\;m \leq -9.5 \cdot 10^{-6} \lor \neg \left(m \leq 0.000116\right):\\
                        \;\;\;\;{k}^{m} \cdot a\_m\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10 + k, k, 1\right)}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if m < -9.5000000000000005e-6 or 1.16e-4 < m

                          1. Initial program 91.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -9.5000000000000005e-6 < m < 1.16e-4

                          1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 7: 73.4% accurate, 2.4× speedup?

                        \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -9.2 \cdot 10^{+16}:\\ \;\;\;\;\frac{a\_m - \frac{a\_m}{k} \cdot \left(\frac{-99}{k} - -10\right)}{k \cdot k}\\ \mathbf{elif}\;m \leq 1.35:\\ \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(k \cdot k\right) \cdot a\_m\right) \cdot 99\\ \end{array} \end{array} \]
                        a\_m = (fabs.f64 a)
                        a\_s = (copysign.f64 #s(literal 1 binary64) a)
                        (FPCore (a_s a_m k m)
                         :precision binary64
                         (*
                          a_s
                          (if (<= m -9.2e+16)
                            (/ (- a_m (* (/ a_m k) (- (/ -99.0 k) -10.0))) (* k k))
                            (if (<= m 1.35) (/ a_m (fma (+ 10.0 k) k 1.0)) (* (* (* k k) a_m) 99.0)))))
                        a\_m = fabs(a);
                        a\_s = copysign(1.0, a);
                        double code(double a_s, double a_m, double k, double m) {
                        	double tmp;
                        	if (m <= -9.2e+16) {
                        		tmp = (a_m - ((a_m / k) * ((-99.0 / k) - -10.0))) / (k * k);
                        	} else if (m <= 1.35) {
                        		tmp = a_m / fma((10.0 + k), k, 1.0);
                        	} else {
                        		tmp = ((k * k) * a_m) * 99.0;
                        	}
                        	return a_s * tmp;
                        }
                        
                        a\_m = abs(a)
                        a\_s = copysign(1.0, a)
                        function code(a_s, a_m, k, m)
                        	tmp = 0.0
                        	if (m <= -9.2e+16)
                        		tmp = Float64(Float64(a_m - Float64(Float64(a_m / k) * Float64(Float64(-99.0 / k) - -10.0))) / Float64(k * k));
                        	elseif (m <= 1.35)
                        		tmp = Float64(a_m / fma(Float64(10.0 + k), k, 1.0));
                        	else
                        		tmp = Float64(Float64(Float64(k * k) * a_m) * 99.0);
                        	end
                        	return Float64(a_s * tmp)
                        end
                        
                        a\_m = N[Abs[a], $MachinePrecision]
                        a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                        code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, -9.2e+16], N[(N[(a$95$m - N[(N[(a$95$m / k), $MachinePrecision] * N[(N[(-99.0 / k), $MachinePrecision] - -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.35], N[(a$95$m / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(k * k), $MachinePrecision] * a$95$m), $MachinePrecision] * 99.0), $MachinePrecision]]]), $MachinePrecision]
                        
                        \begin{array}{l}
                        a\_m = \left|a\right|
                        \\
                        a\_s = \mathsf{copysign}\left(1, a\right)
                        
                        \\
                        a\_s \cdot \begin{array}{l}
                        \mathbf{if}\;m \leq -9.2 \cdot 10^{+16}:\\
                        \;\;\;\;\frac{a\_m - \frac{a\_m}{k} \cdot \left(\frac{-99}{k} - -10\right)}{k \cdot k}\\
                        
                        \mathbf{elif}\;m \leq 1.35:\\
                        \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10 + k, k, 1\right)}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\left(\left(k \cdot k\right) \cdot a\_m\right) \cdot 99\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if m < -9.2e16

                          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if -9.2e16 < m < 1.3500000000000001

                            1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 1.3500000000000001 < m

                            1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 8: 68.7% accurate, 2.4× speedup?

                              \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -1 \cdot 10^{+23}:\\ \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(\left(-\mathsf{fma}\left(k, k, -100\right)\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0001, k, 0.001\right), k, 0.01\right), k, 0.1\right), k, 1\right)}\\ \mathbf{elif}\;m \leq 1.35:\\ \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(k \cdot k\right) \cdot a\_m\right) \cdot 99\\ \end{array} \end{array} \]
                              a\_m = (fabs.f64 a)
                              a\_s = (copysign.f64 #s(literal 1 binary64) a)
                              (FPCore (a_s a_m k m)
                               :precision binary64
                               (*
                                a_s
                                (if (<= m -1e+23)
                                  (/
                                   a_m
                                   (fma
                                    (* (- (fma k k -100.0)) (fma (fma (fma 0.0001 k 0.001) k 0.01) k 0.1))
                                    k
                                    1.0))
                                  (if (<= m 1.35) (/ a_m (fma (+ 10.0 k) k 1.0)) (* (* (* k k) a_m) 99.0)))))
                              a\_m = fabs(a);
                              a\_s = copysign(1.0, a);
                              double code(double a_s, double a_m, double k, double m) {
                              	double tmp;
                              	if (m <= -1e+23) {
                              		tmp = a_m / fma((-fma(k, k, -100.0) * fma(fma(fma(0.0001, k, 0.001), k, 0.01), k, 0.1)), k, 1.0);
                              	} else if (m <= 1.35) {
                              		tmp = a_m / fma((10.0 + k), k, 1.0);
                              	} else {
                              		tmp = ((k * k) * a_m) * 99.0;
                              	}
                              	return a_s * tmp;
                              }
                              
                              a\_m = abs(a)
                              a\_s = copysign(1.0, a)
                              function code(a_s, a_m, k, m)
                              	tmp = 0.0
                              	if (m <= -1e+23)
                              		tmp = Float64(a_m / fma(Float64(Float64(-fma(k, k, -100.0)) * fma(fma(fma(0.0001, k, 0.001), k, 0.01), k, 0.1)), k, 1.0));
                              	elseif (m <= 1.35)
                              		tmp = Float64(a_m / fma(Float64(10.0 + k), k, 1.0));
                              	else
                              		tmp = Float64(Float64(Float64(k * k) * a_m) * 99.0);
                              	end
                              	return Float64(a_s * tmp)
                              end
                              
                              a\_m = N[Abs[a], $MachinePrecision]
                              a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                              code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, -1e+23], N[(a$95$m / N[(N[((-N[(k * k + -100.0), $MachinePrecision]) * N[(N[(N[(0.0001 * k + 0.001), $MachinePrecision] * k + 0.01), $MachinePrecision] * k + 0.1), $MachinePrecision]), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.35], N[(a$95$m / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(k * k), $MachinePrecision] * a$95$m), $MachinePrecision] * 99.0), $MachinePrecision]]]), $MachinePrecision]
                              
                              \begin{array}{l}
                              a\_m = \left|a\right|
                              \\
                              a\_s = \mathsf{copysign}\left(1, a\right)
                              
                              \\
                              a\_s \cdot \begin{array}{l}
                              \mathbf{if}\;m \leq -1 \cdot 10^{+23}:\\
                              \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(\left(-\mathsf{fma}\left(k, k, -100\right)\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0001, k, 0.001\right), k, 0.01\right), k, 0.1\right), k, 1\right)}\\
                              
                              \mathbf{elif}\;m \leq 1.35:\\
                              \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10 + k, k, 1\right)}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\left(\left(k \cdot k\right) \cdot a\_m\right) \cdot 99\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if m < -9.9999999999999992e22

                                1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if -9.9999999999999992e22 < m < 1.3500000000000001

                                    1. Initial program 95.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if 1.3500000000000001 < m

                                    1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      Alternative 9: 71.7% accurate, 4.1× speedup?

                                      \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -9.2 \cdot 10^{+16}:\\ \;\;\;\;\frac{a\_m}{k \cdot k}\\ \mathbf{elif}\;m \leq 1.35:\\ \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(k \cdot k\right) \cdot a\_m\right) \cdot 99\\ \end{array} \end{array} \]
                                      a\_m = (fabs.f64 a)
                                      a\_s = (copysign.f64 #s(literal 1 binary64) a)
                                      (FPCore (a_s a_m k m)
                                       :precision binary64
                                       (*
                                        a_s
                                        (if (<= m -9.2e+16)
                                          (/ a_m (* k k))
                                          (if (<= m 1.35) (/ a_m (fma (+ 10.0 k) k 1.0)) (* (* (* k k) a_m) 99.0)))))
                                      a\_m = fabs(a);
                                      a\_s = copysign(1.0, a);
                                      double code(double a_s, double a_m, double k, double m) {
                                      	double tmp;
                                      	if (m <= -9.2e+16) {
                                      		tmp = a_m / (k * k);
                                      	} else if (m <= 1.35) {
                                      		tmp = a_m / fma((10.0 + k), k, 1.0);
                                      	} else {
                                      		tmp = ((k * k) * a_m) * 99.0;
                                      	}
                                      	return a_s * tmp;
                                      }
                                      
                                      a\_m = abs(a)
                                      a\_s = copysign(1.0, a)
                                      function code(a_s, a_m, k, m)
                                      	tmp = 0.0
                                      	if (m <= -9.2e+16)
                                      		tmp = Float64(a_m / Float64(k * k));
                                      	elseif (m <= 1.35)
                                      		tmp = Float64(a_m / fma(Float64(10.0 + k), k, 1.0));
                                      	else
                                      		tmp = Float64(Float64(Float64(k * k) * a_m) * 99.0);
                                      	end
                                      	return Float64(a_s * tmp)
                                      end
                                      
                                      a\_m = N[Abs[a], $MachinePrecision]
                                      a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                      code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, -9.2e+16], N[(a$95$m / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.35], N[(a$95$m / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(k * k), $MachinePrecision] * a$95$m), $MachinePrecision] * 99.0), $MachinePrecision]]]), $MachinePrecision]
                                      
                                      \begin{array}{l}
                                      a\_m = \left|a\right|
                                      \\
                                      a\_s = \mathsf{copysign}\left(1, a\right)
                                      
                                      \\
                                      a\_s \cdot \begin{array}{l}
                                      \mathbf{if}\;m \leq -9.2 \cdot 10^{+16}:\\
                                      \;\;\;\;\frac{a\_m}{k \cdot k}\\
                                      
                                      \mathbf{elif}\;m \leq 1.35:\\
                                      \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10 + k, k, 1\right)}\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\left(\left(k \cdot k\right) \cdot a\_m\right) \cdot 99\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 3 regimes
                                      2. if m < -9.2e16

                                        1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          if -9.2e16 < m < 1.3500000000000001

                                          1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          if 1.3500000000000001 < m

                                          1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            Alternative 10: 61.2% accurate, 4.5× speedup?

                                            \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -8.5 \cdot 10^{-27}:\\ \;\;\;\;\frac{a\_m}{k \cdot k}\\ \mathbf{elif}\;m \leq 1.35:\\ \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(k \cdot k\right) \cdot a\_m\right) \cdot 99\\ \end{array} \end{array} \]
                                            a\_m = (fabs.f64 a)
                                            a\_s = (copysign.f64 #s(literal 1 binary64) a)
                                            (FPCore (a_s a_m k m)
                                             :precision binary64
                                             (*
                                              a_s
                                              (if (<= m -8.5e-27)
                                                (/ a_m (* k k))
                                                (if (<= m 1.35) (/ a_m (fma 10.0 k 1.0)) (* (* (* k k) a_m) 99.0)))))
                                            a\_m = fabs(a);
                                            a\_s = copysign(1.0, a);
                                            double code(double a_s, double a_m, double k, double m) {
                                            	double tmp;
                                            	if (m <= -8.5e-27) {
                                            		tmp = a_m / (k * k);
                                            	} else if (m <= 1.35) {
                                            		tmp = a_m / fma(10.0, k, 1.0);
                                            	} else {
                                            		tmp = ((k * k) * a_m) * 99.0;
                                            	}
                                            	return a_s * tmp;
                                            }
                                            
                                            a\_m = abs(a)
                                            a\_s = copysign(1.0, a)
                                            function code(a_s, a_m, k, m)
                                            	tmp = 0.0
                                            	if (m <= -8.5e-27)
                                            		tmp = Float64(a_m / Float64(k * k));
                                            	elseif (m <= 1.35)
                                            		tmp = Float64(a_m / fma(10.0, k, 1.0));
                                            	else
                                            		tmp = Float64(Float64(Float64(k * k) * a_m) * 99.0);
                                            	end
                                            	return Float64(a_s * tmp)
                                            end
                                            
                                            a\_m = N[Abs[a], $MachinePrecision]
                                            a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                            code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, -8.5e-27], N[(a$95$m / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.35], N[(a$95$m / N[(10.0 * k + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(k * k), $MachinePrecision] * a$95$m), $MachinePrecision] * 99.0), $MachinePrecision]]]), $MachinePrecision]
                                            
                                            \begin{array}{l}
                                            a\_m = \left|a\right|
                                            \\
                                            a\_s = \mathsf{copysign}\left(1, a\right)
                                            
                                            \\
                                            a\_s \cdot \begin{array}{l}
                                            \mathbf{if}\;m \leq -8.5 \cdot 10^{-27}:\\
                                            \;\;\;\;\frac{a\_m}{k \cdot k}\\
                                            
                                            \mathbf{elif}\;m \leq 1.35:\\
                                            \;\;\;\;\frac{a\_m}{\mathsf{fma}\left(10, k, 1\right)}\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;\left(\left(k \cdot k\right) \cdot a\_m\right) \cdot 99\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 3 regimes
                                            2. if m < -8.50000000000000033e-27

                                              1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                if -8.50000000000000033e-27 < m < 1.3500000000000001

                                                1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  if 1.3500000000000001 < m

                                                  1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    Alternative 11: 56.4% accurate, 4.8× speedup?

                                                    \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -4.5 \cdot 10^{-27}:\\ \;\;\;\;\frac{a\_m}{k \cdot k}\\ \mathbf{elif}\;m \leq 1.15 \cdot 10^{-5}:\\ \;\;\;\;\mathsf{fma}\left(a\_m \cdot k, -10, a\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(k \cdot k\right) \cdot a\_m\right) \cdot 99\\ \end{array} \end{array} \]
                                                    a\_m = (fabs.f64 a)
                                                    a\_s = (copysign.f64 #s(literal 1 binary64) a)
                                                    (FPCore (a_s a_m k m)
                                                     :precision binary64
                                                     (*
                                                      a_s
                                                      (if (<= m -4.5e-27)
                                                        (/ a_m (* k k))
                                                        (if (<= m 1.15e-5) (fma (* a_m k) -10.0 a_m) (* (* (* k k) a_m) 99.0)))))
                                                    a\_m = fabs(a);
                                                    a\_s = copysign(1.0, a);
                                                    double code(double a_s, double a_m, double k, double m) {
                                                    	double tmp;
                                                    	if (m <= -4.5e-27) {
                                                    		tmp = a_m / (k * k);
                                                    	} else if (m <= 1.15e-5) {
                                                    		tmp = fma((a_m * k), -10.0, a_m);
                                                    	} else {
                                                    		tmp = ((k * k) * a_m) * 99.0;
                                                    	}
                                                    	return a_s * tmp;
                                                    }
                                                    
                                                    a\_m = abs(a)
                                                    a\_s = copysign(1.0, a)
                                                    function code(a_s, a_m, k, m)
                                                    	tmp = 0.0
                                                    	if (m <= -4.5e-27)
                                                    		tmp = Float64(a_m / Float64(k * k));
                                                    	elseif (m <= 1.15e-5)
                                                    		tmp = fma(Float64(a_m * k), -10.0, a_m);
                                                    	else
                                                    		tmp = Float64(Float64(Float64(k * k) * a_m) * 99.0);
                                                    	end
                                                    	return Float64(a_s * tmp)
                                                    end
                                                    
                                                    a\_m = N[Abs[a], $MachinePrecision]
                                                    a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                    code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, -4.5e-27], N[(a$95$m / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.15e-5], N[(N[(a$95$m * k), $MachinePrecision] * -10.0 + a$95$m), $MachinePrecision], N[(N[(N[(k * k), $MachinePrecision] * a$95$m), $MachinePrecision] * 99.0), $MachinePrecision]]]), $MachinePrecision]
                                                    
                                                    \begin{array}{l}
                                                    a\_m = \left|a\right|
                                                    \\
                                                    a\_s = \mathsf{copysign}\left(1, a\right)
                                                    
                                                    \\
                                                    a\_s \cdot \begin{array}{l}
                                                    \mathbf{if}\;m \leq -4.5 \cdot 10^{-27}:\\
                                                    \;\;\;\;\frac{a\_m}{k \cdot k}\\
                                                    
                                                    \mathbf{elif}\;m \leq 1.15 \cdot 10^{-5}:\\
                                                    \;\;\;\;\mathsf{fma}\left(a\_m \cdot k, -10, a\_m\right)\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;\left(\left(k \cdot k\right) \cdot a\_m\right) \cdot 99\\
                                                    
                                                    
                                                    \end{array}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 3 regimes
                                                    2. if m < -4.5000000000000002e-27

                                                      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        if -4.5000000000000002e-27 < m < 1.15e-5

                                                        1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          if 1.15e-5 < m

                                                          1. Initial program 84.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            Alternative 12: 38.0% accurate, 6.1× speedup?

                                                            \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq 4.2 \cdot 10^{-15}:\\ \;\;\;\;\mathsf{fma}\left(a\_m \cdot k, -10, a\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(k \cdot k\right) \cdot a\_m\right) \cdot 99\\ \end{array} \end{array} \]
                                                            a\_m = (fabs.f64 a)
                                                            a\_s = (copysign.f64 #s(literal 1 binary64) a)
                                                            (FPCore (a_s a_m k m)
                                                             :precision binary64
                                                             (*
                                                              a_s
                                                              (if (<= m 4.2e-15) (fma (* a_m k) -10.0 a_m) (* (* (* k k) a_m) 99.0))))
                                                            a\_m = fabs(a);
                                                            a\_s = copysign(1.0, a);
                                                            double code(double a_s, double a_m, double k, double m) {
                                                            	double tmp;
                                                            	if (m <= 4.2e-15) {
                                                            		tmp = fma((a_m * k), -10.0, a_m);
                                                            	} else {
                                                            		tmp = ((k * k) * a_m) * 99.0;
                                                            	}
                                                            	return a_s * tmp;
                                                            }
                                                            
                                                            a\_m = abs(a)
                                                            a\_s = copysign(1.0, a)
                                                            function code(a_s, a_m, k, m)
                                                            	tmp = 0.0
                                                            	if (m <= 4.2e-15)
                                                            		tmp = fma(Float64(a_m * k), -10.0, a_m);
                                                            	else
                                                            		tmp = Float64(Float64(Float64(k * k) * a_m) * 99.0);
                                                            	end
                                                            	return Float64(a_s * tmp)
                                                            end
                                                            
                                                            a\_m = N[Abs[a], $MachinePrecision]
                                                            a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                            code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, 4.2e-15], N[(N[(a$95$m * k), $MachinePrecision] * -10.0 + a$95$m), $MachinePrecision], N[(N[(N[(k * k), $MachinePrecision] * a$95$m), $MachinePrecision] * 99.0), $MachinePrecision]]), $MachinePrecision]
                                                            
                                                            \begin{array}{l}
                                                            a\_m = \left|a\right|
                                                            \\
                                                            a\_s = \mathsf{copysign}\left(1, a\right)
                                                            
                                                            \\
                                                            a\_s \cdot \begin{array}{l}
                                                            \mathbf{if}\;m \leq 4.2 \cdot 10^{-15}:\\
                                                            \;\;\;\;\mathsf{fma}\left(a\_m \cdot k, -10, a\_m\right)\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;\left(\left(k \cdot k\right) \cdot a\_m\right) \cdot 99\\
                                                            
                                                            
                                                            \end{array}
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 2 regimes
                                                            2. if m < 4.19999999999999962e-15

                                                              1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                if 4.19999999999999962e-15 < m

                                                                1. Initial program 84.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  Alternative 13: 24.2% accurate, 7.4× speedup?

                                                                  \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq 1.15 \cdot 10^{-5}:\\ \;\;\;\;\mathsf{fma}\left(a\_m \cdot k, -10, a\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m \cdot k\right) \cdot -10\\ \end{array} \end{array} \]
                                                                  a\_m = (fabs.f64 a)
                                                                  a\_s = (copysign.f64 #s(literal 1 binary64) a)
                                                                  (FPCore (a_s a_m k m)
                                                                   :precision binary64
                                                                   (* a_s (if (<= m 1.15e-5) (fma (* a_m k) -10.0 a_m) (* (* a_m k) -10.0))))
                                                                  a\_m = fabs(a);
                                                                  a\_s = copysign(1.0, a);
                                                                  double code(double a_s, double a_m, double k, double m) {
                                                                  	double tmp;
                                                                  	if (m <= 1.15e-5) {
                                                                  		tmp = fma((a_m * k), -10.0, a_m);
                                                                  	} else {
                                                                  		tmp = (a_m * k) * -10.0;
                                                                  	}
                                                                  	return a_s * tmp;
                                                                  }
                                                                  
                                                                  a\_m = abs(a)
                                                                  a\_s = copysign(1.0, a)
                                                                  function code(a_s, a_m, k, m)
                                                                  	tmp = 0.0
                                                                  	if (m <= 1.15e-5)
                                                                  		tmp = fma(Float64(a_m * k), -10.0, a_m);
                                                                  	else
                                                                  		tmp = Float64(Float64(a_m * k) * -10.0);
                                                                  	end
                                                                  	return Float64(a_s * tmp)
                                                                  end
                                                                  
                                                                  a\_m = N[Abs[a], $MachinePrecision]
                                                                  a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                  code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, 1.15e-5], N[(N[(a$95$m * k), $MachinePrecision] * -10.0 + a$95$m), $MachinePrecision], N[(N[(a$95$m * k), $MachinePrecision] * -10.0), $MachinePrecision]]), $MachinePrecision]
                                                                  
                                                                  \begin{array}{l}
                                                                  a\_m = \left|a\right|
                                                                  \\
                                                                  a\_s = \mathsf{copysign}\left(1, a\right)
                                                                  
                                                                  \\
                                                                  a\_s \cdot \begin{array}{l}
                                                                  \mathbf{if}\;m \leq 1.15 \cdot 10^{-5}:\\
                                                                  \;\;\;\;\mathsf{fma}\left(a\_m \cdot k, -10, a\_m\right)\\
                                                                  
                                                                  \mathbf{else}:\\
                                                                  \;\;\;\;\left(a\_m \cdot k\right) \cdot -10\\
                                                                  
                                                                  
                                                                  \end{array}
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Split input into 2 regimes
                                                                  2. if m < 1.15e-5

                                                                    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      if 1.15e-5 < m

                                                                      1. Initial program 84.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          Alternative 14: 8.2% accurate, 12.2× speedup?

                                                                          \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \left(\left(a\_m \cdot k\right) \cdot -10\right) \end{array} \]
                                                                          a\_m = (fabs.f64 a)
                                                                          a\_s = (copysign.f64 #s(literal 1 binary64) a)
                                                                          (FPCore (a_s a_m k m) :precision binary64 (* a_s (* (* a_m k) -10.0)))
                                                                          a\_m = fabs(a);
                                                                          a\_s = copysign(1.0, a);
                                                                          double code(double a_s, double a_m, double k, double m) {
                                                                          	return a_s * ((a_m * k) * -10.0);
                                                                          }
                                                                          
                                                                          a\_m = abs(a)
                                                                          a\_s = copysign(1.0d0, a)
                                                                          real(8) function code(a_s, a_m, k, m)
                                                                              real(8), intent (in) :: a_s
                                                                              real(8), intent (in) :: a_m
                                                                              real(8), intent (in) :: k
                                                                              real(8), intent (in) :: m
                                                                              code = a_s * ((a_m * k) * (-10.0d0))
                                                                          end function
                                                                          
                                                                          a\_m = Math.abs(a);
                                                                          a\_s = Math.copySign(1.0, a);
                                                                          public static double code(double a_s, double a_m, double k, double m) {
                                                                          	return a_s * ((a_m * k) * -10.0);
                                                                          }
                                                                          
                                                                          a\_m = math.fabs(a)
                                                                          a\_s = math.copysign(1.0, a)
                                                                          def code(a_s, a_m, k, m):
                                                                          	return a_s * ((a_m * k) * -10.0)
                                                                          
                                                                          a\_m = abs(a)
                                                                          a\_s = copysign(1.0, a)
                                                                          function code(a_s, a_m, k, m)
                                                                          	return Float64(a_s * Float64(Float64(a_m * k) * -10.0))
                                                                          end
                                                                          
                                                                          a\_m = abs(a);
                                                                          a\_s = sign(a) * abs(1.0);
                                                                          function tmp = code(a_s, a_m, k, m)
                                                                          	tmp = a_s * ((a_m * k) * -10.0);
                                                                          end
                                                                          
                                                                          a\_m = N[Abs[a], $MachinePrecision]
                                                                          a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                          code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * N[(N[(a$95$m * k), $MachinePrecision] * -10.0), $MachinePrecision]), $MachinePrecision]
                                                                          
                                                                          \begin{array}{l}
                                                                          a\_m = \left|a\right|
                                                                          \\
                                                                          a\_s = \mathsf{copysign}\left(1, a\right)
                                                                          
                                                                          \\
                                                                          a\_s \cdot \left(\left(a\_m \cdot k\right) \cdot -10\right)
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  \[\leadsto \left(a \cdot k\right) \cdot -10 \]
                                                                                2. Add Preprocessing

                                                                                Alternative 15: 8.2% accurate, 12.2× speedup?

                                                                                \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \left(\left(-10 \cdot a\_m\right) \cdot k\right) \end{array} \]
                                                                                a\_m = (fabs.f64 a)
                                                                                a\_s = (copysign.f64 #s(literal 1 binary64) a)
                                                                                (FPCore (a_s a_m k m) :precision binary64 (* a_s (* (* -10.0 a_m) k)))
                                                                                a\_m = fabs(a);
                                                                                a\_s = copysign(1.0, a);
                                                                                double code(double a_s, double a_m, double k, double m) {
                                                                                	return a_s * ((-10.0 * a_m) * k);
                                                                                }
                                                                                
                                                                                a\_m = abs(a)
                                                                                a\_s = copysign(1.0d0, a)
                                                                                real(8) function code(a_s, a_m, k, m)
                                                                                    real(8), intent (in) :: a_s
                                                                                    real(8), intent (in) :: a_m
                                                                                    real(8), intent (in) :: k
                                                                                    real(8), intent (in) :: m
                                                                                    code = a_s * (((-10.0d0) * a_m) * k)
                                                                                end function
                                                                                
                                                                                a\_m = Math.abs(a);
                                                                                a\_s = Math.copySign(1.0, a);
                                                                                public static double code(double a_s, double a_m, double k, double m) {
                                                                                	return a_s * ((-10.0 * a_m) * k);
                                                                                }
                                                                                
                                                                                a\_m = math.fabs(a)
                                                                                a\_s = math.copysign(1.0, a)
                                                                                def code(a_s, a_m, k, m):
                                                                                	return a_s * ((-10.0 * a_m) * k)
                                                                                
                                                                                a\_m = abs(a)
                                                                                a\_s = copysign(1.0, a)
                                                                                function code(a_s, a_m, k, m)
                                                                                	return Float64(a_s * Float64(Float64(-10.0 * a_m) * k))
                                                                                end
                                                                                
                                                                                a\_m = abs(a);
                                                                                a\_s = sign(a) * abs(1.0);
                                                                                function tmp = code(a_s, a_m, k, m)
                                                                                	tmp = a_s * ((-10.0 * a_m) * k);
                                                                                end
                                                                                
                                                                                a\_m = N[Abs[a], $MachinePrecision]
                                                                                a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * N[(N[(-10.0 * a$95$m), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
                                                                                
                                                                                \begin{array}{l}
                                                                                a\_m = \left|a\right|
                                                                                \\
                                                                                a\_s = \mathsf{copysign}\left(1, a\right)
                                                                                
                                                                                \\
                                                                                a\_s \cdot \left(\left(-10 \cdot a\_m\right) \cdot k\right)
                                                                                \end{array}
                                                                                
                                                                                Derivation
                                                                                1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                      \[\leadsto \left(-10 \cdot a\right) \cdot k \]
                                                                                    2. Add Preprocessing

                                                                                    Reproduce

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