Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A

Percentage Accurate: 98.3% → 98.4%
Time: 9.8s
Alternatives: 12
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
	return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
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(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b):
	return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b)
	return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y)
end
function tmp = code(x, y, z, t, a, b)
	tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}

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 12 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: 98.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
	return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
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(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b):
	return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b)
	return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y)
end
function tmp = code(x, y, z, t, a, b)
	tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}

Alternative 1: 98.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x \cdot \frac{e^{\mathsf{fma}\left(\log a, t - 1, -\left(-\log z\right) \cdot y\right) - b}}{y} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (* x (/ (exp (- (fma (log a) (- t 1.0) (- (* (- (log z)) y))) b)) y)))
double code(double x, double y, double z, double t, double a, double b) {
	return x * (exp((fma(log(a), (t - 1.0), -(-log(z) * y)) - b)) / y);
}
function code(x, y, z, t, a, b)
	return Float64(x * Float64(exp(Float64(fma(log(a), Float64(t - 1.0), Float64(-Float64(Float64(-log(z)) * y))) - b)) / y))
end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[(N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision] + (-N[((-N[Log[z], $MachinePrecision]) * y), $MachinePrecision])), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x \cdot \frac{e^{\mathsf{fma}\left(\log a, t - 1, -\left(-\log z\right) \cdot y\right) - b}}{y}
\end{array}
Derivation
  1. Initial program 98.3%

    \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
  2. Add Preprocessing
  3. Taylor expanded in z around inf

    \[\leadsto \color{blue}{\frac{x \cdot e^{\left(-1 \cdot \left(y \cdot \log \left(\frac{1}{z}\right)\right) + \log a \cdot \left(t - 1\right)\right) - b}}{y}} \]
  4. Step-by-step derivation
    1. associate-/l*N/A

      \[\leadsto x \cdot \color{blue}{\frac{e^{\left(-1 \cdot \left(y \cdot \log \left(\frac{1}{z}\right)\right) + \log a \cdot \left(t - 1\right)\right) - b}}{y}} \]
    2. lower-*.f64N/A

      \[\leadsto x \cdot \color{blue}{\frac{e^{\left(-1 \cdot \left(y \cdot \log \left(\frac{1}{z}\right)\right) + \log a \cdot \left(t - 1\right)\right) - b}}{y}} \]
    3. lower-/.f64N/A

      \[\leadsto x \cdot \frac{e^{\left(-1 \cdot \left(y \cdot \log \left(\frac{1}{z}\right)\right) + \log a \cdot \left(t - 1\right)\right) - b}}{\color{blue}{y}} \]
  5. Applied rewrites98.4%

    \[\leadsto \color{blue}{x \cdot \frac{e^{\mathsf{fma}\left(\log a, t - 1, -\left(-\log z\right) \cdot y\right) - b}}{y}} \]
  6. Add Preprocessing

Alternative 2: 58.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - 1\right) \cdot \log a\\ t_2 := \frac{{a}^{t} \cdot x}{y}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+26}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 680.5:\\ \;\;\;\;\frac{x}{a \cdot y}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (- t 1.0) (log a))) (t_2 (/ (* (pow a t) x) y)))
   (if (<= t_1 -1e+26) t_2 (if (<= t_1 680.5) (/ x (* a y)) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - 1.0) * log(a);
	double t_2 = (pow(a, t) * x) / y;
	double tmp;
	if (t_1 <= -1e+26) {
		tmp = t_2;
	} else if (t_1 <= 680.5) {
		tmp = x / (a * y);
	} else {
		tmp = t_2;
	}
	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(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (t - 1.0d0) * log(a)
    t_2 = ((a ** t) * x) / y
    if (t_1 <= (-1d+26)) then
        tmp = t_2
    else if (t_1 <= 680.5d0) then
        tmp = x / (a * y)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - 1.0) * Math.log(a);
	double t_2 = (Math.pow(a, t) * x) / y;
	double tmp;
	if (t_1 <= -1e+26) {
		tmp = t_2;
	} else if (t_1 <= 680.5) {
		tmp = x / (a * y);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (t - 1.0) * math.log(a)
	t_2 = (math.pow(a, t) * x) / y
	tmp = 0
	if t_1 <= -1e+26:
		tmp = t_2
	elif t_1 <= 680.5:
		tmp = x / (a * y)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(t - 1.0) * log(a))
	t_2 = Float64(Float64((a ^ t) * x) / y)
	tmp = 0.0
	if (t_1 <= -1e+26)
		tmp = t_2;
	elseif (t_1 <= 680.5)
		tmp = Float64(x / Float64(a * y));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (t - 1.0) * log(a);
	t_2 = ((a ^ t) * x) / y;
	tmp = 0.0;
	if (t_1 <= -1e+26)
		tmp = t_2;
	elseif (t_1 <= 680.5)
		tmp = x / (a * y);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Power[a, t], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+26], t$95$2, If[LessEqual[t$95$1, 680.5], N[(x / N[(a * y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(t - 1\right) \cdot \log a\\
t_2 := \frac{{a}^{t} \cdot x}{y}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+26}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 680.5:\\
\;\;\;\;\frac{x}{a \cdot y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -1.00000000000000005e26 or 680.5 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))

    1. Initial program 100.0%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0

      \[\leadsto \color{blue}{\frac{x \cdot e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
    4. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
      2. lower-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
      3. lower-/.f64N/A

        \[\leadsto x \cdot \frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{\color{blue}{y}} \]
      4. exp-sumN/A

        \[\leadsto x \cdot \frac{e^{y \cdot \log z} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
      5. *-commutativeN/A

        \[\leadsto x \cdot \frac{e^{\log z \cdot y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
      6. pow-to-expN/A

        \[\leadsto x \cdot \frac{{z}^{y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
      7. pow-to-expN/A

        \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
      8. lower-*.f64N/A

        \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
      9. lower-pow.f64N/A

        \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
      10. lower-pow.f64N/A

        \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
      11. lift--.f6467.6

        \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
    5. Applied rewrites67.6%

      \[\leadsto \color{blue}{x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y}} \]
    6. Taylor expanded in y around 0

      \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{\color{blue}{y}} \]
    7. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
      2. *-commutativeN/A

        \[\leadsto \frac{e^{\log a \cdot \left(t - 1\right)} \cdot x}{y} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{e^{\log a \cdot \left(t - 1\right)} \cdot x}{y} \]
      4. pow-to-expN/A

        \[\leadsto \frac{{a}^{\left(t - 1\right)} \cdot x}{y} \]
      5. lift-pow.f64N/A

        \[\leadsto \frac{{a}^{\left(t - 1\right)} \cdot x}{y} \]
      6. lift--.f6479.6

        \[\leadsto \frac{{a}^{\left(t - 1\right)} \cdot x}{y} \]
    8. Applied rewrites79.6%

      \[\leadsto \frac{{a}^{\left(t - 1\right)} \cdot x}{\color{blue}{y}} \]
    9. Taylor expanded in t around inf

      \[\leadsto \frac{{a}^{t} \cdot x}{y} \]
    10. Step-by-step derivation
      1. Applied rewrites78.9%

        \[\leadsto \frac{{a}^{t} \cdot x}{y} \]

      if -1.00000000000000005e26 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 680.5

      1. Initial program 96.7%

        \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
      2. Add Preprocessing
      3. Taylor expanded in b around 0

        \[\leadsto \color{blue}{\frac{x \cdot e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
      4. Step-by-step derivation
        1. associate-/l*N/A

          \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
        2. lower-*.f64N/A

          \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
        3. lower-/.f64N/A

          \[\leadsto x \cdot \frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{\color{blue}{y}} \]
        4. exp-sumN/A

          \[\leadsto x \cdot \frac{e^{y \cdot \log z} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
        5. *-commutativeN/A

          \[\leadsto x \cdot \frac{e^{\log z \cdot y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
        6. pow-to-expN/A

          \[\leadsto x \cdot \frac{{z}^{y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
        7. pow-to-expN/A

          \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
        8. lower-*.f64N/A

          \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
        9. lower-pow.f64N/A

          \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
        10. lower-pow.f64N/A

          \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
        11. lift--.f6472.3

          \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
      5. Applied rewrites72.3%

        \[\leadsto \color{blue}{x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y}} \]
      6. Taylor expanded in t around 0

        \[\leadsto \frac{x \cdot {z}^{y}}{\color{blue}{a \cdot y}} \]
      7. Step-by-step derivation
        1. times-fracN/A

          \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{\color{blue}{y}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{\color{blue}{y}} \]
        3. lower-/.f64N/A

          \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
        4. lower-/.f64N/A

          \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
        5. lift-pow.f6466.4

          \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
      8. Applied rewrites66.4%

        \[\leadsto \frac{x}{a} \cdot \color{blue}{\frac{{z}^{y}}{y}} \]
      9. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{\color{blue}{y}} \]
        2. lift-/.f64N/A

          \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
        3. lift-/.f64N/A

          \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
        4. lift-pow.f64N/A

          \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
        5. frac-timesN/A

          \[\leadsto \frac{x \cdot {z}^{y}}{a \cdot \color{blue}{y}} \]
        6. lower-/.f64N/A

          \[\leadsto \frac{x \cdot {z}^{y}}{a \cdot \color{blue}{y}} \]
        7. *-commutativeN/A

          \[\leadsto \frac{{z}^{y} \cdot x}{a \cdot y} \]
        8. lower-*.f64N/A

          \[\leadsto \frac{{z}^{y} \cdot x}{a \cdot y} \]
        9. lift-pow.f64N/A

          \[\leadsto \frac{{z}^{y} \cdot x}{a \cdot y} \]
        10. lower-*.f6465.7

          \[\leadsto \frac{{z}^{y} \cdot x}{a \cdot y} \]
      10. Applied rewrites65.7%

        \[\leadsto \frac{{z}^{y} \cdot x}{a \cdot \color{blue}{y}} \]
      11. Taylor expanded in y around 0

        \[\leadsto \frac{x}{a \cdot y} \]
      12. Step-by-step derivation
        1. Applied rewrites39.6%

          \[\leadsto \frac{x}{a \cdot y} \]
      13. Recombined 2 regimes into one program.
      14. Add Preprocessing

      Alternative 3: 98.3% accurate, 1.0× speedup?

      \[\begin{array}{l} \\ \frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
      double code(double x, double y, double z, double t, double a, double b) {
      	return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
      }
      
      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(x, y, z, t, a, b)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
      }
      
      def code(x, y, z, t, a, b):
      	return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
      
      function code(x, y, z, t, a, b)
      	return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y)
      end
      
      function tmp = code(x, y, z, t, a, b)
      	tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
      end
      
      code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      \frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
      \end{array}
      
      Derivation
      1. Initial program 98.3%

        \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
      2. Add Preprocessing
      3. Add Preprocessing

      Alternative 4: 88.6% accurate, 1.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{+177}:\\ \;\;\;\;\frac{\frac{{z}^{y} \cdot x}{a}}{y}\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{+130}:\\ \;\;\;\;x \cdot \frac{e^{\log a \cdot \left(t - 1\right) - b}}{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= y -5.2e+177)
         (/ (/ (* (pow z y) x) a) y)
         (if (<= y 3.9e+130)
           (* x (/ (exp (- (* (log a) (- t 1.0)) b)) y))
           (* x (/ (/ (pow z y) a) y)))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (y <= -5.2e+177) {
      		tmp = ((pow(z, y) * x) / a) / y;
      	} else if (y <= 3.9e+130) {
      		tmp = x * (exp(((log(a) * (t - 1.0)) - b)) / y);
      	} else {
      		tmp = x * ((pow(z, y) / a) / y);
      	}
      	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(x, y, z, t, a, b)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: tmp
          if (y <= (-5.2d+177)) then
              tmp = (((z ** y) * x) / a) / y
          else if (y <= 3.9d+130) then
              tmp = x * (exp(((log(a) * (t - 1.0d0)) - b)) / y)
          else
              tmp = x * (((z ** y) / a) / y)
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (y <= -5.2e+177) {
      		tmp = ((Math.pow(z, y) * x) / a) / y;
      	} else if (y <= 3.9e+130) {
      		tmp = x * (Math.exp(((Math.log(a) * (t - 1.0)) - b)) / y);
      	} else {
      		tmp = x * ((Math.pow(z, y) / a) / y);
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	tmp = 0
      	if y <= -5.2e+177:
      		tmp = ((math.pow(z, y) * x) / a) / y
      	elif y <= 3.9e+130:
      		tmp = x * (math.exp(((math.log(a) * (t - 1.0)) - b)) / y)
      	else:
      		tmp = x * ((math.pow(z, y) / a) / y)
      	return tmp
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (y <= -5.2e+177)
      		tmp = Float64(Float64(Float64((z ^ y) * x) / a) / y);
      	elseif (y <= 3.9e+130)
      		tmp = Float64(x * Float64(exp(Float64(Float64(log(a) * Float64(t - 1.0)) - b)) / y));
      	else
      		tmp = Float64(x * Float64(Float64((z ^ y) / a) / y));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	tmp = 0.0;
      	if (y <= -5.2e+177)
      		tmp = (((z ^ y) * x) / a) / y;
      	elseif (y <= 3.9e+130)
      		tmp = x * (exp(((log(a) * (t - 1.0)) - b)) / y);
      	else
      		tmp = x * (((z ^ y) / a) / y);
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -5.2e+177], N[(N[(N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 3.9e+130], N[(x * N[(N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq -5.2 \cdot 10^{+177}:\\
      \;\;\;\;\frac{\frac{{z}^{y} \cdot x}{a}}{y}\\
      
      \mathbf{elif}\;y \leq 3.9 \cdot 10^{+130}:\\
      \;\;\;\;x \cdot \frac{e^{\log a \cdot \left(t - 1\right) - b}}{y}\\
      
      \mathbf{else}:\\
      \;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y < -5.19999999999999959e177

        1. Initial program 100.0%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in b around 0

          \[\leadsto \color{blue}{\frac{x \cdot e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
        4. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          2. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          3. lower-/.f64N/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{\color{blue}{y}} \]
          4. exp-sumN/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          5. *-commutativeN/A

            \[\leadsto x \cdot \frac{e^{\log z \cdot y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          6. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          7. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          8. lower-*.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          9. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          10. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          11. lift--.f6471.7

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
        5. Applied rewrites71.7%

          \[\leadsto \color{blue}{x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y}} \]
        6. Taylor expanded in t around 0

          \[\leadsto \frac{x \cdot {z}^{y}}{\color{blue}{a \cdot y}} \]
        7. Step-by-step derivation
          1. times-fracN/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{\color{blue}{y}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{\color{blue}{y}} \]
          3. lower-/.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
          4. lower-/.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
          5. lift-pow.f6482.0

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
        8. Applied rewrites82.0%

          \[\leadsto \frac{x}{a} \cdot \color{blue}{\frac{{z}^{y}}{y}} \]
        9. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{\color{blue}{y}} \]
          2. lift-/.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
          3. lift-/.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
          4. lift-pow.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
          5. frac-timesN/A

            \[\leadsto \frac{x \cdot {z}^{y}}{a \cdot \color{blue}{y}} \]
          6. associate-/r*N/A

            \[\leadsto \frac{\frac{x \cdot {z}^{y}}{a}}{y} \]
          7. lower-/.f64N/A

            \[\leadsto \frac{\frac{x \cdot {z}^{y}}{a}}{y} \]
          8. lower-/.f64N/A

            \[\leadsto \frac{\frac{x \cdot {z}^{y}}{a}}{y} \]
          9. *-commutativeN/A

            \[\leadsto \frac{\frac{{z}^{y} \cdot x}{a}}{y} \]
          10. lower-*.f64N/A

            \[\leadsto \frac{\frac{{z}^{y} \cdot x}{a}}{y} \]
          11. lift-pow.f6491.1

            \[\leadsto \frac{\frac{{z}^{y} \cdot x}{a}}{y} \]
        10. Applied rewrites91.1%

          \[\leadsto \frac{\frac{{z}^{y} \cdot x}{a}}{y} \]

        if -5.19999999999999959e177 < y < 3.9000000000000002e130

        1. Initial program 97.7%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in z around inf

          \[\leadsto \color{blue}{\frac{x \cdot e^{\left(-1 \cdot \left(y \cdot \log \left(\frac{1}{z}\right)\right) + \log a \cdot \left(t - 1\right)\right) - b}}{y}} \]
        4. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{\left(-1 \cdot \left(y \cdot \log \left(\frac{1}{z}\right)\right) + \log a \cdot \left(t - 1\right)\right) - b}}{y}} \]
          2. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{\left(-1 \cdot \left(y \cdot \log \left(\frac{1}{z}\right)\right) + \log a \cdot \left(t - 1\right)\right) - b}}{y}} \]
          3. lower-/.f64N/A

            \[\leadsto x \cdot \frac{e^{\left(-1 \cdot \left(y \cdot \log \left(\frac{1}{z}\right)\right) + \log a \cdot \left(t - 1\right)\right) - b}}{\color{blue}{y}} \]
        5. Applied rewrites97.9%

          \[\leadsto \color{blue}{x \cdot \frac{e^{\mathsf{fma}\left(\log a, t - 1, -\left(-\log z\right) \cdot y\right) - b}}{y}} \]
        6. Taylor expanded in y around 0

          \[\leadsto x \cdot \frac{e^{\log a \cdot \left(t - 1\right) - b}}{y} \]
        7. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto x \cdot \frac{e^{\log a \cdot \left(t - 1\right) - b}}{y} \]
          2. lift-log.f64N/A

            \[\leadsto x \cdot \frac{e^{\log a \cdot \left(t - 1\right) - b}}{y} \]
          3. lift--.f6488.5

            \[\leadsto x \cdot \frac{e^{\log a \cdot \left(t - 1\right) - b}}{y} \]
        8. Applied rewrites88.5%

          \[\leadsto x \cdot \frac{e^{\log a \cdot \left(t - 1\right) - b}}{y} \]

        if 3.9000000000000002e130 < y

        1. Initial program 100.0%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in b around 0

          \[\leadsto \color{blue}{\frac{x \cdot e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
        4. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          2. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          3. lower-/.f64N/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{\color{blue}{y}} \]
          4. exp-sumN/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          5. *-commutativeN/A

            \[\leadsto x \cdot \frac{e^{\log z \cdot y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          6. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          7. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          8. lower-*.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          9. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          10. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          11. lift--.f6469.2

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
        5. Applied rewrites69.2%

          \[\leadsto \color{blue}{x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y}} \]
        6. Taylor expanded in t around 0

          \[\leadsto x \cdot \frac{\frac{{z}^{y}}{a}}{y} \]
        7. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto x \cdot \frac{\frac{{z}^{y}}{a}}{y} \]
          2. lift-pow.f6487.4

            \[\leadsto x \cdot \frac{\frac{{z}^{y}}{a}}{y} \]
        8. Applied rewrites87.4%

          \[\leadsto x \cdot \frac{\frac{{z}^{y}}{a}}{y} \]
      3. Recombined 3 regimes into one program.
      4. Add Preprocessing

      Alternative 5: 82.6% accurate, 1.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{e^{-b}}{y}\\ \mathbf{if}\;b \leq -3.8 \cdot 10^{+114}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 7.2 \cdot 10^{+39}:\\ \;\;\;\;x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* x (/ (exp (- b)) y))))
         (if (<= b -3.8e+114)
           t_1
           (if (<= b 7.2e+39) (* x (/ (* (pow z y) (pow a (- t 1.0))) y)) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * (exp(-b) / y);
      	double tmp;
      	if (b <= -3.8e+114) {
      		tmp = t_1;
      	} else if (b <= 7.2e+39) {
      		tmp = x * ((pow(z, y) * pow(a, (t - 1.0))) / y);
      	} else {
      		tmp = t_1;
      	}
      	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(x, y, z, t, a, b)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: tmp
          t_1 = x * (exp(-b) / y)
          if (b <= (-3.8d+114)) then
              tmp = t_1
          else if (b <= 7.2d+39) then
              tmp = x * (((z ** y) * (a ** (t - 1.0d0))) / y)
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * (Math.exp(-b) / y);
      	double tmp;
      	if (b <= -3.8e+114) {
      		tmp = t_1;
      	} else if (b <= 7.2e+39) {
      		tmp = x * ((Math.pow(z, y) * Math.pow(a, (t - 1.0))) / y);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = x * (math.exp(-b) / y)
      	tmp = 0
      	if b <= -3.8e+114:
      		tmp = t_1
      	elif b <= 7.2e+39:
      		tmp = x * ((math.pow(z, y) * math.pow(a, (t - 1.0))) / y)
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(x * Float64(exp(Float64(-b)) / y))
      	tmp = 0.0
      	if (b <= -3.8e+114)
      		tmp = t_1;
      	elseif (b <= 7.2e+39)
      		tmp = Float64(x * Float64(Float64((z ^ y) * (a ^ Float64(t - 1.0))) / y));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = x * (exp(-b) / y);
      	tmp = 0.0;
      	if (b <= -3.8e+114)
      		tmp = t_1;
      	elseif (b <= 7.2e+39)
      		tmp = x * (((z ^ y) * (a ^ (t - 1.0))) / y);
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.8e+114], t$95$1, If[LessEqual[b, 7.2e+39], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] * N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x \cdot \frac{e^{-b}}{y}\\
      \mathbf{if}\;b \leq -3.8 \cdot 10^{+114}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;b \leq 7.2 \cdot 10^{+39}:\\
      \;\;\;\;x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < -3.8000000000000001e114 or 7.19999999999999969e39 < b

        1. Initial program 100.0%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in b around inf

          \[\leadsto \frac{x \cdot e^{\color{blue}{-1 \cdot b}}}{y} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \frac{x \cdot e^{\mathsf{neg}\left(b\right)}}{y} \]
          2. lower-neg.f6483.7

            \[\leadsto \frac{x \cdot e^{-b}}{y} \]
        5. Applied rewrites83.7%

          \[\leadsto \frac{x \cdot e^{\color{blue}{-b}}}{y} \]
        6. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x \cdot e^{-b}}{y}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot e^{-b}}}{y} \]
          3. associate-/l*N/A

            \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]
          4. lower-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]
          5. lower-/.f6483.7

            \[\leadsto x \cdot \color{blue}{\frac{e^{-b}}{y}} \]
        7. Applied rewrites83.7%

          \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]

        if -3.8000000000000001e114 < b < 7.19999999999999969e39

        1. Initial program 97.2%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in b around 0

          \[\leadsto \color{blue}{\frac{x \cdot e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
        4. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          2. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          3. lower-/.f64N/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{\color{blue}{y}} \]
          4. exp-sumN/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          5. *-commutativeN/A

            \[\leadsto x \cdot \frac{e^{\log z \cdot y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          6. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          7. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          8. lower-*.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          9. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          10. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          11. lift--.f6482.0

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
        5. Applied rewrites82.0%

          \[\leadsto \color{blue}{x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y}} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 6: 74.1% accurate, 2.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := {a}^{\left(t - 1\right)}\\ t_2 := x \cdot \frac{e^{-b}}{y}\\ \mathbf{if}\;b \leq -1.3 \cdot 10^{+28}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq -7 \cdot 10^{-112}:\\ \;\;\;\;x \cdot \frac{t\_1}{y}\\ \mathbf{elif}\;b \leq 2.7 \cdot 10^{-217}:\\ \;\;\;\;\frac{x}{a} \cdot \frac{{z}^{y}}{y}\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{+39}:\\ \;\;\;\;\frac{t\_1 \cdot x}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (pow a (- t 1.0))) (t_2 (* x (/ (exp (- b)) y))))
         (if (<= b -1.3e+28)
           t_2
           (if (<= b -7e-112)
             (* x (/ t_1 y))
             (if (<= b 2.7e-217)
               (* (/ x a) (/ (pow z y) y))
               (if (<= b 2.5e+39) (/ (* t_1 x) y) t_2))))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = pow(a, (t - 1.0));
      	double t_2 = x * (exp(-b) / y);
      	double tmp;
      	if (b <= -1.3e+28) {
      		tmp = t_2;
      	} else if (b <= -7e-112) {
      		tmp = x * (t_1 / y);
      	} else if (b <= 2.7e-217) {
      		tmp = (x / a) * (pow(z, y) / y);
      	} else if (b <= 2.5e+39) {
      		tmp = (t_1 * x) / y;
      	} else {
      		tmp = t_2;
      	}
      	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(x, y, z, t, a, b)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: t_2
          real(8) :: tmp
          t_1 = a ** (t - 1.0d0)
          t_2 = x * (exp(-b) / y)
          if (b <= (-1.3d+28)) then
              tmp = t_2
          else if (b <= (-7d-112)) then
              tmp = x * (t_1 / y)
          else if (b <= 2.7d-217) then
              tmp = (x / a) * ((z ** y) / y)
          else if (b <= 2.5d+39) then
              tmp = (t_1 * x) / y
          else
              tmp = t_2
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = Math.pow(a, (t - 1.0));
      	double t_2 = x * (Math.exp(-b) / y);
      	double tmp;
      	if (b <= -1.3e+28) {
      		tmp = t_2;
      	} else if (b <= -7e-112) {
      		tmp = x * (t_1 / y);
      	} else if (b <= 2.7e-217) {
      		tmp = (x / a) * (Math.pow(z, y) / y);
      	} else if (b <= 2.5e+39) {
      		tmp = (t_1 * x) / y;
      	} else {
      		tmp = t_2;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = math.pow(a, (t - 1.0))
      	t_2 = x * (math.exp(-b) / y)
      	tmp = 0
      	if b <= -1.3e+28:
      		tmp = t_2
      	elif b <= -7e-112:
      		tmp = x * (t_1 / y)
      	elif b <= 2.7e-217:
      		tmp = (x / a) * (math.pow(z, y) / y)
      	elif b <= 2.5e+39:
      		tmp = (t_1 * x) / y
      	else:
      		tmp = t_2
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = a ^ Float64(t - 1.0)
      	t_2 = Float64(x * Float64(exp(Float64(-b)) / y))
      	tmp = 0.0
      	if (b <= -1.3e+28)
      		tmp = t_2;
      	elseif (b <= -7e-112)
      		tmp = Float64(x * Float64(t_1 / y));
      	elseif (b <= 2.7e-217)
      		tmp = Float64(Float64(x / a) * Float64((z ^ y) / y));
      	elseif (b <= 2.5e+39)
      		tmp = Float64(Float64(t_1 * x) / y);
      	else
      		tmp = t_2;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = a ^ (t - 1.0);
      	t_2 = x * (exp(-b) / y);
      	tmp = 0.0;
      	if (b <= -1.3e+28)
      		tmp = t_2;
      	elseif (b <= -7e-112)
      		tmp = x * (t_1 / y);
      	elseif (b <= 2.7e-217)
      		tmp = (x / a) * ((z ^ y) / y);
      	elseif (b <= 2.5e+39)
      		tmp = (t_1 * x) / y;
      	else
      		tmp = t_2;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.3e+28], t$95$2, If[LessEqual[b, -7e-112], N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.7e-217], N[(N[(x / a), $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.5e+39], N[(N[(t$95$1 * x), $MachinePrecision] / y), $MachinePrecision], t$95$2]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := {a}^{\left(t - 1\right)}\\
      t_2 := x \cdot \frac{e^{-b}}{y}\\
      \mathbf{if}\;b \leq -1.3 \cdot 10^{+28}:\\
      \;\;\;\;t\_2\\
      
      \mathbf{elif}\;b \leq -7 \cdot 10^{-112}:\\
      \;\;\;\;x \cdot \frac{t\_1}{y}\\
      
      \mathbf{elif}\;b \leq 2.7 \cdot 10^{-217}:\\
      \;\;\;\;\frac{x}{a} \cdot \frac{{z}^{y}}{y}\\
      
      \mathbf{elif}\;b \leq 2.5 \cdot 10^{+39}:\\
      \;\;\;\;\frac{t\_1 \cdot x}{y}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_2\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if b < -1.3000000000000001e28 or 2.50000000000000008e39 < b

        1. Initial program 100.0%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in b around inf

          \[\leadsto \frac{x \cdot e^{\color{blue}{-1 \cdot b}}}{y} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \frac{x \cdot e^{\mathsf{neg}\left(b\right)}}{y} \]
          2. lower-neg.f6480.8

            \[\leadsto \frac{x \cdot e^{-b}}{y} \]
        5. Applied rewrites80.8%

          \[\leadsto \frac{x \cdot e^{\color{blue}{-b}}}{y} \]
        6. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x \cdot e^{-b}}{y}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot e^{-b}}}{y} \]
          3. associate-/l*N/A

            \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]
          4. lower-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]
          5. lower-/.f6480.8

            \[\leadsto x \cdot \color{blue}{\frac{e^{-b}}{y}} \]
        7. Applied rewrites80.8%

          \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]

        if -1.3000000000000001e28 < b < -6.99999999999999988e-112

        1. Initial program 97.1%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in b around 0

          \[\leadsto \color{blue}{\frac{x \cdot e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
        4. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          2. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          3. lower-/.f64N/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{\color{blue}{y}} \]
          4. exp-sumN/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          5. *-commutativeN/A

            \[\leadsto x \cdot \frac{e^{\log z \cdot y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          6. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          7. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          8. lower-*.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          9. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          10. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          11. lift--.f6483.4

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
        5. Applied rewrites83.4%

          \[\leadsto \color{blue}{x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y}} \]
        6. Taylor expanded in y around 0

          \[\leadsto x \cdot \frac{e^{\log a \cdot \left(t - 1\right)}}{y} \]
        7. Step-by-step derivation
          1. pow-to-expN/A

            \[\leadsto x \cdot \frac{{a}^{\left(t - 1\right)}}{y} \]
          2. lift-pow.f64N/A

            \[\leadsto x \cdot \frac{{a}^{\left(t - 1\right)}}{y} \]
          3. lift--.f6470.3

            \[\leadsto x \cdot \frac{{a}^{\left(t - 1\right)}}{y} \]
        8. Applied rewrites70.3%

          \[\leadsto x \cdot \frac{{a}^{\left(t - 1\right)}}{y} \]

        if -6.99999999999999988e-112 < b < 2.70000000000000016e-217

        1. Initial program 96.7%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in b around 0

          \[\leadsto \color{blue}{\frac{x \cdot e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
        4. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          2. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          3. lower-/.f64N/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{\color{blue}{y}} \]
          4. exp-sumN/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          5. *-commutativeN/A

            \[\leadsto x \cdot \frac{e^{\log z \cdot y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          6. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          7. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          8. lower-*.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          9. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          10. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          11. lift--.f6485.9

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
        5. Applied rewrites85.9%

          \[\leadsto \color{blue}{x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y}} \]
        6. Taylor expanded in t around 0

          \[\leadsto \frac{x \cdot {z}^{y}}{\color{blue}{a \cdot y}} \]
        7. Step-by-step derivation
          1. times-fracN/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{\color{blue}{y}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{\color{blue}{y}} \]
          3. lower-/.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
          4. lower-/.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
          5. lift-pow.f6467.2

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
        8. Applied rewrites67.2%

          \[\leadsto \frac{x}{a} \cdot \color{blue}{\frac{{z}^{y}}{y}} \]

        if 2.70000000000000016e-217 < b < 2.50000000000000008e39

        1. Initial program 97.1%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in b around 0

          \[\leadsto \color{blue}{\frac{x \cdot e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
        4. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          2. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          3. lower-/.f64N/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{\color{blue}{y}} \]
          4. exp-sumN/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          5. *-commutativeN/A

            \[\leadsto x \cdot \frac{e^{\log z \cdot y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          6. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          7. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          8. lower-*.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          9. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          10. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          11. lift--.f6481.4

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
        5. Applied rewrites81.4%

          \[\leadsto \color{blue}{x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y}} \]
        6. Taylor expanded in y around 0

          \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{\color{blue}{y}} \]
        7. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          2. *-commutativeN/A

            \[\leadsto \frac{e^{\log a \cdot \left(t - 1\right)} \cdot x}{y} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{e^{\log a \cdot \left(t - 1\right)} \cdot x}{y} \]
          4. pow-to-expN/A

            \[\leadsto \frac{{a}^{\left(t - 1\right)} \cdot x}{y} \]
          5. lift-pow.f64N/A

            \[\leadsto \frac{{a}^{\left(t - 1\right)} \cdot x}{y} \]
          6. lift--.f6469.4

            \[\leadsto \frac{{a}^{\left(t - 1\right)} \cdot x}{y} \]
        8. Applied rewrites69.4%

          \[\leadsto \frac{{a}^{\left(t - 1\right)} \cdot x}{\color{blue}{y}} \]
      3. Recombined 4 regimes into one program.
      4. Add Preprocessing

      Alternative 7: 75.3% accurate, 2.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{e^{-b}}{y}\\ \mathbf{if}\;b \leq -2.8 \cdot 10^{+22}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 9.5 \cdot 10^{+38}:\\ \;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* x (/ (exp (- b)) y))))
         (if (<= b -2.8e+22)
           t_1
           (if (<= b 9.5e+38) (* x (/ (/ (pow z y) a) y)) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * (exp(-b) / y);
      	double tmp;
      	if (b <= -2.8e+22) {
      		tmp = t_1;
      	} else if (b <= 9.5e+38) {
      		tmp = x * ((pow(z, y) / a) / y);
      	} else {
      		tmp = t_1;
      	}
      	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(x, y, z, t, a, b)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: tmp
          t_1 = x * (exp(-b) / y)
          if (b <= (-2.8d+22)) then
              tmp = t_1
          else if (b <= 9.5d+38) then
              tmp = x * (((z ** y) / a) / y)
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * (Math.exp(-b) / y);
      	double tmp;
      	if (b <= -2.8e+22) {
      		tmp = t_1;
      	} else if (b <= 9.5e+38) {
      		tmp = x * ((Math.pow(z, y) / a) / y);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = x * (math.exp(-b) / y)
      	tmp = 0
      	if b <= -2.8e+22:
      		tmp = t_1
      	elif b <= 9.5e+38:
      		tmp = x * ((math.pow(z, y) / a) / y)
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(x * Float64(exp(Float64(-b)) / y))
      	tmp = 0.0
      	if (b <= -2.8e+22)
      		tmp = t_1;
      	elseif (b <= 9.5e+38)
      		tmp = Float64(x * Float64(Float64((z ^ y) / a) / y));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = x * (exp(-b) / y);
      	tmp = 0.0;
      	if (b <= -2.8e+22)
      		tmp = t_1;
      	elseif (b <= 9.5e+38)
      		tmp = x * (((z ^ y) / a) / y);
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.8e+22], t$95$1, If[LessEqual[b, 9.5e+38], N[(x * N[(N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x \cdot \frac{e^{-b}}{y}\\
      \mathbf{if}\;b \leq -2.8 \cdot 10^{+22}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;b \leq 9.5 \cdot 10^{+38}:\\
      \;\;\;\;x \cdot \frac{\frac{{z}^{y}}{a}}{y}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < -2.8e22 or 9.4999999999999995e38 < b

        1. Initial program 100.0%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in b around inf

          \[\leadsto \frac{x \cdot e^{\color{blue}{-1 \cdot b}}}{y} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \frac{x \cdot e^{\mathsf{neg}\left(b\right)}}{y} \]
          2. lower-neg.f6480.7

            \[\leadsto \frac{x \cdot e^{-b}}{y} \]
        5. Applied rewrites80.7%

          \[\leadsto \frac{x \cdot e^{\color{blue}{-b}}}{y} \]
        6. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x \cdot e^{-b}}{y}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot e^{-b}}}{y} \]
          3. associate-/l*N/A

            \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]
          4. lower-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]
          5. lower-/.f6480.7

            \[\leadsto x \cdot \color{blue}{\frac{e^{-b}}{y}} \]
        7. Applied rewrites80.7%

          \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]

        if -2.8e22 < b < 9.4999999999999995e38

        1. Initial program 96.9%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in b around 0

          \[\leadsto \color{blue}{\frac{x \cdot e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
        4. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          2. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          3. lower-/.f64N/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{\color{blue}{y}} \]
          4. exp-sumN/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          5. *-commutativeN/A

            \[\leadsto x \cdot \frac{e^{\log z \cdot y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          6. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          7. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          8. lower-*.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          9. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          10. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          11. lift--.f6483.9

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
        5. Applied rewrites83.9%

          \[\leadsto \color{blue}{x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y}} \]
        6. Taylor expanded in t around 0

          \[\leadsto x \cdot \frac{\frac{{z}^{y}}{a}}{y} \]
        7. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto x \cdot \frac{\frac{{z}^{y}}{a}}{y} \]
          2. lift-pow.f6470.8

            \[\leadsto x \cdot \frac{\frac{{z}^{y}}{a}}{y} \]
        8. Applied rewrites70.8%

          \[\leadsto x \cdot \frac{\frac{{z}^{y}}{a}}{y} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 8: 75.0% accurate, 2.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{e^{-b}}{y}\\ \mathbf{if}\;b \leq -2.7 \cdot 10^{+22}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 2.7 \cdot 10^{-217}:\\ \;\;\;\;\frac{\frac{{z}^{y} \cdot x}{a}}{y}\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{+39}:\\ \;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot x}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* x (/ (exp (- b)) y))))
         (if (<= b -2.7e+22)
           t_1
           (if (<= b 2.7e-217)
             (/ (/ (* (pow z y) x) a) y)
             (if (<= b 2.5e+39) (/ (* (pow a (- t 1.0)) x) y) t_1)))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * (exp(-b) / y);
      	double tmp;
      	if (b <= -2.7e+22) {
      		tmp = t_1;
      	} else if (b <= 2.7e-217) {
      		tmp = ((pow(z, y) * x) / a) / y;
      	} else if (b <= 2.5e+39) {
      		tmp = (pow(a, (t - 1.0)) * x) / y;
      	} else {
      		tmp = t_1;
      	}
      	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(x, y, z, t, a, b)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: tmp
          t_1 = x * (exp(-b) / y)
          if (b <= (-2.7d+22)) then
              tmp = t_1
          else if (b <= 2.7d-217) then
              tmp = (((z ** y) * x) / a) / y
          else if (b <= 2.5d+39) then
              tmp = ((a ** (t - 1.0d0)) * x) / y
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * (Math.exp(-b) / y);
      	double tmp;
      	if (b <= -2.7e+22) {
      		tmp = t_1;
      	} else if (b <= 2.7e-217) {
      		tmp = ((Math.pow(z, y) * x) / a) / y;
      	} else if (b <= 2.5e+39) {
      		tmp = (Math.pow(a, (t - 1.0)) * x) / y;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = x * (math.exp(-b) / y)
      	tmp = 0
      	if b <= -2.7e+22:
      		tmp = t_1
      	elif b <= 2.7e-217:
      		tmp = ((math.pow(z, y) * x) / a) / y
      	elif b <= 2.5e+39:
      		tmp = (math.pow(a, (t - 1.0)) * x) / y
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(x * Float64(exp(Float64(-b)) / y))
      	tmp = 0.0
      	if (b <= -2.7e+22)
      		tmp = t_1;
      	elseif (b <= 2.7e-217)
      		tmp = Float64(Float64(Float64((z ^ y) * x) / a) / y);
      	elseif (b <= 2.5e+39)
      		tmp = Float64(Float64((a ^ Float64(t - 1.0)) * x) / y);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = x * (exp(-b) / y);
      	tmp = 0.0;
      	if (b <= -2.7e+22)
      		tmp = t_1;
      	elseif (b <= 2.7e-217)
      		tmp = (((z ^ y) * x) / a) / y;
      	elseif (b <= 2.5e+39)
      		tmp = ((a ^ (t - 1.0)) * x) / y;
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.7e+22], t$95$1, If[LessEqual[b, 2.7e-217], N[(N[(N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[b, 2.5e+39], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x \cdot \frac{e^{-b}}{y}\\
      \mathbf{if}\;b \leq -2.7 \cdot 10^{+22}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;b \leq 2.7 \cdot 10^{-217}:\\
      \;\;\;\;\frac{\frac{{z}^{y} \cdot x}{a}}{y}\\
      
      \mathbf{elif}\;b \leq 2.5 \cdot 10^{+39}:\\
      \;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot x}{y}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if b < -2.7000000000000002e22 or 2.50000000000000008e39 < b

        1. Initial program 100.0%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in b around inf

          \[\leadsto \frac{x \cdot e^{\color{blue}{-1 \cdot b}}}{y} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \frac{x \cdot e^{\mathsf{neg}\left(b\right)}}{y} \]
          2. lower-neg.f6480.8

            \[\leadsto \frac{x \cdot e^{-b}}{y} \]
        5. Applied rewrites80.8%

          \[\leadsto \frac{x \cdot e^{\color{blue}{-b}}}{y} \]
        6. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x \cdot e^{-b}}{y}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot e^{-b}}}{y} \]
          3. associate-/l*N/A

            \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]
          4. lower-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]
          5. lower-/.f6480.8

            \[\leadsto x \cdot \color{blue}{\frac{e^{-b}}{y}} \]
        7. Applied rewrites80.8%

          \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]

        if -2.7000000000000002e22 < b < 2.70000000000000016e-217

        1. Initial program 96.7%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in b around 0

          \[\leadsto \color{blue}{\frac{x \cdot e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
        4. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          2. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          3. lower-/.f64N/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{\color{blue}{y}} \]
          4. exp-sumN/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          5. *-commutativeN/A

            \[\leadsto x \cdot \frac{e^{\log z \cdot y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          6. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          7. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          8. lower-*.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          9. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          10. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          11. lift--.f6485.5

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
        5. Applied rewrites85.5%

          \[\leadsto \color{blue}{x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y}} \]
        6. Taylor expanded in t around 0

          \[\leadsto \frac{x \cdot {z}^{y}}{\color{blue}{a \cdot y}} \]
        7. Step-by-step derivation
          1. times-fracN/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{\color{blue}{y}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{\color{blue}{y}} \]
          3. lower-/.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
          4. lower-/.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
          5. lift-pow.f6466.2

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
        8. Applied rewrites66.2%

          \[\leadsto \frac{x}{a} \cdot \color{blue}{\frac{{z}^{y}}{y}} \]
        9. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{\color{blue}{y}} \]
          2. lift-/.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
          3. lift-/.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
          4. lift-pow.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
          5. frac-timesN/A

            \[\leadsto \frac{x \cdot {z}^{y}}{a \cdot \color{blue}{y}} \]
          6. associate-/r*N/A

            \[\leadsto \frac{\frac{x \cdot {z}^{y}}{a}}{y} \]
          7. lower-/.f64N/A

            \[\leadsto \frac{\frac{x \cdot {z}^{y}}{a}}{y} \]
          8. lower-/.f64N/A

            \[\leadsto \frac{\frac{x \cdot {z}^{y}}{a}}{y} \]
          9. *-commutativeN/A

            \[\leadsto \frac{\frac{{z}^{y} \cdot x}{a}}{y} \]
          10. lower-*.f64N/A

            \[\leadsto \frac{\frac{{z}^{y} \cdot x}{a}}{y} \]
          11. lift-pow.f6470.7

            \[\leadsto \frac{\frac{{z}^{y} \cdot x}{a}}{y} \]
        10. Applied rewrites70.7%

          \[\leadsto \frac{\frac{{z}^{y} \cdot x}{a}}{y} \]

        if 2.70000000000000016e-217 < b < 2.50000000000000008e39

        1. Initial program 97.1%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in b around 0

          \[\leadsto \color{blue}{\frac{x \cdot e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
        4. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          2. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          3. lower-/.f64N/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{\color{blue}{y}} \]
          4. exp-sumN/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          5. *-commutativeN/A

            \[\leadsto x \cdot \frac{e^{\log z \cdot y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          6. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          7. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          8. lower-*.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          9. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          10. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          11. lift--.f6481.4

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
        5. Applied rewrites81.4%

          \[\leadsto \color{blue}{x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y}} \]
        6. Taylor expanded in y around 0

          \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{\color{blue}{y}} \]
        7. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          2. *-commutativeN/A

            \[\leadsto \frac{e^{\log a \cdot \left(t - 1\right)} \cdot x}{y} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{e^{\log a \cdot \left(t - 1\right)} \cdot x}{y} \]
          4. pow-to-expN/A

            \[\leadsto \frac{{a}^{\left(t - 1\right)} \cdot x}{y} \]
          5. lift-pow.f64N/A

            \[\leadsto \frac{{a}^{\left(t - 1\right)} \cdot x}{y} \]
          6. lift--.f6469.4

            \[\leadsto \frac{{a}^{\left(t - 1\right)} \cdot x}{y} \]
        8. Applied rewrites69.4%

          \[\leadsto \frac{{a}^{\left(t - 1\right)} \cdot x}{\color{blue}{y}} \]
      3. Recombined 3 regimes into one program.
      4. Add Preprocessing

      Alternative 9: 75.1% accurate, 2.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{e^{-b}}{y}\\ \mathbf{if}\;b \leq -1.3 \cdot 10^{+28}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 7.2 \cdot 10^{+39}:\\ \;\;\;\;x \cdot \frac{{a}^{\left(t - 1\right)}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* x (/ (exp (- b)) y))))
         (if (<= b -1.3e+28)
           t_1
           (if (<= b 7.2e+39) (* x (/ (pow a (- t 1.0)) y)) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * (exp(-b) / y);
      	double tmp;
      	if (b <= -1.3e+28) {
      		tmp = t_1;
      	} else if (b <= 7.2e+39) {
      		tmp = x * (pow(a, (t - 1.0)) / y);
      	} else {
      		tmp = t_1;
      	}
      	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(x, y, z, t, a, b)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: tmp
          t_1 = x * (exp(-b) / y)
          if (b <= (-1.3d+28)) then
              tmp = t_1
          else if (b <= 7.2d+39) then
              tmp = x * ((a ** (t - 1.0d0)) / y)
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * (Math.exp(-b) / y);
      	double tmp;
      	if (b <= -1.3e+28) {
      		tmp = t_1;
      	} else if (b <= 7.2e+39) {
      		tmp = x * (Math.pow(a, (t - 1.0)) / y);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = x * (math.exp(-b) / y)
      	tmp = 0
      	if b <= -1.3e+28:
      		tmp = t_1
      	elif b <= 7.2e+39:
      		tmp = x * (math.pow(a, (t - 1.0)) / y)
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(x * Float64(exp(Float64(-b)) / y))
      	tmp = 0.0
      	if (b <= -1.3e+28)
      		tmp = t_1;
      	elseif (b <= 7.2e+39)
      		tmp = Float64(x * Float64((a ^ Float64(t - 1.0)) / y));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = x * (exp(-b) / y);
      	tmp = 0.0;
      	if (b <= -1.3e+28)
      		tmp = t_1;
      	elseif (b <= 7.2e+39)
      		tmp = x * ((a ^ (t - 1.0)) / y);
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.3e+28], t$95$1, If[LessEqual[b, 7.2e+39], N[(x * N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x \cdot \frac{e^{-b}}{y}\\
      \mathbf{if}\;b \leq -1.3 \cdot 10^{+28}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;b \leq 7.2 \cdot 10^{+39}:\\
      \;\;\;\;x \cdot \frac{{a}^{\left(t - 1\right)}}{y}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < -1.3000000000000001e28 or 7.19999999999999969e39 < b

        1. Initial program 100.0%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in b around inf

          \[\leadsto \frac{x \cdot e^{\color{blue}{-1 \cdot b}}}{y} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \frac{x \cdot e^{\mathsf{neg}\left(b\right)}}{y} \]
          2. lower-neg.f6480.8

            \[\leadsto \frac{x \cdot e^{-b}}{y} \]
        5. Applied rewrites80.8%

          \[\leadsto \frac{x \cdot e^{\color{blue}{-b}}}{y} \]
        6. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x \cdot e^{-b}}{y}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot e^{-b}}}{y} \]
          3. associate-/l*N/A

            \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]
          4. lower-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]
          5. lower-/.f6480.8

            \[\leadsto x \cdot \color{blue}{\frac{e^{-b}}{y}} \]
        7. Applied rewrites80.8%

          \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]

        if -1.3000000000000001e28 < b < 7.19999999999999969e39

        1. Initial program 96.9%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in b around 0

          \[\leadsto \color{blue}{\frac{x \cdot e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
        4. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          2. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          3. lower-/.f64N/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{\color{blue}{y}} \]
          4. exp-sumN/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          5. *-commutativeN/A

            \[\leadsto x \cdot \frac{e^{\log z \cdot y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          6. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          7. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          8. lower-*.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          9. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          10. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          11. lift--.f6483.7

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
        5. Applied rewrites83.7%

          \[\leadsto \color{blue}{x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y}} \]
        6. Taylor expanded in y around 0

          \[\leadsto x \cdot \frac{e^{\log a \cdot \left(t - 1\right)}}{y} \]
        7. Step-by-step derivation
          1. pow-to-expN/A

            \[\leadsto x \cdot \frac{{a}^{\left(t - 1\right)}}{y} \]
          2. lift-pow.f64N/A

            \[\leadsto x \cdot \frac{{a}^{\left(t - 1\right)}}{y} \]
          3. lift--.f6470.4

            \[\leadsto x \cdot \frac{{a}^{\left(t - 1\right)}}{y} \]
        8. Applied rewrites70.4%

          \[\leadsto x \cdot \frac{{a}^{\left(t - 1\right)}}{y} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 10: 75.1% accurate, 2.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{e^{-b}}{y}\\ \mathbf{if}\;b \leq -1.3 \cdot 10^{+27}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{+39}:\\ \;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot x}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* x (/ (exp (- b)) y))))
         (if (<= b -1.3e+27)
           t_1
           (if (<= b 2.5e+39) (/ (* (pow a (- t 1.0)) x) y) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * (exp(-b) / y);
      	double tmp;
      	if (b <= -1.3e+27) {
      		tmp = t_1;
      	} else if (b <= 2.5e+39) {
      		tmp = (pow(a, (t - 1.0)) * x) / y;
      	} else {
      		tmp = t_1;
      	}
      	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(x, y, z, t, a, b)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: tmp
          t_1 = x * (exp(-b) / y)
          if (b <= (-1.3d+27)) then
              tmp = t_1
          else if (b <= 2.5d+39) then
              tmp = ((a ** (t - 1.0d0)) * x) / y
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * (Math.exp(-b) / y);
      	double tmp;
      	if (b <= -1.3e+27) {
      		tmp = t_1;
      	} else if (b <= 2.5e+39) {
      		tmp = (Math.pow(a, (t - 1.0)) * x) / y;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = x * (math.exp(-b) / y)
      	tmp = 0
      	if b <= -1.3e+27:
      		tmp = t_1
      	elif b <= 2.5e+39:
      		tmp = (math.pow(a, (t - 1.0)) * x) / y
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(x * Float64(exp(Float64(-b)) / y))
      	tmp = 0.0
      	if (b <= -1.3e+27)
      		tmp = t_1;
      	elseif (b <= 2.5e+39)
      		tmp = Float64(Float64((a ^ Float64(t - 1.0)) * x) / y);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = x * (exp(-b) / y);
      	tmp = 0.0;
      	if (b <= -1.3e+27)
      		tmp = t_1;
      	elseif (b <= 2.5e+39)
      		tmp = ((a ^ (t - 1.0)) * x) / y;
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.3e+27], t$95$1, If[LessEqual[b, 2.5e+39], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x \cdot \frac{e^{-b}}{y}\\
      \mathbf{if}\;b \leq -1.3 \cdot 10^{+27}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;b \leq 2.5 \cdot 10^{+39}:\\
      \;\;\;\;\frac{{a}^{\left(t - 1\right)} \cdot x}{y}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < -1.30000000000000004e27 or 2.50000000000000008e39 < b

        1. Initial program 100.0%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in b around inf

          \[\leadsto \frac{x \cdot e^{\color{blue}{-1 \cdot b}}}{y} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \frac{x \cdot e^{\mathsf{neg}\left(b\right)}}{y} \]
          2. lower-neg.f6480.8

            \[\leadsto \frac{x \cdot e^{-b}}{y} \]
        5. Applied rewrites80.8%

          \[\leadsto \frac{x \cdot e^{\color{blue}{-b}}}{y} \]
        6. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x \cdot e^{-b}}{y}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot e^{-b}}}{y} \]
          3. associate-/l*N/A

            \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]
          4. lower-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]
          5. lower-/.f6480.8

            \[\leadsto x \cdot \color{blue}{\frac{e^{-b}}{y}} \]
        7. Applied rewrites80.8%

          \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]

        if -1.30000000000000004e27 < b < 2.50000000000000008e39

        1. Initial program 96.9%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in b around 0

          \[\leadsto \color{blue}{\frac{x \cdot e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
        4. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          2. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          3. lower-/.f64N/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{\color{blue}{y}} \]
          4. exp-sumN/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          5. *-commutativeN/A

            \[\leadsto x \cdot \frac{e^{\log z \cdot y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          6. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          7. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          8. lower-*.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          9. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          10. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          11. lift--.f6483.7

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
        5. Applied rewrites83.7%

          \[\leadsto \color{blue}{x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y}} \]
        6. Taylor expanded in y around 0

          \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{\color{blue}{y}} \]
        7. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          2. *-commutativeN/A

            \[\leadsto \frac{e^{\log a \cdot \left(t - 1\right)} \cdot x}{y} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{e^{\log a \cdot \left(t - 1\right)} \cdot x}{y} \]
          4. pow-to-expN/A

            \[\leadsto \frac{{a}^{\left(t - 1\right)} \cdot x}{y} \]
          5. lift-pow.f64N/A

            \[\leadsto \frac{{a}^{\left(t - 1\right)} \cdot x}{y} \]
          6. lift--.f6470.4

            \[\leadsto \frac{{a}^{\left(t - 1\right)} \cdot x}{y} \]
        8. Applied rewrites70.4%

          \[\leadsto \frac{{a}^{\left(t - 1\right)} \cdot x}{\color{blue}{y}} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 11: 65.2% accurate, 2.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{e^{-b}}{y}\\ \mathbf{if}\;b \leq -1.05 \cdot 10^{+35}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{+39}:\\ \;\;\;\;x \cdot \frac{{a}^{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* x (/ (exp (- b)) y))))
         (if (<= b -1.05e+35) t_1 (if (<= b 2.5e+39) (* x (/ (pow a t) y)) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * (exp(-b) / y);
      	double tmp;
      	if (b <= -1.05e+35) {
      		tmp = t_1;
      	} else if (b <= 2.5e+39) {
      		tmp = x * (pow(a, t) / y);
      	} else {
      		tmp = t_1;
      	}
      	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(x, y, z, t, a, b)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: tmp
          t_1 = x * (exp(-b) / y)
          if (b <= (-1.05d+35)) then
              tmp = t_1
          else if (b <= 2.5d+39) then
              tmp = x * ((a ** t) / y)
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * (Math.exp(-b) / y);
      	double tmp;
      	if (b <= -1.05e+35) {
      		tmp = t_1;
      	} else if (b <= 2.5e+39) {
      		tmp = x * (Math.pow(a, t) / y);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = x * (math.exp(-b) / y)
      	tmp = 0
      	if b <= -1.05e+35:
      		tmp = t_1
      	elif b <= 2.5e+39:
      		tmp = x * (math.pow(a, t) / y)
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(x * Float64(exp(Float64(-b)) / y))
      	tmp = 0.0
      	if (b <= -1.05e+35)
      		tmp = t_1;
      	elseif (b <= 2.5e+39)
      		tmp = Float64(x * Float64((a ^ t) / y));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = x * (exp(-b) / y);
      	tmp = 0.0;
      	if (b <= -1.05e+35)
      		tmp = t_1;
      	elseif (b <= 2.5e+39)
      		tmp = x * ((a ^ t) / y);
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.05e+35], t$95$1, If[LessEqual[b, 2.5e+39], N[(x * N[(N[Power[a, t], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x \cdot \frac{e^{-b}}{y}\\
      \mathbf{if}\;b \leq -1.05 \cdot 10^{+35}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;b \leq 2.5 \cdot 10^{+39}:\\
      \;\;\;\;x \cdot \frac{{a}^{t}}{y}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < -1.0499999999999999e35 or 2.50000000000000008e39 < b

        1. Initial program 100.0%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in b around inf

          \[\leadsto \frac{x \cdot e^{\color{blue}{-1 \cdot b}}}{y} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \frac{x \cdot e^{\mathsf{neg}\left(b\right)}}{y} \]
          2. lower-neg.f6481.0

            \[\leadsto \frac{x \cdot e^{-b}}{y} \]
        5. Applied rewrites81.0%

          \[\leadsto \frac{x \cdot e^{\color{blue}{-b}}}{y} \]
        6. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x \cdot e^{-b}}{y}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x \cdot e^{-b}}}{y} \]
          3. associate-/l*N/A

            \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]
          4. lower-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]
          5. lower-/.f6481.0

            \[\leadsto x \cdot \color{blue}{\frac{e^{-b}}{y}} \]
        7. Applied rewrites81.0%

          \[\leadsto \color{blue}{x \cdot \frac{e^{-b}}{y}} \]

        if -1.0499999999999999e35 < b < 2.50000000000000008e39

        1. Initial program 96.9%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in b around 0

          \[\leadsto \color{blue}{\frac{x \cdot e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
        4. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          2. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          3. lower-/.f64N/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{\color{blue}{y}} \]
          4. exp-sumN/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          5. *-commutativeN/A

            \[\leadsto x \cdot \frac{e^{\log z \cdot y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          6. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          7. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          8. lower-*.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          9. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          10. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          11. lift--.f6483.7

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
        5. Applied rewrites83.7%

          \[\leadsto \color{blue}{x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y}} \]
        6. Taylor expanded in y around 0

          \[\leadsto x \cdot \frac{e^{\log a \cdot \left(t - 1\right)}}{y} \]
        7. Step-by-step derivation
          1. pow-to-expN/A

            \[\leadsto x \cdot \frac{{a}^{\left(t - 1\right)}}{y} \]
          2. lift-pow.f64N/A

            \[\leadsto x \cdot \frac{{a}^{\left(t - 1\right)}}{y} \]
          3. lift--.f6470.4

            \[\leadsto x \cdot \frac{{a}^{\left(t - 1\right)}}{y} \]
        8. Applied rewrites70.4%

          \[\leadsto x \cdot \frac{{a}^{\left(t - 1\right)}}{y} \]
        9. Taylor expanded in t around inf

          \[\leadsto x \cdot \frac{{a}^{t}}{y} \]
        10. Step-by-step derivation
          1. Applied rewrites52.5%

            \[\leadsto x \cdot \frac{{a}^{t}}{y} \]
        11. Recombined 2 regimes into one program.
        12. Add Preprocessing

        Alternative 12: 32.4% accurate, 19.8× speedup?

        \[\begin{array}{l} \\ \frac{x}{a \cdot y} \end{array} \]
        (FPCore (x y z t a b) :precision binary64 (/ x (* a y)))
        double code(double x, double y, double z, double t, double a, double b) {
        	return x / (a * y);
        }
        
        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(x, y, z, t, a, b)
        use fmin_fmax_functions
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8), intent (in) :: a
            real(8), intent (in) :: b
            code = x / (a * y)
        end function
        
        public static double code(double x, double y, double z, double t, double a, double b) {
        	return x / (a * y);
        }
        
        def code(x, y, z, t, a, b):
        	return x / (a * y)
        
        function code(x, y, z, t, a, b)
        	return Float64(x / Float64(a * y))
        end
        
        function tmp = code(x, y, z, t, a, b)
        	tmp = x / (a * y);
        end
        
        code[x_, y_, z_, t_, a_, b_] := N[(x / N[(a * y), $MachinePrecision]), $MachinePrecision]
        
        \begin{array}{l}
        
        \\
        \frac{x}{a \cdot y}
        \end{array}
        
        Derivation
        1. Initial program 98.3%

          \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
        2. Add Preprocessing
        3. Taylor expanded in b around 0

          \[\leadsto \color{blue}{\frac{x \cdot e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
        4. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          2. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{y}} \]
          3. lower-/.f64N/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}{\color{blue}{y}} \]
          4. exp-sumN/A

            \[\leadsto x \cdot \frac{e^{y \cdot \log z} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          5. *-commutativeN/A

            \[\leadsto x \cdot \frac{e^{\log z \cdot y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          6. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
          7. pow-to-expN/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          8. lower-*.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          9. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          10. lower-pow.f64N/A

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
          11. lift--.f6470.0

            \[\leadsto x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y} \]
        5. Applied rewrites70.0%

          \[\leadsto \color{blue}{x \cdot \frac{{z}^{y} \cdot {a}^{\left(t - 1\right)}}{y}} \]
        6. Taylor expanded in t around 0

          \[\leadsto \frac{x \cdot {z}^{y}}{\color{blue}{a \cdot y}} \]
        7. Step-by-step derivation
          1. times-fracN/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{\color{blue}{y}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{\color{blue}{y}} \]
          3. lower-/.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
          4. lower-/.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
          5. lift-pow.f6455.5

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
        8. Applied rewrites55.5%

          \[\leadsto \frac{x}{a} \cdot \color{blue}{\frac{{z}^{y}}{y}} \]
        9. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{\color{blue}{y}} \]
          2. lift-/.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
          3. lift-/.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
          4. lift-pow.f64N/A

            \[\leadsto \frac{x}{a} \cdot \frac{{z}^{y}}{y} \]
          5. frac-timesN/A

            \[\leadsto \frac{x \cdot {z}^{y}}{a \cdot \color{blue}{y}} \]
          6. lower-/.f64N/A

            \[\leadsto \frac{x \cdot {z}^{y}}{a \cdot \color{blue}{y}} \]
          7. *-commutativeN/A

            \[\leadsto \frac{{z}^{y} \cdot x}{a \cdot y} \]
          8. lower-*.f64N/A

            \[\leadsto \frac{{z}^{y} \cdot x}{a \cdot y} \]
          9. lift-pow.f64N/A

            \[\leadsto \frac{{z}^{y} \cdot x}{a \cdot y} \]
          10. lower-*.f6455.2

            \[\leadsto \frac{{z}^{y} \cdot x}{a \cdot y} \]
        10. Applied rewrites55.2%

          \[\leadsto \frac{{z}^{y} \cdot x}{a \cdot \color{blue}{y}} \]
        11. Taylor expanded in y around 0

          \[\leadsto \frac{x}{a \cdot y} \]
        12. Step-by-step derivation
          1. Applied rewrites32.4%

            \[\leadsto \frac{x}{a \cdot y} \]
          2. Add Preprocessing

          Developer Target 1: 72.7% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := {a}^{\left(t - 1\right)}\\ t_2 := \frac{x \cdot \frac{t\_1}{y}}{\left(b + 1\right) - y \cdot \log z}\\ \mathbf{if}\;t < -0.8845848504127471:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t < 852031.2288374073:\\ \;\;\;\;\frac{\frac{x}{y} \cdot t\_1}{e^{b - \log z \cdot y}}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (let* ((t_1 (pow a (- t 1.0)))
                  (t_2 (/ (* x (/ t_1 y)) (- (+ b 1.0) (* y (log z))))))
             (if (< t -0.8845848504127471)
               t_2
               (if (< t 852031.2288374073)
                 (/ (* (/ x y) t_1) (exp (- b (* (log z) y))))
                 t_2))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = pow(a, (t - 1.0));
          	double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z)));
          	double tmp;
          	if (t < -0.8845848504127471) {
          		tmp = t_2;
          	} else if (t < 852031.2288374073) {
          		tmp = ((x / y) * t_1) / exp((b - (log(z) * y)));
          	} else {
          		tmp = t_2;
          	}
          	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(x, y, z, t, a, b)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8), intent (in) :: b
              real(8) :: t_1
              real(8) :: t_2
              real(8) :: tmp
              t_1 = a ** (t - 1.0d0)
              t_2 = (x * (t_1 / y)) / ((b + 1.0d0) - (y * log(z)))
              if (t < (-0.8845848504127471d0)) then
                  tmp = t_2
              else if (t < 852031.2288374073d0) then
                  tmp = ((x / y) * t_1) / exp((b - (log(z) * y)))
              else
                  tmp = t_2
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = Math.pow(a, (t - 1.0));
          	double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * Math.log(z)));
          	double tmp;
          	if (t < -0.8845848504127471) {
          		tmp = t_2;
          	} else if (t < 852031.2288374073) {
          		tmp = ((x / y) * t_1) / Math.exp((b - (Math.log(z) * y)));
          	} else {
          		tmp = t_2;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	t_1 = math.pow(a, (t - 1.0))
          	t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * math.log(z)))
          	tmp = 0
          	if t < -0.8845848504127471:
          		tmp = t_2
          	elif t < 852031.2288374073:
          		tmp = ((x / y) * t_1) / math.exp((b - (math.log(z) * y)))
          	else:
          		tmp = t_2
          	return tmp
          
          function code(x, y, z, t, a, b)
          	t_1 = a ^ Float64(t - 1.0)
          	t_2 = Float64(Float64(x * Float64(t_1 / y)) / Float64(Float64(b + 1.0) - Float64(y * log(z))))
          	tmp = 0.0
          	if (t < -0.8845848504127471)
          		tmp = t_2;
          	elseif (t < 852031.2288374073)
          		tmp = Float64(Float64(Float64(x / y) * t_1) / exp(Float64(b - Float64(log(z) * y))));
          	else
          		tmp = t_2;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b)
          	t_1 = a ^ (t - 1.0);
          	t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z)));
          	tmp = 0.0;
          	if (t < -0.8845848504127471)
          		tmp = t_2;
          	elseif (t < 852031.2288374073)
          		tmp = ((x / y) * t_1) / exp((b - (log(z) * y)));
          	else
          		tmp = t_2;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] / N[(N[(b + 1.0), $MachinePrecision] - N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -0.8845848504127471], t$95$2, If[Less[t, 852031.2288374073], N[(N[(N[(x / y), $MachinePrecision] * t$95$1), $MachinePrecision] / N[Exp[N[(b - N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := {a}^{\left(t - 1\right)}\\
          t_2 := \frac{x \cdot \frac{t\_1}{y}}{\left(b + 1\right) - y \cdot \log z}\\
          \mathbf{if}\;t < -0.8845848504127471:\\
          \;\;\;\;t\_2\\
          
          \mathbf{elif}\;t < 852031.2288374073:\\
          \;\;\;\;\frac{\frac{x}{y} \cdot t\_1}{e^{b - \log z \cdot y}}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_2\\
          
          
          \end{array}
          \end{array}
          

          Reproduce

          ?
          herbie shell --seed 2025088 
          (FPCore (x y z t a b)
            :name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
            :precision binary64
          
            :alt
            (! :herbie-platform default (if (< t -8845848504127471/10000000000000000) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))) (if (< t 8520312288374073/10000000000) (/ (* (/ x y) (pow a (- t 1))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))))))
          
            (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))