Falkner and Boettcher, Appendix A

Percentage Accurate: 90.2% → 97.7%
Time: 9.3s
Alternatives: 15
Speedup: 1.1×

Specification

?
\[\begin{array}{l} \\ \frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \end{array} \]
(FPCore (a k m)
 :precision binary64
 (/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))
double code(double a, double k, double m) {
	return (a * pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 90.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));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

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

Alternative 1: 97.7% accurate, 1.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;{k}^{m} \cdot a\\


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

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6200000000000001 < m

    1. Initial program 78.2%

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

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

        \[\leadsto \frac{a \cdot {k}^{m}}{\color{blue}{k \cdot k}} \]
      2. lower-*.f6457.5

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

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

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

        \[\leadsto \frac{\color{blue}{a \cdot {k}^{m}}}{k \cdot k} \]
      3. *-commutativeN/A

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

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

        \[\leadsto \color{blue}{{k}^{m} \cdot \frac{a}{k \cdot k}} \]
      6. lower-/.f6443.7

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

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

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

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

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

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

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

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

Alternative 2: 61.9% accurate, 0.3× speedup?

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

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

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

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

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


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

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

          1. Initial program 100.0%

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

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

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

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

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

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

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

              \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
            7. lower-+.f643.4

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

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

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

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

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

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

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

              1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

              Alternative 3: 61.2% accurate, 0.3× speedup?

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

                1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

                      1. Initial program 100.0%

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

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

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

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

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

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

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

                          \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                        7. lower-+.f643.4

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

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

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

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

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

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

                          1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

                          Alternative 4: 61.6% accurate, 0.3× speedup?

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

                            1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

                                1. Initial program 100.0%

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

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

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

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

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

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

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

                                    \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                                  7. lower-+.f643.4

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

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

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

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

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

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

                                    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

                                    Alternative 5: 16.6% accurate, 0.9× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \leq 0:\\ \;\;\;\;\left(a \cdot k\right) \cdot -10\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-10 \cdot a, k, a\right)\\ \end{array} \end{array} \]
                                    (FPCore (a k m)
                                     :precision binary64
                                     (if (<= (/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))) 0.0)
                                       (* (* a k) -10.0)
                                       (fma (* -10.0 a) k a)))
                                    double code(double a, double k, double m) {
                                    	double tmp;
                                    	if (((a * pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k))) <= 0.0) {
                                    		tmp = (a * k) * -10.0;
                                    	} else {
                                    		tmp = fma((-10.0 * a), k, a);
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(a, k, m)
                                    	tmp = 0.0
                                    	if (Float64(Float64(a * (k ^ m)) / Float64(Float64(1.0 + Float64(10.0 * k)) + Float64(k * k))) <= 0.0)
                                    		tmp = Float64(Float64(a * k) * -10.0);
                                    	else
                                    		tmp = fma(Float64(-10.0 * a), k, a);
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[a_, k_, m_] := If[LessEqual[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], 0.0], N[(N[(a * k), $MachinePrecision] * -10.0), $MachinePrecision], N[(N[(-10.0 * a), $MachinePrecision] * k + a), $MachinePrecision]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \leq 0:\\
                                    \;\;\;\;\left(a \cdot k\right) \cdot -10\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\mathsf{fma}\left(-10 \cdot a, k, a\right)\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k))) < 0.0

                                      1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            1. Initial program 77.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                Alternative 6: 16.7% accurate, 0.9× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \leq 0:\\ \;\;\;\;\left(a \cdot k\right) \cdot -10\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-10, k, 1\right) \cdot a\\ \end{array} \end{array} \]
                                                (FPCore (a k m)
                                                 :precision binary64
                                                 (if (<= (/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))) 0.0)
                                                   (* (* a k) -10.0)
                                                   (* (fma -10.0 k 1.0) a)))
                                                double code(double a, double k, double m) {
                                                	double tmp;
                                                	if (((a * pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k))) <= 0.0) {
                                                		tmp = (a * k) * -10.0;
                                                	} else {
                                                		tmp = fma(-10.0, k, 1.0) * a;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                function code(a, k, m)
                                                	tmp = 0.0
                                                	if (Float64(Float64(a * (k ^ m)) / Float64(Float64(1.0 + Float64(10.0 * k)) + Float64(k * k))) <= 0.0)
                                                		tmp = Float64(Float64(a * k) * -10.0);
                                                	else
                                                		tmp = Float64(fma(-10.0, k, 1.0) * a);
                                                	end
                                                	return tmp
                                                end
                                                
                                                code[a_, k_, m_] := If[LessEqual[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], 0.0], N[(N[(a * k), $MachinePrecision] * -10.0), $MachinePrecision], N[(N[(-10.0 * k + 1.0), $MachinePrecision] * a), $MachinePrecision]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \leq 0:\\
                                                \;\;\;\;\left(a \cdot k\right) \cdot -10\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\mathsf{fma}\left(-10, k, 1\right) \cdot a\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k))) < 0.0

                                                  1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        1. Initial program 77.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            Alternative 7: 97.1% accurate, 1.0× speedup?

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

                                                              1. Initial program 100.0%

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

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

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

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

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

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

                                                                  \[\leadsto \frac{\color{blue}{a \cdot {k}^{m}}}{k \cdot k} \]
                                                                3. *-commutativeN/A

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

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

                                                                  \[\leadsto \color{blue}{{k}^{m} \cdot \frac{a}{k \cdot k}} \]
                                                                6. lower-/.f64100.0

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

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

                                                              if -2.7999999999999999e-8 < m < 5.19999999999999998e-7

                                                              1. Initial program 92.7%

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

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

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

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

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

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

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

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

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

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

                                                              if 5.19999999999999998e-7 < m

                                                              1. Initial program 78.2%

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

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

                                                                  \[\leadsto \frac{a \cdot {k}^{m}}{\color{blue}{k \cdot k}} \]
                                                                2. lower-*.f6457.5

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

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

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

                                                                  \[\leadsto \frac{\color{blue}{a \cdot {k}^{m}}}{k \cdot k} \]
                                                                3. *-commutativeN/A

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

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

                                                                  \[\leadsto \color{blue}{{k}^{m} \cdot \frac{a}{k \cdot k}} \]
                                                                6. lower-/.f6443.7

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

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

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

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

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

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

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

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

                                                            Alternative 8: 96.9% accurate, 1.1× speedup?

                                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;m \leq -11000000 \lor \neg \left(m \leq 5.2 \cdot 10^{-7}\right):\\ \;\;\;\;{k}^{m} \cdot a\\ \mathbf{else}:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\ \end{array} \end{array} \]
                                                            (FPCore (a k m)
                                                             :precision binary64
                                                             (if (or (<= m -11000000.0) (not (<= m 5.2e-7)))
                                                               (* (pow k m) a)
                                                               (/ a (fma (+ 10.0 k) k 1.0))))
                                                            double code(double a, double k, double m) {
                                                            	double tmp;
                                                            	if ((m <= -11000000.0) || !(m <= 5.2e-7)) {
                                                            		tmp = pow(k, m) * a;
                                                            	} else {
                                                            		tmp = a / fma((10.0 + k), k, 1.0);
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            function code(a, k, m)
                                                            	tmp = 0.0
                                                            	if ((m <= -11000000.0) || !(m <= 5.2e-7))
                                                            		tmp = Float64((k ^ m) * a);
                                                            	else
                                                            		tmp = Float64(a / fma(Float64(10.0 + k), k, 1.0));
                                                            	end
                                                            	return tmp
                                                            end
                                                            
                                                            code[a_, k_, m_] := If[Or[LessEqual[m, -11000000.0], N[Not[LessEqual[m, 5.2e-7]], $MachinePrecision]], N[(N[Power[k, m], $MachinePrecision] * a), $MachinePrecision], N[(a / N[(N[(10.0 + k), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision]]
                                                            
                                                            \begin{array}{l}
                                                            
                                                            \\
                                                            \begin{array}{l}
                                                            \mathbf{if}\;m \leq -11000000 \lor \neg \left(m \leq 5.2 \cdot 10^{-7}\right):\\
                                                            \;\;\;\;{k}^{m} \cdot a\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;\frac{a}{\mathsf{fma}\left(10 + k, k, 1\right)}\\
                                                            
                                                            
                                                            \end{array}
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 2 regimes
                                                            2. if m < -1.1e7 or 5.19999999999999998e-7 < m

                                                              1. Initial program 89.2%

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

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

                                                                  \[\leadsto \frac{a \cdot {k}^{m}}{\color{blue}{k \cdot k}} \]
                                                                2. lower-*.f6479.0

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

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

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

                                                                  \[\leadsto \frac{\color{blue}{a \cdot {k}^{m}}}{k \cdot k} \]
                                                                3. *-commutativeN/A

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

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

                                                                  \[\leadsto \color{blue}{{k}^{m} \cdot \frac{a}{k \cdot k}} \]
                                                                6. lower-/.f6472.2

                                                                  \[\leadsto {k}^{m} \cdot \color{blue}{\frac{a}{k \cdot k}} \]
                                                              7. Applied rewrites72.2%

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

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

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

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

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

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

                                                              if -1.1e7 < m < 5.19999999999999998e-7

                                                              1. Initial program 93.0%

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

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

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

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

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

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

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

                                                                  \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                                                                7. lower-+.f6492.3

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

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

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

                                                            Alternative 9: 62.8% accurate, 4.1× speedup?

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

                                                              1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

                                                                  \[\leadsto \frac{a}{-1 \cdot \color{blue}{\left({k}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}} \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites55.4%

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

                                                                  if -1.05e18 < m < 2.25

                                                                  1. Initial program 93.2%

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

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

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

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

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

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

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

                                                                      \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                                                                    7. lower-+.f6490.3

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

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

                                                                  if 2.25 < m

                                                                  1. Initial program 78.2%

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

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

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

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

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

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

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

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

                                                                  Alternative 10: 61.8% accurate, 4.2× speedup?

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

                                                                    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

                                                                        \[\leadsto \frac{a}{-1 \cdot \color{blue}{\left({k}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}} \]
                                                                      3. Step-by-step derivation
                                                                        1. Applied rewrites55.4%

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

                                                                        if -1.05e18 < m < 2.25

                                                                        1. Initial program 93.2%

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

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

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

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

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

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

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

                                                                            \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                                                                          7. lower-+.f6490.3

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

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

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

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

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

                                                                            if 2.25 < m

                                                                            1. Initial program 78.2%

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

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

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

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

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

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

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

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

                                                                            Alternative 11: 56.9% accurate, 4.5× speedup?

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

                                                                              1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

                                                                                  \[\leadsto \frac{a}{-1 \cdot \color{blue}{\left({k}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}} \]
                                                                                3. Step-by-step derivation
                                                                                  1. Applied rewrites55.4%

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

                                                                                  if -1.05e18 < m < 1.15000000000000006e39

                                                                                  1. Initial program 90.2%

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

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

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

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

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

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

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

                                                                                      \[\leadsto \frac{a}{\color{blue}{\mathsf{fma}\left(10 + k, k, 1\right)}} \]
                                                                                    7. lower-+.f6484.3

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

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

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

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

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

                                                                                      if 1.15000000000000006e39 < m

                                                                                      1. Initial program 80.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                          Alternative 12: 47.5% accurate, 4.5× speedup?

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

                                                                                            1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                if -9.2000000000000004e-18 < m < 1.15000000000000006e39

                                                                                                1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                  if 1.15000000000000006e39 < m

                                                                                                  1. Initial program 80.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                          \[\leadsto \left(a \cdot k\right) \cdot -10 \]
                                                                                                      4. Recombined 3 regimes into one program.
                                                                                                      5. Final simplification45.7%

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

                                                                                                      Alternative 13: 43.4% accurate, 5.6× speedup?

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

                                                                                                        1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                            if -1.19999999999999996e-20 < m < 0.450000000000000011

                                                                                                            1. Initial program 92.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                  if 0.450000000000000011 < m

                                                                                                                  1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                      Alternative 14: 25.5% accurate, 7.4× speedup?

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

                                                                                                                        1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                              if 5.40000000000000018e-306 < k

                                                                                                                              1. Initial program 90.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                  Alternative 15: 8.2% accurate, 12.2× speedup?

                                                                                                                                  \[\begin{array}{l} \\ \left(a \cdot k\right) \cdot -10 \end{array} \]
                                                                                                                                  (FPCore (a k m) :precision binary64 (* (* a k) -10.0))
                                                                                                                                  double code(double a, double k, double m) {
                                                                                                                                  	return (a * k) * -10.0;
                                                                                                                                  }
                                                                                                                                  
                                                                                                                                  module fmin_fmax_functions
                                                                                                                                      implicit none
                                                                                                                                      private
                                                                                                                                      public fmax
                                                                                                                                      public fmin
                                                                                                                                  
                                                                                                                                      interface fmax
                                                                                                                                          module procedure fmax88
                                                                                                                                          module procedure fmax44
                                                                                                                                          module procedure fmax84
                                                                                                                                          module procedure fmax48
                                                                                                                                      end interface
                                                                                                                                      interface fmin
                                                                                                                                          module procedure fmin88
                                                                                                                                          module procedure fmin44
                                                                                                                                          module procedure fmin84
                                                                                                                                          module procedure fmin48
                                                                                                                                      end interface
                                                                                                                                  contains
                                                                                                                                      real(8) function fmax88(x, y) result (res)
                                                                                                                                          real(8), intent (in) :: x
                                                                                                                                          real(8), intent (in) :: y
                                                                                                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                      end function
                                                                                                                                      real(4) function fmax44(x, y) result (res)
                                                                                                                                          real(4), intent (in) :: x
                                                                                                                                          real(4), intent (in) :: y
                                                                                                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                      end function
                                                                                                                                      real(8) function fmax84(x, y) result(res)
                                                                                                                                          real(8), intent (in) :: x
                                                                                                                                          real(4), intent (in) :: y
                                                                                                                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                                      end function
                                                                                                                                      real(8) function fmax48(x, y) result(res)
                                                                                                                                          real(4), intent (in) :: x
                                                                                                                                          real(8), intent (in) :: y
                                                                                                                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                                      end function
                                                                                                                                      real(8) function fmin88(x, y) result (res)
                                                                                                                                          real(8), intent (in) :: x
                                                                                                                                          real(8), intent (in) :: y
                                                                                                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                      end function
                                                                                                                                      real(4) function fmin44(x, y) result (res)
                                                                                                                                          real(4), intent (in) :: x
                                                                                                                                          real(4), intent (in) :: y
                                                                                                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                      end function
                                                                                                                                      real(8) function fmin84(x, y) result(res)
                                                                                                                                          real(8), intent (in) :: x
                                                                                                                                          real(4), intent (in) :: y
                                                                                                                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                                      end function
                                                                                                                                      real(8) function fmin48(x, y) result(res)
                                                                                                                                          real(4), intent (in) :: x
                                                                                                                                          real(8), intent (in) :: y
                                                                                                                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                                      end function
                                                                                                                                  end module
                                                                                                                                  
                                                                                                                                  real(8) function code(a, k, m)
                                                                                                                                  use fmin_fmax_functions
                                                                                                                                      real(8), intent (in) :: a
                                                                                                                                      real(8), intent (in) :: k
                                                                                                                                      real(8), intent (in) :: m
                                                                                                                                      code = (a * k) * (-10.0d0)
                                                                                                                                  end function
                                                                                                                                  
                                                                                                                                  public static double code(double a, double k, double m) {
                                                                                                                                  	return (a * k) * -10.0;
                                                                                                                                  }
                                                                                                                                  
                                                                                                                                  def code(a, k, m):
                                                                                                                                  	return (a * k) * -10.0
                                                                                                                                  
                                                                                                                                  function code(a, k, m)
                                                                                                                                  	return Float64(Float64(a * k) * -10.0)
                                                                                                                                  end
                                                                                                                                  
                                                                                                                                  function tmp = code(a, k, m)
                                                                                                                                  	tmp = (a * k) * -10.0;
                                                                                                                                  end
                                                                                                                                  
                                                                                                                                  code[a_, k_, m_] := N[(N[(a * k), $MachinePrecision] * -10.0), $MachinePrecision]
                                                                                                                                  
                                                                                                                                  \begin{array}{l}
                                                                                                                                  
                                                                                                                                  \\
                                                                                                                                  \left(a \cdot k\right) \cdot -10
                                                                                                                                  \end{array}
                                                                                                                                  
                                                                                                                                  Derivation
                                                                                                                                  1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                        Reproduce

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