Falkner and Boettcher, Appendix A

Percentage Accurate: 89.8% → 99.8%
Time: 5.6s
Alternatives: 14
Speedup: 1.3×

Specification

?
\[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
(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]
\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 89.8% accurate, 1.0× speedup?

\[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
(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]
\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}

Alternative 1: 99.8% accurate, 0.8× speedup?

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 5.5999999999999998e-17

    1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{a}{\left(1 + 10 \cdot k\right) \cdot {k}^{-1} + k} \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{k}\right)} \]
    6. Applied rewrites45.2%

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

      \[\leadsto \frac{a \cdot -1}{-1} \]
    8. Step-by-step derivation
      1. Applied rewrites20.7%

        \[\leadsto \frac{a \cdot -1}{-1} \]
      2. Taylor expanded in k around 0

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

          \[\leadsto a \cdot \color{blue}{{k}^{m}} \]
        2. lower-pow.f6482.7%

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

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

      if 5.5999999999999998e-17 < k

      1. Initial program 89.8%

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

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

          \[\leadsto \frac{\color{blue}{{k}^{m} \cdot a}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
        3. lower-*.f6489.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{{k}^{m} \cdot a}{\mathsf{fma}\left(\color{blue}{k - \left(\mathsf{neg}\left(10\right)\right)}, k, 1\right)} \]
        22. metadata-eval89.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{a}{\left(\left(10 + \frac{1}{k}\right) + k\right) \cdot {k}^{\left(-m\right)}}}{k}} \]
    9. Recombined 2 regimes into one program.
    10. Add Preprocessing

    Alternative 2: 97.3% accurate, 1.0× speedup?

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

      1. Initial program 89.8%

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

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

          \[\leadsto \frac{\color{blue}{{k}^{m} \cdot a}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
        3. lower-*.f6489.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{{k}^{m} \cdot a}{\mathsf{fma}\left(\color{blue}{k - \left(\mathsf{neg}\left(10\right)\right)}, k, 1\right)} \]
        22. metadata-eval89.8%

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

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

      if 1.5e-10 < m

      1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{a}{\left(1 + 10 \cdot k\right) \cdot {k}^{-1} + k} \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{k}\right)} \]
      6. Applied rewrites45.2%

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

        \[\leadsto \frac{a \cdot -1}{-1} \]
      8. Step-by-step derivation
        1. Applied rewrites20.7%

          \[\leadsto \frac{a \cdot -1}{-1} \]
        2. Taylor expanded in k around 0

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

            \[\leadsto a \cdot \color{blue}{{k}^{m}} \]
          2. lower-pow.f6482.7%

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

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

      Alternative 3: 97.1% accurate, 1.1× speedup?

      \[\begin{array}{l} t_0 := a \cdot {k}^{m}\\ \mathbf{if}\;m \leq -0.00016:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;m \leq 1.5 \cdot 10^{-10}:\\ \;\;\;\;\mathsf{fma}\left(\log k, m, 1\right) \cdot \frac{a}{\mathsf{fma}\left(k - -10, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
      (FPCore (a k m)
        :precision binary64
        (let* ((t_0 (* a (pow k m))))
        (if (<= m -0.00016)
          t_0
          (if (<= m 1.5e-10)
            (* (fma (log k) m 1.0) (/ a (fma (- k -10.0) k 1.0)))
            t_0))))
      double code(double a, double k, double m) {
      	double t_0 = a * pow(k, m);
      	double tmp;
      	if (m <= -0.00016) {
      		tmp = t_0;
      	} else if (m <= 1.5e-10) {
      		tmp = fma(log(k), m, 1.0) * (a / fma((k - -10.0), k, 1.0));
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      function code(a, k, m)
      	t_0 = Float64(a * (k ^ m))
      	tmp = 0.0
      	if (m <= -0.00016)
      		tmp = t_0;
      	elseif (m <= 1.5e-10)
      		tmp = Float64(fma(log(k), m, 1.0) * Float64(a / fma(Float64(k - -10.0), k, 1.0)));
      	else
      		tmp = t_0;
      	end
      	return tmp
      end
      
      code[a_, k_, m_] := Block[{t$95$0 = N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[m, -0.00016], t$95$0, If[LessEqual[m, 1.5e-10], N[(N[(N[Log[k], $MachinePrecision] * m + 1.0), $MachinePrecision] * N[(a / N[(N[(k - -10.0), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
      
      \begin{array}{l}
      t_0 := a \cdot {k}^{m}\\
      \mathbf{if}\;m \leq -0.00016:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;m \leq 1.5 \cdot 10^{-10}:\\
      \;\;\;\;\mathsf{fma}\left(\log k, m, 1\right) \cdot \frac{a}{\mathsf{fma}\left(k - -10, k, 1\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if m < -1.6000000000000001e-4 or 1.5e-10 < m

        1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{a}{\left(1 + 10 \cdot k\right) \cdot {k}^{-1} + k} \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{k}\right)} \]
        6. Applied rewrites45.2%

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

          \[\leadsto \frac{a \cdot -1}{-1} \]
        8. Step-by-step derivation
          1. Applied rewrites20.7%

            \[\leadsto \frac{a \cdot -1}{-1} \]
          2. Taylor expanded in k around 0

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

              \[\leadsto a \cdot \color{blue}{{k}^{m}} \]
            2. lower-pow.f6482.7%

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

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

          if -1.6000000000000001e-4 < m < 1.5e-10

          1. Initial program 89.8%

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

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

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

              \[\leadsto \frac{a \cdot \left(1 + m \cdot \color{blue}{\log k}\right)}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
            3. lower-log.f6440.7%

              \[\leadsto \frac{a \cdot \left(1 + m \cdot \log k\right)}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
          4. Applied rewrites40.7%

            \[\leadsto \frac{a \cdot \color{blue}{\left(1 + m \cdot \log k\right)}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
          5. Applied rewrites41.6%

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

        Alternative 4: 96.9% accurate, 1.3× speedup?

        \[\begin{array}{l} t_0 := a \cdot {k}^{m}\\ \mathbf{if}\;m \leq -0.00016:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;m \leq 1.5 \cdot 10^{-10}:\\ \;\;\;\;\frac{a}{\mathsf{fma}\left(k - -10, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
        (FPCore (a k m)
          :precision binary64
          (let* ((t_0 (* a (pow k m))))
          (if (<= m -0.00016)
            t_0
            (if (<= m 1.5e-10) (/ a (fma (- k -10.0) k 1.0)) t_0))))
        double code(double a, double k, double m) {
        	double t_0 = a * pow(k, m);
        	double tmp;
        	if (m <= -0.00016) {
        		tmp = t_0;
        	} else if (m <= 1.5e-10) {
        		tmp = a / fma((k - -10.0), k, 1.0);
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        function code(a, k, m)
        	t_0 = Float64(a * (k ^ m))
        	tmp = 0.0
        	if (m <= -0.00016)
        		tmp = t_0;
        	elseif (m <= 1.5e-10)
        		tmp = Float64(a / fma(Float64(k - -10.0), k, 1.0));
        	else
        		tmp = t_0;
        	end
        	return tmp
        end
        
        code[a_, k_, m_] := Block[{t$95$0 = N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[m, -0.00016], t$95$0, If[LessEqual[m, 1.5e-10], N[(a / N[(N[(k - -10.0), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
        
        \begin{array}{l}
        t_0 := a \cdot {k}^{m}\\
        \mathbf{if}\;m \leq -0.00016:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;m \leq 1.5 \cdot 10^{-10}:\\
        \;\;\;\;\frac{a}{\mathsf{fma}\left(k - -10, k, 1\right)}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if m < -1.6000000000000001e-4 or 1.5e-10 < m

          1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{a}{\left(1 + 10 \cdot k\right) \cdot {k}^{-1} + k} \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{k}\right)} \]
          6. Applied rewrites45.2%

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

            \[\leadsto \frac{a \cdot -1}{-1} \]
          8. Step-by-step derivation
            1. Applied rewrites20.7%

              \[\leadsto \frac{a \cdot -1}{-1} \]
            2. Taylor expanded in k around 0

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

                \[\leadsto a \cdot \color{blue}{{k}^{m}} \]
              2. lower-pow.f6482.7%

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

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

            if -1.6000000000000001e-4 < m < 1.5e-10

            1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{a}{1 + \left(\frac{{k}^{1}}{{k}^{-1}} + 10 \cdot k\right)} \]
              14. pow-divN/A

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

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

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

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

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

                \[\leadsto \frac{a}{1 + k \cdot \left(k + \left(\mathsf{neg}\left(-10\right)\right)\right)} \]
              20. sub-flipN/A

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

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

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

                \[\leadsto \frac{a}{\left(k - -10\right) \cdot k + \color{blue}{1}} \]
              24. lift-fma.f6445.2%

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

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

          Alternative 5: 96.6% accurate, 0.5× speedup?

          \[\begin{array}{l} t_0 := a \cdot {k}^{m}\\ \mathbf{if}\;\frac{t\_0}{\left(1 + 10 \cdot k\right) + k \cdot k} \leq \infty:\\ \;\;\;\;\frac{t\_0}{1 + k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;a + a \cdot \left(k \cdot \left(99 \cdot k - 10\right)\right)\\ \end{array} \]
          (FPCore (a k m)
            :precision binary64
            (let* ((t_0 (* a (pow k m))))
            (if (<= (/ t_0 (+ (+ 1.0 (* 10.0 k)) (* k k))) INFINITY)
              (/ t_0 (+ 1.0 (* k k)))
              (+ a (* a (* k (- (* 99.0 k) 10.0)))))))
          double code(double a, double k, double m) {
          	double t_0 = a * pow(k, m);
          	double tmp;
          	if ((t_0 / ((1.0 + (10.0 * k)) + (k * k))) <= ((double) INFINITY)) {
          		tmp = t_0 / (1.0 + (k * k));
          	} else {
          		tmp = a + (a * (k * ((99.0 * k) - 10.0)));
          	}
          	return tmp;
          }
          
          public static double code(double a, double k, double m) {
          	double t_0 = a * Math.pow(k, m);
          	double tmp;
          	if ((t_0 / ((1.0 + (10.0 * k)) + (k * k))) <= Double.POSITIVE_INFINITY) {
          		tmp = t_0 / (1.0 + (k * k));
          	} else {
          		tmp = a + (a * (k * ((99.0 * k) - 10.0)));
          	}
          	return tmp;
          }
          
          def code(a, k, m):
          	t_0 = a * math.pow(k, m)
          	tmp = 0
          	if (t_0 / ((1.0 + (10.0 * k)) + (k * k))) <= math.inf:
          		tmp = t_0 / (1.0 + (k * k))
          	else:
          		tmp = a + (a * (k * ((99.0 * k) - 10.0)))
          	return tmp
          
          function code(a, k, m)
          	t_0 = Float64(a * (k ^ m))
          	tmp = 0.0
          	if (Float64(t_0 / Float64(Float64(1.0 + Float64(10.0 * k)) + Float64(k * k))) <= Inf)
          		tmp = Float64(t_0 / Float64(1.0 + Float64(k * k)));
          	else
          		tmp = Float64(a + Float64(a * Float64(k * Float64(Float64(99.0 * k) - 10.0))));
          	end
          	return tmp
          end
          
          function tmp_2 = code(a, k, m)
          	t_0 = a * (k ^ m);
          	tmp = 0.0;
          	if ((t_0 / ((1.0 + (10.0 * k)) + (k * k))) <= Inf)
          		tmp = t_0 / (1.0 + (k * k));
          	else
          		tmp = a + (a * (k * ((99.0 * k) - 10.0)));
          	end
          	tmp_2 = tmp;
          end
          
          code[a_, k_, m_] := Block[{t$95$0 = N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$0 / N[(N[(1.0 + N[(10.0 * k), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(t$95$0 / N[(1.0 + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(a * N[(k * N[(N[(99.0 * k), $MachinePrecision] - 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
          
          \begin{array}{l}
          t_0 := a \cdot {k}^{m}\\
          \mathbf{if}\;\frac{t\_0}{\left(1 + 10 \cdot k\right) + k \cdot k} \leq \infty:\\
          \;\;\;\;\frac{t\_0}{1 + k \cdot k}\\
          
          \mathbf{else}:\\
          \;\;\;\;a + a \cdot \left(k \cdot \left(99 \cdot k - 10\right)\right)\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k))) < +inf.0

            1. Initial program 89.8%

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

              \[\leadsto \frac{a \cdot {k}^{m}}{\color{blue}{1} + k \cdot k} \]
            3. Step-by-step derivation
              1. Applied rewrites88.9%

                \[\leadsto \frac{a \cdot {k}^{m}}{\color{blue}{1} + 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 89.8%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right) \]
                5. lower-*.f64N/A

                  \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right) \]
                6. lower-+.f64N/A

                  \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right) \]
                7. lower-*.f64N/A

                  \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right) \]
                8. lower-*.f6428.2%

                  \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right) \]
              7. Applied rewrites28.2%

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

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

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

                  \[\leadsto a + a \cdot \left(k \cdot \left(99 \cdot k - 10\right)\right) \]
                3. lower--.f64N/A

                  \[\leadsto a + a \cdot \left(k \cdot \left(99 \cdot k - 10\right)\right) \]
                4. lower-*.f6429.9%

                  \[\leadsto a + a \cdot \left(k \cdot \left(99 \cdot k - 10\right)\right) \]
              10. Applied rewrites29.9%

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

            Alternative 6: 58.9% accurate, 0.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{a}{\left(1 + 10 \cdot k\right) \cdot {k}^{-1} + k} \cdot \frac{-1}{\mathsf{neg}\left(\color{blue}{k}\right)} \]
              6. Applied rewrites45.2%

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

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

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

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

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

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

                  \[\leadsto \frac{a}{\frac{\mathsf{fma}\left(10, k, 1\right)}{k} + k} \cdot \frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(k\right)} \]
                7. frac-2negN/A

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

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

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

                  \[\leadsto \frac{\frac{a}{\frac{\mathsf{fma}\left(10, k, 1\right)}{k} + k}}{k} \]
                11. lift-/.f64N/A

                  \[\leadsto \frac{\frac{a}{\frac{\mathsf{fma}\left(10, k, 1\right)}{k} + k}}{k} \]
                12. lift-fma.f64N/A

                  \[\leadsto \frac{\frac{a}{\frac{10 \cdot k + 1}{k} + k}}{k} \]
                13. add-to-fraction-revN/A

                  \[\leadsto \frac{\frac{a}{\left(10 + \frac{1}{k}\right) + k}}{k} \]
                14. lift-/.f64N/A

                  \[\leadsto \frac{\frac{a}{\left(10 + \frac{1}{k}\right) + k}}{k} \]
                15. lower-+.f6445.3%

                  \[\leadsto \frac{\frac{a}{\left(10 + \frac{1}{k}\right) + k}}{k} \]
              8. Applied rewrites45.3%

                \[\leadsto \frac{\frac{a}{\left(10 + \frac{1}{k}\right) + k}}{\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))) < 9.9999999999999996e274

              1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{a}{1 + \left(\frac{{k}^{1}}{{k}^{-1}} + 10 \cdot k\right)} \]
                14. pow-divN/A

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

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

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

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

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

                  \[\leadsto \frac{a}{1 + k \cdot \left(k + \left(\mathsf{neg}\left(-10\right)\right)\right)} \]
                20. sub-flipN/A

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

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

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

                  \[\leadsto \frac{a}{\left(k - -10\right) \cdot k + \color{blue}{1}} \]
                24. lift-fma.f6445.2%

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

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

              if 9.9999999999999996e274 < (/.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 89.8%

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

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

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

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

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

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

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

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

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

                  \[\leadsto a + -10 \cdot \left(a \cdot \color{blue}{k}\right) \]
                3. lower-*.f6421.6%

                  \[\leadsto a + -10 \cdot \left(a \cdot k\right) \]
              7. Applied rewrites21.6%

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

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

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

                  \[\leadsto k \cdot \mathsf{fma}\left(-10, a, \frac{a}{k}\right) \]
                3. lower-/.f6420.0%

                  \[\leadsto k \cdot \mathsf{fma}\left(-10, a, \frac{a}{k}\right) \]
              10. Applied rewrites20.0%

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

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

              1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right) \]
                5. lower-*.f64N/A

                  \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right) \]
                6. lower-+.f64N/A

                  \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right) \]
                7. lower-*.f64N/A

                  \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right) \]
                8. lower-*.f6428.2%

                  \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right) \]
              7. Applied rewrites28.2%

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

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

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

                  \[\leadsto a + a \cdot \left(k \cdot \left(99 \cdot k - 10\right)\right) \]
                3. lower--.f64N/A

                  \[\leadsto a + a \cdot \left(k \cdot \left(99 \cdot k - 10\right)\right) \]
                4. lower-*.f6429.9%

                  \[\leadsto a + a \cdot \left(k \cdot \left(99 \cdot k - 10\right)\right) \]
              10. Applied rewrites29.9%

                \[\leadsto a + a \cdot \left(k \cdot \color{blue}{\left(99 \cdot k - 10\right)}\right) \]
            3. Recombined 4 regimes into one program.
            4. Add Preprocessing

            Alternative 7: 58.5% accurate, 1.6× speedup?

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

              1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{a}{1 + \left(\frac{{k}^{1}}{{k}^{-1}} + 10 \cdot k\right)} \]
                14. pow-divN/A

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

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

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

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

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

                  \[\leadsto \frac{a}{1 + k \cdot \left(k + \left(\mathsf{neg}\left(-10\right)\right)\right)} \]
                20. sub-flipN/A

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

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

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

                  \[\leadsto \frac{a}{\left(k - -10\right) \cdot k + \color{blue}{1}} \]
                24. lift-fma.f6445.2%

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

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

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

              if -4e19 < m < 112000

              1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{a}{1 + \left(\frac{{k}^{1}}{{k}^{-1}} + 10 \cdot k\right)} \]
                14. pow-divN/A

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

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

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

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

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

                  \[\leadsto \frac{a}{1 + k \cdot \left(k + \left(\mathsf{neg}\left(-10\right)\right)\right)} \]
                20. sub-flipN/A

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

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

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

                  \[\leadsto \frac{a}{\left(k - -10\right) \cdot k + \color{blue}{1}} \]
                24. lift-fma.f6445.2%

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

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

              if 112000 < m

              1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right) \]
                5. lower-*.f64N/A

                  \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right) \]
                6. lower-+.f64N/A

                  \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right) \]
                7. lower-*.f64N/A

                  \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right) \]
                8. lower-*.f6428.2%

                  \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right) \]
              7. Applied rewrites28.2%

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

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

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

                  \[\leadsto a + a \cdot \left(k \cdot \left(99 \cdot k - 10\right)\right) \]
                3. lower--.f64N/A

                  \[\leadsto a + a \cdot \left(k \cdot \left(99 \cdot k - 10\right)\right) \]
                4. lower-*.f6429.9%

                  \[\leadsto a + a \cdot \left(k \cdot \left(99 \cdot k - 10\right)\right) \]
              10. Applied rewrites29.9%

                \[\leadsto a + a \cdot \left(k \cdot \color{blue}{\left(99 \cdot k - 10\right)}\right) \]
            3. Recombined 3 regimes into one program.
            4. Add Preprocessing

            Alternative 8: 55.1% accurate, 0.4× speedup?

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

              1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{a}{1 + \left(\frac{{k}^{1}}{{k}^{-1}} + 10 \cdot k\right)} \]
                14. pow-divN/A

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

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

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

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

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

                  \[\leadsto \frac{a}{1 + k \cdot \left(k + \left(\mathsf{neg}\left(-10\right)\right)\right)} \]
                20. sub-flipN/A

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

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

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

                  \[\leadsto \frac{a}{\left(k - -10\right) \cdot k + \color{blue}{1}} \]
                24. lift-fma.f6445.2%

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

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

              if 9.9999999999999996e274 < (/.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 89.8%

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

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

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

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

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

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

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

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

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

                  \[\leadsto a + -10 \cdot \left(a \cdot \color{blue}{k}\right) \]
                3. lower-*.f6421.6%

                  \[\leadsto a + -10 \cdot \left(a \cdot k\right) \]
              7. Applied rewrites21.6%

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

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

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

                  \[\leadsto k \cdot \mathsf{fma}\left(-10, a, \frac{a}{k}\right) \]
                3. lower-/.f6420.0%

                  \[\leadsto k \cdot \mathsf{fma}\left(-10, a, \frac{a}{k}\right) \]
              10. Applied rewrites20.0%

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

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

              1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right) \]
                5. lower-*.f64N/A

                  \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right) \]
                6. lower-+.f64N/A

                  \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right) \]
                7. lower-*.f64N/A

                  \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right) \]
                8. lower-*.f6428.2%

                  \[\leadsto a + k \cdot \left(-1 \cdot \left(k \cdot \left(a + -100 \cdot a\right)\right) - 10 \cdot a\right) \]
              7. Applied rewrites28.2%

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

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

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

                  \[\leadsto a + a \cdot \left(k \cdot \left(99 \cdot k - 10\right)\right) \]
                3. lower--.f64N/A

                  \[\leadsto a + a \cdot \left(k \cdot \left(99 \cdot k - 10\right)\right) \]
                4. lower-*.f6429.9%

                  \[\leadsto a + a \cdot \left(k \cdot \left(99 \cdot k - 10\right)\right) \]
              10. Applied rewrites29.9%

                \[\leadsto a + a \cdot \left(k \cdot \color{blue}{\left(99 \cdot k - 10\right)}\right) \]
            3. Recombined 3 regimes into one program.
            4. Add Preprocessing

            Alternative 9: 48.6% accurate, 0.6× speedup?

            \[\mathsf{copysign}\left(1, a\right) \cdot \begin{array}{l} \mathbf{if}\;\frac{\left|a\right| \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \leq 10^{+275}:\\ \;\;\;\;\frac{\left|a\right|}{\mathsf{fma}\left(k - -10, k, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;k \cdot \mathsf{fma}\left(-10, \left|a\right|, \frac{\left|a\right|}{k}\right)\\ \end{array} \]
            (FPCore (a k m)
              :precision binary64
              (*
             (copysign 1.0 a)
             (if (<=
                  (/ (* (fabs a) (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k)))
                  1e+275)
               (/ (fabs a) (fma (- k -10.0) k 1.0))
               (* k (fma -10.0 (fabs a) (/ (fabs a) k))))))
            double code(double a, double k, double m) {
            	double tmp;
            	if (((fabs(a) * pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k))) <= 1e+275) {
            		tmp = fabs(a) / fma((k - -10.0), k, 1.0);
            	} else {
            		tmp = k * fma(-10.0, fabs(a), (fabs(a) / k));
            	}
            	return copysign(1.0, a) * tmp;
            }
            
            function code(a, k, m)
            	tmp = 0.0
            	if (Float64(Float64(abs(a) * (k ^ m)) / Float64(Float64(1.0 + Float64(10.0 * k)) + Float64(k * k))) <= 1e+275)
            		tmp = Float64(abs(a) / fma(Float64(k - -10.0), k, 1.0));
            	else
            		tmp = Float64(k * fma(-10.0, abs(a), Float64(abs(a) / k)));
            	end
            	return Float64(copysign(1.0, a) * tmp)
            end
            
            code[a_, k_, m_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[(N[(N[Abs[a], $MachinePrecision] * N[Power[k, m], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 + N[(10.0 * k), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+275], N[(N[Abs[a], $MachinePrecision] / N[(N[(k - -10.0), $MachinePrecision] * k + 1.0), $MachinePrecision]), $MachinePrecision], N[(k * N[(-10.0 * N[Abs[a], $MachinePrecision] + N[(N[Abs[a], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
            
            \mathsf{copysign}\left(1, a\right) \cdot \begin{array}{l}
            \mathbf{if}\;\frac{\left|a\right| \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \leq 10^{+275}:\\
            \;\;\;\;\frac{\left|a\right|}{\mathsf{fma}\left(k - -10, k, 1\right)}\\
            
            \mathbf{else}:\\
            \;\;\;\;k \cdot \mathsf{fma}\left(-10, \left|a\right|, \frac{\left|a\right|}{k}\right)\\
            
            
            \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))) < 9.9999999999999996e274

              1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{a}{1 + \left(\frac{{k}^{1}}{{k}^{-1}} + 10 \cdot k\right)} \]
                14. pow-divN/A

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

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

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

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

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

                  \[\leadsto \frac{a}{1 + k \cdot \left(k + \left(\mathsf{neg}\left(-10\right)\right)\right)} \]
                20. sub-flipN/A

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

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

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

                  \[\leadsto \frac{a}{\left(k - -10\right) \cdot k + \color{blue}{1}} \]
                24. lift-fma.f6445.2%

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

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

              if 9.9999999999999996e274 < (/.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 89.8%

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

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

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

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

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

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

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

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

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

                  \[\leadsto a + -10 \cdot \left(a \cdot \color{blue}{k}\right) \]
                3. lower-*.f6421.6%

                  \[\leadsto a + -10 \cdot \left(a \cdot k\right) \]
              7. Applied rewrites21.6%

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

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

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

                  \[\leadsto k \cdot \mathsf{fma}\left(-10, a, \frac{a}{k}\right) \]
                3. lower-/.f6420.0%

                  \[\leadsto k \cdot \mathsf{fma}\left(-10, a, \frac{a}{k}\right) \]
              10. Applied rewrites20.0%

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

            Alternative 10: 46.9% accurate, 2.2× speedup?

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

              1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{a}{1 + \left(\frac{{k}^{1}}{{k}^{-1}} + 10 \cdot k\right)} \]
                14. pow-divN/A

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

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

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

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

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

                  \[\leadsto \frac{a}{1 + k \cdot \left(k + \left(\mathsf{neg}\left(-10\right)\right)\right)} \]
                20. sub-flipN/A

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

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

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

                  \[\leadsto \frac{a}{\left(k - -10\right) \cdot k + \color{blue}{1}} \]
                24. lift-fma.f6445.2%

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

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

              if 112000 < m

              1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

                  \[\leadsto a + -10 \cdot \left(a \cdot \color{blue}{k}\right) \]
                3. lower-*.f6421.6%

                  \[\leadsto a + -10 \cdot \left(a \cdot k\right) \]
              7. Applied rewrites21.6%

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

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

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

                  \[\leadsto a \cdot \left(1 + -10 \cdot k\right) \]
                3. lower-*.f6421.6%

                  \[\leadsto a \cdot \left(1 + -10 \cdot k\right) \]
              10. Applied rewrites21.6%

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

            Alternative 11: 30.9% accurate, 2.6× speedup?

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

              1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{a}{1 + \left(\frac{{k}^{1}}{{k}^{-1}} + 10 \cdot k\right)} \]
                14. pow-divN/A

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

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

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

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

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

                  \[\leadsto \frac{a}{1 + k \cdot \left(k + \left(\mathsf{neg}\left(-10\right)\right)\right)} \]
                20. sub-flipN/A

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

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

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

                  \[\leadsto \frac{a}{\left(k - -10\right) \cdot k + \color{blue}{1}} \]
                24. lift-fma.f6445.2%

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

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

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

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

                if 46 < m

                1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

                    \[\leadsto a + -10 \cdot \left(a \cdot \color{blue}{k}\right) \]
                  3. lower-*.f6421.6%

                    \[\leadsto a + -10 \cdot \left(a \cdot k\right) \]
                7. Applied rewrites21.6%

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

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

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

                    \[\leadsto a \cdot \left(1 + -10 \cdot k\right) \]
                  3. lower-*.f6421.6%

                    \[\leadsto a \cdot \left(1 + -10 \cdot k\right) \]
                10. Applied rewrites21.6%

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

              Alternative 12: 21.6% accurate, 3.8× speedup?

              \[a \cdot \left(1 + -10 \cdot k\right) \]
              (FPCore (a k m)
                :precision binary64
                (* a (+ 1.0 (* -10.0 k))))
              double code(double a, double k, double m) {
              	return a * (1.0 + (-10.0 * 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 * (1.0d0 + ((-10.0d0) * k))
              end function
              
              public static double code(double a, double k, double m) {
              	return a * (1.0 + (-10.0 * k));
              }
              
              def code(a, k, m):
              	return a * (1.0 + (-10.0 * k))
              
              function code(a, k, m)
              	return Float64(a * Float64(1.0 + Float64(-10.0 * k)))
              end
              
              function tmp = code(a, k, m)
              	tmp = a * (1.0 + (-10.0 * k));
              end
              
              code[a_, k_, m_] := N[(a * N[(1.0 + N[(-10.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
              
              a \cdot \left(1 + -10 \cdot k\right)
              
              Derivation
              1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

                  \[\leadsto a + -10 \cdot \left(a \cdot \color{blue}{k}\right) \]
                3. lower-*.f6421.6%

                  \[\leadsto a + -10 \cdot \left(a \cdot k\right) \]
              7. Applied rewrites21.6%

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

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

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

                  \[\leadsto a \cdot \left(1 + -10 \cdot k\right) \]
                3. lower-*.f6421.6%

                  \[\leadsto a \cdot \left(1 + -10 \cdot k\right) \]
              10. Applied rewrites21.6%

                \[\leadsto a \cdot \left(1 + \color{blue}{-10 \cdot k}\right) \]
              11. Add Preprocessing

              Alternative 13: 21.6% accurate, 4.0× speedup?

              \[\mathsf{fma}\left(-10 \cdot k, a, a\right) \]
              (FPCore (a k m)
                :precision binary64
                (fma (* -10.0 k) a a))
              double code(double a, double k, double m) {
              	return fma((-10.0 * k), a, a);
              }
              
              function code(a, k, m)
              	return fma(Float64(-10.0 * k), a, a)
              end
              
              code[a_, k_, m_] := N[(N[(-10.0 * k), $MachinePrecision] * a + a), $MachinePrecision]
              
              \mathsf{fma}\left(-10 \cdot k, a, a\right)
              
              Derivation
              1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

                  \[\leadsto a + -10 \cdot \left(a \cdot \color{blue}{k}\right) \]
                3. lower-*.f6421.6%

                  \[\leadsto a + -10 \cdot \left(a \cdot k\right) \]
              7. Applied rewrites21.6%

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

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

                  \[\leadsto -10 \cdot \left(a \cdot k\right) + a \]
                3. lift-*.f64N/A

                  \[\leadsto -10 \cdot \left(a \cdot k\right) + a \]
                4. lift-*.f64N/A

                  \[\leadsto -10 \cdot \left(a \cdot k\right) + a \]
                5. *-commutativeN/A

                  \[\leadsto -10 \cdot \left(k \cdot a\right) + a \]
                6. associate-*r*N/A

                  \[\leadsto \left(-10 \cdot k\right) \cdot a + a \]
                7. metadata-evalN/A

                  \[\leadsto \left(\left(\mathsf{neg}\left(10\right)\right) \cdot k\right) \cdot a + a \]
                8. distribute-lft-neg-outN/A

                  \[\leadsto \left(\mathsf{neg}\left(10 \cdot k\right)\right) \cdot a + a \]
                9. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(10 \cdot k\right), a, a\right) \]
                10. distribute-lft-neg-outN/A

                  \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(10\right)\right) \cdot k, a, a\right) \]
                11. metadata-evalN/A

                  \[\leadsto \mathsf{fma}\left(-10 \cdot k, a, a\right) \]
                12. lower-*.f6421.6%

                  \[\leadsto \mathsf{fma}\left(-10 \cdot k, a, a\right) \]
              9. Applied rewrites21.6%

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

              Alternative 14: 20.7% accurate, 7.5× speedup?

              \[\frac{a}{1} \]
              (FPCore (a k m)
                :precision binary64
                (/ a 1.0))
              double code(double a, double k, double m) {
              	return a / 1.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 / 1.0d0
              end function
              
              public static double code(double a, double k, double m) {
              	return a / 1.0;
              }
              
              def code(a, k, m):
              	return a / 1.0
              
              function code(a, k, m)
              	return Float64(a / 1.0)
              end
              
              function tmp = code(a, k, m)
              	tmp = a / 1.0;
              end
              
              code[a_, k_, m_] := N[(a / 1.0), $MachinePrecision]
              
              \frac{a}{1}
              
              Derivation
              1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{a}{1 + \left(\frac{{k}^{1}}{{k}^{-1}} + 10 \cdot k\right)} \]
                14. pow-divN/A

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

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

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

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

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

                  \[\leadsto \frac{a}{1 + k \cdot \left(k + \left(\mathsf{neg}\left(-10\right)\right)\right)} \]
                20. sub-flipN/A

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

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

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

                  \[\leadsto \frac{a}{\left(k - -10\right) \cdot k + \color{blue}{1}} \]
                24. lift-fma.f6445.2%

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

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

                \[\leadsto \frac{a}{1} \]
              8. Step-by-step derivation
                1. Applied rewrites20.7%

                  \[\leadsto \frac{a}{1} \]
                2. Add Preprocessing

                Reproduce

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