Falkner and Boettcher, Appendix A

Percentage Accurate: 90.2% → 98.4%
Time: 12.7s
Alternatives: 19
Speedup: 1.0×

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 19 alternatives:

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

Initial Program: 90.2% accurate, 1.0× speedup?

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

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

Alternative 1: 98.4% accurate, 0.5× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ \begin{array}{l} t_0 := a\_m \cdot {k}^{m}\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{t\_0}{\left(k \cdot 10 + 1\right) + k \cdot k} \leq 2 \cdot 10^{+102}:\\ \;\;\;\;\frac{{k}^{m}}{\frac{1}{a\_m} + k \cdot \left(\frac{k}{a\_m} + \frac{10}{a\_m}\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) a)
(FPCore (a_s a_m k m)
 :precision binary64
 (let* ((t_0 (* a_m (pow k m))))
   (*
    a_s
    (if (<= (/ t_0 (+ (+ (* k 10.0) 1.0) (* k k))) 2e+102)
      (/ (pow k m) (+ (/ 1.0 a_m) (* k (+ (/ k a_m) (/ 10.0 a_m)))))
      t_0))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
double code(double a_s, double a_m, double k, double m) {
	double t_0 = a_m * pow(k, m);
	double tmp;
	if ((t_0 / (((k * 10.0) + 1.0) + (k * k))) <= 2e+102) {
		tmp = pow(k, m) / ((1.0 / a_m) + (k * ((k / a_m) + (10.0 / a_m))));
	} else {
		tmp = t_0;
	}
	return a_s * tmp;
}
a\_m = abs(a)
a\_s = copysign(1.0d0, a)
real(8) function code(a_s, a_m, k, m)
    real(8), intent (in) :: a_s
    real(8), intent (in) :: a_m
    real(8), intent (in) :: k
    real(8), intent (in) :: m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = a_m * (k ** m)
    if ((t_0 / (((k * 10.0d0) + 1.0d0) + (k * k))) <= 2d+102) then
        tmp = (k ** m) / ((1.0d0 / a_m) + (k * ((k / a_m) + (10.0d0 / a_m))))
    else
        tmp = t_0
    end if
    code = a_s * tmp
end function
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
public static double code(double a_s, double a_m, double k, double m) {
	double t_0 = a_m * Math.pow(k, m);
	double tmp;
	if ((t_0 / (((k * 10.0) + 1.0) + (k * k))) <= 2e+102) {
		tmp = Math.pow(k, m) / ((1.0 / a_m) + (k * ((k / a_m) + (10.0 / a_m))));
	} else {
		tmp = t_0;
	}
	return a_s * tmp;
}
a\_m = math.fabs(a)
a\_s = math.copysign(1.0, a)
def code(a_s, a_m, k, m):
	t_0 = a_m * math.pow(k, m)
	tmp = 0
	if (t_0 / (((k * 10.0) + 1.0) + (k * k))) <= 2e+102:
		tmp = math.pow(k, m) / ((1.0 / a_m) + (k * ((k / a_m) + (10.0 / a_m))))
	else:
		tmp = t_0
	return a_s * tmp
a\_m = abs(a)
a\_s = copysign(1.0, a)
function code(a_s, a_m, k, m)
	t_0 = Float64(a_m * (k ^ m))
	tmp = 0.0
	if (Float64(t_0 / Float64(Float64(Float64(k * 10.0) + 1.0) + Float64(k * k))) <= 2e+102)
		tmp = Float64((k ^ m) / Float64(Float64(1.0 / a_m) + Float64(k * Float64(Float64(k / a_m) + Float64(10.0 / a_m)))));
	else
		tmp = t_0;
	end
	return Float64(a_s * tmp)
end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
function tmp_2 = code(a_s, a_m, k, m)
	t_0 = a_m * (k ^ m);
	tmp = 0.0;
	if ((t_0 / (((k * 10.0) + 1.0) + (k * k))) <= 2e+102)
		tmp = (k ^ m) / ((1.0 / a_m) + (k * ((k / a_m) + (10.0 / a_m))));
	else
		tmp = t_0;
	end
	tmp_2 = a_s * tmp;
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[a$95$s_, a$95$m_, k_, m_] := Block[{t$95$0 = N[(a$95$m * N[Power[k, m], $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[N[(t$95$0 / N[(N[(N[(k * 10.0), $MachinePrecision] + 1.0), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+102], N[(N[Power[k, m], $MachinePrecision] / N[(N[(1.0 / a$95$m), $MachinePrecision] + N[(k * N[(N[(k / a$95$m), $MachinePrecision] + N[(10.0 / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]), $MachinePrecision]]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)

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

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


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

    1. Initial program 97.3%

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      6. distribute-rgt-outN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
      9. +-lowering-+.f6497.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
    3. Simplified97.3%

      \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. distribute-rgt-inN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({k}^{m}\right), \left(\left(1 + 10 \cdot k\right) + k \cdot k\right)\right), a\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \left(\left(1 + 10 \cdot k\right) + k \cdot k\right)\right), a\right) \]
      9. associate-+l+N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \left(1 + \left(10 \cdot k + k \cdot k\right)\right)\right), a\right) \]
      10. distribute-rgt-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \left(1 + k \cdot \left(10 + k\right)\right)\right), a\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \left(1 + k \cdot \left(k + 10\right)\right)\right), a\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(1, \left(k \cdot \left(k + 10\right)\right)\right)\right), a\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right)\right), a\right) \]
      14. +-lowering-+.f6497.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right), a\right) \]
    6. Applied egg-rr97.3%

      \[\leadsto \color{blue}{\frac{{k}^{m}}{1 + k \cdot \left(k + 10\right)} \cdot a} \]
    7. Step-by-step derivation
      1. div-invN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{/.f64}\left(\left(1 + k \cdot \left(k + 10\right)\right), \color{blue}{a}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \left(k \cdot \left(k + 10\right)\right)\right), a\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right), a\right)\right) \]
      10. +-lowering-+.f6495.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right), a\right)\right) \]
    8. Applied egg-rr95.4%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \color{blue}{\left(k \cdot \left(10 \cdot \frac{1}{a} + \frac{k}{a}\right) + \frac{1}{a}\right)}\right) \]
    10. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(1, a\right), \left(\color{blue}{k} \cdot \left(10 \cdot \frac{1}{a} + \frac{k}{a}\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(1, a\right), \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{/.f64}\left(k, a\right), \left(\frac{10 \cdot 1}{\color{blue}{a}}\right)\right)\right)\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(1, a\right), \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{/.f64}\left(k, a\right), \left(\frac{10}{a}\right)\right)\right)\right)\right) \]
      10. /-lowering-/.f6497.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(1, a\right), \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{/.f64}\left(k, a\right), \mathsf{/.f64}\left(10, \color{blue}{a}\right)\right)\right)\right)\right) \]
    11. Simplified97.7%

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

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

    1. Initial program 66.1%

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      6. distribute-rgt-outN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
      9. +-lowering-+.f6466.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
    3. Simplified66.1%

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

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

        \[\leadsto \mathsf{*.f64}\left(a, \color{blue}{\left({k}^{m}\right)}\right) \]
      2. pow-lowering-pow.f64100.0%

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, \color{blue}{m}\right)\right) \]
    7. Simplified100.0%

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

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

Alternative 2: 97.9% accurate, 0.5× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ \begin{array}{l} t_0 := a\_m \cdot {k}^{m}\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{t\_0}{\left(k \cdot 10 + 1\right) + k \cdot k} \leq 2 \cdot 10^{+102}:\\ \;\;\;\;\frac{{k}^{m}}{\frac{1}{a\_m} + k \cdot \frac{k}{a\_m}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) a)
(FPCore (a_s a_m k m)
 :precision binary64
 (let* ((t_0 (* a_m (pow k m))))
   (*
    a_s
    (if (<= (/ t_0 (+ (+ (* k 10.0) 1.0) (* k k))) 2e+102)
      (/ (pow k m) (+ (/ 1.0 a_m) (* k (/ k a_m))))
      t_0))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
double code(double a_s, double a_m, double k, double m) {
	double t_0 = a_m * pow(k, m);
	double tmp;
	if ((t_0 / (((k * 10.0) + 1.0) + (k * k))) <= 2e+102) {
		tmp = pow(k, m) / ((1.0 / a_m) + (k * (k / a_m)));
	} else {
		tmp = t_0;
	}
	return a_s * tmp;
}
a\_m = abs(a)
a\_s = copysign(1.0d0, a)
real(8) function code(a_s, a_m, k, m)
    real(8), intent (in) :: a_s
    real(8), intent (in) :: a_m
    real(8), intent (in) :: k
    real(8), intent (in) :: m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = a_m * (k ** m)
    if ((t_0 / (((k * 10.0d0) + 1.0d0) + (k * k))) <= 2d+102) then
        tmp = (k ** m) / ((1.0d0 / a_m) + (k * (k / a_m)))
    else
        tmp = t_0
    end if
    code = a_s * tmp
end function
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
public static double code(double a_s, double a_m, double k, double m) {
	double t_0 = a_m * Math.pow(k, m);
	double tmp;
	if ((t_0 / (((k * 10.0) + 1.0) + (k * k))) <= 2e+102) {
		tmp = Math.pow(k, m) / ((1.0 / a_m) + (k * (k / a_m)));
	} else {
		tmp = t_0;
	}
	return a_s * tmp;
}
a\_m = math.fabs(a)
a\_s = math.copysign(1.0, a)
def code(a_s, a_m, k, m):
	t_0 = a_m * math.pow(k, m)
	tmp = 0
	if (t_0 / (((k * 10.0) + 1.0) + (k * k))) <= 2e+102:
		tmp = math.pow(k, m) / ((1.0 / a_m) + (k * (k / a_m)))
	else:
		tmp = t_0
	return a_s * tmp
a\_m = abs(a)
a\_s = copysign(1.0, a)
function code(a_s, a_m, k, m)
	t_0 = Float64(a_m * (k ^ m))
	tmp = 0.0
	if (Float64(t_0 / Float64(Float64(Float64(k * 10.0) + 1.0) + Float64(k * k))) <= 2e+102)
		tmp = Float64((k ^ m) / Float64(Float64(1.0 / a_m) + Float64(k * Float64(k / a_m))));
	else
		tmp = t_0;
	end
	return Float64(a_s * tmp)
end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
function tmp_2 = code(a_s, a_m, k, m)
	t_0 = a_m * (k ^ m);
	tmp = 0.0;
	if ((t_0 / (((k * 10.0) + 1.0) + (k * k))) <= 2e+102)
		tmp = (k ^ m) / ((1.0 / a_m) + (k * (k / a_m)));
	else
		tmp = t_0;
	end
	tmp_2 = a_s * tmp;
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[a$95$s_, a$95$m_, k_, m_] := Block[{t$95$0 = N[(a$95$m * N[Power[k, m], $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[N[(t$95$0 / N[(N[(N[(k * 10.0), $MachinePrecision] + 1.0), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+102], N[(N[Power[k, m], $MachinePrecision] / N[(N[(1.0 / a$95$m), $MachinePrecision] + N[(k * N[(k / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]), $MachinePrecision]]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)

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

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


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

    1. Initial program 97.3%

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      6. distribute-rgt-outN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
      9. +-lowering-+.f6497.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
    3. Simplified97.3%

      \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. distribute-rgt-inN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({k}^{m}\right), \left(\left(1 + 10 \cdot k\right) + k \cdot k\right)\right), a\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \left(\left(1 + 10 \cdot k\right) + k \cdot k\right)\right), a\right) \]
      9. associate-+l+N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \left(1 + \left(10 \cdot k + k \cdot k\right)\right)\right), a\right) \]
      10. distribute-rgt-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \left(1 + k \cdot \left(10 + k\right)\right)\right), a\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \left(1 + k \cdot \left(k + 10\right)\right)\right), a\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(1, \left(k \cdot \left(k + 10\right)\right)\right)\right), a\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right)\right), a\right) \]
      14. +-lowering-+.f6497.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right), a\right) \]
    6. Applied egg-rr97.3%

      \[\leadsto \color{blue}{\frac{{k}^{m}}{1 + k \cdot \left(k + 10\right)} \cdot a} \]
    7. Step-by-step derivation
      1. div-invN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{/.f64}\left(\left(1 + k \cdot \left(k + 10\right)\right), \color{blue}{a}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \left(k \cdot \left(k + 10\right)\right)\right), a\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right), a\right)\right) \]
      10. +-lowering-+.f6495.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right), a\right)\right) \]
    8. Applied egg-rr95.4%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \color{blue}{\left(k \cdot \left(10 \cdot \frac{1}{a} + \frac{k}{a}\right) + \frac{1}{a}\right)}\right) \]
    10. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(1, a\right), \left(\color{blue}{k} \cdot \left(10 \cdot \frac{1}{a} + \frac{k}{a}\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(1, a\right), \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{/.f64}\left(k, a\right), \left(\frac{10 \cdot 1}{\color{blue}{a}}\right)\right)\right)\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(1, a\right), \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{/.f64}\left(k, a\right), \left(\frac{10}{a}\right)\right)\right)\right)\right) \]
      10. /-lowering-/.f6497.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(1, a\right), \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{/.f64}\left(k, a\right), \mathsf{/.f64}\left(10, \color{blue}{a}\right)\right)\right)\right)\right) \]
    11. Simplified97.7%

      \[\leadsto \frac{{k}^{m}}{\color{blue}{\frac{1}{a} + k \cdot \left(\frac{k}{a} + \frac{10}{a}\right)}} \]
    12. Taylor expanded in k around inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(1, a\right), \mathsf{*.f64}\left(k, \color{blue}{\left(\frac{k}{a}\right)}\right)\right)\right) \]
    13. Step-by-step derivation
      1. /-lowering-/.f6496.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(1, a\right), \mathsf{*.f64}\left(k, \mathsf{/.f64}\left(k, \color{blue}{a}\right)\right)\right)\right) \]
    14. Simplified96.9%

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

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

    1. Initial program 66.1%

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      6. distribute-rgt-outN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
      9. +-lowering-+.f6466.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
    3. Simplified66.1%

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

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

        \[\leadsto \mathsf{*.f64}\left(a, \color{blue}{\left({k}^{m}\right)}\right) \]
      2. pow-lowering-pow.f64100.0%

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, \color{blue}{m}\right)\right) \]
    7. Simplified100.0%

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

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

Alternative 3: 97.3% accurate, 1.0× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq 1.38 \cdot 10^{-18}:\\ \;\;\;\;\frac{a\_m \cdot {k}^{m}}{k \cdot \left(k + 10\right) + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{{k}^{m}}{\frac{1}{a\_m}}\\ \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) a)
(FPCore (a_s a_m k m)
 :precision binary64
 (*
  a_s
  (if (<= m 1.38e-18)
    (/ (* a_m (pow k m)) (+ (* k (+ k 10.0)) 1.0))
    (/ (pow k m) (/ 1.0 a_m)))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
double code(double a_s, double a_m, double k, double m) {
	double tmp;
	if (m <= 1.38e-18) {
		tmp = (a_m * pow(k, m)) / ((k * (k + 10.0)) + 1.0);
	} else {
		tmp = pow(k, m) / (1.0 / a_m);
	}
	return a_s * tmp;
}
a\_m = abs(a)
a\_s = copysign(1.0d0, a)
real(8) function code(a_s, a_m, k, m)
    real(8), intent (in) :: a_s
    real(8), intent (in) :: a_m
    real(8), intent (in) :: k
    real(8), intent (in) :: m
    real(8) :: tmp
    if (m <= 1.38d-18) then
        tmp = (a_m * (k ** m)) / ((k * (k + 10.0d0)) + 1.0d0)
    else
        tmp = (k ** m) / (1.0d0 / a_m)
    end if
    code = a_s * tmp
end function
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
public static double code(double a_s, double a_m, double k, double m) {
	double tmp;
	if (m <= 1.38e-18) {
		tmp = (a_m * Math.pow(k, m)) / ((k * (k + 10.0)) + 1.0);
	} else {
		tmp = Math.pow(k, m) / (1.0 / a_m);
	}
	return a_s * tmp;
}
a\_m = math.fabs(a)
a\_s = math.copysign(1.0, a)
def code(a_s, a_m, k, m):
	tmp = 0
	if m <= 1.38e-18:
		tmp = (a_m * math.pow(k, m)) / ((k * (k + 10.0)) + 1.0)
	else:
		tmp = math.pow(k, m) / (1.0 / a_m)
	return a_s * tmp
a\_m = abs(a)
a\_s = copysign(1.0, a)
function code(a_s, a_m, k, m)
	tmp = 0.0
	if (m <= 1.38e-18)
		tmp = Float64(Float64(a_m * (k ^ m)) / Float64(Float64(k * Float64(k + 10.0)) + 1.0));
	else
		tmp = Float64((k ^ m) / Float64(1.0 / a_m));
	end
	return Float64(a_s * tmp)
end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
function tmp_2 = code(a_s, a_m, k, m)
	tmp = 0.0;
	if (m <= 1.38e-18)
		tmp = (a_m * (k ^ m)) / ((k * (k + 10.0)) + 1.0);
	else
		tmp = (k ^ m) / (1.0 / a_m);
	end
	tmp_2 = a_s * tmp;
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, 1.38e-18], N[(N[(a$95$m * N[Power[k, m], $MachinePrecision]), $MachinePrecision] / N[(N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[Power[k, m], $MachinePrecision] / N[(1.0 / a$95$m), $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 1.38 \cdot 10^{-18}:\\
\;\;\;\;\frac{a\_m \cdot {k}^{m}}{k \cdot \left(k + 10\right) + 1}\\

\mathbf{else}:\\
\;\;\;\;\frac{{k}^{m}}{\frac{1}{a\_m}}\\


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

    1. Initial program 96.9%

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      6. distribute-rgt-outN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
      9. +-lowering-+.f6496.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
    3. Simplified96.9%

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

    if 1.38e-18 < m

    1. Initial program 75.8%

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      6. distribute-rgt-outN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
      9. +-lowering-+.f6475.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
    3. Simplified75.8%

      \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. distribute-rgt-inN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({k}^{m}\right), \left(\left(1 + 10 \cdot k\right) + k \cdot k\right)\right), a\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \left(\left(1 + 10 \cdot k\right) + k \cdot k\right)\right), a\right) \]
      9. associate-+l+N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \left(1 + \left(10 \cdot k + k \cdot k\right)\right)\right), a\right) \]
      10. distribute-rgt-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \left(1 + k \cdot \left(10 + k\right)\right)\right), a\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \left(1 + k \cdot \left(k + 10\right)\right)\right), a\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(1, \left(k \cdot \left(k + 10\right)\right)\right)\right), a\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right)\right), a\right) \]
      14. +-lowering-+.f6475.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right), a\right) \]
    6. Applied egg-rr75.8%

      \[\leadsto \color{blue}{\frac{{k}^{m}}{1 + k \cdot \left(k + 10\right)} \cdot a} \]
    7. Step-by-step derivation
      1. div-invN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{/.f64}\left(\left(1 + k \cdot \left(k + 10\right)\right), \color{blue}{a}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \left(k \cdot \left(k + 10\right)\right)\right), a\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right), a\right)\right) \]
      10. +-lowering-+.f6467.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right), a\right)\right) \]
    8. Applied egg-rr67.8%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \color{blue}{\left(\frac{1}{a}\right)}\right) \]
    10. Step-by-step derivation
      1. /-lowering-/.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{/.f64}\left(1, \color{blue}{a}\right)\right) \]
    11. Simplified100.0%

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

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

Alternative 4: 97.2% accurate, 1.0× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq 1.38 \cdot 10^{-18}:\\ \;\;\;\;a\_m \cdot \frac{{k}^{m}}{k \cdot \left(k + 10\right) + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{{k}^{m}}{\frac{1}{a\_m}}\\ \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) a)
(FPCore (a_s a_m k m)
 :precision binary64
 (*
  a_s
  (if (<= m 1.38e-18)
    (* a_m (/ (pow k m) (+ (* k (+ k 10.0)) 1.0)))
    (/ (pow k m) (/ 1.0 a_m)))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
double code(double a_s, double a_m, double k, double m) {
	double tmp;
	if (m <= 1.38e-18) {
		tmp = a_m * (pow(k, m) / ((k * (k + 10.0)) + 1.0));
	} else {
		tmp = pow(k, m) / (1.0 / a_m);
	}
	return a_s * tmp;
}
a\_m = abs(a)
a\_s = copysign(1.0d0, a)
real(8) function code(a_s, a_m, k, m)
    real(8), intent (in) :: a_s
    real(8), intent (in) :: a_m
    real(8), intent (in) :: k
    real(8), intent (in) :: m
    real(8) :: tmp
    if (m <= 1.38d-18) then
        tmp = a_m * ((k ** m) / ((k * (k + 10.0d0)) + 1.0d0))
    else
        tmp = (k ** m) / (1.0d0 / a_m)
    end if
    code = a_s * tmp
end function
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
public static double code(double a_s, double a_m, double k, double m) {
	double tmp;
	if (m <= 1.38e-18) {
		tmp = a_m * (Math.pow(k, m) / ((k * (k + 10.0)) + 1.0));
	} else {
		tmp = Math.pow(k, m) / (1.0 / a_m);
	}
	return a_s * tmp;
}
a\_m = math.fabs(a)
a\_s = math.copysign(1.0, a)
def code(a_s, a_m, k, m):
	tmp = 0
	if m <= 1.38e-18:
		tmp = a_m * (math.pow(k, m) / ((k * (k + 10.0)) + 1.0))
	else:
		tmp = math.pow(k, m) / (1.0 / a_m)
	return a_s * tmp
a\_m = abs(a)
a\_s = copysign(1.0, a)
function code(a_s, a_m, k, m)
	tmp = 0.0
	if (m <= 1.38e-18)
		tmp = Float64(a_m * Float64((k ^ m) / Float64(Float64(k * Float64(k + 10.0)) + 1.0)));
	else
		tmp = Float64((k ^ m) / Float64(1.0 / a_m));
	end
	return Float64(a_s * tmp)
end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
function tmp_2 = code(a_s, a_m, k, m)
	tmp = 0.0;
	if (m <= 1.38e-18)
		tmp = a_m * ((k ^ m) / ((k * (k + 10.0)) + 1.0));
	else
		tmp = (k ^ m) / (1.0 / a_m);
	end
	tmp_2 = a_s * tmp;
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, 1.38e-18], N[(a$95$m * N[(N[Power[k, m], $MachinePrecision] / N[(N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[k, m], $MachinePrecision] / N[(1.0 / a$95$m), $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 1.38 \cdot 10^{-18}:\\
\;\;\;\;a\_m \cdot \frac{{k}^{m}}{k \cdot \left(k + 10\right) + 1}\\

\mathbf{else}:\\
\;\;\;\;\frac{{k}^{m}}{\frac{1}{a\_m}}\\


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

    1. Initial program 96.9%

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      6. distribute-rgt-outN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
      9. +-lowering-+.f6496.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
    3. Simplified96.9%

      \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. distribute-rgt-inN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({k}^{m}\right), \left(\left(1 + 10 \cdot k\right) + k \cdot k\right)\right), a\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \left(\left(1 + 10 \cdot k\right) + k \cdot k\right)\right), a\right) \]
      9. associate-+l+N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \left(1 + \left(10 \cdot k + k \cdot k\right)\right)\right), a\right) \]
      10. distribute-rgt-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \left(1 + k \cdot \left(10 + k\right)\right)\right), a\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \left(1 + k \cdot \left(k + 10\right)\right)\right), a\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(1, \left(k \cdot \left(k + 10\right)\right)\right)\right), a\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right)\right), a\right) \]
      14. +-lowering-+.f6496.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right), a\right) \]
    6. Applied egg-rr96.9%

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

    if 1.38e-18 < m

    1. Initial program 75.8%

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      6. distribute-rgt-outN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
      9. +-lowering-+.f6475.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
    3. Simplified75.8%

      \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. distribute-rgt-inN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({k}^{m}\right), \left(\left(1 + 10 \cdot k\right) + k \cdot k\right)\right), a\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \left(\left(1 + 10 \cdot k\right) + k \cdot k\right)\right), a\right) \]
      9. associate-+l+N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \left(1 + \left(10 \cdot k + k \cdot k\right)\right)\right), a\right) \]
      10. distribute-rgt-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \left(1 + k \cdot \left(10 + k\right)\right)\right), a\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \left(1 + k \cdot \left(k + 10\right)\right)\right), a\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(1, \left(k \cdot \left(k + 10\right)\right)\right)\right), a\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right)\right), a\right) \]
      14. +-lowering-+.f6475.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right)\right), a\right) \]
    6. Applied egg-rr75.8%

      \[\leadsto \color{blue}{\frac{{k}^{m}}{1 + k \cdot \left(k + 10\right)} \cdot a} \]
    7. Step-by-step derivation
      1. div-invN/A

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{/.f64}\left(\left(1 + k \cdot \left(k + 10\right)\right), \color{blue}{a}\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \left(k \cdot \left(k + 10\right)\right)\right), a\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + 10\right)\right)\right), a\right)\right) \]
      10. +-lowering-+.f6467.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, 10\right)\right)\right), a\right)\right) \]
    8. Applied egg-rr67.8%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \color{blue}{\left(\frac{1}{a}\right)}\right) \]
    10. Step-by-step derivation
      1. /-lowering-/.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(k, m\right), \mathsf{/.f64}\left(1, \color{blue}{a}\right)\right) \]
    11. Simplified100.0%

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

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

Alternative 5: 96.9% accurate, 1.0× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ \begin{array}{l} t_0 := a\_m \cdot {k}^{m}\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -0.245:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;m \leq 2.8 \cdot 10^{-19}:\\ \;\;\;\;\frac{a\_m}{\left(k \cdot 10 + 1\right) + k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) a)
(FPCore (a_s a_m k m)
 :precision binary64
 (let* ((t_0 (* a_m (pow k m))))
   (*
    a_s
    (if (<= m -0.245)
      t_0
      (if (<= m 2.8e-19) (/ a_m (+ (+ (* k 10.0) 1.0) (* k k))) t_0)))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
double code(double a_s, double a_m, double k, double m) {
	double t_0 = a_m * pow(k, m);
	double tmp;
	if (m <= -0.245) {
		tmp = t_0;
	} else if (m <= 2.8e-19) {
		tmp = a_m / (((k * 10.0) + 1.0) + (k * k));
	} else {
		tmp = t_0;
	}
	return a_s * tmp;
}
a\_m = abs(a)
a\_s = copysign(1.0d0, a)
real(8) function code(a_s, a_m, k, m)
    real(8), intent (in) :: a_s
    real(8), intent (in) :: a_m
    real(8), intent (in) :: k
    real(8), intent (in) :: m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = a_m * (k ** m)
    if (m <= (-0.245d0)) then
        tmp = t_0
    else if (m <= 2.8d-19) then
        tmp = a_m / (((k * 10.0d0) + 1.0d0) + (k * k))
    else
        tmp = t_0
    end if
    code = a_s * tmp
end function
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
public static double code(double a_s, double a_m, double k, double m) {
	double t_0 = a_m * Math.pow(k, m);
	double tmp;
	if (m <= -0.245) {
		tmp = t_0;
	} else if (m <= 2.8e-19) {
		tmp = a_m / (((k * 10.0) + 1.0) + (k * k));
	} else {
		tmp = t_0;
	}
	return a_s * tmp;
}
a\_m = math.fabs(a)
a\_s = math.copysign(1.0, a)
def code(a_s, a_m, k, m):
	t_0 = a_m * math.pow(k, m)
	tmp = 0
	if m <= -0.245:
		tmp = t_0
	elif m <= 2.8e-19:
		tmp = a_m / (((k * 10.0) + 1.0) + (k * k))
	else:
		tmp = t_0
	return a_s * tmp
a\_m = abs(a)
a\_s = copysign(1.0, a)
function code(a_s, a_m, k, m)
	t_0 = Float64(a_m * (k ^ m))
	tmp = 0.0
	if (m <= -0.245)
		tmp = t_0;
	elseif (m <= 2.8e-19)
		tmp = Float64(a_m / Float64(Float64(Float64(k * 10.0) + 1.0) + Float64(k * k)));
	else
		tmp = t_0;
	end
	return Float64(a_s * tmp)
end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
function tmp_2 = code(a_s, a_m, k, m)
	t_0 = a_m * (k ^ m);
	tmp = 0.0;
	if (m <= -0.245)
		tmp = t_0;
	elseif (m <= 2.8e-19)
		tmp = a_m / (((k * 10.0) + 1.0) + (k * k));
	else
		tmp = t_0;
	end
	tmp_2 = a_s * tmp;
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[a$95$s_, a$95$m_, k_, m_] := Block[{t$95$0 = N[(a$95$m * N[Power[k, m], $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[m, -0.245], t$95$0, If[LessEqual[m, 2.8e-19], N[(a$95$m / N[(N[(N[(k * 10.0), $MachinePrecision] + 1.0), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]), $MachinePrecision]]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)

\\
\begin{array}{l}
t_0 := a\_m \cdot {k}^{m}\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;m \leq -0.245:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;m \leq 2.8 \cdot 10^{-19}:\\
\;\;\;\;\frac{a\_m}{\left(k \cdot 10 + 1\right) + k \cdot k}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if m < -0.245 or 2.80000000000000003e-19 < m

    1. Initial program 87.7%

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
      6. distribute-rgt-outN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
      9. +-lowering-+.f6487.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
    3. Simplified87.7%

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

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

        \[\leadsto \mathsf{*.f64}\left(a, \color{blue}{\left({k}^{m}\right)}\right) \]
      2. pow-lowering-pow.f64100.0%

        \[\leadsto \mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, \color{blue}{m}\right)\right) \]
    7. Simplified100.0%

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

    if -0.245 < m < 2.80000000000000003e-19

    1. Initial program 93.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 \mathsf{/.f64}\left(\color{blue}{a}, \mathsf{+.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(10, k\right)\right), \mathsf{*.f64}\left(k, k\right)\right)\right) \]
    4. Step-by-step derivation
      1. Simplified93.7%

        \[\leadsto \frac{\color{blue}{a}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
    5. Recombined 2 regimes into one program.
    6. Final simplification97.9%

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

    Alternative 6: 67.0% accurate, 4.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 -0.66:\\ \;\;\;\;\frac{a\_m - \frac{a\_m - \frac{a\_m}{k \cdot k}}{k \cdot k}}{k \cdot k}\\ \mathbf{elif}\;m \leq 2.8 \cdot 10^{-19}:\\ \;\;\;\;\frac{a\_m}{\left(k \cdot 10 + 1\right) + k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;a\_m + \left(k \cdot k\right) \cdot \left(a\_m \cdot \left(k \cdot k + -1\right)\right)\\ \end{array} \end{array} \]
    a\_m = (fabs.f64 a)
    a\_s = (copysign.f64 #s(literal 1 binary64) a)
    (FPCore (a_s a_m k m)
     :precision binary64
     (*
      a_s
      (if (<= m -0.66)
        (/ (- a_m (/ (- a_m (/ a_m (* k k))) (* k k))) (* k k))
        (if (<= m 2.8e-19)
          (/ a_m (+ (+ (* k 10.0) 1.0) (* k k)))
          (+ a_m (* (* k k) (* a_m (+ (* 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 <= -0.66) {
    		tmp = (a_m - ((a_m - (a_m / (k * k))) / (k * k))) / (k * k);
    	} else if (m <= 2.8e-19) {
    		tmp = a_m / (((k * 10.0) + 1.0) + (k * k));
    	} else {
    		tmp = a_m + ((k * k) * (a_m * ((k * k) + -1.0)));
    	}
    	return a_s * tmp;
    }
    
    a\_m = abs(a)
    a\_s = copysign(1.0d0, a)
    real(8) function code(a_s, a_m, k, m)
        real(8), intent (in) :: a_s
        real(8), intent (in) :: a_m
        real(8), intent (in) :: k
        real(8), intent (in) :: m
        real(8) :: tmp
        if (m <= (-0.66d0)) then
            tmp = (a_m - ((a_m - (a_m / (k * k))) / (k * k))) / (k * k)
        else if (m <= 2.8d-19) then
            tmp = a_m / (((k * 10.0d0) + 1.0d0) + (k * k))
        else
            tmp = a_m + ((k * k) * (a_m * ((k * k) + (-1.0d0))))
        end if
        code = a_s * tmp
    end function
    
    a\_m = Math.abs(a);
    a\_s = Math.copySign(1.0, a);
    public static double code(double a_s, double a_m, double k, double m) {
    	double tmp;
    	if (m <= -0.66) {
    		tmp = (a_m - ((a_m - (a_m / (k * k))) / (k * k))) / (k * k);
    	} else if (m <= 2.8e-19) {
    		tmp = a_m / (((k * 10.0) + 1.0) + (k * k));
    	} else {
    		tmp = a_m + ((k * k) * (a_m * ((k * k) + -1.0)));
    	}
    	return a_s * tmp;
    }
    
    a\_m = math.fabs(a)
    a\_s = math.copysign(1.0, a)
    def code(a_s, a_m, k, m):
    	tmp = 0
    	if m <= -0.66:
    		tmp = (a_m - ((a_m - (a_m / (k * k))) / (k * k))) / (k * k)
    	elif m <= 2.8e-19:
    		tmp = a_m / (((k * 10.0) + 1.0) + (k * k))
    	else:
    		tmp = a_m + ((k * k) * (a_m * ((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 <= -0.66)
    		tmp = Float64(Float64(a_m - Float64(Float64(a_m - Float64(a_m / Float64(k * k))) / Float64(k * k))) / Float64(k * k));
    	elseif (m <= 2.8e-19)
    		tmp = Float64(a_m / Float64(Float64(Float64(k * 10.0) + 1.0) + Float64(k * k)));
    	else
    		tmp = Float64(a_m + Float64(Float64(k * k) * Float64(a_m * Float64(Float64(k * k) + -1.0))));
    	end
    	return Float64(a_s * tmp)
    end
    
    a\_m = abs(a);
    a\_s = sign(a) * abs(1.0);
    function tmp_2 = code(a_s, a_m, k, m)
    	tmp = 0.0;
    	if (m <= -0.66)
    		tmp = (a_m - ((a_m - (a_m / (k * k))) / (k * k))) / (k * k);
    	elseif (m <= 2.8e-19)
    		tmp = a_m / (((k * 10.0) + 1.0) + (k * k));
    	else
    		tmp = a_m + ((k * k) * (a_m * ((k * k) + -1.0)));
    	end
    	tmp_2 = a_s * tmp;
    end
    
    a\_m = N[Abs[a], $MachinePrecision]
    a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, -0.66], N[(N[(a$95$m - N[(N[(a$95$m - N[(a$95$m / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 2.8e-19], N[(a$95$m / N[(N[(N[(k * 10.0), $MachinePrecision] + 1.0), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a$95$m + N[(N[(k * k), $MachinePrecision] * N[(a$95$m * N[(N[(k * k), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $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 -0.66:\\
    \;\;\;\;\frac{a\_m - \frac{a\_m - \frac{a\_m}{k \cdot k}}{k \cdot k}}{k \cdot k}\\
    
    \mathbf{elif}\;m \leq 2.8 \cdot 10^{-19}:\\
    \;\;\;\;\frac{a\_m}{\left(k \cdot 10 + 1\right) + k \cdot k}\\
    
    \mathbf{else}:\\
    \;\;\;\;a\_m + \left(k \cdot k\right) \cdot \left(a\_m \cdot \left(k \cdot k + -1\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if m < -0.660000000000000031

      1. Initial program 100.0%

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
        5. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
        6. distribute-rgt-outN/A

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
        9. +-lowering-+.f64100.0%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
      3. Simplified100.0%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
        11. fma-defineN/A

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
        20. *-lowering-*.f64N/A

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

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

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
      7. Simplified40.9%

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

        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      9. Step-by-step derivation
        1. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{k}\right)\right)\right) \]
        2. *-lowering-*.f6440.9%

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
      10. Simplified40.9%

        \[\leadsto \frac{a}{1 + \color{blue}{k \cdot k}} \]
      11. Step-by-step derivation
        1. clear-numN/A

          \[\leadsto \frac{1}{\color{blue}{\frac{1 + k \cdot k}{a}}} \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{1 + k \cdot k}{a}\right)}\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(1 + k \cdot k\right), \color{blue}{a}\right)\right) \]
        4. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \left(k \cdot k\right)\right), a\right)\right) \]
        5. *-lowering-*.f6444.2%

          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, k\right)\right), a\right)\right) \]
      12. Applied egg-rr44.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{1 + k \cdot k}{a}}} \]
      13. Taylor expanded in k around inf

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

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

          \[\leadsto \frac{\left(\frac{a}{{k}^{4}} + a\right) + \left(\mathsf{neg}\left(\frac{a}{{k}^{2}}\right)\right)}{{k}^{2}} \]
        3. mul-1-negN/A

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

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

          \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\frac{a}{{k}^{4}}\right)\right)\right)\right) + \left(a + -1 \cdot \frac{a}{{k}^{2}}\right)}{{k}^{2}} \]
        6. mul-1-negN/A

          \[\leadsto \frac{\left(\mathsf{neg}\left(-1 \cdot \frac{a}{{k}^{4}}\right)\right) + \left(a + -1 \cdot \frac{a}{{k}^{2}}\right)}{{k}^{2}} \]
        7. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(-1 \cdot \frac{a}{{k}^{4}}\right)\right) + \left(a + -1 \cdot \frac{a}{{k}^{2}}\right)\right), \color{blue}{\left({k}^{2}\right)}\right) \]
      15. Simplified72.4%

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

      if -0.660000000000000031 < m < 2.80000000000000003e-19

      1. Initial program 93.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 \mathsf{/.f64}\left(\color{blue}{a}, \mathsf{+.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(10, k\right)\right), \mathsf{*.f64}\left(k, k\right)\right)\right) \]
      4. Step-by-step derivation
        1. Simplified93.7%

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

        if 2.80000000000000003e-19 < m

        1. Initial program 76.1%

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
          5. +-lowering-+.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
          6. distribute-rgt-outN/A

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
          9. +-lowering-+.f6476.1%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
        3. Simplified76.1%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
          11. fma-defineN/A

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
          20. *-lowering-*.f64N/A

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

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

            \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
        7. Simplified5.1%

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

          \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2}\right)}\right)\right) \]
        9. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{k}\right)\right)\right) \]
          2. *-lowering-*.f645.1%

            \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
        10. Simplified5.1%

          \[\leadsto \frac{a}{1 + \color{blue}{k \cdot k}} \]
        11. Taylor expanded in k around 0

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

            \[\leadsto \mathsf{+.f64}\left(a, \color{blue}{\left({k}^{2} \cdot \left(a \cdot {k}^{2} - a\right)\right)}\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\left({k}^{2}\right), \color{blue}{\left(a \cdot {k}^{2} - a\right)}\right)\right) \]
          3. unpow2N/A

            \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\left(k \cdot k\right), \left(\color{blue}{a \cdot {k}^{2}} - a\right)\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\color{blue}{a \cdot {k}^{2}} - a\right)\right)\right) \]
          5. sub-negN/A

            \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(a \cdot {k}^{2} + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right)\right) \]
          6. mul-1-negN/A

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

            \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(a \cdot {k}^{2} + a \cdot \color{blue}{-1}\right)\right)\right) \]
          8. distribute-lft-outN/A

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

            \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(a, \color{blue}{\left({k}^{2} + -1\right)}\right)\right)\right) \]
          10. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\left({k}^{2}\right), \color{blue}{-1}\right)\right)\right)\right) \]
          11. unpow2N/A

            \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\left(k \cdot k\right), -1\right)\right)\right)\right) \]
          12. *-lowering-*.f6439.9%

            \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), -1\right)\right)\right)\right) \]
        13. Simplified39.9%

          \[\leadsto \color{blue}{a + \left(k \cdot k\right) \cdot \left(a \cdot \left(k \cdot k + -1\right)\right)} \]
      5. Recombined 3 regimes into one program.
      6. Final simplification68.3%

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

      Alternative 7: 65.7% accurate, 4.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 -0.39:\\ \;\;\;\;\frac{a\_m - \frac{\frac{a\_m \cdot -99}{k}}{k}}{k \cdot k}\\ \mathbf{elif}\;m \leq 2.8 \cdot 10^{-19}:\\ \;\;\;\;\frac{a\_m}{\left(k \cdot 10 + 1\right) + k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;a\_m + \left(k \cdot k\right) \cdot \left(a\_m \cdot \left(k \cdot k + -1\right)\right)\\ \end{array} \end{array} \]
      a\_m = (fabs.f64 a)
      a\_s = (copysign.f64 #s(literal 1 binary64) a)
      (FPCore (a_s a_m k m)
       :precision binary64
       (*
        a_s
        (if (<= m -0.39)
          (/ (- a_m (/ (/ (* a_m -99.0) k) k)) (* k k))
          (if (<= m 2.8e-19)
            (/ a_m (+ (+ (* k 10.0) 1.0) (* k k)))
            (+ a_m (* (* k k) (* a_m (+ (* 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 <= -0.39) {
      		tmp = (a_m - (((a_m * -99.0) / k) / k)) / (k * k);
      	} else if (m <= 2.8e-19) {
      		tmp = a_m / (((k * 10.0) + 1.0) + (k * k));
      	} else {
      		tmp = a_m + ((k * k) * (a_m * ((k * k) + -1.0)));
      	}
      	return a_s * tmp;
      }
      
      a\_m = abs(a)
      a\_s = copysign(1.0d0, a)
      real(8) function code(a_s, a_m, k, m)
          real(8), intent (in) :: a_s
          real(8), intent (in) :: a_m
          real(8), intent (in) :: k
          real(8), intent (in) :: m
          real(8) :: tmp
          if (m <= (-0.39d0)) then
              tmp = (a_m - (((a_m * (-99.0d0)) / k) / k)) / (k * k)
          else if (m <= 2.8d-19) then
              tmp = a_m / (((k * 10.0d0) + 1.0d0) + (k * k))
          else
              tmp = a_m + ((k * k) * (a_m * ((k * k) + (-1.0d0))))
          end if
          code = a_s * tmp
      end function
      
      a\_m = Math.abs(a);
      a\_s = Math.copySign(1.0, a);
      public static double code(double a_s, double a_m, double k, double m) {
      	double tmp;
      	if (m <= -0.39) {
      		tmp = (a_m - (((a_m * -99.0) / k) / k)) / (k * k);
      	} else if (m <= 2.8e-19) {
      		tmp = a_m / (((k * 10.0) + 1.0) + (k * k));
      	} else {
      		tmp = a_m + ((k * k) * (a_m * ((k * k) + -1.0)));
      	}
      	return a_s * tmp;
      }
      
      a\_m = math.fabs(a)
      a\_s = math.copysign(1.0, a)
      def code(a_s, a_m, k, m):
      	tmp = 0
      	if m <= -0.39:
      		tmp = (a_m - (((a_m * -99.0) / k) / k)) / (k * k)
      	elif m <= 2.8e-19:
      		tmp = a_m / (((k * 10.0) + 1.0) + (k * k))
      	else:
      		tmp = a_m + ((k * k) * (a_m * ((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 <= -0.39)
      		tmp = Float64(Float64(a_m - Float64(Float64(Float64(a_m * -99.0) / k) / k)) / Float64(k * k));
      	elseif (m <= 2.8e-19)
      		tmp = Float64(a_m / Float64(Float64(Float64(k * 10.0) + 1.0) + Float64(k * k)));
      	else
      		tmp = Float64(a_m + Float64(Float64(k * k) * Float64(a_m * Float64(Float64(k * k) + -1.0))));
      	end
      	return Float64(a_s * tmp)
      end
      
      a\_m = abs(a);
      a\_s = sign(a) * abs(1.0);
      function tmp_2 = code(a_s, a_m, k, m)
      	tmp = 0.0;
      	if (m <= -0.39)
      		tmp = (a_m - (((a_m * -99.0) / k) / k)) / (k * k);
      	elseif (m <= 2.8e-19)
      		tmp = a_m / (((k * 10.0) + 1.0) + (k * k));
      	else
      		tmp = a_m + ((k * k) * (a_m * ((k * k) + -1.0)));
      	end
      	tmp_2 = a_s * tmp;
      end
      
      a\_m = N[Abs[a], $MachinePrecision]
      a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, -0.39], N[(N[(a$95$m - N[(N[(N[(a$95$m * -99.0), $MachinePrecision] / k), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 2.8e-19], N[(a$95$m / N[(N[(N[(k * 10.0), $MachinePrecision] + 1.0), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a$95$m + N[(N[(k * k), $MachinePrecision] * N[(a$95$m * N[(N[(k * k), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $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 -0.39:\\
      \;\;\;\;\frac{a\_m - \frac{\frac{a\_m \cdot -99}{k}}{k}}{k \cdot k}\\
      
      \mathbf{elif}\;m \leq 2.8 \cdot 10^{-19}:\\
      \;\;\;\;\frac{a\_m}{\left(k \cdot 10 + 1\right) + k \cdot k}\\
      
      \mathbf{else}:\\
      \;\;\;\;a\_m + \left(k \cdot k\right) \cdot \left(a\_m \cdot \left(k \cdot k + -1\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if m < -0.39000000000000001

        1. Initial program 100.0%

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
          5. +-lowering-+.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
          6. distribute-rgt-outN/A

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
          9. +-lowering-+.f64100.0%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
        3. Simplified100.0%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
          11. fma-defineN/A

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
          20. *-lowering-*.f64N/A

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

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

            \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
        7. Simplified40.9%

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

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

            \[\leadsto \mathsf{/.f64}\left(\left(a + -1 \cdot \frac{-1 \cdot \frac{\left(10 \cdot \frac{a}{k} + 10 \cdot \frac{a + -100 \cdot a}{k}\right) - \left(a + -100 \cdot a\right)}{k} - -10 \cdot a}{k}\right), \color{blue}{\left({k}^{2}\right)}\right) \]
        10. Simplified49.3%

          \[\leadsto \color{blue}{\frac{a - \frac{a \cdot 10 - \frac{\frac{a \cdot 10}{k} + \left(\frac{-990 \cdot a}{k} + a \cdot 99\right)}{k}}{k}}{k \cdot k}} \]
        11. Taylor expanded in k around 0

          \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, \mathsf{/.f64}\left(\color{blue}{\left(\frac{-99 \cdot \left(a \cdot k\right) - \left(-990 \cdot a + 10 \cdot a\right)}{{k}^{2}}\right)}, k\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
        12. Step-by-step derivation
          1. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(-99 \cdot \left(a \cdot k\right) - \left(-990 \cdot a + 10 \cdot a\right)\right), \left({k}^{2}\right)\right), k\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
          2. sub-negN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(-99 \cdot \left(a \cdot k\right) + \left(\mathsf{neg}\left(\left(-990 \cdot a + 10 \cdot a\right)\right)\right)\right), \left({k}^{2}\right)\right), k\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
          3. +-lowering-+.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(-99 \cdot \left(a \cdot k\right)\right), \left(\mathsf{neg}\left(\left(-990 \cdot a + 10 \cdot a\right)\right)\right)\right), \left({k}^{2}\right)\right), k\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
          4. *-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\left(a \cdot k\right) \cdot -99\right), \left(\mathsf{neg}\left(\left(-990 \cdot a + 10 \cdot a\right)\right)\right)\right), \left({k}^{2}\right)\right), k\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
          5. associate-*l*N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(a \cdot \left(k \cdot -99\right)\right), \left(\mathsf{neg}\left(\left(-990 \cdot a + 10 \cdot a\right)\right)\right)\right), \left({k}^{2}\right)\right), k\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \left(k \cdot -99\right)\right), \left(\mathsf{neg}\left(\left(-990 \cdot a + 10 \cdot a\right)\right)\right)\right), \left({k}^{2}\right)\right), k\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(k, -99\right)\right), \left(\mathsf{neg}\left(\left(-990 \cdot a + 10 \cdot a\right)\right)\right)\right), \left({k}^{2}\right)\right), k\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
          8. distribute-rgt-outN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(k, -99\right)\right), \left(\mathsf{neg}\left(a \cdot \left(-990 + 10\right)\right)\right)\right), \left({k}^{2}\right)\right), k\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
          9. distribute-rgt-neg-inN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(k, -99\right)\right), \left(a \cdot \left(\mathsf{neg}\left(\left(-990 + 10\right)\right)\right)\right)\right), \left({k}^{2}\right)\right), k\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
          10. metadata-evalN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(k, -99\right)\right), \left(a \cdot \left(\mathsf{neg}\left(-980\right)\right)\right)\right), \left({k}^{2}\right)\right), k\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
          11. metadata-evalN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(k, -99\right)\right), \left(a \cdot 980\right)\right), \left({k}^{2}\right)\right), k\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
          12. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(k, -99\right)\right), \mathsf{*.f64}\left(a, 980\right)\right), \left({k}^{2}\right)\right), k\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
          13. unpow2N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(k, -99\right)\right), \mathsf{*.f64}\left(a, 980\right)\right), \left(k \cdot k\right)\right), k\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
          14. *-lowering-*.f6437.2%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(k, -99\right)\right), \mathsf{*.f64}\left(a, 980\right)\right), \mathsf{*.f64}\left(k, k\right)\right), k\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
        13. Simplified37.2%

          \[\leadsto \frac{a - \frac{\color{blue}{\frac{a \cdot \left(k \cdot -99\right) + a \cdot 980}{k \cdot k}}}{k}}{k \cdot k} \]
        14. Taylor expanded in k around inf

          \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, \mathsf{/.f64}\left(\color{blue}{\left(-99 \cdot \frac{a}{k}\right)}, k\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
        15. Step-by-step derivation
          1. associate-*r/N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, \mathsf{/.f64}\left(\left(\frac{-99 \cdot a}{k}\right), k\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
          2. /-lowering-/.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(-99 \cdot a\right), k\right), k\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(a \cdot -99\right), k\right), k\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
          4. *-lowering-*.f6468.9%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(a, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(a, -99\right), k\right), k\right)\right), \mathsf{*.f64}\left(k, k\right)\right) \]
        16. Simplified68.9%

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

        if -0.39000000000000001 < m < 2.80000000000000003e-19

        1. Initial program 93.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 \mathsf{/.f64}\left(\color{blue}{a}, \mathsf{+.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(10, k\right)\right), \mathsf{*.f64}\left(k, k\right)\right)\right) \]
        4. Step-by-step derivation
          1. Simplified93.7%

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

          if 2.80000000000000003e-19 < m

          1. Initial program 76.1%

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

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

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

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
            6. distribute-rgt-outN/A

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

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
            9. +-lowering-+.f6476.1%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
          3. Simplified76.1%

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
            11. fma-defineN/A

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
            20. *-lowering-*.f64N/A

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

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

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
          7. Simplified5.1%

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

            \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2}\right)}\right)\right) \]
          9. Step-by-step derivation
            1. unpow2N/A

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{k}\right)\right)\right) \]
            2. *-lowering-*.f645.1%

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
          10. Simplified5.1%

            \[\leadsto \frac{a}{1 + \color{blue}{k \cdot k}} \]
          11. Taylor expanded in k around 0

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

              \[\leadsto \mathsf{+.f64}\left(a, \color{blue}{\left({k}^{2} \cdot \left(a \cdot {k}^{2} - a\right)\right)}\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\left({k}^{2}\right), \color{blue}{\left(a \cdot {k}^{2} - a\right)}\right)\right) \]
            3. unpow2N/A

              \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\left(k \cdot k\right), \left(\color{blue}{a \cdot {k}^{2}} - a\right)\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\color{blue}{a \cdot {k}^{2}} - a\right)\right)\right) \]
            5. sub-negN/A

              \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(a \cdot {k}^{2} + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right)\right) \]
            6. mul-1-negN/A

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

              \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(a \cdot {k}^{2} + a \cdot \color{blue}{-1}\right)\right)\right) \]
            8. distribute-lft-outN/A

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

              \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(a, \color{blue}{\left({k}^{2} + -1\right)}\right)\right)\right) \]
            10. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\left({k}^{2}\right), \color{blue}{-1}\right)\right)\right)\right) \]
            11. unpow2N/A

              \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\left(k \cdot k\right), -1\right)\right)\right)\right) \]
            12. *-lowering-*.f6439.9%

              \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), -1\right)\right)\right)\right) \]
          13. Simplified39.9%

            \[\leadsto \color{blue}{a + \left(k \cdot k\right) \cdot \left(a \cdot \left(k \cdot k + -1\right)\right)} \]
        5. Recombined 3 regimes into one program.
        6. Final simplification67.2%

          \[\leadsto \begin{array}{l} \mathbf{if}\;m \leq -0.39:\\ \;\;\;\;\frac{a - \frac{\frac{a \cdot -99}{k}}{k}}{k \cdot k}\\ \mathbf{elif}\;m \leq 2.8 \cdot 10^{-19}:\\ \;\;\;\;\frac{a}{\left(k \cdot 10 + 1\right) + k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;a + \left(k \cdot k\right) \cdot \left(a \cdot \left(k \cdot k + -1\right)\right)\\ \end{array} \]
        7. Add Preprocessing

        Alternative 8: 64.3% accurate, 4.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 -0.29:\\ \;\;\;\;\frac{1}{\frac{k \cdot k}{a\_m}}\\ \mathbf{elif}\;m \leq 2.3:\\ \;\;\;\;\frac{a\_m}{\left(k \cdot 10 + 1\right) + k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;a\_m + \left(k \cdot k\right) \cdot \left(a\_m \cdot \left(k \cdot k + -1\right)\right)\\ \end{array} \end{array} \]
        a\_m = (fabs.f64 a)
        a\_s = (copysign.f64 #s(literal 1 binary64) a)
        (FPCore (a_s a_m k m)
         :precision binary64
         (*
          a_s
          (if (<= m -0.29)
            (/ 1.0 (/ (* k k) a_m))
            (if (<= m 2.3)
              (/ a_m (+ (+ (* k 10.0) 1.0) (* k k)))
              (+ a_m (* (* k k) (* a_m (+ (* 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 <= -0.29) {
        		tmp = 1.0 / ((k * k) / a_m);
        	} else if (m <= 2.3) {
        		tmp = a_m / (((k * 10.0) + 1.0) + (k * k));
        	} else {
        		tmp = a_m + ((k * k) * (a_m * ((k * k) + -1.0)));
        	}
        	return a_s * tmp;
        }
        
        a\_m = abs(a)
        a\_s = copysign(1.0d0, a)
        real(8) function code(a_s, a_m, k, m)
            real(8), intent (in) :: a_s
            real(8), intent (in) :: a_m
            real(8), intent (in) :: k
            real(8), intent (in) :: m
            real(8) :: tmp
            if (m <= (-0.29d0)) then
                tmp = 1.0d0 / ((k * k) / a_m)
            else if (m <= 2.3d0) then
                tmp = a_m / (((k * 10.0d0) + 1.0d0) + (k * k))
            else
                tmp = a_m + ((k * k) * (a_m * ((k * k) + (-1.0d0))))
            end if
            code = a_s * tmp
        end function
        
        a\_m = Math.abs(a);
        a\_s = Math.copySign(1.0, a);
        public static double code(double a_s, double a_m, double k, double m) {
        	double tmp;
        	if (m <= -0.29) {
        		tmp = 1.0 / ((k * k) / a_m);
        	} else if (m <= 2.3) {
        		tmp = a_m / (((k * 10.0) + 1.0) + (k * k));
        	} else {
        		tmp = a_m + ((k * k) * (a_m * ((k * k) + -1.0)));
        	}
        	return a_s * tmp;
        }
        
        a\_m = math.fabs(a)
        a\_s = math.copysign(1.0, a)
        def code(a_s, a_m, k, m):
        	tmp = 0
        	if m <= -0.29:
        		tmp = 1.0 / ((k * k) / a_m)
        	elif m <= 2.3:
        		tmp = a_m / (((k * 10.0) + 1.0) + (k * k))
        	else:
        		tmp = a_m + ((k * k) * (a_m * ((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 <= -0.29)
        		tmp = Float64(1.0 / Float64(Float64(k * k) / a_m));
        	elseif (m <= 2.3)
        		tmp = Float64(a_m / Float64(Float64(Float64(k * 10.0) + 1.0) + Float64(k * k)));
        	else
        		tmp = Float64(a_m + Float64(Float64(k * k) * Float64(a_m * Float64(Float64(k * k) + -1.0))));
        	end
        	return Float64(a_s * tmp)
        end
        
        a\_m = abs(a);
        a\_s = sign(a) * abs(1.0);
        function tmp_2 = code(a_s, a_m, k, m)
        	tmp = 0.0;
        	if (m <= -0.29)
        		tmp = 1.0 / ((k * k) / a_m);
        	elseif (m <= 2.3)
        		tmp = a_m / (((k * 10.0) + 1.0) + (k * k));
        	else
        		tmp = a_m + ((k * k) * (a_m * ((k * k) + -1.0)));
        	end
        	tmp_2 = a_s * tmp;
        end
        
        a\_m = N[Abs[a], $MachinePrecision]
        a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
        code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, -0.29], N[(1.0 / N[(N[(k * k), $MachinePrecision] / a$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 2.3], N[(a$95$m / N[(N[(N[(k * 10.0), $MachinePrecision] + 1.0), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a$95$m + N[(N[(k * k), $MachinePrecision] * N[(a$95$m * N[(N[(k * k), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $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 -0.29:\\
        \;\;\;\;\frac{1}{\frac{k \cdot k}{a\_m}}\\
        
        \mathbf{elif}\;m \leq 2.3:\\
        \;\;\;\;\frac{a\_m}{\left(k \cdot 10 + 1\right) + k \cdot k}\\
        
        \mathbf{else}:\\
        \;\;\;\;a\_m + \left(k \cdot k\right) \cdot \left(a\_m \cdot \left(k \cdot k + -1\right)\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if m < -0.28999999999999998

          1. Initial program 100.0%

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

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

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

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
            5. +-lowering-+.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
            6. distribute-rgt-outN/A

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

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
            9. +-lowering-+.f64100.0%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
          3. Simplified100.0%

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
            11. fma-defineN/A

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
            20. *-lowering-*.f64N/A

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

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

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
          7. Simplified40.9%

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

            \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
          9. Step-by-step derivation
            1. unpow2N/A

              \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
            2. *-lowering-*.f6464.3%

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
          10. Simplified64.3%

            \[\leadsto \frac{a}{\color{blue}{k \cdot k}} \]
          11. Step-by-step derivation
            1. associate-/r*N/A

              \[\leadsto \frac{\frac{a}{k}}{\color{blue}{k}} \]
            2. clear-numN/A

              \[\leadsto \frac{1}{\color{blue}{\frac{k}{\frac{a}{k}}}} \]
            3. un-div-invN/A

              \[\leadsto \frac{1}{k \cdot \color{blue}{\frac{1}{\frac{a}{k}}}} \]
            4. clear-numN/A

              \[\leadsto \frac{1}{k \cdot \frac{k}{\color{blue}{a}}} \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(k \cdot \frac{k}{a}\right)}\right) \]
            6. associate-*r/N/A

              \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{k \cdot k}{\color{blue}{a}}\right)\right) \]
            7. /-lowering-/.f64N/A

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(k \cdot k\right), \color{blue}{a}\right)\right) \]
            8. *-lowering-*.f6467.6%

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, k\right), a\right)\right) \]
          12. Applied egg-rr67.6%

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

          if -0.28999999999999998 < m < 2.2999999999999998

          1. Initial program 94.1%

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

            \[\leadsto \mathsf{/.f64}\left(\color{blue}{a}, \mathsf{+.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(10, k\right)\right), \mathsf{*.f64}\left(k, k\right)\right)\right) \]
          4. Step-by-step derivation
            1. Simplified93.8%

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

            if 2.2999999999999998 < m

            1. Initial program 75.6%

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
              5. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
              6. distribute-rgt-outN/A

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
              9. +-lowering-+.f6475.6%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
            3. Simplified75.6%

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
              11. fma-defineN/A

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
              20. *-lowering-*.f64N/A

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
            7. Simplified3.0%

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

              \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2}\right)}\right)\right) \]
            9. Step-by-step derivation
              1. unpow2N/A

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{k}\right)\right)\right) \]
              2. *-lowering-*.f643.0%

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
            10. Simplified3.0%

              \[\leadsto \frac{a}{1 + \color{blue}{k \cdot k}} \]
            11. Taylor expanded in k around 0

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

                \[\leadsto \mathsf{+.f64}\left(a, \color{blue}{\left({k}^{2} \cdot \left(a \cdot {k}^{2} - a\right)\right)}\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\left({k}^{2}\right), \color{blue}{\left(a \cdot {k}^{2} - a\right)}\right)\right) \]
              3. unpow2N/A

                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\left(k \cdot k\right), \left(\color{blue}{a \cdot {k}^{2}} - a\right)\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\color{blue}{a \cdot {k}^{2}} - a\right)\right)\right) \]
              5. sub-negN/A

                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(a \cdot {k}^{2} + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right)\right) \]
              6. mul-1-negN/A

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

                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(a \cdot {k}^{2} + a \cdot \color{blue}{-1}\right)\right)\right) \]
              8. distribute-lft-outN/A

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

                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(a, \color{blue}{\left({k}^{2} + -1\right)}\right)\right)\right) \]
              10. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\left({k}^{2}\right), \color{blue}{-1}\right)\right)\right)\right) \]
              11. unpow2N/A

                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\left(k \cdot k\right), -1\right)\right)\right)\right) \]
              12. *-lowering-*.f6438.6%

                \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), -1\right)\right)\right)\right) \]
            13. Simplified38.6%

              \[\leadsto \color{blue}{a + \left(k \cdot k\right) \cdot \left(a \cdot \left(k \cdot k + -1\right)\right)} \]
          5. Recombined 3 regimes into one program.
          6. Final simplification66.7%

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

          Alternative 9: 60.4% accurate, 4.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 -0.41:\\ \;\;\;\;\frac{1}{\frac{k \cdot k}{a\_m}}\\ \mathbf{elif}\;m \leq 2.8 \cdot 10^{-19}:\\ \;\;\;\;\frac{a\_m}{\left(k \cdot 10 + 1\right) + k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;a\_m + k \cdot \left(k \cdot \left(a\_m \cdot 99\right) + a\_m \cdot -10\right)\\ \end{array} \end{array} \]
          a\_m = (fabs.f64 a)
          a\_s = (copysign.f64 #s(literal 1 binary64) a)
          (FPCore (a_s a_m k m)
           :precision binary64
           (*
            a_s
            (if (<= m -0.41)
              (/ 1.0 (/ (* k k) a_m))
              (if (<= m 2.8e-19)
                (/ a_m (+ (+ (* k 10.0) 1.0) (* k k)))
                (+ a_m (* k (+ (* k (* a_m 99.0)) (* a_m -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 <= -0.41) {
          		tmp = 1.0 / ((k * k) / a_m);
          	} else if (m <= 2.8e-19) {
          		tmp = a_m / (((k * 10.0) + 1.0) + (k * k));
          	} else {
          		tmp = a_m + (k * ((k * (a_m * 99.0)) + (a_m * -10.0)));
          	}
          	return a_s * tmp;
          }
          
          a\_m = abs(a)
          a\_s = copysign(1.0d0, a)
          real(8) function code(a_s, a_m, k, m)
              real(8), intent (in) :: a_s
              real(8), intent (in) :: a_m
              real(8), intent (in) :: k
              real(8), intent (in) :: m
              real(8) :: tmp
              if (m <= (-0.41d0)) then
                  tmp = 1.0d0 / ((k * k) / a_m)
              else if (m <= 2.8d-19) then
                  tmp = a_m / (((k * 10.0d0) + 1.0d0) + (k * k))
              else
                  tmp = a_m + (k * ((k * (a_m * 99.0d0)) + (a_m * (-10.0d0))))
              end if
              code = a_s * tmp
          end function
          
          a\_m = Math.abs(a);
          a\_s = Math.copySign(1.0, a);
          public static double code(double a_s, double a_m, double k, double m) {
          	double tmp;
          	if (m <= -0.41) {
          		tmp = 1.0 / ((k * k) / a_m);
          	} else if (m <= 2.8e-19) {
          		tmp = a_m / (((k * 10.0) + 1.0) + (k * k));
          	} else {
          		tmp = a_m + (k * ((k * (a_m * 99.0)) + (a_m * -10.0)));
          	}
          	return a_s * tmp;
          }
          
          a\_m = math.fabs(a)
          a\_s = math.copysign(1.0, a)
          def code(a_s, a_m, k, m):
          	tmp = 0
          	if m <= -0.41:
          		tmp = 1.0 / ((k * k) / a_m)
          	elif m <= 2.8e-19:
          		tmp = a_m / (((k * 10.0) + 1.0) + (k * k))
          	else:
          		tmp = a_m + (k * ((k * (a_m * 99.0)) + (a_m * -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 <= -0.41)
          		tmp = Float64(1.0 / Float64(Float64(k * k) / a_m));
          	elseif (m <= 2.8e-19)
          		tmp = Float64(a_m / Float64(Float64(Float64(k * 10.0) + 1.0) + Float64(k * k)));
          	else
          		tmp = Float64(a_m + Float64(k * Float64(Float64(k * Float64(a_m * 99.0)) + Float64(a_m * -10.0))));
          	end
          	return Float64(a_s * tmp)
          end
          
          a\_m = abs(a);
          a\_s = sign(a) * abs(1.0);
          function tmp_2 = code(a_s, a_m, k, m)
          	tmp = 0.0;
          	if (m <= -0.41)
          		tmp = 1.0 / ((k * k) / a_m);
          	elseif (m <= 2.8e-19)
          		tmp = a_m / (((k * 10.0) + 1.0) + (k * k));
          	else
          		tmp = a_m + (k * ((k * (a_m * 99.0)) + (a_m * -10.0)));
          	end
          	tmp_2 = a_s * tmp;
          end
          
          a\_m = N[Abs[a], $MachinePrecision]
          a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, -0.41], N[(1.0 / N[(N[(k * k), $MachinePrecision] / a$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 2.8e-19], N[(a$95$m / N[(N[(N[(k * 10.0), $MachinePrecision] + 1.0), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a$95$m + N[(k * N[(N[(k * N[(a$95$m * 99.0), $MachinePrecision]), $MachinePrecision] + N[(a$95$m * -10.0), $MachinePrecision]), $MachinePrecision]), $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 -0.41:\\
          \;\;\;\;\frac{1}{\frac{k \cdot k}{a\_m}}\\
          
          \mathbf{elif}\;m \leq 2.8 \cdot 10^{-19}:\\
          \;\;\;\;\frac{a\_m}{\left(k \cdot 10 + 1\right) + k \cdot k}\\
          
          \mathbf{else}:\\
          \;\;\;\;a\_m + k \cdot \left(k \cdot \left(a\_m \cdot 99\right) + a\_m \cdot -10\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if m < -0.409999999999999976

            1. Initial program 100.0%

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
              5. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
              6. distribute-rgt-outN/A

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
              9. +-lowering-+.f64100.0%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
            3. Simplified100.0%

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
              11. fma-defineN/A

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
              20. *-lowering-*.f64N/A

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

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

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
            7. Simplified40.9%

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

              \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
            9. Step-by-step derivation
              1. unpow2N/A

                \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
              2. *-lowering-*.f6464.3%

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
            10. Simplified64.3%

              \[\leadsto \frac{a}{\color{blue}{k \cdot k}} \]
            11. Step-by-step derivation
              1. associate-/r*N/A

                \[\leadsto \frac{\frac{a}{k}}{\color{blue}{k}} \]
              2. clear-numN/A

                \[\leadsto \frac{1}{\color{blue}{\frac{k}{\frac{a}{k}}}} \]
              3. un-div-invN/A

                \[\leadsto \frac{1}{k \cdot \color{blue}{\frac{1}{\frac{a}{k}}}} \]
              4. clear-numN/A

                \[\leadsto \frac{1}{k \cdot \frac{k}{\color{blue}{a}}} \]
              5. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(k \cdot \frac{k}{a}\right)}\right) \]
              6. associate-*r/N/A

                \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{k \cdot k}{\color{blue}{a}}\right)\right) \]
              7. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(k \cdot k\right), \color{blue}{a}\right)\right) \]
              8. *-lowering-*.f6467.6%

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, k\right), a\right)\right) \]
            12. Applied egg-rr67.6%

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

            if -0.409999999999999976 < m < 2.80000000000000003e-19

            1. Initial program 93.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 \mathsf{/.f64}\left(\color{blue}{a}, \mathsf{+.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(10, k\right)\right), \mathsf{*.f64}\left(k, k\right)\right)\right) \]
            4. Step-by-step derivation
              1. Simplified93.7%

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

              if 2.80000000000000003e-19 < m

              1. Initial program 76.1%

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6476.1%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified76.1%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                11. fma-defineN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                20. *-lowering-*.f64N/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
              7. Simplified5.1%

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

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

                  \[\leadsto \mathsf{+.f64}\left(a, \color{blue}{\left(k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{\left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right)}\right)\right) \]
                3. cancel-sign-sub-invN/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) + \color{blue}{\left(\mathsf{neg}\left(10\right)\right) \cdot a}\right)\right)\right) \]
                4. metadata-evalN/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) + -10 \cdot a\right)\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right)\right), \color{blue}{\left(-10 \cdot a\right)}\right)\right)\right) \]
                6. mul-1-negN/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(k \cdot \left(a + -100 \cdot a\right)\right)\right), \left(\color{blue}{-10} \cdot a\right)\right)\right)\right) \]
                7. distribute-rgt-neg-inN/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\left(k \cdot \left(\mathsf{neg}\left(\left(a + -100 \cdot a\right)\right)\right)\right), \left(\color{blue}{-10} \cdot a\right)\right)\right)\right) \]
                8. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left(\mathsf{neg}\left(\left(a + -100 \cdot a\right)\right)\right)\right), \left(\color{blue}{-10} \cdot a\right)\right)\right)\right) \]
                9. distribute-rgt1-inN/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left(\mathsf{neg}\left(\left(-100 + 1\right) \cdot a\right)\right)\right), \left(-10 \cdot a\right)\right)\right)\right) \]
                10. *-commutativeN/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left(\mathsf{neg}\left(a \cdot \left(-100 + 1\right)\right)\right)\right), \left(-10 \cdot a\right)\right)\right)\right) \]
                11. distribute-rgt-neg-inN/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \left(a \cdot \left(\mathsf{neg}\left(\left(-100 + 1\right)\right)\right)\right)\right), \left(-10 \cdot a\right)\right)\right)\right) \]
                12. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(\left(-100 + 1\right)\right)\right)\right)\right), \left(-10 \cdot a\right)\right)\right)\right) \]
                13. metadata-evalN/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(-99\right)\right)\right)\right), \left(-10 \cdot a\right)\right)\right)\right) \]
                14. metadata-evalN/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, 99\right)\right), \left(-10 \cdot a\right)\right)\right)\right) \]
                15. *-commutativeN/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, 99\right)\right), \left(a \cdot \color{blue}{-10}\right)\right)\right)\right) \]
                16. *-lowering-*.f6431.3%

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(a, 99\right)\right), \mathsf{*.f64}\left(a, \color{blue}{-10}\right)\right)\right)\right) \]
              10. Simplified31.3%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;m \leq -0.41:\\ \;\;\;\;\frac{1}{\frac{k \cdot k}{a}}\\ \mathbf{elif}\;m \leq 2.8 \cdot 10^{-19}:\\ \;\;\;\;\frac{a}{\left(k \cdot 10 + 1\right) + k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;a + k \cdot \left(k \cdot \left(a \cdot 99\right) + a \cdot -10\right)\\ \end{array} \]
            7. Add Preprocessing

            Alternative 10: 47.6% accurate, 6.7× 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}\;k \leq -3 \cdot 10^{-308}:\\ \;\;\;\;\frac{1}{\frac{k \cdot k}{a\_m}}\\ \mathbf{elif}\;k \leq 10:\\ \;\;\;\;\frac{a\_m}{k \cdot 10 + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{a\_m}{k}}{k}\\ \end{array} \end{array} \]
            a\_m = (fabs.f64 a)
            a\_s = (copysign.f64 #s(literal 1 binary64) a)
            (FPCore (a_s a_m k m)
             :precision binary64
             (*
              a_s
              (if (<= k -3e-308)
                (/ 1.0 (/ (* k k) a_m))
                (if (<= k 10.0) (/ a_m (+ (* k 10.0) 1.0)) (/ (/ a_m k) k)))))
            a\_m = fabs(a);
            a\_s = copysign(1.0, a);
            double code(double a_s, double a_m, double k, double m) {
            	double tmp;
            	if (k <= -3e-308) {
            		tmp = 1.0 / ((k * k) / a_m);
            	} else if (k <= 10.0) {
            		tmp = a_m / ((k * 10.0) + 1.0);
            	} else {
            		tmp = (a_m / k) / k;
            	}
            	return a_s * tmp;
            }
            
            a\_m = abs(a)
            a\_s = copysign(1.0d0, a)
            real(8) function code(a_s, a_m, k, m)
                real(8), intent (in) :: a_s
                real(8), intent (in) :: a_m
                real(8), intent (in) :: k
                real(8), intent (in) :: m
                real(8) :: tmp
                if (k <= (-3d-308)) then
                    tmp = 1.0d0 / ((k * k) / a_m)
                else if (k <= 10.0d0) then
                    tmp = a_m / ((k * 10.0d0) + 1.0d0)
                else
                    tmp = (a_m / k) / k
                end if
                code = a_s * tmp
            end function
            
            a\_m = Math.abs(a);
            a\_s = Math.copySign(1.0, a);
            public static double code(double a_s, double a_m, double k, double m) {
            	double tmp;
            	if (k <= -3e-308) {
            		tmp = 1.0 / ((k * k) / a_m);
            	} else if (k <= 10.0) {
            		tmp = a_m / ((k * 10.0) + 1.0);
            	} else {
            		tmp = (a_m / k) / k;
            	}
            	return a_s * tmp;
            }
            
            a\_m = math.fabs(a)
            a\_s = math.copysign(1.0, a)
            def code(a_s, a_m, k, m):
            	tmp = 0
            	if k <= -3e-308:
            		tmp = 1.0 / ((k * k) / a_m)
            	elif k <= 10.0:
            		tmp = a_m / ((k * 10.0) + 1.0)
            	else:
            		tmp = (a_m / k) / k
            	return a_s * tmp
            
            a\_m = abs(a)
            a\_s = copysign(1.0, a)
            function code(a_s, a_m, k, m)
            	tmp = 0.0
            	if (k <= -3e-308)
            		tmp = Float64(1.0 / Float64(Float64(k * k) / a_m));
            	elseif (k <= 10.0)
            		tmp = Float64(a_m / Float64(Float64(k * 10.0) + 1.0));
            	else
            		tmp = Float64(Float64(a_m / k) / k);
            	end
            	return Float64(a_s * tmp)
            end
            
            a\_m = abs(a);
            a\_s = sign(a) * abs(1.0);
            function tmp_2 = code(a_s, a_m, k, m)
            	tmp = 0.0;
            	if (k <= -3e-308)
            		tmp = 1.0 / ((k * k) / a_m);
            	elseif (k <= 10.0)
            		tmp = a_m / ((k * 10.0) + 1.0);
            	else
            		tmp = (a_m / k) / k;
            	end
            	tmp_2 = a_s * tmp;
            end
            
            a\_m = N[Abs[a], $MachinePrecision]
            a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[k, -3e-308], N[(1.0 / N[(N[(k * k), $MachinePrecision] / a$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 10.0], N[(a$95$m / N[(N[(k * 10.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m / k), $MachinePrecision] / k), $MachinePrecision]]]), $MachinePrecision]
            
            \begin{array}{l}
            a\_m = \left|a\right|
            \\
            a\_s = \mathsf{copysign}\left(1, a\right)
            
            \\
            a\_s \cdot \begin{array}{l}
            \mathbf{if}\;k \leq -3 \cdot 10^{-308}:\\
            \;\;\;\;\frac{1}{\frac{k \cdot k}{a\_m}}\\
            
            \mathbf{elif}\;k \leq 10:\\
            \;\;\;\;\frac{a\_m}{k \cdot 10 + 1}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{\frac{a\_m}{k}}{k}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if k < -3.00000000000000022e-308

              1. Initial program 88.6%

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6488.6%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified88.6%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                11. fma-defineN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                20. *-lowering-*.f64N/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
              7. Simplified23.4%

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

                \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
              9. Step-by-step derivation
                1. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                2. *-lowering-*.f6433.9%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
              10. Simplified33.9%

                \[\leadsto \frac{a}{\color{blue}{k \cdot k}} \]
              11. Step-by-step derivation
                1. associate-/r*N/A

                  \[\leadsto \frac{\frac{a}{k}}{\color{blue}{k}} \]
                2. clear-numN/A

                  \[\leadsto \frac{1}{\color{blue}{\frac{k}{\frac{a}{k}}}} \]
                3. un-div-invN/A

                  \[\leadsto \frac{1}{k \cdot \color{blue}{\frac{1}{\frac{a}{k}}}} \]
                4. clear-numN/A

                  \[\leadsto \frac{1}{k \cdot \frac{k}{\color{blue}{a}}} \]
                5. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(k \cdot \frac{k}{a}\right)}\right) \]
                6. associate-*r/N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{k \cdot k}{\color{blue}{a}}\right)\right) \]
                7. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(k \cdot k\right), \color{blue}{a}\right)\right) \]
                8. *-lowering-*.f6434.5%

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, k\right), a\right)\right) \]
              12. Applied egg-rr34.5%

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

              if -3.00000000000000022e-308 < k < 10

              1. Initial program 100.0%

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6499.9%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified99.9%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                11. fma-defineN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                20. *-lowering-*.f64N/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
              7. Simplified54.1%

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

                \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + 10 \cdot k\right)}\right) \]
              9. Step-by-step derivation
                1. +-lowering-+.f64N/A

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{10}\right)\right)\right) \]
                3. *-lowering-*.f6453.4%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{10}\right)\right)\right) \]
              10. Simplified53.4%

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

              if 10 < k

              1. Initial program 80.1%

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6480.1%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified80.1%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                11. fma-defineN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                20. *-lowering-*.f64N/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
              7. Simplified58.5%

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

                \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
              9. Step-by-step derivation
                1. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                2. *-lowering-*.f6458.0%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
              10. Simplified58.0%

                \[\leadsto \frac{a}{\color{blue}{k \cdot k}} \]
              11. Step-by-step derivation
                1. associate-/r*N/A

                  \[\leadsto \frac{\frac{a}{k}}{\color{blue}{k}} \]
                2. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(\frac{a}{k}\right), \color{blue}{k}\right) \]
                3. /-lowering-/.f6460.7%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, k\right), k\right) \]
              12. Applied egg-rr60.7%

                \[\leadsto \color{blue}{\frac{\frac{a}{k}}{k}} \]
            3. Recombined 3 regimes into one program.
            4. Final simplification50.1%

              \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -3 \cdot 10^{-308}:\\ \;\;\;\;\frac{1}{\frac{k \cdot k}{a}}\\ \mathbf{elif}\;k \leq 10:\\ \;\;\;\;\frac{a}{k \cdot 10 + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{a}{k}}{k}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 11: 47.5% accurate, 6.7× 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}\;k \leq -3 \cdot 10^{-308}:\\ \;\;\;\;\frac{1}{\frac{k \cdot k}{a\_m}}\\ \mathbf{elif}\;k \leq 0.14:\\ \;\;\;\;a\_m + a\_m \cdot \left(k \cdot -10\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{a\_m}{k}}{k}\\ \end{array} \end{array} \]
            a\_m = (fabs.f64 a)
            a\_s = (copysign.f64 #s(literal 1 binary64) a)
            (FPCore (a_s a_m k m)
             :precision binary64
             (*
              a_s
              (if (<= k -3e-308)
                (/ 1.0 (/ (* k k) a_m))
                (if (<= k 0.14) (+ a_m (* a_m (* k -10.0))) (/ (/ a_m k) k)))))
            a\_m = fabs(a);
            a\_s = copysign(1.0, a);
            double code(double a_s, double a_m, double k, double m) {
            	double tmp;
            	if (k <= -3e-308) {
            		tmp = 1.0 / ((k * k) / a_m);
            	} else if (k <= 0.14) {
            		tmp = a_m + (a_m * (k * -10.0));
            	} else {
            		tmp = (a_m / k) / k;
            	}
            	return a_s * tmp;
            }
            
            a\_m = abs(a)
            a\_s = copysign(1.0d0, a)
            real(8) function code(a_s, a_m, k, m)
                real(8), intent (in) :: a_s
                real(8), intent (in) :: a_m
                real(8), intent (in) :: k
                real(8), intent (in) :: m
                real(8) :: tmp
                if (k <= (-3d-308)) then
                    tmp = 1.0d0 / ((k * k) / a_m)
                else if (k <= 0.14d0) then
                    tmp = a_m + (a_m * (k * (-10.0d0)))
                else
                    tmp = (a_m / k) / k
                end if
                code = a_s * tmp
            end function
            
            a\_m = Math.abs(a);
            a\_s = Math.copySign(1.0, a);
            public static double code(double a_s, double a_m, double k, double m) {
            	double tmp;
            	if (k <= -3e-308) {
            		tmp = 1.0 / ((k * k) / a_m);
            	} else if (k <= 0.14) {
            		tmp = a_m + (a_m * (k * -10.0));
            	} else {
            		tmp = (a_m / k) / k;
            	}
            	return a_s * tmp;
            }
            
            a\_m = math.fabs(a)
            a\_s = math.copysign(1.0, a)
            def code(a_s, a_m, k, m):
            	tmp = 0
            	if k <= -3e-308:
            		tmp = 1.0 / ((k * k) / a_m)
            	elif k <= 0.14:
            		tmp = a_m + (a_m * (k * -10.0))
            	else:
            		tmp = (a_m / k) / k
            	return a_s * tmp
            
            a\_m = abs(a)
            a\_s = copysign(1.0, a)
            function code(a_s, a_m, k, m)
            	tmp = 0.0
            	if (k <= -3e-308)
            		tmp = Float64(1.0 / Float64(Float64(k * k) / a_m));
            	elseif (k <= 0.14)
            		tmp = Float64(a_m + Float64(a_m * Float64(k * -10.0)));
            	else
            		tmp = Float64(Float64(a_m / k) / k);
            	end
            	return Float64(a_s * tmp)
            end
            
            a\_m = abs(a);
            a\_s = sign(a) * abs(1.0);
            function tmp_2 = code(a_s, a_m, k, m)
            	tmp = 0.0;
            	if (k <= -3e-308)
            		tmp = 1.0 / ((k * k) / a_m);
            	elseif (k <= 0.14)
            		tmp = a_m + (a_m * (k * -10.0));
            	else
            		tmp = (a_m / k) / k;
            	end
            	tmp_2 = a_s * tmp;
            end
            
            a\_m = N[Abs[a], $MachinePrecision]
            a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[k, -3e-308], N[(1.0 / N[(N[(k * k), $MachinePrecision] / a$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.14], N[(a$95$m + N[(a$95$m * N[(k * -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m / k), $MachinePrecision] / k), $MachinePrecision]]]), $MachinePrecision]
            
            \begin{array}{l}
            a\_m = \left|a\right|
            \\
            a\_s = \mathsf{copysign}\left(1, a\right)
            
            \\
            a\_s \cdot \begin{array}{l}
            \mathbf{if}\;k \leq -3 \cdot 10^{-308}:\\
            \;\;\;\;\frac{1}{\frac{k \cdot k}{a\_m}}\\
            
            \mathbf{elif}\;k \leq 0.14:\\
            \;\;\;\;a\_m + a\_m \cdot \left(k \cdot -10\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{\frac{a\_m}{k}}{k}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if k < -3.00000000000000022e-308

              1. Initial program 88.6%

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6488.6%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified88.6%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                11. fma-defineN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                20. *-lowering-*.f64N/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
              7. Simplified23.4%

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

                \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
              9. Step-by-step derivation
                1. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                2. *-lowering-*.f6433.9%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
              10. Simplified33.9%

                \[\leadsto \frac{a}{\color{blue}{k \cdot k}} \]
              11. Step-by-step derivation
                1. associate-/r*N/A

                  \[\leadsto \frac{\frac{a}{k}}{\color{blue}{k}} \]
                2. clear-numN/A

                  \[\leadsto \frac{1}{\color{blue}{\frac{k}{\frac{a}{k}}}} \]
                3. un-div-invN/A

                  \[\leadsto \frac{1}{k \cdot \color{blue}{\frac{1}{\frac{a}{k}}}} \]
                4. clear-numN/A

                  \[\leadsto \frac{1}{k \cdot \frac{k}{\color{blue}{a}}} \]
                5. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(k \cdot \frac{k}{a}\right)}\right) \]
                6. associate-*r/N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{k \cdot k}{\color{blue}{a}}\right)\right) \]
                7. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(k \cdot k\right), \color{blue}{a}\right)\right) \]
                8. *-lowering-*.f6434.5%

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, k\right), a\right)\right) \]
              12. Applied egg-rr34.5%

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

              if -3.00000000000000022e-308 < k < 0.14000000000000001

              1. Initial program 100.0%

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6499.9%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified99.9%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                11. fma-defineN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                20. *-lowering-*.f64N/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
              7. Simplified54.1%

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(k + 10\right) \cdot \color{blue}{k}\right)\right)\right) \]
                2. flip-+N/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(k \cdot k - 10 \cdot 10\right) \cdot k\right), \color{blue}{\left(k - 10\right)}\right)\right)\right) \]
                5. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k - 10 \cdot 10\right), k\right), \left(\color{blue}{k} - 10\right)\right)\right)\right) \]
                6. sub-negN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k + \left(\mathsf{neg}\left(10 \cdot 10\right)\right)\right), k\right), \left(k - 10\right)\right)\right)\right) \]
                7. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(k \cdot k\right), \left(\mathsf{neg}\left(10 \cdot 10\right)\right)\right), k\right), \left(k - 10\right)\right)\right)\right) \]
                8. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\mathsf{neg}\left(10 \cdot 10\right)\right)\right), k\right), \left(k - 10\right)\right)\right)\right) \]
                9. metadata-evalN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\mathsf{neg}\left(100\right)\right)\right), k\right), \left(k - 10\right)\right)\right)\right) \]
                10. metadata-evalN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), -100\right), k\right), \left(k - 10\right)\right)\right)\right) \]
                11. sub-negN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), -100\right), k\right), \left(k + \color{blue}{\left(\mathsf{neg}\left(10\right)\right)}\right)\right)\right)\right) \]
                12. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), -100\right), k\right), \mathsf{+.f64}\left(k, \color{blue}{\left(\mathsf{neg}\left(10\right)\right)}\right)\right)\right)\right) \]
                13. metadata-eval54.1%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), -100\right), k\right), \mathsf{+.f64}\left(k, -10\right)\right)\right)\right) \]
              9. Applied egg-rr54.1%

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

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

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

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

                  \[\leadsto \mathsf{+.f64}\left(a, \left(a \cdot \color{blue}{\left(k \cdot -10\right)}\right)\right) \]
                4. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(a, \color{blue}{\left(k \cdot -10\right)}\right)\right) \]
                5. *-lowering-*.f6453.3%

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{-10}\right)\right)\right) \]
              12. Simplified53.3%

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

              if 0.14000000000000001 < k

              1. Initial program 80.1%

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6480.1%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified80.1%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                11. fma-defineN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                20. *-lowering-*.f64N/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
              7. Simplified58.5%

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

                \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
              9. Step-by-step derivation
                1. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                2. *-lowering-*.f6458.0%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
              10. Simplified58.0%

                \[\leadsto \frac{a}{\color{blue}{k \cdot k}} \]
              11. Step-by-step derivation
                1. associate-/r*N/A

                  \[\leadsto \frac{\frac{a}{k}}{\color{blue}{k}} \]
                2. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(\frac{a}{k}\right), \color{blue}{k}\right) \]
                3. /-lowering-/.f6460.7%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, k\right), k\right) \]
              12. Applied egg-rr60.7%

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

            Alternative 12: 47.5% accurate, 6.7× 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}\;k \leq -3 \cdot 10^{-308}:\\ \;\;\;\;\frac{a\_m}{k \cdot k}\\ \mathbf{elif}\;k \leq 0.14:\\ \;\;\;\;a\_m + a\_m \cdot \left(k \cdot -10\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{a\_m}{k}}{k}\\ \end{array} \end{array} \]
            a\_m = (fabs.f64 a)
            a\_s = (copysign.f64 #s(literal 1 binary64) a)
            (FPCore (a_s a_m k m)
             :precision binary64
             (*
              a_s
              (if (<= k -3e-308)
                (/ a_m (* k k))
                (if (<= k 0.14) (+ a_m (* a_m (* k -10.0))) (/ (/ a_m k) k)))))
            a\_m = fabs(a);
            a\_s = copysign(1.0, a);
            double code(double a_s, double a_m, double k, double m) {
            	double tmp;
            	if (k <= -3e-308) {
            		tmp = a_m / (k * k);
            	} else if (k <= 0.14) {
            		tmp = a_m + (a_m * (k * -10.0));
            	} else {
            		tmp = (a_m / k) / k;
            	}
            	return a_s * tmp;
            }
            
            a\_m = abs(a)
            a\_s = copysign(1.0d0, a)
            real(8) function code(a_s, a_m, k, m)
                real(8), intent (in) :: a_s
                real(8), intent (in) :: a_m
                real(8), intent (in) :: k
                real(8), intent (in) :: m
                real(8) :: tmp
                if (k <= (-3d-308)) then
                    tmp = a_m / (k * k)
                else if (k <= 0.14d0) then
                    tmp = a_m + (a_m * (k * (-10.0d0)))
                else
                    tmp = (a_m / k) / k
                end if
                code = a_s * tmp
            end function
            
            a\_m = Math.abs(a);
            a\_s = Math.copySign(1.0, a);
            public static double code(double a_s, double a_m, double k, double m) {
            	double tmp;
            	if (k <= -3e-308) {
            		tmp = a_m / (k * k);
            	} else if (k <= 0.14) {
            		tmp = a_m + (a_m * (k * -10.0));
            	} else {
            		tmp = (a_m / k) / k;
            	}
            	return a_s * tmp;
            }
            
            a\_m = math.fabs(a)
            a\_s = math.copysign(1.0, a)
            def code(a_s, a_m, k, m):
            	tmp = 0
            	if k <= -3e-308:
            		tmp = a_m / (k * k)
            	elif k <= 0.14:
            		tmp = a_m + (a_m * (k * -10.0))
            	else:
            		tmp = (a_m / k) / k
            	return a_s * tmp
            
            a\_m = abs(a)
            a\_s = copysign(1.0, a)
            function code(a_s, a_m, k, m)
            	tmp = 0.0
            	if (k <= -3e-308)
            		tmp = Float64(a_m / Float64(k * k));
            	elseif (k <= 0.14)
            		tmp = Float64(a_m + Float64(a_m * Float64(k * -10.0)));
            	else
            		tmp = Float64(Float64(a_m / k) / k);
            	end
            	return Float64(a_s * tmp)
            end
            
            a\_m = abs(a);
            a\_s = sign(a) * abs(1.0);
            function tmp_2 = code(a_s, a_m, k, m)
            	tmp = 0.0;
            	if (k <= -3e-308)
            		tmp = a_m / (k * k);
            	elseif (k <= 0.14)
            		tmp = a_m + (a_m * (k * -10.0));
            	else
            		tmp = (a_m / k) / k;
            	end
            	tmp_2 = a_s * tmp;
            end
            
            a\_m = N[Abs[a], $MachinePrecision]
            a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[k, -3e-308], N[(a$95$m / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.14], N[(a$95$m + N[(a$95$m * N[(k * -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m / k), $MachinePrecision] / k), $MachinePrecision]]]), $MachinePrecision]
            
            \begin{array}{l}
            a\_m = \left|a\right|
            \\
            a\_s = \mathsf{copysign}\left(1, a\right)
            
            \\
            a\_s \cdot \begin{array}{l}
            \mathbf{if}\;k \leq -3 \cdot 10^{-308}:\\
            \;\;\;\;\frac{a\_m}{k \cdot k}\\
            
            \mathbf{elif}\;k \leq 0.14:\\
            \;\;\;\;a\_m + a\_m \cdot \left(k \cdot -10\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{\frac{a\_m}{k}}{k}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if k < -3.00000000000000022e-308

              1. Initial program 88.6%

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6488.6%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified88.6%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                11. fma-defineN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                20. *-lowering-*.f64N/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
              7. Simplified23.4%

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

                \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
              9. Step-by-step derivation
                1. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                2. *-lowering-*.f6433.9%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
              10. Simplified33.9%

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

              if -3.00000000000000022e-308 < k < 0.14000000000000001

              1. Initial program 100.0%

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6499.9%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified99.9%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                11. fma-defineN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                20. *-lowering-*.f64N/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
              7. Simplified54.1%

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(k + 10\right) \cdot \color{blue}{k}\right)\right)\right) \]
                2. flip-+N/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(k \cdot k - 10 \cdot 10\right) \cdot k\right), \color{blue}{\left(k - 10\right)}\right)\right)\right) \]
                5. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k - 10 \cdot 10\right), k\right), \left(\color{blue}{k} - 10\right)\right)\right)\right) \]
                6. sub-negN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k + \left(\mathsf{neg}\left(10 \cdot 10\right)\right)\right), k\right), \left(k - 10\right)\right)\right)\right) \]
                7. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(k \cdot k\right), \left(\mathsf{neg}\left(10 \cdot 10\right)\right)\right), k\right), \left(k - 10\right)\right)\right)\right) \]
                8. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\mathsf{neg}\left(10 \cdot 10\right)\right)\right), k\right), \left(k - 10\right)\right)\right)\right) \]
                9. metadata-evalN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\mathsf{neg}\left(100\right)\right)\right), k\right), \left(k - 10\right)\right)\right)\right) \]
                10. metadata-evalN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), -100\right), k\right), \left(k - 10\right)\right)\right)\right) \]
                11. sub-negN/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), -100\right), k\right), \left(k + \color{blue}{\left(\mathsf{neg}\left(10\right)\right)}\right)\right)\right)\right) \]
                12. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), -100\right), k\right), \mathsf{+.f64}\left(k, \color{blue}{\left(\mathsf{neg}\left(10\right)\right)}\right)\right)\right)\right) \]
                13. metadata-eval54.1%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(k, k\right), -100\right), k\right), \mathsf{+.f64}\left(k, -10\right)\right)\right)\right) \]
              9. Applied egg-rr54.1%

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

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

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

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

                  \[\leadsto \mathsf{+.f64}\left(a, \left(a \cdot \color{blue}{\left(k \cdot -10\right)}\right)\right) \]
                4. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(a, \color{blue}{\left(k \cdot -10\right)}\right)\right) \]
                5. *-lowering-*.f6453.3%

                  \[\leadsto \mathsf{+.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{-10}\right)\right)\right) \]
              12. Simplified53.3%

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

              if 0.14000000000000001 < k

              1. Initial program 80.1%

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6480.1%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified80.1%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                11. fma-defineN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                20. *-lowering-*.f64N/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
              7. Simplified58.5%

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

                \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
              9. Step-by-step derivation
                1. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                2. *-lowering-*.f6458.0%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
              10. Simplified58.0%

                \[\leadsto \frac{a}{\color{blue}{k \cdot k}} \]
              11. Step-by-step derivation
                1. associate-/r*N/A

                  \[\leadsto \frac{\frac{a}{k}}{\color{blue}{k}} \]
                2. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(\frac{a}{k}\right), \color{blue}{k}\right) \]
                3. /-lowering-/.f6460.7%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, k\right), k\right) \]
              12. Applied egg-rr60.7%

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

            Alternative 13: 47.3% accurate, 6.7× 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}\;k \leq -3 \cdot 10^{-308}:\\ \;\;\;\;\frac{a\_m}{k \cdot k}\\ \mathbf{elif}\;k \leq 1:\\ \;\;\;\;a\_m \cdot \left(1 - k \cdot k\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{a\_m}{k}}{k}\\ \end{array} \end{array} \]
            a\_m = (fabs.f64 a)
            a\_s = (copysign.f64 #s(literal 1 binary64) a)
            (FPCore (a_s a_m k m)
             :precision binary64
             (*
              a_s
              (if (<= k -3e-308)
                (/ a_m (* k k))
                (if (<= k 1.0) (* a_m (- 1.0 (* k k))) (/ (/ a_m k) k)))))
            a\_m = fabs(a);
            a\_s = copysign(1.0, a);
            double code(double a_s, double a_m, double k, double m) {
            	double tmp;
            	if (k <= -3e-308) {
            		tmp = a_m / (k * k);
            	} else if (k <= 1.0) {
            		tmp = a_m * (1.0 - (k * k));
            	} else {
            		tmp = (a_m / k) / k;
            	}
            	return a_s * tmp;
            }
            
            a\_m = abs(a)
            a\_s = copysign(1.0d0, a)
            real(8) function code(a_s, a_m, k, m)
                real(8), intent (in) :: a_s
                real(8), intent (in) :: a_m
                real(8), intent (in) :: k
                real(8), intent (in) :: m
                real(8) :: tmp
                if (k <= (-3d-308)) then
                    tmp = a_m / (k * k)
                else if (k <= 1.0d0) then
                    tmp = a_m * (1.0d0 - (k * k))
                else
                    tmp = (a_m / k) / k
                end if
                code = a_s * tmp
            end function
            
            a\_m = Math.abs(a);
            a\_s = Math.copySign(1.0, a);
            public static double code(double a_s, double a_m, double k, double m) {
            	double tmp;
            	if (k <= -3e-308) {
            		tmp = a_m / (k * k);
            	} else if (k <= 1.0) {
            		tmp = a_m * (1.0 - (k * k));
            	} else {
            		tmp = (a_m / k) / k;
            	}
            	return a_s * tmp;
            }
            
            a\_m = math.fabs(a)
            a\_s = math.copysign(1.0, a)
            def code(a_s, a_m, k, m):
            	tmp = 0
            	if k <= -3e-308:
            		tmp = a_m / (k * k)
            	elif k <= 1.0:
            		tmp = a_m * (1.0 - (k * k))
            	else:
            		tmp = (a_m / k) / k
            	return a_s * tmp
            
            a\_m = abs(a)
            a\_s = copysign(1.0, a)
            function code(a_s, a_m, k, m)
            	tmp = 0.0
            	if (k <= -3e-308)
            		tmp = Float64(a_m / Float64(k * k));
            	elseif (k <= 1.0)
            		tmp = Float64(a_m * Float64(1.0 - Float64(k * k)));
            	else
            		tmp = Float64(Float64(a_m / k) / k);
            	end
            	return Float64(a_s * tmp)
            end
            
            a\_m = abs(a);
            a\_s = sign(a) * abs(1.0);
            function tmp_2 = code(a_s, a_m, k, m)
            	tmp = 0.0;
            	if (k <= -3e-308)
            		tmp = a_m / (k * k);
            	elseif (k <= 1.0)
            		tmp = a_m * (1.0 - (k * k));
            	else
            		tmp = (a_m / k) / k;
            	end
            	tmp_2 = a_s * tmp;
            end
            
            a\_m = N[Abs[a], $MachinePrecision]
            a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[k, -3e-308], N[(a$95$m / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.0], N[(a$95$m * N[(1.0 - N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m / k), $MachinePrecision] / k), $MachinePrecision]]]), $MachinePrecision]
            
            \begin{array}{l}
            a\_m = \left|a\right|
            \\
            a\_s = \mathsf{copysign}\left(1, a\right)
            
            \\
            a\_s \cdot \begin{array}{l}
            \mathbf{if}\;k \leq -3 \cdot 10^{-308}:\\
            \;\;\;\;\frac{a\_m}{k \cdot k}\\
            
            \mathbf{elif}\;k \leq 1:\\
            \;\;\;\;a\_m \cdot \left(1 - k \cdot k\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{\frac{a\_m}{k}}{k}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if k < -3.00000000000000022e-308

              1. Initial program 88.6%

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6488.6%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified88.6%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                11. fma-defineN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                20. *-lowering-*.f64N/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
              7. Simplified23.4%

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

                \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
              9. Step-by-step derivation
                1. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                2. *-lowering-*.f6433.9%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
              10. Simplified33.9%

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

              if -3.00000000000000022e-308 < k < 1

              1. Initial program 100.0%

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6499.9%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified99.9%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                11. fma-defineN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                20. *-lowering-*.f64N/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
              7. Simplified54.1%

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

                \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2}\right)}\right)\right) \]
              9. Step-by-step derivation
                1. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{k}\right)\right)\right) \]
                2. *-lowering-*.f6452.9%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
              10. Simplified52.9%

                \[\leadsto \frac{a}{1 + \color{blue}{k \cdot k}} \]
              11. Step-by-step derivation
                1. clear-numN/A

                  \[\leadsto \frac{1}{\color{blue}{\frac{1 + k \cdot k}{a}}} \]
                2. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{1 + k \cdot k}{a}\right)}\right) \]
                3. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(1 + k \cdot k\right), \color{blue}{a}\right)\right) \]
                4. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \left(k \cdot k\right)\right), a\right)\right) \]
                5. *-lowering-*.f6452.7%

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, k\right)\right), a\right)\right) \]
              12. Applied egg-rr52.7%

                \[\leadsto \color{blue}{\frac{1}{\frac{1 + k \cdot k}{a}}} \]
              13. Taylor expanded in k around 0

                \[\leadsto \color{blue}{a + -1 \cdot \left(a \cdot {k}^{2}\right)} \]
              14. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto a + \left(\mathsf{neg}\left(a \cdot {k}^{2}\right)\right) \]
                2. unsub-negN/A

                  \[\leadsto a - \color{blue}{a \cdot {k}^{2}} \]
                3. *-lft-identityN/A

                  \[\leadsto 1 \cdot a - \color{blue}{a} \cdot {k}^{2} \]
                4. *-commutativeN/A

                  \[\leadsto 1 \cdot a - {k}^{2} \cdot \color{blue}{a} \]
                5. distribute-rgt-out--N/A

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

                  \[\leadsto \mathsf{*.f64}\left(a, \color{blue}{\left(1 - {k}^{2}\right)}\right) \]
                7. --lowering--.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(1, \color{blue}{\left({k}^{2}\right)}\right)\right) \]
                8. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(1, \left(k \cdot \color{blue}{k}\right)\right)\right) \]
                9. *-lowering-*.f6452.9%

                  \[\leadsto \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
              15. Simplified52.9%

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

              if 1 < k

              1. Initial program 80.1%

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f6480.1%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified80.1%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                11. fma-defineN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                20. *-lowering-*.f64N/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
              7. Simplified58.5%

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

                \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
              9. Step-by-step derivation
                1. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                2. *-lowering-*.f6458.0%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
              10. Simplified58.0%

                \[\leadsto \frac{a}{\color{blue}{k \cdot k}} \]
              11. Step-by-step derivation
                1. associate-/r*N/A

                  \[\leadsto \frac{\frac{a}{k}}{\color{blue}{k}} \]
                2. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\left(\frac{a}{k}\right), \color{blue}{k}\right) \]
                3. /-lowering-/.f6460.7%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, k\right), k\right) \]
              12. Applied egg-rr60.7%

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

            Alternative 14: 52.8% accurate, 7.1× speedup?

            \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -0.35:\\ \;\;\;\;\frac{1}{\frac{k \cdot k}{a\_m}}\\ \mathbf{else}:\\ \;\;\;\;\frac{a\_m}{\left(k \cdot 10 + 1\right) + k \cdot k}\\ \end{array} \end{array} \]
            a\_m = (fabs.f64 a)
            a\_s = (copysign.f64 #s(literal 1 binary64) a)
            (FPCore (a_s a_m k m)
             :precision binary64
             (*
              a_s
              (if (<= m -0.35)
                (/ 1.0 (/ (* k k) a_m))
                (/ a_m (+ (+ (* k 10.0) 1.0) (* k k))))))
            a\_m = fabs(a);
            a\_s = copysign(1.0, a);
            double code(double a_s, double a_m, double k, double m) {
            	double tmp;
            	if (m <= -0.35) {
            		tmp = 1.0 / ((k * k) / a_m);
            	} else {
            		tmp = a_m / (((k * 10.0) + 1.0) + (k * k));
            	}
            	return a_s * tmp;
            }
            
            a\_m = abs(a)
            a\_s = copysign(1.0d0, a)
            real(8) function code(a_s, a_m, k, m)
                real(8), intent (in) :: a_s
                real(8), intent (in) :: a_m
                real(8), intent (in) :: k
                real(8), intent (in) :: m
                real(8) :: tmp
                if (m <= (-0.35d0)) then
                    tmp = 1.0d0 / ((k * k) / a_m)
                else
                    tmp = a_m / (((k * 10.0d0) + 1.0d0) + (k * k))
                end if
                code = a_s * tmp
            end function
            
            a\_m = Math.abs(a);
            a\_s = Math.copySign(1.0, a);
            public static double code(double a_s, double a_m, double k, double m) {
            	double tmp;
            	if (m <= -0.35) {
            		tmp = 1.0 / ((k * k) / a_m);
            	} else {
            		tmp = a_m / (((k * 10.0) + 1.0) + (k * k));
            	}
            	return a_s * tmp;
            }
            
            a\_m = math.fabs(a)
            a\_s = math.copysign(1.0, a)
            def code(a_s, a_m, k, m):
            	tmp = 0
            	if m <= -0.35:
            		tmp = 1.0 / ((k * k) / a_m)
            	else:
            		tmp = a_m / (((k * 10.0) + 1.0) + (k * k))
            	return a_s * tmp
            
            a\_m = abs(a)
            a\_s = copysign(1.0, a)
            function code(a_s, a_m, k, m)
            	tmp = 0.0
            	if (m <= -0.35)
            		tmp = Float64(1.0 / Float64(Float64(k * k) / a_m));
            	else
            		tmp = Float64(a_m / Float64(Float64(Float64(k * 10.0) + 1.0) + Float64(k * k)));
            	end
            	return Float64(a_s * tmp)
            end
            
            a\_m = abs(a);
            a\_s = sign(a) * abs(1.0);
            function tmp_2 = code(a_s, a_m, k, m)
            	tmp = 0.0;
            	if (m <= -0.35)
            		tmp = 1.0 / ((k * k) / a_m);
            	else
            		tmp = a_m / (((k * 10.0) + 1.0) + (k * k));
            	end
            	tmp_2 = a_s * tmp;
            end
            
            a\_m = N[Abs[a], $MachinePrecision]
            a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, -0.35], N[(1.0 / N[(N[(k * k), $MachinePrecision] / a$95$m), $MachinePrecision]), $MachinePrecision], N[(a$95$m / N[(N[(N[(k * 10.0), $MachinePrecision] + 1.0), $MachinePrecision] + N[(k * k), $MachinePrecision]), $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 -0.35:\\
            \;\;\;\;\frac{1}{\frac{k \cdot k}{a\_m}}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{a\_m}{\left(k \cdot 10 + 1\right) + k \cdot k}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if m < -0.34999999999999998

              1. Initial program 100.0%

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                5. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                6. distribute-rgt-outN/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                9. +-lowering-+.f64100.0%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
              3. Simplified100.0%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                11. fma-defineN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                20. *-lowering-*.f64N/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
              7. Simplified40.9%

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

                \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
              9. Step-by-step derivation
                1. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                2. *-lowering-*.f6464.3%

                  \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
              10. Simplified64.3%

                \[\leadsto \frac{a}{\color{blue}{k \cdot k}} \]
              11. Step-by-step derivation
                1. associate-/r*N/A

                  \[\leadsto \frac{\frac{a}{k}}{\color{blue}{k}} \]
                2. clear-numN/A

                  \[\leadsto \frac{1}{\color{blue}{\frac{k}{\frac{a}{k}}}} \]
                3. un-div-invN/A

                  \[\leadsto \frac{1}{k \cdot \color{blue}{\frac{1}{\frac{a}{k}}}} \]
                4. clear-numN/A

                  \[\leadsto \frac{1}{k \cdot \frac{k}{\color{blue}{a}}} \]
                5. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(k \cdot \frac{k}{a}\right)}\right) \]
                6. associate-*r/N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{k \cdot k}{\color{blue}{a}}\right)\right) \]
                7. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(k \cdot k\right), \color{blue}{a}\right)\right) \]
                8. *-lowering-*.f6467.6%

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, k\right), a\right)\right) \]
              12. Applied egg-rr67.6%

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

              if -0.34999999999999998 < m

              1. Initial program 84.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 \mathsf{/.f64}\left(\color{blue}{a}, \mathsf{+.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(10, k\right)\right), \mathsf{*.f64}\left(k, k\right)\right)\right) \]
              4. Step-by-step derivation
                1. Simplified48.6%

                  \[\leadsto \frac{\color{blue}{a}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
              5. Recombined 2 regimes into one program.
              6. Final simplification54.8%

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

              Alternative 15: 47.3% accurate, 7.6× 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}\;k \leq -3 \cdot 10^{-308}:\\ \;\;\;\;\frac{a\_m}{k \cdot k}\\ \mathbf{elif}\;k \leq 1:\\ \;\;\;\;a\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{a\_m}{k}}{k}\\ \end{array} \end{array} \]
              a\_m = (fabs.f64 a)
              a\_s = (copysign.f64 #s(literal 1 binary64) a)
              (FPCore (a_s a_m k m)
               :precision binary64
               (*
                a_s
                (if (<= k -3e-308) (/ a_m (* k k)) (if (<= k 1.0) a_m (/ (/ a_m k) k)))))
              a\_m = fabs(a);
              a\_s = copysign(1.0, a);
              double code(double a_s, double a_m, double k, double m) {
              	double tmp;
              	if (k <= -3e-308) {
              		tmp = a_m / (k * k);
              	} else if (k <= 1.0) {
              		tmp = a_m;
              	} else {
              		tmp = (a_m / k) / k;
              	}
              	return a_s * tmp;
              }
              
              a\_m = abs(a)
              a\_s = copysign(1.0d0, a)
              real(8) function code(a_s, a_m, k, m)
                  real(8), intent (in) :: a_s
                  real(8), intent (in) :: a_m
                  real(8), intent (in) :: k
                  real(8), intent (in) :: m
                  real(8) :: tmp
                  if (k <= (-3d-308)) then
                      tmp = a_m / (k * k)
                  else if (k <= 1.0d0) then
                      tmp = a_m
                  else
                      tmp = (a_m / k) / k
                  end if
                  code = a_s * tmp
              end function
              
              a\_m = Math.abs(a);
              a\_s = Math.copySign(1.0, a);
              public static double code(double a_s, double a_m, double k, double m) {
              	double tmp;
              	if (k <= -3e-308) {
              		tmp = a_m / (k * k);
              	} else if (k <= 1.0) {
              		tmp = a_m;
              	} else {
              		tmp = (a_m / k) / k;
              	}
              	return a_s * tmp;
              }
              
              a\_m = math.fabs(a)
              a\_s = math.copysign(1.0, a)
              def code(a_s, a_m, k, m):
              	tmp = 0
              	if k <= -3e-308:
              		tmp = a_m / (k * k)
              	elif k <= 1.0:
              		tmp = a_m
              	else:
              		tmp = (a_m / k) / k
              	return a_s * tmp
              
              a\_m = abs(a)
              a\_s = copysign(1.0, a)
              function code(a_s, a_m, k, m)
              	tmp = 0.0
              	if (k <= -3e-308)
              		tmp = Float64(a_m / Float64(k * k));
              	elseif (k <= 1.0)
              		tmp = a_m;
              	else
              		tmp = Float64(Float64(a_m / k) / k);
              	end
              	return Float64(a_s * tmp)
              end
              
              a\_m = abs(a);
              a\_s = sign(a) * abs(1.0);
              function tmp_2 = code(a_s, a_m, k, m)
              	tmp = 0.0;
              	if (k <= -3e-308)
              		tmp = a_m / (k * k);
              	elseif (k <= 1.0)
              		tmp = a_m;
              	else
              		tmp = (a_m / k) / k;
              	end
              	tmp_2 = a_s * tmp;
              end
              
              a\_m = N[Abs[a], $MachinePrecision]
              a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
              code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[k, -3e-308], N[(a$95$m / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.0], a$95$m, N[(N[(a$95$m / k), $MachinePrecision] / k), $MachinePrecision]]]), $MachinePrecision]
              
              \begin{array}{l}
              a\_m = \left|a\right|
              \\
              a\_s = \mathsf{copysign}\left(1, a\right)
              
              \\
              a\_s \cdot \begin{array}{l}
              \mathbf{if}\;k \leq -3 \cdot 10^{-308}:\\
              \;\;\;\;\frac{a\_m}{k \cdot k}\\
              
              \mathbf{elif}\;k \leq 1:\\
              \;\;\;\;a\_m\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{\frac{a\_m}{k}}{k}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if k < -3.00000000000000022e-308

                1. Initial program 88.6%

                  \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                2. Step-by-step derivation
                  1. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                  2. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                  3. pow-lowering-pow.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                  4. associate-+l+N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                  5. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                  6. distribute-rgt-outN/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                  7. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                  8. +-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                  9. +-lowering-+.f6488.6%

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                3. Simplified88.6%

                  \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
                4. Add Preprocessing
                5. Taylor expanded in m around 0

                  \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
                6. Step-by-step derivation
                  1. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                  2. +-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(10 + k\right) + \color{blue}{1}\right)\right) \]
                  3. fma-defineN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \color{blue}{10 + k}, 1\right)\right)\right) \]
                  4. metadata-evalN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, 10 \cdot 1 + k, 1\right)\right)\right) \]
                  5. lft-mult-inverseN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, 10 \cdot \left(\frac{1}{k} \cdot k\right) + k, 1\right)\right)\right) \]
                  6. associate-*l*N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \left(10 \cdot \frac{1}{k}\right) \cdot k + k, 1\right)\right)\right) \]
                  7. *-lft-identityN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \left(10 \cdot \frac{1}{k}\right) \cdot k + 1 \cdot \color{blue}{k}, 1\right)\right)\right) \]
                  8. distribute-rgt-inN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \color{blue}{\left(10 \cdot \frac{1}{k} + 1\right)}, 1\right)\right)\right) \]
                  9. +-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + \color{blue}{10 \cdot \frac{1}{k}}\right), 1\right)\right)\right) \]
                  10. lft-mult-inverseN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                  11. fma-defineN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right) + \color{blue}{\frac{1}{{k}^{2}} \cdot {k}^{2}}\right)\right) \]
                  12. associate-*l*N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(\left(k \cdot k\right) \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + \color{blue}{\frac{1}{{k}^{2}}} \cdot {k}^{2}\right)\right) \]
                  13. unpow2N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + \frac{\color{blue}{1}}{{k}^{2}} \cdot {k}^{2}\right)\right) \]
                  14. lft-mult-inverseN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + 1\right)\right) \]
                  15. +-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \color{blue}{{k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right) \]
                  16. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right) \]
                  17. unpow2N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(k \cdot k\right) \cdot \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right)\right) \]
                  18. associate-*l*N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right)\right) \]
                  19. *-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                  20. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right)}\right)\right)\right) \]
                  21. *-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right)\right)\right) \]
                  22. distribute-rgt-inN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
                7. Simplified23.4%

                  \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                8. Taylor expanded in k around inf

                  \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
                9. Step-by-step derivation
                  1. unpow2N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                  2. *-lowering-*.f6433.9%

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
                10. Simplified33.9%

                  \[\leadsto \frac{a}{\color{blue}{k \cdot k}} \]

                if -3.00000000000000022e-308 < k < 1

                1. Initial program 100.0%

                  \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                2. Step-by-step derivation
                  1. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                  2. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                  3. pow-lowering-pow.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                  4. associate-+l+N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                  5. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                  6. distribute-rgt-outN/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                  7. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                  8. +-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                  9. +-lowering-+.f6499.9%

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                3. Simplified99.9%

                  \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
                4. Add Preprocessing
                5. Taylor expanded in m around 0

                  \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
                6. Step-by-step derivation
                  1. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                  2. +-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(10 + k\right) + \color{blue}{1}\right)\right) \]
                  3. fma-defineN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \color{blue}{10 + k}, 1\right)\right)\right) \]
                  4. metadata-evalN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, 10 \cdot 1 + k, 1\right)\right)\right) \]
                  5. lft-mult-inverseN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, 10 \cdot \left(\frac{1}{k} \cdot k\right) + k, 1\right)\right)\right) \]
                  6. associate-*l*N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \left(10 \cdot \frac{1}{k}\right) \cdot k + k, 1\right)\right)\right) \]
                  7. *-lft-identityN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \left(10 \cdot \frac{1}{k}\right) \cdot k + 1 \cdot \color{blue}{k}, 1\right)\right)\right) \]
                  8. distribute-rgt-inN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \color{blue}{\left(10 \cdot \frac{1}{k} + 1\right)}, 1\right)\right)\right) \]
                  9. +-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + \color{blue}{10 \cdot \frac{1}{k}}\right), 1\right)\right)\right) \]
                  10. lft-mult-inverseN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                  11. fma-defineN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right) + \color{blue}{\frac{1}{{k}^{2}} \cdot {k}^{2}}\right)\right) \]
                  12. associate-*l*N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(\left(k \cdot k\right) \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + \color{blue}{\frac{1}{{k}^{2}}} \cdot {k}^{2}\right)\right) \]
                  13. unpow2N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + \frac{\color{blue}{1}}{{k}^{2}} \cdot {k}^{2}\right)\right) \]
                  14. lft-mult-inverseN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + 1\right)\right) \]
                  15. +-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \color{blue}{{k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right) \]
                  16. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right) \]
                  17. unpow2N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(k \cdot k\right) \cdot \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right)\right) \]
                  18. associate-*l*N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right)\right) \]
                  19. *-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                  20. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right)}\right)\right)\right) \]
                  21. *-commutativeN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right)\right)\right) \]
                  22. distribute-rgt-inN/A

                    \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
                7. Simplified54.1%

                  \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                8. Taylor expanded in k around 0

                  \[\leadsto \color{blue}{a} \]
                9. Step-by-step derivation
                  1. Simplified52.9%

                    \[\leadsto \color{blue}{a} \]

                  if 1 < k

                  1. Initial program 80.1%

                    \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                  2. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                    3. pow-lowering-pow.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                    4. associate-+l+N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                    5. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                    6. distribute-rgt-outN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                    7. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                    8. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                    9. +-lowering-+.f6480.1%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                  3. Simplified80.1%

                    \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
                  4. Add Preprocessing
                  5. Taylor expanded in m around 0

                    \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
                  6. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                    2. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(10 + k\right) + \color{blue}{1}\right)\right) \]
                    3. fma-defineN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \color{blue}{10 + k}, 1\right)\right)\right) \]
                    4. metadata-evalN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, 10 \cdot 1 + k, 1\right)\right)\right) \]
                    5. lft-mult-inverseN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, 10 \cdot \left(\frac{1}{k} \cdot k\right) + k, 1\right)\right)\right) \]
                    6. associate-*l*N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \left(10 \cdot \frac{1}{k}\right) \cdot k + k, 1\right)\right)\right) \]
                    7. *-lft-identityN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \left(10 \cdot \frac{1}{k}\right) \cdot k + 1 \cdot \color{blue}{k}, 1\right)\right)\right) \]
                    8. distribute-rgt-inN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \color{blue}{\left(10 \cdot \frac{1}{k} + 1\right)}, 1\right)\right)\right) \]
                    9. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + \color{blue}{10 \cdot \frac{1}{k}}\right), 1\right)\right)\right) \]
                    10. lft-mult-inverseN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                    11. fma-defineN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right) + \color{blue}{\frac{1}{{k}^{2}} \cdot {k}^{2}}\right)\right) \]
                    12. associate-*l*N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\left(k \cdot k\right) \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + \color{blue}{\frac{1}{{k}^{2}}} \cdot {k}^{2}\right)\right) \]
                    13. unpow2N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + \frac{\color{blue}{1}}{{k}^{2}} \cdot {k}^{2}\right)\right) \]
                    14. lft-mult-inverseN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + 1\right)\right) \]
                    15. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \color{blue}{{k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right) \]
                    16. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right) \]
                    17. unpow2N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(k \cdot k\right) \cdot \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right)\right) \]
                    18. associate-*l*N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right)\right) \]
                    19. *-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                    20. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right)}\right)\right)\right) \]
                    21. *-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right)\right)\right) \]
                    22. distribute-rgt-inN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
                  7. Simplified58.5%

                    \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                  8. Taylor expanded in k around inf

                    \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
                  9. Step-by-step derivation
                    1. unpow2N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                    2. *-lowering-*.f6458.0%

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
                  10. Simplified58.0%

                    \[\leadsto \frac{a}{\color{blue}{k \cdot k}} \]
                  11. Step-by-step derivation
                    1. associate-/r*N/A

                      \[\leadsto \frac{\frac{a}{k}}{\color{blue}{k}} \]
                    2. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\left(\frac{a}{k}\right), \color{blue}{k}\right) \]
                    3. /-lowering-/.f6460.7%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(a, k\right), k\right) \]
                  12. Applied egg-rr60.7%

                    \[\leadsto \color{blue}{\frac{\frac{a}{k}}{k}} \]
                10. Recombined 3 regimes into one program.
                11. Add Preprocessing

                Alternative 16: 46.3% accurate, 7.6× speedup?

                \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ \begin{array}{l} t_0 := \frac{a\_m}{k \cdot k}\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq -3 \cdot 10^{-308}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;k \leq 1:\\ \;\;\;\;a\_m\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \end{array} \]
                a\_m = (fabs.f64 a)
                a\_s = (copysign.f64 #s(literal 1 binary64) a)
                (FPCore (a_s a_m k m)
                 :precision binary64
                 (let* ((t_0 (/ a_m (* k k))))
                   (* a_s (if (<= k -3e-308) t_0 (if (<= k 1.0) a_m t_0)))))
                a\_m = fabs(a);
                a\_s = copysign(1.0, a);
                double code(double a_s, double a_m, double k, double m) {
                	double t_0 = a_m / (k * k);
                	double tmp;
                	if (k <= -3e-308) {
                		tmp = t_0;
                	} else if (k <= 1.0) {
                		tmp = a_m;
                	} else {
                		tmp = t_0;
                	}
                	return a_s * tmp;
                }
                
                a\_m = abs(a)
                a\_s = copysign(1.0d0, a)
                real(8) function code(a_s, a_m, k, m)
                    real(8), intent (in) :: a_s
                    real(8), intent (in) :: a_m
                    real(8), intent (in) :: k
                    real(8), intent (in) :: m
                    real(8) :: t_0
                    real(8) :: tmp
                    t_0 = a_m / (k * k)
                    if (k <= (-3d-308)) then
                        tmp = t_0
                    else if (k <= 1.0d0) then
                        tmp = a_m
                    else
                        tmp = t_0
                    end if
                    code = a_s * tmp
                end function
                
                a\_m = Math.abs(a);
                a\_s = Math.copySign(1.0, a);
                public static double code(double a_s, double a_m, double k, double m) {
                	double t_0 = a_m / (k * k);
                	double tmp;
                	if (k <= -3e-308) {
                		tmp = t_0;
                	} else if (k <= 1.0) {
                		tmp = a_m;
                	} else {
                		tmp = t_0;
                	}
                	return a_s * tmp;
                }
                
                a\_m = math.fabs(a)
                a\_s = math.copysign(1.0, a)
                def code(a_s, a_m, k, m):
                	t_0 = a_m / (k * k)
                	tmp = 0
                	if k <= -3e-308:
                		tmp = t_0
                	elif k <= 1.0:
                		tmp = a_m
                	else:
                		tmp = t_0
                	return a_s * tmp
                
                a\_m = abs(a)
                a\_s = copysign(1.0, a)
                function code(a_s, a_m, k, m)
                	t_0 = Float64(a_m / Float64(k * k))
                	tmp = 0.0
                	if (k <= -3e-308)
                		tmp = t_0;
                	elseif (k <= 1.0)
                		tmp = a_m;
                	else
                		tmp = t_0;
                	end
                	return Float64(a_s * tmp)
                end
                
                a\_m = abs(a);
                a\_s = sign(a) * abs(1.0);
                function tmp_2 = code(a_s, a_m, k, m)
                	t_0 = a_m / (k * k);
                	tmp = 0.0;
                	if (k <= -3e-308)
                		tmp = t_0;
                	elseif (k <= 1.0)
                		tmp = a_m;
                	else
                		tmp = t_0;
                	end
                	tmp_2 = a_s * tmp;
                end
                
                a\_m = N[Abs[a], $MachinePrecision]
                a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[a$95$s_, a$95$m_, k_, m_] := Block[{t$95$0 = N[(a$95$m / N[(k * k), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[k, -3e-308], t$95$0, If[LessEqual[k, 1.0], a$95$m, t$95$0]]), $MachinePrecision]]
                
                \begin{array}{l}
                a\_m = \left|a\right|
                \\
                a\_s = \mathsf{copysign}\left(1, a\right)
                
                \\
                \begin{array}{l}
                t_0 := \frac{a\_m}{k \cdot k}\\
                a\_s \cdot \begin{array}{l}
                \mathbf{if}\;k \leq -3 \cdot 10^{-308}:\\
                \;\;\;\;t\_0\\
                
                \mathbf{elif}\;k \leq 1:\\
                \;\;\;\;a\_m\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_0\\
                
                
                \end{array}
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if k < -3.00000000000000022e-308 or 1 < k

                  1. Initial program 84.2%

                    \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                  2. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                    3. pow-lowering-pow.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                    4. associate-+l+N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                    5. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                    6. distribute-rgt-outN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                    7. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                    8. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                    9. +-lowering-+.f6484.2%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                  3. Simplified84.2%

                    \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
                  4. Add Preprocessing
                  5. Taylor expanded in m around 0

                    \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
                  6. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                    2. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(10 + k\right) + \color{blue}{1}\right)\right) \]
                    3. fma-defineN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \color{blue}{10 + k}, 1\right)\right)\right) \]
                    4. metadata-evalN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, 10 \cdot 1 + k, 1\right)\right)\right) \]
                    5. lft-mult-inverseN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, 10 \cdot \left(\frac{1}{k} \cdot k\right) + k, 1\right)\right)\right) \]
                    6. associate-*l*N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \left(10 \cdot \frac{1}{k}\right) \cdot k + k, 1\right)\right)\right) \]
                    7. *-lft-identityN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \left(10 \cdot \frac{1}{k}\right) \cdot k + 1 \cdot \color{blue}{k}, 1\right)\right)\right) \]
                    8. distribute-rgt-inN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \color{blue}{\left(10 \cdot \frac{1}{k} + 1\right)}, 1\right)\right)\right) \]
                    9. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + \color{blue}{10 \cdot \frac{1}{k}}\right), 1\right)\right)\right) \]
                    10. lft-mult-inverseN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                    11. fma-defineN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right) + \color{blue}{\frac{1}{{k}^{2}} \cdot {k}^{2}}\right)\right) \]
                    12. associate-*l*N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\left(k \cdot k\right) \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + \color{blue}{\frac{1}{{k}^{2}}} \cdot {k}^{2}\right)\right) \]
                    13. unpow2N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + \frac{\color{blue}{1}}{{k}^{2}} \cdot {k}^{2}\right)\right) \]
                    14. lft-mult-inverseN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + 1\right)\right) \]
                    15. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \color{blue}{{k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right) \]
                    16. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right) \]
                    17. unpow2N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(k \cdot k\right) \cdot \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right)\right) \]
                    18. associate-*l*N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right)\right) \]
                    19. *-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                    20. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right)}\right)\right)\right) \]
                    21. *-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right)\right)\right) \]
                    22. distribute-rgt-inN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
                  7. Simplified41.7%

                    \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                  8. Taylor expanded in k around inf

                    \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
                  9. Step-by-step derivation
                    1. unpow2N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                    2. *-lowering-*.f6446.5%

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
                  10. Simplified46.5%

                    \[\leadsto \frac{a}{\color{blue}{k \cdot k}} \]

                  if -3.00000000000000022e-308 < k < 1

                  1. Initial program 100.0%

                    \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                  2. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                    3. pow-lowering-pow.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                    4. associate-+l+N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                    5. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                    6. distribute-rgt-outN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                    7. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                    8. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                    9. +-lowering-+.f6499.9%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                  3. Simplified99.9%

                    \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
                  4. Add Preprocessing
                  5. Taylor expanded in m around 0

                    \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
                  6. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                    2. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(10 + k\right) + \color{blue}{1}\right)\right) \]
                    3. fma-defineN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \color{blue}{10 + k}, 1\right)\right)\right) \]
                    4. metadata-evalN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, 10 \cdot 1 + k, 1\right)\right)\right) \]
                    5. lft-mult-inverseN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, 10 \cdot \left(\frac{1}{k} \cdot k\right) + k, 1\right)\right)\right) \]
                    6. associate-*l*N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \left(10 \cdot \frac{1}{k}\right) \cdot k + k, 1\right)\right)\right) \]
                    7. *-lft-identityN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \left(10 \cdot \frac{1}{k}\right) \cdot k + 1 \cdot \color{blue}{k}, 1\right)\right)\right) \]
                    8. distribute-rgt-inN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \color{blue}{\left(10 \cdot \frac{1}{k} + 1\right)}, 1\right)\right)\right) \]
                    9. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + \color{blue}{10 \cdot \frac{1}{k}}\right), 1\right)\right)\right) \]
                    10. lft-mult-inverseN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                    11. fma-defineN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right) + \color{blue}{\frac{1}{{k}^{2}} \cdot {k}^{2}}\right)\right) \]
                    12. associate-*l*N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\left(k \cdot k\right) \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + \color{blue}{\frac{1}{{k}^{2}}} \cdot {k}^{2}\right)\right) \]
                    13. unpow2N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + \frac{\color{blue}{1}}{{k}^{2}} \cdot {k}^{2}\right)\right) \]
                    14. lft-mult-inverseN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + 1\right)\right) \]
                    15. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \color{blue}{{k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right) \]
                    16. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right) \]
                    17. unpow2N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(k \cdot k\right) \cdot \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right)\right) \]
                    18. associate-*l*N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right)\right) \]
                    19. *-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                    20. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right)}\right)\right)\right) \]
                    21. *-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right)\right)\right) \]
                    22. distribute-rgt-inN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
                  7. Simplified54.1%

                    \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                  8. Taylor expanded in k around 0

                    \[\leadsto \color{blue}{a} \]
                  9. Step-by-step derivation
                    1. Simplified52.9%

                      \[\leadsto \color{blue}{a} \]
                  10. Recombined 2 regimes into one program.
                  11. Add Preprocessing

                  Alternative 17: 52.8% accurate, 8.1× speedup?

                  \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -0.32:\\ \;\;\;\;\frac{1}{\frac{k \cdot k}{a\_m}}\\ \mathbf{else}:\\ \;\;\;\;\frac{a\_m}{k \cdot \left(k + 10\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 (<= m -0.32) (/ 1.0 (/ (* k k) a_m)) (/ a_m (+ (* k (+ k 10.0)) 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 <= -0.32) {
                  		tmp = 1.0 / ((k * k) / a_m);
                  	} else {
                  		tmp = a_m / ((k * (k + 10.0)) + 1.0);
                  	}
                  	return a_s * tmp;
                  }
                  
                  a\_m = abs(a)
                  a\_s = copysign(1.0d0, a)
                  real(8) function code(a_s, a_m, k, m)
                      real(8), intent (in) :: a_s
                      real(8), intent (in) :: a_m
                      real(8), intent (in) :: k
                      real(8), intent (in) :: m
                      real(8) :: tmp
                      if (m <= (-0.32d0)) then
                          tmp = 1.0d0 / ((k * k) / a_m)
                      else
                          tmp = a_m / ((k * (k + 10.0d0)) + 1.0d0)
                      end if
                      code = a_s * tmp
                  end function
                  
                  a\_m = Math.abs(a);
                  a\_s = Math.copySign(1.0, a);
                  public static double code(double a_s, double a_m, double k, double m) {
                  	double tmp;
                  	if (m <= -0.32) {
                  		tmp = 1.0 / ((k * k) / a_m);
                  	} else {
                  		tmp = a_m / ((k * (k + 10.0)) + 1.0);
                  	}
                  	return a_s * tmp;
                  }
                  
                  a\_m = math.fabs(a)
                  a\_s = math.copysign(1.0, a)
                  def code(a_s, a_m, k, m):
                  	tmp = 0
                  	if m <= -0.32:
                  		tmp = 1.0 / ((k * k) / a_m)
                  	else:
                  		tmp = a_m / ((k * (k + 10.0)) + 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 <= -0.32)
                  		tmp = Float64(1.0 / Float64(Float64(k * k) / a_m));
                  	else
                  		tmp = Float64(a_m / Float64(Float64(k * Float64(k + 10.0)) + 1.0));
                  	end
                  	return Float64(a_s * tmp)
                  end
                  
                  a\_m = abs(a);
                  a\_s = sign(a) * abs(1.0);
                  function tmp_2 = code(a_s, a_m, k, m)
                  	tmp = 0.0;
                  	if (m <= -0.32)
                  		tmp = 1.0 / ((k * k) / a_m);
                  	else
                  		tmp = a_m / ((k * (k + 10.0)) + 1.0);
                  	end
                  	tmp_2 = a_s * tmp;
                  end
                  
                  a\_m = N[Abs[a], $MachinePrecision]
                  a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                  code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, -0.32], N[(1.0 / N[(N[(k * k), $MachinePrecision] / a$95$m), $MachinePrecision]), $MachinePrecision], N[(a$95$m / N[(N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision] + 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 -0.32:\\
                  \;\;\;\;\frac{1}{\frac{k \cdot k}{a\_m}}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{a\_m}{k \cdot \left(k + 10\right) + 1}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if m < -0.320000000000000007

                    1. Initial program 100.0%

                      \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                    2. Step-by-step derivation
                      1. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                      2. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                      3. pow-lowering-pow.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                      4. associate-+l+N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                      5. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                      6. distribute-rgt-outN/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                      7. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                      8. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                      9. +-lowering-+.f64100.0%

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                    3. Simplified100.0%

                      \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
                    4. Add Preprocessing
                    5. Taylor expanded in m around 0

                      \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
                    6. Step-by-step derivation
                      1. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                      2. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(10 + k\right) + \color{blue}{1}\right)\right) \]
                      3. fma-defineN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \color{blue}{10 + k}, 1\right)\right)\right) \]
                      4. metadata-evalN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, 10 \cdot 1 + k, 1\right)\right)\right) \]
                      5. lft-mult-inverseN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, 10 \cdot \left(\frac{1}{k} \cdot k\right) + k, 1\right)\right)\right) \]
                      6. associate-*l*N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \left(10 \cdot \frac{1}{k}\right) \cdot k + k, 1\right)\right)\right) \]
                      7. *-lft-identityN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \left(10 \cdot \frac{1}{k}\right) \cdot k + 1 \cdot \color{blue}{k}, 1\right)\right)\right) \]
                      8. distribute-rgt-inN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \color{blue}{\left(10 \cdot \frac{1}{k} + 1\right)}, 1\right)\right)\right) \]
                      9. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + \color{blue}{10 \cdot \frac{1}{k}}\right), 1\right)\right)\right) \]
                      10. lft-mult-inverseN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                      11. fma-defineN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right) + \color{blue}{\frac{1}{{k}^{2}} \cdot {k}^{2}}\right)\right) \]
                      12. associate-*l*N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\left(k \cdot k\right) \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + \color{blue}{\frac{1}{{k}^{2}}} \cdot {k}^{2}\right)\right) \]
                      13. unpow2N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + \frac{\color{blue}{1}}{{k}^{2}} \cdot {k}^{2}\right)\right) \]
                      14. lft-mult-inverseN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + 1\right)\right) \]
                      15. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \color{blue}{{k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right) \]
                      16. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right) \]
                      17. unpow2N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(k \cdot k\right) \cdot \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right)\right) \]
                      18. associate-*l*N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right)\right) \]
                      19. *-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                      20. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right)}\right)\right)\right) \]
                      21. *-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right)\right)\right) \]
                      22. distribute-rgt-inN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
                    7. Simplified40.9%

                      \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                    8. Taylor expanded in k around inf

                      \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
                    9. Step-by-step derivation
                      1. unpow2N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                      2. *-lowering-*.f6464.3%

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
                    10. Simplified64.3%

                      \[\leadsto \frac{a}{\color{blue}{k \cdot k}} \]
                    11. Step-by-step derivation
                      1. associate-/r*N/A

                        \[\leadsto \frac{\frac{a}{k}}{\color{blue}{k}} \]
                      2. clear-numN/A

                        \[\leadsto \frac{1}{\color{blue}{\frac{k}{\frac{a}{k}}}} \]
                      3. un-div-invN/A

                        \[\leadsto \frac{1}{k \cdot \color{blue}{\frac{1}{\frac{a}{k}}}} \]
                      4. clear-numN/A

                        \[\leadsto \frac{1}{k \cdot \frac{k}{\color{blue}{a}}} \]
                      5. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(k \cdot \frac{k}{a}\right)}\right) \]
                      6. associate-*r/N/A

                        \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{k \cdot k}{\color{blue}{a}}\right)\right) \]
                      7. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(k \cdot k\right), \color{blue}{a}\right)\right) \]
                      8. *-lowering-*.f6467.6%

                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, k\right), a\right)\right) \]
                    12. Applied egg-rr67.6%

                      \[\leadsto \color{blue}{\frac{1}{\frac{k \cdot k}{a}}} \]

                    if -0.320000000000000007 < m

                    1. Initial program 84.9%

                      \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                    2. Step-by-step derivation
                      1. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                      2. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                      3. pow-lowering-pow.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                      4. associate-+l+N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                      5. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                      6. distribute-rgt-outN/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                      7. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                      8. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                      9. +-lowering-+.f6484.9%

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                    3. Simplified84.9%

                      \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
                    4. Add Preprocessing
                    5. Taylor expanded in m around 0

                      \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
                    6. Step-by-step derivation
                      1. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                      2. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(10 + k\right) + \color{blue}{1}\right)\right) \]
                      3. fma-defineN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \color{blue}{10 + k}, 1\right)\right)\right) \]
                      4. metadata-evalN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, 10 \cdot 1 + k, 1\right)\right)\right) \]
                      5. lft-mult-inverseN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, 10 \cdot \left(\frac{1}{k} \cdot k\right) + k, 1\right)\right)\right) \]
                      6. associate-*l*N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \left(10 \cdot \frac{1}{k}\right) \cdot k + k, 1\right)\right)\right) \]
                      7. *-lft-identityN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \left(10 \cdot \frac{1}{k}\right) \cdot k + 1 \cdot \color{blue}{k}, 1\right)\right)\right) \]
                      8. distribute-rgt-inN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \color{blue}{\left(10 \cdot \frac{1}{k} + 1\right)}, 1\right)\right)\right) \]
                      9. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + \color{blue}{10 \cdot \frac{1}{k}}\right), 1\right)\right)\right) \]
                      10. lft-mult-inverseN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                      11. fma-defineN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right) + \color{blue}{\frac{1}{{k}^{2}} \cdot {k}^{2}}\right)\right) \]
                      12. associate-*l*N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\left(k \cdot k\right) \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + \color{blue}{\frac{1}{{k}^{2}}} \cdot {k}^{2}\right)\right) \]
                      13. unpow2N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + \frac{\color{blue}{1}}{{k}^{2}} \cdot {k}^{2}\right)\right) \]
                      14. lft-mult-inverseN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + 1\right)\right) \]
                      15. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \color{blue}{{k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right) \]
                      16. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right) \]
                      17. unpow2N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(k \cdot k\right) \cdot \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right)\right) \]
                      18. associate-*l*N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right)\right) \]
                      19. *-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                      20. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right)}\right)\right)\right) \]
                      21. *-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right)\right)\right) \]
                      22. distribute-rgt-inN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
                    7. Simplified48.6%

                      \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification54.8%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;m \leq -0.32:\\ \;\;\;\;\frac{1}{\frac{k \cdot k}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{k \cdot \left(k + 10\right) + 1}\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 18: 52.0% accurate, 9.5× speedup?

                  \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;m \leq -0.62:\\ \;\;\;\;\frac{1}{\frac{k \cdot k}{a\_m}}\\ \mathbf{else}:\\ \;\;\;\;\frac{a\_m}{k \cdot k + 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 (<= m -0.62) (/ 1.0 (/ (* k k) a_m)) (/ a_m (+ (* 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 <= -0.62) {
                  		tmp = 1.0 / ((k * k) / a_m);
                  	} else {
                  		tmp = a_m / ((k * k) + 1.0);
                  	}
                  	return a_s * tmp;
                  }
                  
                  a\_m = abs(a)
                  a\_s = copysign(1.0d0, a)
                  real(8) function code(a_s, a_m, k, m)
                      real(8), intent (in) :: a_s
                      real(8), intent (in) :: a_m
                      real(8), intent (in) :: k
                      real(8), intent (in) :: m
                      real(8) :: tmp
                      if (m <= (-0.62d0)) then
                          tmp = 1.0d0 / ((k * k) / a_m)
                      else
                          tmp = a_m / ((k * k) + 1.0d0)
                      end if
                      code = a_s * tmp
                  end function
                  
                  a\_m = Math.abs(a);
                  a\_s = Math.copySign(1.0, a);
                  public static double code(double a_s, double a_m, double k, double m) {
                  	double tmp;
                  	if (m <= -0.62) {
                  		tmp = 1.0 / ((k * k) / a_m);
                  	} else {
                  		tmp = a_m / ((k * k) + 1.0);
                  	}
                  	return a_s * tmp;
                  }
                  
                  a\_m = math.fabs(a)
                  a\_s = math.copysign(1.0, a)
                  def code(a_s, a_m, k, m):
                  	tmp = 0
                  	if m <= -0.62:
                  		tmp = 1.0 / ((k * k) / a_m)
                  	else:
                  		tmp = a_m / ((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 <= -0.62)
                  		tmp = Float64(1.0 / Float64(Float64(k * k) / a_m));
                  	else
                  		tmp = Float64(a_m / Float64(Float64(k * k) + 1.0));
                  	end
                  	return Float64(a_s * tmp)
                  end
                  
                  a\_m = abs(a);
                  a\_s = sign(a) * abs(1.0);
                  function tmp_2 = code(a_s, a_m, k, m)
                  	tmp = 0.0;
                  	if (m <= -0.62)
                  		tmp = 1.0 / ((k * k) / a_m);
                  	else
                  		tmp = a_m / ((k * k) + 1.0);
                  	end
                  	tmp_2 = a_s * tmp;
                  end
                  
                  a\_m = N[Abs[a], $MachinePrecision]
                  a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                  code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * If[LessEqual[m, -0.62], N[(1.0 / N[(N[(k * k), $MachinePrecision] / a$95$m), $MachinePrecision]), $MachinePrecision], N[(a$95$m / N[(N[(k * k), $MachinePrecision] + 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 -0.62:\\
                  \;\;\;\;\frac{1}{\frac{k \cdot k}{a\_m}}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{a\_m}{k \cdot k + 1}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if m < -0.619999999999999996

                    1. Initial program 100.0%

                      \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                    2. Step-by-step derivation
                      1. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                      2. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                      3. pow-lowering-pow.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                      4. associate-+l+N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                      5. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                      6. distribute-rgt-outN/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                      7. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                      8. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                      9. +-lowering-+.f64100.0%

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                    3. Simplified100.0%

                      \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
                    4. Add Preprocessing
                    5. Taylor expanded in m around 0

                      \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
                    6. Step-by-step derivation
                      1. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                      2. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(10 + k\right) + \color{blue}{1}\right)\right) \]
                      3. fma-defineN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \color{blue}{10 + k}, 1\right)\right)\right) \]
                      4. metadata-evalN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, 10 \cdot 1 + k, 1\right)\right)\right) \]
                      5. lft-mult-inverseN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, 10 \cdot \left(\frac{1}{k} \cdot k\right) + k, 1\right)\right)\right) \]
                      6. associate-*l*N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \left(10 \cdot \frac{1}{k}\right) \cdot k + k, 1\right)\right)\right) \]
                      7. *-lft-identityN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \left(10 \cdot \frac{1}{k}\right) \cdot k + 1 \cdot \color{blue}{k}, 1\right)\right)\right) \]
                      8. distribute-rgt-inN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \color{blue}{\left(10 \cdot \frac{1}{k} + 1\right)}, 1\right)\right)\right) \]
                      9. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + \color{blue}{10 \cdot \frac{1}{k}}\right), 1\right)\right)\right) \]
                      10. lft-mult-inverseN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                      11. fma-defineN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right) + \color{blue}{\frac{1}{{k}^{2}} \cdot {k}^{2}}\right)\right) \]
                      12. associate-*l*N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\left(k \cdot k\right) \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + \color{blue}{\frac{1}{{k}^{2}}} \cdot {k}^{2}\right)\right) \]
                      13. unpow2N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + \frac{\color{blue}{1}}{{k}^{2}} \cdot {k}^{2}\right)\right) \]
                      14. lft-mult-inverseN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + 1\right)\right) \]
                      15. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \color{blue}{{k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right) \]
                      16. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right) \]
                      17. unpow2N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(k \cdot k\right) \cdot \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right)\right) \]
                      18. associate-*l*N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right)\right) \]
                      19. *-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                      20. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right)}\right)\right)\right) \]
                      21. *-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right)\right)\right) \]
                      22. distribute-rgt-inN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
                    7. Simplified40.9%

                      \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                    8. Taylor expanded in k around inf

                      \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left({k}^{2}\right)}\right) \]
                    9. Step-by-step derivation
                      1. unpow2N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \color{blue}{k}\right)\right) \]
                      2. *-lowering-*.f6464.3%

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right) \]
                    10. Simplified64.3%

                      \[\leadsto \frac{a}{\color{blue}{k \cdot k}} \]
                    11. Step-by-step derivation
                      1. associate-/r*N/A

                        \[\leadsto \frac{\frac{a}{k}}{\color{blue}{k}} \]
                      2. clear-numN/A

                        \[\leadsto \frac{1}{\color{blue}{\frac{k}{\frac{a}{k}}}} \]
                      3. un-div-invN/A

                        \[\leadsto \frac{1}{k \cdot \color{blue}{\frac{1}{\frac{a}{k}}}} \]
                      4. clear-numN/A

                        \[\leadsto \frac{1}{k \cdot \frac{k}{\color{blue}{a}}} \]
                      5. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(k \cdot \frac{k}{a}\right)}\right) \]
                      6. associate-*r/N/A

                        \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{k \cdot k}{\color{blue}{a}}\right)\right) \]
                      7. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(k \cdot k\right), \color{blue}{a}\right)\right) \]
                      8. *-lowering-*.f6467.6%

                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, k\right), a\right)\right) \]
                    12. Applied egg-rr67.6%

                      \[\leadsto \color{blue}{\frac{1}{\frac{k \cdot k}{a}}} \]

                    if -0.619999999999999996 < m

                    1. Initial program 84.9%

                      \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                    2. Step-by-step derivation
                      1. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                      2. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                      3. pow-lowering-pow.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                      4. associate-+l+N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                      5. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                      6. distribute-rgt-outN/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                      7. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                      8. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                      9. +-lowering-+.f6484.9%

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                    3. Simplified84.9%

                      \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
                    4. Add Preprocessing
                    5. Taylor expanded in m around 0

                      \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
                    6. Step-by-step derivation
                      1. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                      2. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(10 + k\right) + \color{blue}{1}\right)\right) \]
                      3. fma-defineN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \color{blue}{10 + k}, 1\right)\right)\right) \]
                      4. metadata-evalN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, 10 \cdot 1 + k, 1\right)\right)\right) \]
                      5. lft-mult-inverseN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, 10 \cdot \left(\frac{1}{k} \cdot k\right) + k, 1\right)\right)\right) \]
                      6. associate-*l*N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \left(10 \cdot \frac{1}{k}\right) \cdot k + k, 1\right)\right)\right) \]
                      7. *-lft-identityN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \left(10 \cdot \frac{1}{k}\right) \cdot k + 1 \cdot \color{blue}{k}, 1\right)\right)\right) \]
                      8. distribute-rgt-inN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \color{blue}{\left(10 \cdot \frac{1}{k} + 1\right)}, 1\right)\right)\right) \]
                      9. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + \color{blue}{10 \cdot \frac{1}{k}}\right), 1\right)\right)\right) \]
                      10. lft-mult-inverseN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                      11. fma-defineN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right) + \color{blue}{\frac{1}{{k}^{2}} \cdot {k}^{2}}\right)\right) \]
                      12. associate-*l*N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(\left(k \cdot k\right) \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + \color{blue}{\frac{1}{{k}^{2}}} \cdot {k}^{2}\right)\right) \]
                      13. unpow2N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + \frac{\color{blue}{1}}{{k}^{2}} \cdot {k}^{2}\right)\right) \]
                      14. lft-mult-inverseN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + 1\right)\right) \]
                      15. +-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \color{blue}{{k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right) \]
                      16. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right) \]
                      17. unpow2N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(k \cdot k\right) \cdot \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right)\right) \]
                      18. associate-*l*N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right)\right) \]
                      19. *-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                      20. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right)}\right)\right)\right) \]
                      21. *-commutativeN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right)\right)\right) \]
                      22. distribute-rgt-inN/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
                    7. Simplified48.6%

                      \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                    8. Taylor expanded in k around inf

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2}\right)}\right)\right) \]
                    9. Step-by-step derivation
                      1. unpow2N/A

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{k}\right)\right)\right) \]
                      2. *-lowering-*.f6447.7%

                        \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
                    10. Simplified47.7%

                      \[\leadsto \frac{a}{1 + \color{blue}{k \cdot k}} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification54.2%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;m \leq -0.62:\\ \;\;\;\;\frac{1}{\frac{k \cdot k}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{k \cdot k + 1}\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 19: 19.3% accurate, 114.0× speedup?

                  \[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ a\_s \cdot a\_m \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))
                  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;
                  }
                  
                  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
                  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;
                  }
                  
                  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
                  
                  a\_m = abs(a)
                  a\_s = copysign(1.0, a)
                  function code(a_s, a_m, k, m)
                  	return Float64(a_s * a_m)
                  end
                  
                  a\_m = abs(a);
                  a\_s = sign(a) * abs(1.0);
                  function tmp = code(a_s, a_m, k, m)
                  	tmp = a_s * a_m;
                  end
                  
                  a\_m = N[Abs[a], $MachinePrecision]
                  a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                  code[a$95$s_, a$95$m_, k_, m_] := N[(a$95$s * a$95$m), $MachinePrecision]
                  
                  \begin{array}{l}
                  a\_m = \left|a\right|
                  \\
                  a\_s = \mathsf{copysign}\left(1, a\right)
                  
                  \\
                  a\_s \cdot a\_m
                  \end{array}
                  
                  Derivation
                  1. Initial program 89.8%

                    \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
                  2. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\left(a \cdot {k}^{m}\right), \color{blue}{\left(\left(1 + 10 \cdot k\right) + k \cdot k\right)}\right) \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \left({k}^{m}\right)\right), \left(\color{blue}{\left(1 + 10 \cdot k\right)} + k \cdot k\right)\right) \]
                    3. pow-lowering-pow.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(\left(1 + \color{blue}{10 \cdot k}\right) + k \cdot k\right)\right) \]
                    4. associate-+l+N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \left(1 + \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                    5. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(10 \cdot k + k \cdot k\right)}\right)\right) \]
                    6. distribute-rgt-outN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                    7. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(10 + k\right)}\right)\right)\right) \]
                    8. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k + \color{blue}{10}\right)\right)\right)\right) \]
                    9. +-lowering-+.f6489.8%

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, \mathsf{pow.f64}\left(k, m\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(k, \color{blue}{10}\right)\right)\right)\right) \]
                  3. Simplified89.8%

                    \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
                  4. Add Preprocessing
                  5. Taylor expanded in m around 0

                    \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(10 + k\right)}} \]
                  6. Step-by-step derivation
                    1. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \color{blue}{\left(1 + k \cdot \left(10 + k\right)\right)}\right) \]
                    2. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(10 + k\right) + \color{blue}{1}\right)\right) \]
                    3. fma-defineN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \color{blue}{10 + k}, 1\right)\right)\right) \]
                    4. metadata-evalN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, 10 \cdot 1 + k, 1\right)\right)\right) \]
                    5. lft-mult-inverseN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, 10 \cdot \left(\frac{1}{k} \cdot k\right) + k, 1\right)\right)\right) \]
                    6. associate-*l*N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \left(10 \cdot \frac{1}{k}\right) \cdot k + k, 1\right)\right)\right) \]
                    7. *-lft-identityN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, \left(10 \cdot \frac{1}{k}\right) \cdot k + 1 \cdot \color{blue}{k}, 1\right)\right)\right) \]
                    8. distribute-rgt-inN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \color{blue}{\left(10 \cdot \frac{1}{k} + 1\right)}, 1\right)\right)\right) \]
                    9. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + \color{blue}{10 \cdot \frac{1}{k}}\right), 1\right)\right)\right) \]
                    10. lft-mult-inverseN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\mathsf{fma}\left(k, k \cdot \left(1 + 10 \cdot \frac{1}{k}\right), \frac{1}{{k}^{2}} \cdot {k}^{2}\right)\right)\right) \]
                    11. fma-defineN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(k \cdot \left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right) + \color{blue}{\frac{1}{{k}^{2}} \cdot {k}^{2}}\right)\right) \]
                    12. associate-*l*N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(\left(k \cdot k\right) \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + \color{blue}{\frac{1}{{k}^{2}}} \cdot {k}^{2}\right)\right) \]
                    13. unpow2N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + \frac{\color{blue}{1}}{{k}^{2}} \cdot {k}^{2}\right)\right) \]
                    14. lft-mult-inverseN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right) + 1\right)\right) \]
                    15. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \left(1 + \color{blue}{{k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right) \]
                    16. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \color{blue}{\left({k}^{2} \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right) \]
                    17. unpow2N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(\left(k \cdot k\right) \cdot \left(\color{blue}{1} + 10 \cdot \frac{1}{k}\right)\right)\right)\right) \]
                    18. associate-*l*N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \color{blue}{\left(k \cdot \left(1 + 10 \cdot \frac{1}{k}\right)\right)}\right)\right)\right) \]
                    19. *-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \left(k \cdot \left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
                    20. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \color{blue}{\left(\left(1 + 10 \cdot \frac{1}{k}\right) \cdot k\right)}\right)\right)\right) \]
                    21. *-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(1 + 10 \cdot \frac{1}{k}\right)}\right)\right)\right)\right) \]
                    22. distribute-rgt-inN/A

                      \[\leadsto \mathsf{/.f64}\left(a, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(k, \left(1 \cdot k + \color{blue}{\left(10 \cdot \frac{1}{k}\right) \cdot k}\right)\right)\right)\right) \]
                  7. Simplified46.1%

                    \[\leadsto \color{blue}{\frac{a}{1 + k \cdot \left(k + 10\right)}} \]
                  8. Taylor expanded in k around 0

                    \[\leadsto \color{blue}{a} \]
                  9. Step-by-step derivation
                    1. Simplified21.2%

                      \[\leadsto \color{blue}{a} \]
                    2. Add Preprocessing

                    Reproduce

                    ?
                    herbie shell --seed 2024145 
                    (FPCore (a k m)
                      :name "Falkner and Boettcher, Appendix A"
                      :precision binary64
                      (/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))