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

Percentage Accurate: 98.5% → 98.5%
Time: 8.4s
Alternatives: 15
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}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 98.5% 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.5% 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.7%

    \[\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 2: 76.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - 1\right) \cdot \log a\\ t_2 := \frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\ \mathbf{if}\;t\_1 \leq -700:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 150:\\ \;\;\;\;\frac{1}{a \cdot \left(e^{b} \cdot y\right)} \cdot x\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+123}:\\ \;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{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 1.0)) y) x)))
   (if (<= t_1 -700.0)
     t_2
     (if (<= t_1 150.0)
       (* (/ 1.0 (* a (* (exp b) y))) x)
       (if (<= t_1 4e+123) (/ (* x (/ (pow z y) 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 - 1.0)) / y) * x;
	double tmp;
	if (t_1 <= -700.0) {
		tmp = t_2;
	} else if (t_1 <= 150.0) {
		tmp = (1.0 / (a * (exp(b) * y))) * x;
	} else if (t_1 <= 4e+123) {
		tmp = (x * (pow(z, y) / 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 - 1.0d0)) / y) * x
    if (t_1 <= (-700.0d0)) then
        tmp = t_2
    else if (t_1 <= 150.0d0) then
        tmp = (1.0d0 / (a * (exp(b) * y))) * x
    else if (t_1 <= 4d+123) then
        tmp = (x * ((z ** y) / 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 - 1.0)) / y) * x;
	double tmp;
	if (t_1 <= -700.0) {
		tmp = t_2;
	} else if (t_1 <= 150.0) {
		tmp = (1.0 / (a * (Math.exp(b) * y))) * x;
	} else if (t_1 <= 4e+123) {
		tmp = (x * (Math.pow(z, y) / 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 - 1.0)) / y) * x
	tmp = 0
	if t_1 <= -700.0:
		tmp = t_2
	elif t_1 <= 150.0:
		tmp = (1.0 / (a * (math.exp(b) * y))) * x
	elif t_1 <= 4e+123:
		tmp = (x * (math.pow(z, y) / 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 ^ Float64(t - 1.0)) / y) * x)
	tmp = 0.0
	if (t_1 <= -700.0)
		tmp = t_2;
	elseif (t_1 <= 150.0)
		tmp = Float64(Float64(1.0 / Float64(a * Float64(exp(b) * y))) * x);
	elseif (t_1 <= 4e+123)
		tmp = Float64(Float64(x * Float64((z ^ y) / 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 - 1.0)) / y) * x;
	tmp = 0.0;
	if (t_1 <= -700.0)
		tmp = t_2;
	elseif (t_1 <= 150.0)
		tmp = (1.0 / (a * (exp(b) * y))) * x;
	elseif (t_1 <= 4e+123)
		tmp = (x * ((z ^ y) / 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, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[t$95$1, -700.0], t$95$2, If[LessEqual[t$95$1, 150.0], N[(N[(1.0 / N[(a * N[(N[Exp[b], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$1, 4e+123], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq 150:\\
\;\;\;\;\frac{1}{a \cdot \left(e^{b} \cdot y\right)} \cdot x\\

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+123}:\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\

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


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

    1. Initial program 99.1%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{e^{\log a \cdot \left(t - 1\right)}}}{e^{b} \cdot y} \cdot x \]
    6. Step-by-step derivation
      1. Applied rewrites75.3%

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

        \[\leadsto \frac{{a}^{\left(t - 1\right)}}{\color{blue}{y}} \cdot x \]
      3. Step-by-step derivation
        1. Applied rewrites85.9%

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

        if -700 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 150

        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. Step-by-step derivation
          1. lift-/.f64N/A

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

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

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

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

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

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

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

            \[\leadsto \frac{\color{blue}{{a}^{\left(t - 1\right)} \cdot {z}^{y}}}{e^{b} \cdot y} \cdot x \]
          3. associate-/l*N/A

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

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

            \[\leadsto \left({a}^{\color{blue}{\left(t - 1\right)}} \cdot \frac{{z}^{y}}{e^{b} \cdot y}\right) \cdot x \]
          6. pow-subN/A

            \[\leadsto \left(\color{blue}{\frac{{a}^{t}}{{a}^{1}}} \cdot \frac{{z}^{y}}{e^{b} \cdot y}\right) \cdot x \]
          7. unpow1N/A

            \[\leadsto \left(\frac{{a}^{t}}{\color{blue}{a}} \cdot \frac{{z}^{y}}{e^{b} \cdot y}\right) \cdot x \]
          8. frac-timesN/A

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

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

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

            \[\leadsto \frac{\color{blue}{{a}^{t}} \cdot {z}^{y}}{a \cdot \left(e^{b} \cdot y\right)} \cdot x \]
          12. lower-*.f6488.3

            \[\leadsto \frac{{a}^{t} \cdot {z}^{y}}{\color{blue}{a \cdot \left(e^{b} \cdot y\right)}} \cdot x \]
        6. Applied rewrites88.3%

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

          \[\leadsto \frac{\color{blue}{{a}^{t}}}{a \cdot \left(e^{b} \cdot y\right)} \cdot x \]
        8. Step-by-step derivation
          1. Applied rewrites80.4%

            \[\leadsto \frac{\color{blue}{{a}^{t}}}{a \cdot \left(e^{b} \cdot y\right)} \cdot x \]
          2. Taylor expanded in t around 0

            \[\leadsto \frac{1}{a \cdot \left(e^{b} \cdot y\right)} \cdot x \]
          3. Step-by-step derivation
            1. Applied rewrites79.2%

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

            if 150 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 3.99999999999999991e123

            1. Initial program 99.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 \frac{x \cdot \color{blue}{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}}{y} \]
            4. Step-by-step derivation
              1. Applied rewrites73.6%

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

                \[\leadsto \frac{x \cdot \frac{{z}^{y}}{\color{blue}{a}}}{y} \]
              3. Step-by-step derivation
                1. Applied rewrites75.2%

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

              Alternative 3: 66.2% accurate, 0.7× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - 1\right) \cdot \log a\\ t_2 := \frac{x \cdot {a}^{t}}{y}\\ \mathbf{if}\;t\_1 \leq -100000000000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -300:\\ \;\;\;\;\frac{{a}^{-1}}{y} \cdot x\\ \mathbf{elif}\;t\_1 \leq 10^{+17}:\\ \;\;\;\;\frac{e^{-b}}{y} \cdot x\\ \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 (/ (* x (pow a t)) y)))
                 (if (<= t_1 -100000000000.0)
                   t_2
                   (if (<= t_1 -300.0)
                     (* (/ (pow a -1.0) y) x)
                     (if (<= t_1 1e+17) (* (/ (exp (- b)) y) x) 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 = (x * pow(a, t)) / y;
              	double tmp;
              	if (t_1 <= -100000000000.0) {
              		tmp = t_2;
              	} else if (t_1 <= -300.0) {
              		tmp = (pow(a, -1.0) / y) * x;
              	} else if (t_1 <= 1e+17) {
              		tmp = (exp(-b) / y) * x;
              	} 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 = (x * (a ** t)) / y
                  if (t_1 <= (-100000000000.0d0)) then
                      tmp = t_2
                  else if (t_1 <= (-300.0d0)) then
                      tmp = ((a ** (-1.0d0)) / y) * x
                  else if (t_1 <= 1d+17) then
                      tmp = (exp(-b) / y) * x
                  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 = (x * Math.pow(a, t)) / y;
              	double tmp;
              	if (t_1 <= -100000000000.0) {
              		tmp = t_2;
              	} else if (t_1 <= -300.0) {
              		tmp = (Math.pow(a, -1.0) / y) * x;
              	} else if (t_1 <= 1e+17) {
              		tmp = (Math.exp(-b) / y) * x;
              	} else {
              		tmp = t_2;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b):
              	t_1 = (t - 1.0) * math.log(a)
              	t_2 = (x * math.pow(a, t)) / y
              	tmp = 0
              	if t_1 <= -100000000000.0:
              		tmp = t_2
              	elif t_1 <= -300.0:
              		tmp = (math.pow(a, -1.0) / y) * x
              	elif t_1 <= 1e+17:
              		tmp = (math.exp(-b) / y) * x
              	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(x * (a ^ t)) / y)
              	tmp = 0.0
              	if (t_1 <= -100000000000.0)
              		tmp = t_2;
              	elseif (t_1 <= -300.0)
              		tmp = Float64(Float64((a ^ -1.0) / y) * x);
              	elseif (t_1 <= 1e+17)
              		tmp = Float64(Float64(exp(Float64(-b)) / y) * x);
              	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 = (x * (a ^ t)) / y;
              	tmp = 0.0;
              	if (t_1 <= -100000000000.0)
              		tmp = t_2;
              	elseif (t_1 <= -300.0)
              		tmp = ((a ^ -1.0) / y) * x;
              	elseif (t_1 <= 1e+17)
              		tmp = (exp(-b) / y) * x;
              	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[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -100000000000.0], t$95$2, If[LessEqual[t$95$1, -300.0], N[(N[(N[Power[a, -1.0], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$1, 1e+17], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], t$95$2]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \left(t - 1\right) \cdot \log a\\
              t_2 := \frac{x \cdot {a}^{t}}{y}\\
              \mathbf{if}\;t\_1 \leq -100000000000:\\
              \;\;\;\;t\_2\\
              
              \mathbf{elif}\;t\_1 \leq -300:\\
              \;\;\;\;\frac{{a}^{-1}}{y} \cdot x\\
              
              \mathbf{elif}\;t\_1 \leq 10^{+17}:\\
              \;\;\;\;\frac{e^{-b}}{y} \cdot x\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_2\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -1e11 or 1e17 < (*.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 \frac{x \cdot \color{blue}{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}}{y} \]
                4. Step-by-step derivation
                  1. Applied rewrites66.8%

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

                    \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
                  3. Step-by-step derivation
                    1. Applied rewrites83.2%

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

                      \[\leadsto \frac{x \cdot {a}^{t}}{y} \]
                    3. Step-by-step derivation
                      1. Applied rewrites83.2%

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

                      if -1e11 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -300

                      1. Initial program 92.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 \frac{x \cdot \color{blue}{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}}{y} \]
                      4. Step-by-step derivation
                        1. Applied rewrites79.9%

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

                          \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
                        3. Step-by-step derivation
                          1. Applied rewrites56.8%

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

                            \[\leadsto \frac{x \cdot \frac{1}{a}}{y} \]
                          3. Step-by-step derivation
                            1. Applied rewrites56.8%

                              \[\leadsto \frac{x \cdot \frac{1}{a}}{y} \]
                            2. Step-by-step derivation
                              1. lift-/.f64N/A

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

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

                                \[\leadsto \color{blue}{x \cdot \frac{\frac{1}{a}}{y}} \]
                              4. *-commutativeN/A

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

                                \[\leadsto \color{blue}{\frac{\frac{1}{a}}{y} \cdot x} \]
                            3. Applied rewrites66.5%

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

                            if -300 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 1e17

                            1. Initial program 98.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 inf

                              \[\leadsto \frac{x \cdot e^{\color{blue}{-1 \cdot b}}}{y} \]
                            4. Step-by-step derivation
                              1. Applied rewrites54.2%

                                \[\leadsto \frac{x \cdot e^{\color{blue}{-b}}}{y} \]
                              2. 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. *-commutativeN/A

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

                                  \[\leadsto \color{blue}{\frac{e^{-b}}{y} \cdot x} \]
                                6. lower-/.f6454.2

                                  \[\leadsto \color{blue}{\frac{e^{-b}}{y}} \cdot x \]
                              3. Applied rewrites54.2%

                                \[\leadsto \color{blue}{\frac{e^{-b}}{y} \cdot x} \]
                            5. Recombined 3 regimes into one program.
                            6. Add Preprocessing

                            Alternative 4: 64.5% accurate, 0.7× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - 1\right) \cdot \log a\\ t_2 := \frac{x \cdot {a}^{t}}{y}\\ \mathbf{if}\;t\_1 \leq -100000000000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -300:\\ \;\;\;\;\frac{{a}^{-1}}{y} \cdot x\\ \mathbf{elif}\;t\_1 \leq 4000000000:\\ \;\;\;\;e^{-b} \cdot \frac{x}{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 (/ (* x (pow a t)) y)))
                               (if (<= t_1 -100000000000.0)
                                 t_2
                                 (if (<= t_1 -300.0)
                                   (* (/ (pow a -1.0) y) x)
                                   (if (<= t_1 4000000000.0) (* (exp (- b)) (/ x 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 = (x * pow(a, t)) / y;
                            	double tmp;
                            	if (t_1 <= -100000000000.0) {
                            		tmp = t_2;
                            	} else if (t_1 <= -300.0) {
                            		tmp = (pow(a, -1.0) / y) * x;
                            	} else if (t_1 <= 4000000000.0) {
                            		tmp = exp(-b) * (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 = (t - 1.0d0) * log(a)
                                t_2 = (x * (a ** t)) / y
                                if (t_1 <= (-100000000000.0d0)) then
                                    tmp = t_2
                                else if (t_1 <= (-300.0d0)) then
                                    tmp = ((a ** (-1.0d0)) / y) * x
                                else if (t_1 <= 4000000000.0d0) then
                                    tmp = exp(-b) * (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 = (t - 1.0) * Math.log(a);
                            	double t_2 = (x * Math.pow(a, t)) / y;
                            	double tmp;
                            	if (t_1 <= -100000000000.0) {
                            		tmp = t_2;
                            	} else if (t_1 <= -300.0) {
                            		tmp = (Math.pow(a, -1.0) / y) * x;
                            	} else if (t_1 <= 4000000000.0) {
                            		tmp = Math.exp(-b) * (x / 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 = (x * math.pow(a, t)) / y
                            	tmp = 0
                            	if t_1 <= -100000000000.0:
                            		tmp = t_2
                            	elif t_1 <= -300.0:
                            		tmp = (math.pow(a, -1.0) / y) * x
                            	elif t_1 <= 4000000000.0:
                            		tmp = math.exp(-b) * (x / 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(x * (a ^ t)) / y)
                            	tmp = 0.0
                            	if (t_1 <= -100000000000.0)
                            		tmp = t_2;
                            	elseif (t_1 <= -300.0)
                            		tmp = Float64(Float64((a ^ -1.0) / y) * x);
                            	elseif (t_1 <= 4000000000.0)
                            		tmp = Float64(exp(Float64(-b)) * Float64(x / 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 = (x * (a ^ t)) / y;
                            	tmp = 0.0;
                            	if (t_1 <= -100000000000.0)
                            		tmp = t_2;
                            	elseif (t_1 <= -300.0)
                            		tmp = ((a ^ -1.0) / y) * x;
                            	elseif (t_1 <= 4000000000.0)
                            		tmp = exp(-b) * (x / 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[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -100000000000.0], t$95$2, If[LessEqual[t$95$1, -300.0], N[(N[(N[Power[a, -1.0], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$1, 4000000000.0], N[(N[Exp[(-b)], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            t_1 := \left(t - 1\right) \cdot \log a\\
                            t_2 := \frac{x \cdot {a}^{t}}{y}\\
                            \mathbf{if}\;t\_1 \leq -100000000000:\\
                            \;\;\;\;t\_2\\
                            
                            \mathbf{elif}\;t\_1 \leq -300:\\
                            \;\;\;\;\frac{{a}^{-1}}{y} \cdot x\\
                            
                            \mathbf{elif}\;t\_1 \leq 4000000000:\\
                            \;\;\;\;e^{-b} \cdot \frac{x}{y}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_2\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -1e11 or 4e9 < (*.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 \frac{x \cdot \color{blue}{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}}{y} \]
                              4. Step-by-step derivation
                                1. Applied rewrites65.8%

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

                                  \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
                                3. Step-by-step derivation
                                  1. Applied rewrites81.9%

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

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

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

                                    if -1e11 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -300

                                    1. Initial program 92.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 \frac{x \cdot \color{blue}{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}}{y} \]
                                    4. Step-by-step derivation
                                      1. Applied rewrites79.9%

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

                                        \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites56.8%

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

                                          \[\leadsto \frac{x \cdot \frac{1}{a}}{y} \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites56.8%

                                            \[\leadsto \frac{x \cdot \frac{1}{a}}{y} \]
                                          2. Step-by-step derivation
                                            1. lift-/.f64N/A

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

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

                                              \[\leadsto \color{blue}{x \cdot \frac{\frac{1}{a}}{y}} \]
                                            4. *-commutativeN/A

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

                                              \[\leadsto \color{blue}{\frac{\frac{1}{a}}{y} \cdot x} \]
                                          3. Applied rewrites66.5%

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

                                          if -300 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < 4e9

                                          1. Initial program 98.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 inf

                                            \[\leadsto \frac{x \cdot e^{\color{blue}{-1 \cdot b}}}{y} \]
                                          4. Step-by-step derivation
                                            1. Applied rewrites53.3%

                                              \[\leadsto \frac{x \cdot e^{\color{blue}{-b}}}{y} \]
                                            2. 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. *-commutativeN/A

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

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

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

                                                \[\leadsto e^{-b} \cdot \color{blue}{\frac{x}{y}} \]
                                            3. Applied rewrites51.4%

                                              \[\leadsto \color{blue}{e^{-b} \cdot \frac{x}{y}} \]
                                          5. Recombined 3 regimes into one program.
                                          6. Add Preprocessing

                                          Alternative 5: 89.4% accurate, 1.4× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{+79} \lor \neg \left(y \leq 2.7 \cdot 10^{+153}\right):\\ \;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t - 1\right) - b}}{y}\\ \end{array} \end{array} \]
                                          (FPCore (x y z t a b)
                                           :precision binary64
                                           (if (or (<= y -1.8e+79) (not (<= y 2.7e+153)))
                                             (/ (* x (/ (pow z y) a)) y)
                                             (/ (* x (exp (- (* (log a) (- t 1.0)) b))) y)))
                                          double code(double x, double y, double z, double t, double a, double b) {
                                          	double tmp;
                                          	if ((y <= -1.8e+79) || !(y <= 2.7e+153)) {
                                          		tmp = (x * (pow(z, y) / a)) / y;
                                          	} else {
                                          		tmp = (x * exp(((log(a) * (t - 1.0)) - b))) / 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 <= (-1.8d+79)) .or. (.not. (y <= 2.7d+153))) then
                                                  tmp = (x * ((z ** y) / a)) / y
                                              else
                                                  tmp = (x * exp(((log(a) * (t - 1.0d0)) - b))) / 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 <= -1.8e+79) || !(y <= 2.7e+153)) {
                                          		tmp = (x * (Math.pow(z, y) / a)) / y;
                                          	} else {
                                          		tmp = (x * Math.exp(((Math.log(a) * (t - 1.0)) - b))) / y;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          def code(x, y, z, t, a, b):
                                          	tmp = 0
                                          	if (y <= -1.8e+79) or not (y <= 2.7e+153):
                                          		tmp = (x * (math.pow(z, y) / a)) / y
                                          	else:
                                          		tmp = (x * math.exp(((math.log(a) * (t - 1.0)) - b))) / y
                                          	return tmp
                                          
                                          function code(x, y, z, t, a, b)
                                          	tmp = 0.0
                                          	if ((y <= -1.8e+79) || !(y <= 2.7e+153))
                                          		tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y);
                                          	else
                                          		tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * Float64(t - 1.0)) - b))) / y);
                                          	end
                                          	return tmp
                                          end
                                          
                                          function tmp_2 = code(x, y, z, t, a, b)
                                          	tmp = 0.0;
                                          	if ((y <= -1.8e+79) || ~((y <= 2.7e+153)))
                                          		tmp = (x * ((z ^ y) / a)) / y;
                                          	else
                                          		tmp = (x * exp(((log(a) * (t - 1.0)) - b))) / y;
                                          	end
                                          	tmp_2 = tmp;
                                          end
                                          
                                          code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.8e+79], N[Not[LessEqual[y, 2.7e+153]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;y \leq -1.8 \cdot 10^{+79} \lor \neg \left(y \leq 2.7 \cdot 10^{+153}\right):\\
                                          \;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t - 1\right) - b}}{y}\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if y < -1.8e79 or 2.7000000000000001e153 < 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 \frac{x \cdot \color{blue}{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}}{y} \]
                                            4. Step-by-step derivation
                                              1. Applied rewrites73.0%

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

                                                \[\leadsto \frac{x \cdot \frac{{z}^{y}}{\color{blue}{a}}}{y} \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites85.4%

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

                                                if -1.8e79 < y < 2.7000000000000001e153

                                                1. Initial program 98.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 y around 0

                                                  \[\leadsto \frac{x \cdot e^{\color{blue}{\log a \cdot \left(t - 1\right)} - b}}{y} \]
                                                4. Step-by-step derivation
                                                  1. Applied rewrites92.4%

                                                    \[\leadsto \frac{x \cdot e^{\color{blue}{\log a \cdot \left(t - 1\right)} - b}}{y} \]
                                                5. Recombined 2 regimes into one program.
                                                6. Final simplification90.3%

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{+79} \lor \neg \left(y \leq 2.7 \cdot 10^{+153}\right):\\ \;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t - 1\right) - b}}{y}\\ \end{array} \]
                                                7. Add Preprocessing

                                                Alternative 6: 89.3% accurate, 1.4× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{+79} \lor \neg \left(y \leq 2.7 \cdot 10^{+153}\right):\\ \;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{\left(t - 1\right) \cdot \log a - b}}{y} \cdot x\\ \end{array} \end{array} \]
                                                (FPCore (x y z t a b)
                                                 :precision binary64
                                                 (if (or (<= y -1.8e+79) (not (<= y 2.7e+153)))
                                                   (/ (* x (/ (pow z y) a)) y)
                                                   (* (/ (exp (- (* (- t 1.0) (log a)) b)) y) x)))
                                                double code(double x, double y, double z, double t, double a, double b) {
                                                	double tmp;
                                                	if ((y <= -1.8e+79) || !(y <= 2.7e+153)) {
                                                		tmp = (x * (pow(z, y) / a)) / y;
                                                	} else {
                                                		tmp = (exp((((t - 1.0) * log(a)) - b)) / y) * x;
                                                	}
                                                	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 <= (-1.8d+79)) .or. (.not. (y <= 2.7d+153))) then
                                                        tmp = (x * ((z ** y) / a)) / y
                                                    else
                                                        tmp = (exp((((t - 1.0d0) * log(a)) - b)) / y) * x
                                                    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 <= -1.8e+79) || !(y <= 2.7e+153)) {
                                                		tmp = (x * (Math.pow(z, y) / a)) / y;
                                                	} else {
                                                		tmp = (Math.exp((((t - 1.0) * Math.log(a)) - b)) / y) * x;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                def code(x, y, z, t, a, b):
                                                	tmp = 0
                                                	if (y <= -1.8e+79) or not (y <= 2.7e+153):
                                                		tmp = (x * (math.pow(z, y) / a)) / y
                                                	else:
                                                		tmp = (math.exp((((t - 1.0) * math.log(a)) - b)) / y) * x
                                                	return tmp
                                                
                                                function code(x, y, z, t, a, b)
                                                	tmp = 0.0
                                                	if ((y <= -1.8e+79) || !(y <= 2.7e+153))
                                                		tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y);
                                                	else
                                                		tmp = Float64(Float64(exp(Float64(Float64(Float64(t - 1.0) * log(a)) - b)) / y) * x);
                                                	end
                                                	return tmp
                                                end
                                                
                                                function tmp_2 = code(x, y, z, t, a, b)
                                                	tmp = 0.0;
                                                	if ((y <= -1.8e+79) || ~((y <= 2.7e+153)))
                                                		tmp = (x * ((z ^ y) / a)) / y;
                                                	else
                                                		tmp = (exp((((t - 1.0) * log(a)) - b)) / y) * x;
                                                	end
                                                	tmp_2 = tmp;
                                                end
                                                
                                                code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.8e+79], N[Not[LessEqual[y, 2.7e+153]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[Exp[N[(N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;y \leq -1.8 \cdot 10^{+79} \lor \neg \left(y \leq 2.7 \cdot 10^{+153}\right):\\
                                                \;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\frac{e^{\left(t - 1\right) \cdot \log a - b}}{y} \cdot x\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if y < -1.8e79 or 2.7000000000000001e153 < 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 \frac{x \cdot \color{blue}{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}}{y} \]
                                                  4. Step-by-step derivation
                                                    1. Applied rewrites73.0%

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

                                                      \[\leadsto \frac{x \cdot \frac{{z}^{y}}{\color{blue}{a}}}{y} \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites85.4%

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

                                                      if -1.8e79 < y < 2.7000000000000001e153

                                                      1. Initial program 98.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 y around 0

                                                        \[\leadsto \frac{x \cdot e^{\color{blue}{\log a \cdot \left(t - 1\right)} - b}}{y} \]
                                                      4. Step-by-step derivation
                                                        1. Applied rewrites92.4%

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

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

                                                            \[\leadsto \frac{\color{blue}{x \cdot e^{\log a \cdot \left(t - 1\right) - b}}}{y} \]
                                                          3. associate-/l*N/A

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

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

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

                                                          \[\leadsto \color{blue}{\frac{e^{\left(t - 1\right) \cdot \log a - b}}{y} \cdot x} \]
                                                      5. Recombined 2 regimes into one program.
                                                      6. Final simplification89.0%

                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{+79} \lor \neg \left(y \leq 2.7 \cdot 10^{+153}\right):\\ \;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{\left(t - 1\right) \cdot \log a - b}}{y} \cdot x\\ \end{array} \]
                                                      7. Add Preprocessing

                                                      Alternative 7: 80.3% accurate, 1.4× speedup?

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

                                                        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. Applied rewrites92.4%

                                                            \[\leadsto \frac{x \cdot e^{\color{blue}{-b}}}{y} \]
                                                          2. 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. *-commutativeN/A

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

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

                                                              \[\leadsto \color{blue}{\frac{e^{-b}}{y}} \cdot x \]
                                                          3. Applied rewrites92.4%

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

                                                          if -1.10000000000000003e189 < b < 3200

                                                          1. Initial program 98.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 \frac{x \cdot \color{blue}{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}}{y} \]
                                                          4. Step-by-step derivation
                                                            1. Applied rewrites84.1%

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

                                                            if 3200 < 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. Step-by-step derivation
                                                              1. lift-/.f64N/A

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

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

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

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

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

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

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

                                                                \[\leadsto \frac{\color{blue}{{a}^{\left(t - 1\right)} \cdot {z}^{y}}}{e^{b} \cdot y} \cdot x \]
                                                              3. associate-/l*N/A

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

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

                                                                \[\leadsto \left({a}^{\color{blue}{\left(t - 1\right)}} \cdot \frac{{z}^{y}}{e^{b} \cdot y}\right) \cdot x \]
                                                              6. pow-subN/A

                                                                \[\leadsto \left(\color{blue}{\frac{{a}^{t}}{{a}^{1}}} \cdot \frac{{z}^{y}}{e^{b} \cdot y}\right) \cdot x \]
                                                              7. unpow1N/A

                                                                \[\leadsto \left(\frac{{a}^{t}}{\color{blue}{a}} \cdot \frac{{z}^{y}}{e^{b} \cdot y}\right) \cdot x \]
                                                              8. frac-timesN/A

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

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

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

                                                                \[\leadsto \frac{\color{blue}{{a}^{t}} \cdot {z}^{y}}{a \cdot \left(e^{b} \cdot y\right)} \cdot x \]
                                                              12. lower-*.f6450.0

                                                                \[\leadsto \frac{{a}^{t} \cdot {z}^{y}}{\color{blue}{a \cdot \left(e^{b} \cdot y\right)}} \cdot x \]
                                                            6. Applied rewrites50.0%

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

                                                              \[\leadsto \frac{\color{blue}{{a}^{t}}}{a \cdot \left(e^{b} \cdot y\right)} \cdot x \]
                                                            8. Step-by-step derivation
                                                              1. Applied rewrites68.3%

                                                                \[\leadsto \frac{\color{blue}{{a}^{t}}}{a \cdot \left(e^{b} \cdot y\right)} \cdot x \]
                                                              2. Taylor expanded in t around 0

                                                                \[\leadsto \frac{1}{a \cdot \left(e^{b} \cdot y\right)} \cdot x \]
                                                              3. Step-by-step derivation
                                                                1. Applied rewrites80.6%

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

                                                              Alternative 8: 81.4% accurate, 1.4× speedup?

                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.25 \cdot 10^{+32} \lor \neg \left(y \leq 2.7 \cdot 10^{+153}\right):\\ \;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{{a}^{\left(t - 1\right)}}{e^{b} \cdot y} \cdot x\\ \end{array} \end{array} \]
                                                              (FPCore (x y z t a b)
                                                               :precision binary64
                                                               (if (or (<= y -2.25e+32) (not (<= y 2.7e+153)))
                                                                 (/ (* x (/ (pow z y) a)) y)
                                                                 (* (/ (pow a (- t 1.0)) (* (exp b) y)) x)))
                                                              double code(double x, double y, double z, double t, double a, double b) {
                                                              	double tmp;
                                                              	if ((y <= -2.25e+32) || !(y <= 2.7e+153)) {
                                                              		tmp = (x * (pow(z, y) / a)) / y;
                                                              	} else {
                                                              		tmp = (pow(a, (t - 1.0)) / (exp(b) * y)) * x;
                                                              	}
                                                              	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 <= (-2.25d+32)) .or. (.not. (y <= 2.7d+153))) then
                                                                      tmp = (x * ((z ** y) / a)) / y
                                                                  else
                                                                      tmp = ((a ** (t - 1.0d0)) / (exp(b) * y)) * x
                                                                  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 <= -2.25e+32) || !(y <= 2.7e+153)) {
                                                              		tmp = (x * (Math.pow(z, y) / a)) / y;
                                                              	} else {
                                                              		tmp = (Math.pow(a, (t - 1.0)) / (Math.exp(b) * y)) * x;
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              def code(x, y, z, t, a, b):
                                                              	tmp = 0
                                                              	if (y <= -2.25e+32) or not (y <= 2.7e+153):
                                                              		tmp = (x * (math.pow(z, y) / a)) / y
                                                              	else:
                                                              		tmp = (math.pow(a, (t - 1.0)) / (math.exp(b) * y)) * x
                                                              	return tmp
                                                              
                                                              function code(x, y, z, t, a, b)
                                                              	tmp = 0.0
                                                              	if ((y <= -2.25e+32) || !(y <= 2.7e+153))
                                                              		tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y);
                                                              	else
                                                              		tmp = Float64(Float64((a ^ Float64(t - 1.0)) / Float64(exp(b) * y)) * x);
                                                              	end
                                                              	return tmp
                                                              end
                                                              
                                                              function tmp_2 = code(x, y, z, t, a, b)
                                                              	tmp = 0.0;
                                                              	if ((y <= -2.25e+32) || ~((y <= 2.7e+153)))
                                                              		tmp = (x * ((z ^ y) / a)) / y;
                                                              	else
                                                              		tmp = ((a ^ (t - 1.0)) / (exp(b) * y)) * x;
                                                              	end
                                                              	tmp_2 = tmp;
                                                              end
                                                              
                                                              code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.25e+32], N[Not[LessEqual[y, 2.7e+153]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / N[(N[Exp[b], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]
                                                              
                                                              \begin{array}{l}
                                                              
                                                              \\
                                                              \begin{array}{l}
                                                              \mathbf{if}\;y \leq -2.25 \cdot 10^{+32} \lor \neg \left(y \leq 2.7 \cdot 10^{+153}\right):\\
                                                              \;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;\frac{{a}^{\left(t - 1\right)}}{e^{b} \cdot y} \cdot x\\
                                                              
                                                              
                                                              \end{array}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 2 regimes
                                                              2. if y < -2.2500000000000002e32 or 2.7000000000000001e153 < 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 \frac{x \cdot \color{blue}{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}}{y} \]
                                                                4. Step-by-step derivation
                                                                  1. Applied rewrites70.5%

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

                                                                    \[\leadsto \frac{x \cdot \frac{{z}^{y}}{\color{blue}{a}}}{y} \]
                                                                  3. Step-by-step derivation
                                                                    1. Applied rewrites83.2%

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

                                                                    if -2.2500000000000002e32 < y < 2.7000000000000001e153

                                                                    1. Initial program 98.1%

                                                                      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
                                                                    2. Add Preprocessing
                                                                    3. Step-by-step derivation
                                                                      1. lift-/.f64N/A

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

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

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

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

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

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

                                                                      \[\leadsto \frac{\color{blue}{e^{\log a \cdot \left(t - 1\right)}}}{e^{b} \cdot y} \cdot x \]
                                                                    6. Step-by-step derivation
                                                                      1. Applied rewrites81.2%

                                                                        \[\leadsto \frac{\color{blue}{{a}^{\left(t - 1\right)}}}{e^{b} \cdot y} \cdot x \]
                                                                    7. Recombined 2 regimes into one program.
                                                                    8. Final simplification81.9%

                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.25 \cdot 10^{+32} \lor \neg \left(y \leq 2.7 \cdot 10^{+153}\right):\\ \;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{{a}^{\left(t - 1\right)}}{e^{b} \cdot y} \cdot x\\ \end{array} \]
                                                                    9. Add Preprocessing

                                                                    Alternative 9: 75.4% accurate, 2.4× speedup?

                                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -310:\\ \;\;\;\;\frac{e^{-b}}{y} \cdot x\\ \mathbf{elif}\;b \leq 3200:\\ \;\;\;\;\frac{x \cdot {a}^{\left(t - 1\right)}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{a \cdot \left(e^{b} \cdot y\right)} \cdot x\\ \end{array} \end{array} \]
                                                                    (FPCore (x y z t a b)
                                                                     :precision binary64
                                                                     (if (<= b -310.0)
                                                                       (* (/ (exp (- b)) y) x)
                                                                       (if (<= b 3200.0)
                                                                         (/ (* x (pow a (- t 1.0))) y)
                                                                         (* (/ 1.0 (* a (* (exp b) y))) x))))
                                                                    double code(double x, double y, double z, double t, double a, double b) {
                                                                    	double tmp;
                                                                    	if (b <= -310.0) {
                                                                    		tmp = (exp(-b) / y) * x;
                                                                    	} else if (b <= 3200.0) {
                                                                    		tmp = (x * pow(a, (t - 1.0))) / y;
                                                                    	} else {
                                                                    		tmp = (1.0 / (a * (exp(b) * y))) * x;
                                                                    	}
                                                                    	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 (b <= (-310.0d0)) then
                                                                            tmp = (exp(-b) / y) * x
                                                                        else if (b <= 3200.0d0) then
                                                                            tmp = (x * (a ** (t - 1.0d0))) / y
                                                                        else
                                                                            tmp = (1.0d0 / (a * (exp(b) * y))) * x
                                                                        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 (b <= -310.0) {
                                                                    		tmp = (Math.exp(-b) / y) * x;
                                                                    	} else if (b <= 3200.0) {
                                                                    		tmp = (x * Math.pow(a, (t - 1.0))) / y;
                                                                    	} else {
                                                                    		tmp = (1.0 / (a * (Math.exp(b) * y))) * x;
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    def code(x, y, z, t, a, b):
                                                                    	tmp = 0
                                                                    	if b <= -310.0:
                                                                    		tmp = (math.exp(-b) / y) * x
                                                                    	elif b <= 3200.0:
                                                                    		tmp = (x * math.pow(a, (t - 1.0))) / y
                                                                    	else:
                                                                    		tmp = (1.0 / (a * (math.exp(b) * y))) * x
                                                                    	return tmp
                                                                    
                                                                    function code(x, y, z, t, a, b)
                                                                    	tmp = 0.0
                                                                    	if (b <= -310.0)
                                                                    		tmp = Float64(Float64(exp(Float64(-b)) / y) * x);
                                                                    	elseif (b <= 3200.0)
                                                                    		tmp = Float64(Float64(x * (a ^ Float64(t - 1.0))) / y);
                                                                    	else
                                                                    		tmp = Float64(Float64(1.0 / Float64(a * Float64(exp(b) * y))) * x);
                                                                    	end
                                                                    	return tmp
                                                                    end
                                                                    
                                                                    function tmp_2 = code(x, y, z, t, a, b)
                                                                    	tmp = 0.0;
                                                                    	if (b <= -310.0)
                                                                    		tmp = (exp(-b) / y) * x;
                                                                    	elseif (b <= 3200.0)
                                                                    		tmp = (x * (a ^ (t - 1.0))) / y;
                                                                    	else
                                                                    		tmp = (1.0 / (a * (exp(b) * y))) * x;
                                                                    	end
                                                                    	tmp_2 = tmp;
                                                                    end
                                                                    
                                                                    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -310.0], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[b, 3200.0], N[(N[(x * N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(1.0 / N[(a * N[(N[Exp[b], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]
                                                                    
                                                                    \begin{array}{l}
                                                                    
                                                                    \\
                                                                    \begin{array}{l}
                                                                    \mathbf{if}\;b \leq -310:\\
                                                                    \;\;\;\;\frac{e^{-b}}{y} \cdot x\\
                                                                    
                                                                    \mathbf{elif}\;b \leq 3200:\\
                                                                    \;\;\;\;\frac{x \cdot {a}^{\left(t - 1\right)}}{y}\\
                                                                    
                                                                    \mathbf{else}:\\
                                                                    \;\;\;\;\frac{1}{a \cdot \left(e^{b} \cdot y\right)} \cdot x\\
                                                                    
                                                                    
                                                                    \end{array}
                                                                    \end{array}
                                                                    
                                                                    Derivation
                                                                    1. Split input into 3 regimes
                                                                    2. if b < -310

                                                                      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. Applied rewrites75.8%

                                                                          \[\leadsto \frac{x \cdot e^{\color{blue}{-b}}}{y} \]
                                                                        2. 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. *-commutativeN/A

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

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

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

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

                                                                        if -310 < b < 3200

                                                                        1. Initial program 97.5%

                                                                          \[\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 \frac{x \cdot \color{blue}{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}}{y} \]
                                                                        4. Step-by-step derivation
                                                                          1. Applied rewrites88.9%

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

                                                                            \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
                                                                          3. Step-by-step derivation
                                                                            1. Applied rewrites78.7%

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

                                                                              \[\leadsto \frac{x \cdot \frac{1}{a}}{y} \]
                                                                            3. Step-by-step derivation
                                                                              1. Applied rewrites45.5%

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

                                                                                \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
                                                                              3. Step-by-step derivation
                                                                                1. Applied rewrites78.7%

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

                                                                                if 3200 < 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. Step-by-step derivation
                                                                                  1. lift-/.f64N/A

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

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

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

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

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

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

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

                                                                                    \[\leadsto \frac{\color{blue}{{a}^{\left(t - 1\right)} \cdot {z}^{y}}}{e^{b} \cdot y} \cdot x \]
                                                                                  3. associate-/l*N/A

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

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

                                                                                    \[\leadsto \left({a}^{\color{blue}{\left(t - 1\right)}} \cdot \frac{{z}^{y}}{e^{b} \cdot y}\right) \cdot x \]
                                                                                  6. pow-subN/A

                                                                                    \[\leadsto \left(\color{blue}{\frac{{a}^{t}}{{a}^{1}}} \cdot \frac{{z}^{y}}{e^{b} \cdot y}\right) \cdot x \]
                                                                                  7. unpow1N/A

                                                                                    \[\leadsto \left(\frac{{a}^{t}}{\color{blue}{a}} \cdot \frac{{z}^{y}}{e^{b} \cdot y}\right) \cdot x \]
                                                                                  8. frac-timesN/A

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

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

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

                                                                                    \[\leadsto \frac{\color{blue}{{a}^{t}} \cdot {z}^{y}}{a \cdot \left(e^{b} \cdot y\right)} \cdot x \]
                                                                                  12. lower-*.f6450.0

                                                                                    \[\leadsto \frac{{a}^{t} \cdot {z}^{y}}{\color{blue}{a \cdot \left(e^{b} \cdot y\right)}} \cdot x \]
                                                                                6. Applied rewrites50.0%

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

                                                                                  \[\leadsto \frac{\color{blue}{{a}^{t}}}{a \cdot \left(e^{b} \cdot y\right)} \cdot x \]
                                                                                8. Step-by-step derivation
                                                                                  1. Applied rewrites68.3%

                                                                                    \[\leadsto \frac{\color{blue}{{a}^{t}}}{a \cdot \left(e^{b} \cdot y\right)} \cdot x \]
                                                                                  2. Taylor expanded in t around 0

                                                                                    \[\leadsto \frac{1}{a \cdot \left(e^{b} \cdot y\right)} \cdot x \]
                                                                                  3. Step-by-step derivation
                                                                                    1. Applied rewrites80.6%

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

                                                                                  Alternative 10: 58.8% accurate, 2.5× speedup?

                                                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t - 1 \leq -2000000000 \lor \neg \left(t - 1 \leq -0.9999999998\right):\\ \;\;\;\;\frac{x \cdot {a}^{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \frac{1}{a}}{y}\\ \end{array} \end{array} \]
                                                                                  (FPCore (x y z t a b)
                                                                                   :precision binary64
                                                                                   (if (or (<= (- t 1.0) -2000000000.0) (not (<= (- t 1.0) -0.9999999998)))
                                                                                     (/ (* x (pow a t)) y)
                                                                                     (/ (* x (/ 1.0 a)) y)))
                                                                                  double code(double x, double y, double z, double t, double a, double b) {
                                                                                  	double tmp;
                                                                                  	if (((t - 1.0) <= -2000000000.0) || !((t - 1.0) <= -0.9999999998)) {
                                                                                  		tmp = (x * pow(a, t)) / y;
                                                                                  	} else {
                                                                                  		tmp = (x * (1.0 / 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 (((t - 1.0d0) <= (-2000000000.0d0)) .or. (.not. ((t - 1.0d0) <= (-0.9999999998d0)))) then
                                                                                          tmp = (x * (a ** t)) / y
                                                                                      else
                                                                                          tmp = (x * (1.0d0 / 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 (((t - 1.0) <= -2000000000.0) || !((t - 1.0) <= -0.9999999998)) {
                                                                                  		tmp = (x * Math.pow(a, t)) / y;
                                                                                  	} else {
                                                                                  		tmp = (x * (1.0 / a)) / y;
                                                                                  	}
                                                                                  	return tmp;
                                                                                  }
                                                                                  
                                                                                  def code(x, y, z, t, a, b):
                                                                                  	tmp = 0
                                                                                  	if ((t - 1.0) <= -2000000000.0) or not ((t - 1.0) <= -0.9999999998):
                                                                                  		tmp = (x * math.pow(a, t)) / y
                                                                                  	else:
                                                                                  		tmp = (x * (1.0 / a)) / y
                                                                                  	return tmp
                                                                                  
                                                                                  function code(x, y, z, t, a, b)
                                                                                  	tmp = 0.0
                                                                                  	if ((Float64(t - 1.0) <= -2000000000.0) || !(Float64(t - 1.0) <= -0.9999999998))
                                                                                  		tmp = Float64(Float64(x * (a ^ t)) / y);
                                                                                  	else
                                                                                  		tmp = Float64(Float64(x * Float64(1.0 / a)) / y);
                                                                                  	end
                                                                                  	return tmp
                                                                                  end
                                                                                  
                                                                                  function tmp_2 = code(x, y, z, t, a, b)
                                                                                  	tmp = 0.0;
                                                                                  	if (((t - 1.0) <= -2000000000.0) || ~(((t - 1.0) <= -0.9999999998)))
                                                                                  		tmp = (x * (a ^ t)) / y;
                                                                                  	else
                                                                                  		tmp = (x * (1.0 / a)) / y;
                                                                                  	end
                                                                                  	tmp_2 = tmp;
                                                                                  end
                                                                                  
                                                                                  code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(t - 1.0), $MachinePrecision], -2000000000.0], N[Not[LessEqual[N[(t - 1.0), $MachinePrecision], -0.9999999998]], $MachinePrecision]], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[(1.0 / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
                                                                                  
                                                                                  \begin{array}{l}
                                                                                  
                                                                                  \\
                                                                                  \begin{array}{l}
                                                                                  \mathbf{if}\;t - 1 \leq -2000000000 \lor \neg \left(t - 1 \leq -0.9999999998\right):\\
                                                                                  \;\;\;\;\frac{x \cdot {a}^{t}}{y}\\
                                                                                  
                                                                                  \mathbf{else}:\\
                                                                                  \;\;\;\;\frac{x \cdot \frac{1}{a}}{y}\\
                                                                                  
                                                                                  
                                                                                  \end{array}
                                                                                  \end{array}
                                                                                  
                                                                                  Derivation
                                                                                  1. Split input into 2 regimes
                                                                                  2. if (-.f64 t #s(literal 1 binary64)) < -2e9 or -0.9999999998 < (-.f64 t #s(literal 1 binary64))

                                                                                    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 \frac{x \cdot \color{blue}{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}}{y} \]
                                                                                    4. Step-by-step derivation
                                                                                      1. Applied rewrites66.1%

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

                                                                                        \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
                                                                                      3. Step-by-step derivation
                                                                                        1. Applied rewrites80.9%

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

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

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

                                                                                          if -2e9 < (-.f64 t #s(literal 1 binary64)) < -0.9999999998

                                                                                          1. Initial program 97.5%

                                                                                            \[\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 \frac{x \cdot \color{blue}{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}}{y} \]
                                                                                          4. Step-by-step derivation
                                                                                            1. Applied rewrites76.0%

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

                                                                                              \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
                                                                                            3. Step-by-step derivation
                                                                                              1. Applied rewrites47.2%

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

                                                                                                \[\leadsto \frac{x \cdot \frac{1}{a}}{y} \]
                                                                                              3. Step-by-step derivation
                                                                                                1. Applied rewrites46.8%

                                                                                                  \[\leadsto \frac{x \cdot \frac{1}{a}}{y} \]
                                                                                              4. Recombined 2 regimes into one program.
                                                                                              5. Final simplification64.0%

                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;t - 1 \leq -2000000000 \lor \neg \left(t - 1 \leq -0.9999999998\right):\\ \;\;\;\;\frac{x \cdot {a}^{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \frac{1}{a}}{y}\\ \end{array} \]
                                                                                              6. Add Preprocessing

                                                                                              Alternative 11: 75.4% accurate, 2.5× speedup?

                                                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -310 \lor \neg \left(b \leq 3200\right):\\ \;\;\;\;\frac{e^{-b}}{y} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot {a}^{\left(t - 1\right)}}{y}\\ \end{array} \end{array} \]
                                                                                              (FPCore (x y z t a b)
                                                                                               :precision binary64
                                                                                               (if (or (<= b -310.0) (not (<= b 3200.0)))
                                                                                                 (* (/ (exp (- b)) y) x)
                                                                                                 (/ (* x (pow a (- t 1.0))) y)))
                                                                                              double code(double x, double y, double z, double t, double a, double b) {
                                                                                              	double tmp;
                                                                                              	if ((b <= -310.0) || !(b <= 3200.0)) {
                                                                                              		tmp = (exp(-b) / y) * x;
                                                                                              	} else {
                                                                                              		tmp = (x * pow(a, (t - 1.0))) / 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 ((b <= (-310.0d0)) .or. (.not. (b <= 3200.0d0))) then
                                                                                                      tmp = (exp(-b) / y) * x
                                                                                                  else
                                                                                                      tmp = (x * (a ** (t - 1.0d0))) / 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 ((b <= -310.0) || !(b <= 3200.0)) {
                                                                                              		tmp = (Math.exp(-b) / y) * x;
                                                                                              	} else {
                                                                                              		tmp = (x * Math.pow(a, (t - 1.0))) / y;
                                                                                              	}
                                                                                              	return tmp;
                                                                                              }
                                                                                              
                                                                                              def code(x, y, z, t, a, b):
                                                                                              	tmp = 0
                                                                                              	if (b <= -310.0) or not (b <= 3200.0):
                                                                                              		tmp = (math.exp(-b) / y) * x
                                                                                              	else:
                                                                                              		tmp = (x * math.pow(a, (t - 1.0))) / y
                                                                                              	return tmp
                                                                                              
                                                                                              function code(x, y, z, t, a, b)
                                                                                              	tmp = 0.0
                                                                                              	if ((b <= -310.0) || !(b <= 3200.0))
                                                                                              		tmp = Float64(Float64(exp(Float64(-b)) / y) * x);
                                                                                              	else
                                                                                              		tmp = Float64(Float64(x * (a ^ Float64(t - 1.0))) / y);
                                                                                              	end
                                                                                              	return tmp
                                                                                              end
                                                                                              
                                                                                              function tmp_2 = code(x, y, z, t, a, b)
                                                                                              	tmp = 0.0;
                                                                                              	if ((b <= -310.0) || ~((b <= 3200.0)))
                                                                                              		tmp = (exp(-b) / y) * x;
                                                                                              	else
                                                                                              		tmp = (x * (a ^ (t - 1.0))) / y;
                                                                                              	end
                                                                                              	tmp_2 = tmp;
                                                                                              end
                                                                                              
                                                                                              code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -310.0], N[Not[LessEqual[b, 3200.0]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[(x * N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
                                                                                              
                                                                                              \begin{array}{l}
                                                                                              
                                                                                              \\
                                                                                              \begin{array}{l}
                                                                                              \mathbf{if}\;b \leq -310 \lor \neg \left(b \leq 3200\right):\\
                                                                                              \;\;\;\;\frac{e^{-b}}{y} \cdot x\\
                                                                                              
                                                                                              \mathbf{else}:\\
                                                                                              \;\;\;\;\frac{x \cdot {a}^{\left(t - 1\right)}}{y}\\
                                                                                              
                                                                                              
                                                                                              \end{array}
                                                                                              \end{array}
                                                                                              
                                                                                              Derivation
                                                                                              1. Split input into 2 regimes
                                                                                              2. if b < -310 or 3200 < 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. Applied rewrites78.3%

                                                                                                    \[\leadsto \frac{x \cdot e^{\color{blue}{-b}}}{y} \]
                                                                                                  2. 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. *-commutativeN/A

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

                                                                                                      \[\leadsto \color{blue}{\frac{e^{-b}}{y} \cdot x} \]
                                                                                                    6. lower-/.f6478.3

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

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

                                                                                                  if -310 < b < 3200

                                                                                                  1. Initial program 97.5%

                                                                                                    \[\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 \frac{x \cdot \color{blue}{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}}{y} \]
                                                                                                  4. Step-by-step derivation
                                                                                                    1. Applied rewrites88.9%

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

                                                                                                      \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
                                                                                                    3. Step-by-step derivation
                                                                                                      1. Applied rewrites78.7%

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

                                                                                                        \[\leadsto \frac{x \cdot \frac{1}{a}}{y} \]
                                                                                                      3. Step-by-step derivation
                                                                                                        1. Applied rewrites45.5%

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

                                                                                                          \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
                                                                                                        3. Step-by-step derivation
                                                                                                          1. Applied rewrites78.7%

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

                                                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -310 \lor \neg \left(b \leq 3200\right):\\ \;\;\;\;\frac{e^{-b}}{y} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot {a}^{\left(t - 1\right)}}{y}\\ \end{array} \]
                                                                                                        6. Add Preprocessing

                                                                                                        Alternative 12: 75.2% accurate, 2.5× speedup?

                                                                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.65 \cdot 10^{+43} \lor \neg \left(b \leq 3200\right):\\ \;\;\;\;\frac{e^{-b}}{y} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\ \end{array} \end{array} \]
                                                                                                        (FPCore (x y z t a b)
                                                                                                         :precision binary64
                                                                                                         (if (or (<= b -1.65e+43) (not (<= b 3200.0)))
                                                                                                           (* (/ (exp (- b)) y) x)
                                                                                                           (* (/ (pow a (- t 1.0)) y) x)))
                                                                                                        double code(double x, double y, double z, double t, double a, double b) {
                                                                                                        	double tmp;
                                                                                                        	if ((b <= -1.65e+43) || !(b <= 3200.0)) {
                                                                                                        		tmp = (exp(-b) / y) * x;
                                                                                                        	} else {
                                                                                                        		tmp = (pow(a, (t - 1.0)) / y) * x;
                                                                                                        	}
                                                                                                        	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 ((b <= (-1.65d+43)) .or. (.not. (b <= 3200.0d0))) then
                                                                                                                tmp = (exp(-b) / y) * x
                                                                                                            else
                                                                                                                tmp = ((a ** (t - 1.0d0)) / y) * x
                                                                                                            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 ((b <= -1.65e+43) || !(b <= 3200.0)) {
                                                                                                        		tmp = (Math.exp(-b) / y) * x;
                                                                                                        	} else {
                                                                                                        		tmp = (Math.pow(a, (t - 1.0)) / y) * x;
                                                                                                        	}
                                                                                                        	return tmp;
                                                                                                        }
                                                                                                        
                                                                                                        def code(x, y, z, t, a, b):
                                                                                                        	tmp = 0
                                                                                                        	if (b <= -1.65e+43) or not (b <= 3200.0):
                                                                                                        		tmp = (math.exp(-b) / y) * x
                                                                                                        	else:
                                                                                                        		tmp = (math.pow(a, (t - 1.0)) / y) * x
                                                                                                        	return tmp
                                                                                                        
                                                                                                        function code(x, y, z, t, a, b)
                                                                                                        	tmp = 0.0
                                                                                                        	if ((b <= -1.65e+43) || !(b <= 3200.0))
                                                                                                        		tmp = Float64(Float64(exp(Float64(-b)) / y) * x);
                                                                                                        	else
                                                                                                        		tmp = Float64(Float64((a ^ Float64(t - 1.0)) / y) * x);
                                                                                                        	end
                                                                                                        	return tmp
                                                                                                        end
                                                                                                        
                                                                                                        function tmp_2 = code(x, y, z, t, a, b)
                                                                                                        	tmp = 0.0;
                                                                                                        	if ((b <= -1.65e+43) || ~((b <= 3200.0)))
                                                                                                        		tmp = (exp(-b) / y) * x;
                                                                                                        	else
                                                                                                        		tmp = ((a ^ (t - 1.0)) / y) * x;
                                                                                                        	end
                                                                                                        	tmp_2 = tmp;
                                                                                                        end
                                                                                                        
                                                                                                        code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.65e+43], N[Not[LessEqual[b, 3200.0]], $MachinePrecision]], N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[(N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]]
                                                                                                        
                                                                                                        \begin{array}{l}
                                                                                                        
                                                                                                        \\
                                                                                                        \begin{array}{l}
                                                                                                        \mathbf{if}\;b \leq -1.65 \cdot 10^{+43} \lor \neg \left(b \leq 3200\right):\\
                                                                                                        \;\;\;\;\frac{e^{-b}}{y} \cdot x\\
                                                                                                        
                                                                                                        \mathbf{else}:\\
                                                                                                        \;\;\;\;\frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\
                                                                                                        
                                                                                                        
                                                                                                        \end{array}
                                                                                                        \end{array}
                                                                                                        
                                                                                                        Derivation
                                                                                                        1. Split input into 2 regimes
                                                                                                        2. if b < -1.6500000000000001e43 or 3200 < 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. Applied rewrites81.1%

                                                                                                              \[\leadsto \frac{x \cdot e^{\color{blue}{-b}}}{y} \]
                                                                                                            2. 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. *-commutativeN/A

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

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

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

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

                                                                                                            if -1.6500000000000001e43 < b < 3200

                                                                                                            1. Initial program 97.6%

                                                                                                              \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
                                                                                                            2. Add Preprocessing
                                                                                                            3. Step-by-step derivation
                                                                                                              1. lift-/.f64N/A

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

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

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

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

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

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

                                                                                                              \[\leadsto \frac{\color{blue}{e^{\log a \cdot \left(t - 1\right)}}}{e^{b} \cdot y} \cdot x \]
                                                                                                            6. Step-by-step derivation
                                                                                                              1. Applied rewrites73.6%

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

                                                                                                                \[\leadsto \frac{{a}^{\left(t - 1\right)}}{\color{blue}{y}} \cdot x \]
                                                                                                              3. Step-by-step derivation
                                                                                                                1. Applied rewrites74.2%

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

                                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.65 \cdot 10^{+43} \lor \neg \left(b \leq 3200\right):\\ \;\;\;\;\frac{e^{-b}}{y} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\ \end{array} \]
                                                                                                              6. Add Preprocessing

                                                                                                              Alternative 13: 30.9% accurate, 2.7× speedup?

                                                                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -9 \cdot 10^{-91}:\\ \;\;\;\;\frac{{a}^{-1}}{y} \cdot x\\ \mathbf{else}:\\ \;\;\;\;{a}^{-1} \cdot \frac{x}{y}\\ \end{array} \end{array} \]
                                                                                                              (FPCore (x y z t a b)
                                                                                                               :precision binary64
                                                                                                               (if (<= b -9e-91) (* (/ (pow a -1.0) y) x) (* (pow a -1.0) (/ x y))))
                                                                                                              double code(double x, double y, double z, double t, double a, double b) {
                                                                                                              	double tmp;
                                                                                                              	if (b <= -9e-91) {
                                                                                                              		tmp = (pow(a, -1.0) / y) * x;
                                                                                                              	} else {
                                                                                                              		tmp = pow(a, -1.0) * (x / 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 (b <= (-9d-91)) then
                                                                                                                      tmp = ((a ** (-1.0d0)) / y) * x
                                                                                                                  else
                                                                                                                      tmp = (a ** (-1.0d0)) * (x / 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 (b <= -9e-91) {
                                                                                                              		tmp = (Math.pow(a, -1.0) / y) * x;
                                                                                                              	} else {
                                                                                                              		tmp = Math.pow(a, -1.0) * (x / y);
                                                                                                              	}
                                                                                                              	return tmp;
                                                                                                              }
                                                                                                              
                                                                                                              def code(x, y, z, t, a, b):
                                                                                                              	tmp = 0
                                                                                                              	if b <= -9e-91:
                                                                                                              		tmp = (math.pow(a, -1.0) / y) * x
                                                                                                              	else:
                                                                                                              		tmp = math.pow(a, -1.0) * (x / y)
                                                                                                              	return tmp
                                                                                                              
                                                                                                              function code(x, y, z, t, a, b)
                                                                                                              	tmp = 0.0
                                                                                                              	if (b <= -9e-91)
                                                                                                              		tmp = Float64(Float64((a ^ -1.0) / y) * x);
                                                                                                              	else
                                                                                                              		tmp = Float64((a ^ -1.0) * Float64(x / y));
                                                                                                              	end
                                                                                                              	return tmp
                                                                                                              end
                                                                                                              
                                                                                                              function tmp_2 = code(x, y, z, t, a, b)
                                                                                                              	tmp = 0.0;
                                                                                                              	if (b <= -9e-91)
                                                                                                              		tmp = ((a ^ -1.0) / y) * x;
                                                                                                              	else
                                                                                                              		tmp = (a ^ -1.0) * (x / y);
                                                                                                              	end
                                                                                                              	tmp_2 = tmp;
                                                                                                              end
                                                                                                              
                                                                                                              code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -9e-91], N[(N[(N[Power[a, -1.0], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision], N[(N[Power[a, -1.0], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]
                                                                                                              
                                                                                                              \begin{array}{l}
                                                                                                              
                                                                                                              \\
                                                                                                              \begin{array}{l}
                                                                                                              \mathbf{if}\;b \leq -9 \cdot 10^{-91}:\\
                                                                                                              \;\;\;\;\frac{{a}^{-1}}{y} \cdot x\\
                                                                                                              
                                                                                                              \mathbf{else}:\\
                                                                                                              \;\;\;\;{a}^{-1} \cdot \frac{x}{y}\\
                                                                                                              
                                                                                                              
                                                                                                              \end{array}
                                                                                                              \end{array}
                                                                                                              
                                                                                                              Derivation
                                                                                                              1. Split input into 2 regimes
                                                                                                              2. if b < -8.99999999999999952e-91

                                                                                                                1. Initial program 99.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 \frac{x \cdot \color{blue}{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}}{y} \]
                                                                                                                4. Step-by-step derivation
                                                                                                                  1. Applied rewrites65.3%

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

                                                                                                                    \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
                                                                                                                  3. Step-by-step derivation
                                                                                                                    1. Applied rewrites52.1%

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

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

                                                                                                                        \[\leadsto \frac{x \cdot \frac{1}{a}}{y} \]
                                                                                                                      2. Step-by-step derivation
                                                                                                                        1. lift-/.f64N/A

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

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

                                                                                                                          \[\leadsto \color{blue}{x \cdot \frac{\frac{1}{a}}{y}} \]
                                                                                                                        4. *-commutativeN/A

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

                                                                                                                          \[\leadsto \color{blue}{\frac{\frac{1}{a}}{y} \cdot x} \]
                                                                                                                      3. Applied rewrites39.9%

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

                                                                                                                      if -8.99999999999999952e-91 < b

                                                                                                                      1. Initial program 98.5%

                                                                                                                        \[\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 \frac{x \cdot \color{blue}{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}}{y} \]
                                                                                                                      4. Step-by-step derivation
                                                                                                                        1. Applied rewrites73.5%

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

                                                                                                                          \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
                                                                                                                        3. Step-by-step derivation
                                                                                                                          1. Applied rewrites69.6%

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

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

                                                                                                                              \[\leadsto \frac{x \cdot \frac{1}{a}}{y} \]
                                                                                                                            2. Step-by-step derivation
                                                                                                                              1. lift-/.f64N/A

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

                                                                                                                                \[\leadsto \frac{\color{blue}{x \cdot \frac{1}{a}}}{y} \]
                                                                                                                              3. *-commutativeN/A

                                                                                                                                \[\leadsto \frac{\color{blue}{\frac{1}{a} \cdot x}}{y} \]
                                                                                                                              4. associate-/l*N/A

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

                                                                                                                                \[\leadsto \color{blue}{\frac{1}{a} \cdot \frac{x}{y}} \]
                                                                                                                            3. Applied rewrites36.7%

                                                                                                                              \[\leadsto \color{blue}{{a}^{-1} \cdot \frac{x}{y}} \]
                                                                                                                          4. Recombined 2 regimes into one program.
                                                                                                                          5. Add Preprocessing

                                                                                                                          Alternative 14: 31.6% accurate, 2.7× speedup?

                                                                                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.75 \cdot 10^{-247}:\\ \;\;\;\;\frac{x \cdot \frac{1}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;{a}^{-1} \cdot \frac{x}{y}\\ \end{array} \end{array} \]
                                                                                                                          (FPCore (x y z t a b)
                                                                                                                           :precision binary64
                                                                                                                           (if (<= t -2.75e-247) (/ (* x (/ 1.0 a)) y) (* (pow a -1.0) (/ x y))))
                                                                                                                          double code(double x, double y, double z, double t, double a, double b) {
                                                                                                                          	double tmp;
                                                                                                                          	if (t <= -2.75e-247) {
                                                                                                                          		tmp = (x * (1.0 / a)) / y;
                                                                                                                          	} else {
                                                                                                                          		tmp = pow(a, -1.0) * (x / 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 (t <= (-2.75d-247)) then
                                                                                                                                  tmp = (x * (1.0d0 / a)) / y
                                                                                                                              else
                                                                                                                                  tmp = (a ** (-1.0d0)) * (x / 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 (t <= -2.75e-247) {
                                                                                                                          		tmp = (x * (1.0 / a)) / y;
                                                                                                                          	} else {
                                                                                                                          		tmp = Math.pow(a, -1.0) * (x / y);
                                                                                                                          	}
                                                                                                                          	return tmp;
                                                                                                                          }
                                                                                                                          
                                                                                                                          def code(x, y, z, t, a, b):
                                                                                                                          	tmp = 0
                                                                                                                          	if t <= -2.75e-247:
                                                                                                                          		tmp = (x * (1.0 / a)) / y
                                                                                                                          	else:
                                                                                                                          		tmp = math.pow(a, -1.0) * (x / y)
                                                                                                                          	return tmp
                                                                                                                          
                                                                                                                          function code(x, y, z, t, a, b)
                                                                                                                          	tmp = 0.0
                                                                                                                          	if (t <= -2.75e-247)
                                                                                                                          		tmp = Float64(Float64(x * Float64(1.0 / a)) / y);
                                                                                                                          	else
                                                                                                                          		tmp = Float64((a ^ -1.0) * Float64(x / y));
                                                                                                                          	end
                                                                                                                          	return tmp
                                                                                                                          end
                                                                                                                          
                                                                                                                          function tmp_2 = code(x, y, z, t, a, b)
                                                                                                                          	tmp = 0.0;
                                                                                                                          	if (t <= -2.75e-247)
                                                                                                                          		tmp = (x * (1.0 / a)) / y;
                                                                                                                          	else
                                                                                                                          		tmp = (a ^ -1.0) * (x / y);
                                                                                                                          	end
                                                                                                                          	tmp_2 = tmp;
                                                                                                                          end
                                                                                                                          
                                                                                                                          code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.75e-247], N[(N[(x * N[(1.0 / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[Power[a, -1.0], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]
                                                                                                                          
                                                                                                                          \begin{array}{l}
                                                                                                                          
                                                                                                                          \\
                                                                                                                          \begin{array}{l}
                                                                                                                          \mathbf{if}\;t \leq -2.75 \cdot 10^{-247}:\\
                                                                                                                          \;\;\;\;\frac{x \cdot \frac{1}{a}}{y}\\
                                                                                                                          
                                                                                                                          \mathbf{else}:\\
                                                                                                                          \;\;\;\;{a}^{-1} \cdot \frac{x}{y}\\
                                                                                                                          
                                                                                                                          
                                                                                                                          \end{array}
                                                                                                                          \end{array}
                                                                                                                          
                                                                                                                          Derivation
                                                                                                                          1. Split input into 2 regimes
                                                                                                                          2. if t < -2.74999999999999997e-247

                                                                                                                            1. Initial program 99.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 \frac{x \cdot \color{blue}{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}}{y} \]
                                                                                                                            4. Step-by-step derivation
                                                                                                                              1. Applied rewrites69.8%

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

                                                                                                                                \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
                                                                                                                              3. Step-by-step derivation
                                                                                                                                1. Applied rewrites66.8%

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

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

                                                                                                                                    \[\leadsto \frac{x \cdot \frac{1}{a}}{y} \]

                                                                                                                                  if -2.74999999999999997e-247 < t

                                                                                                                                  1. Initial program 98.5%

                                                                                                                                    \[\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 \frac{x \cdot \color{blue}{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}}{y} \]
                                                                                                                                  4. Step-by-step derivation
                                                                                                                                    1. Applied rewrites72.0%

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

                                                                                                                                      \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
                                                                                                                                    3. Step-by-step derivation
                                                                                                                                      1. Applied rewrites62.2%

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

                                                                                                                                        \[\leadsto \frac{x \cdot \frac{1}{a}}{y} \]
                                                                                                                                      3. Step-by-step derivation
                                                                                                                                        1. Applied rewrites30.8%

                                                                                                                                          \[\leadsto \frac{x \cdot \frac{1}{a}}{y} \]
                                                                                                                                        2. Step-by-step derivation
                                                                                                                                          1. lift-/.f64N/A

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

                                                                                                                                            \[\leadsto \frac{\color{blue}{x \cdot \frac{1}{a}}}{y} \]
                                                                                                                                          3. *-commutativeN/A

                                                                                                                                            \[\leadsto \frac{\color{blue}{\frac{1}{a} \cdot x}}{y} \]
                                                                                                                                          4. associate-/l*N/A

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

                                                                                                                                            \[\leadsto \color{blue}{\frac{1}{a} \cdot \frac{x}{y}} \]
                                                                                                                                        3. Applied rewrites35.4%

                                                                                                                                          \[\leadsto \color{blue}{{a}^{-1} \cdot \frac{x}{y}} \]
                                                                                                                                      4. Recombined 2 regimes into one program.
                                                                                                                                      5. Add Preprocessing

                                                                                                                                      Alternative 15: 30.8% accurate, 12.0× speedup?

                                                                                                                                      \[\begin{array}{l} \\ \frac{x \cdot \frac{1}{a}}{y} \end{array} \]
                                                                                                                                      (FPCore (x y z t a b) :precision binary64 (/ (* x (/ 1.0 a)) y))
                                                                                                                                      double code(double x, double y, double z, double t, double a, double b) {
                                                                                                                                      	return (x * (1.0 / 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 * (1.0d0 / a)) / y
                                                                                                                                      end function
                                                                                                                                      
                                                                                                                                      public static double code(double x, double y, double z, double t, double a, double b) {
                                                                                                                                      	return (x * (1.0 / a)) / y;
                                                                                                                                      }
                                                                                                                                      
                                                                                                                                      def code(x, y, z, t, a, b):
                                                                                                                                      	return (x * (1.0 / a)) / y
                                                                                                                                      
                                                                                                                                      function code(x, y, z, t, a, b)
                                                                                                                                      	return Float64(Float64(x * Float64(1.0 / a)) / y)
                                                                                                                                      end
                                                                                                                                      
                                                                                                                                      function tmp = code(x, y, z, t, a, b)
                                                                                                                                      	tmp = (x * (1.0 / a)) / y;
                                                                                                                                      end
                                                                                                                                      
                                                                                                                                      code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[(1.0 / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
                                                                                                                                      
                                                                                                                                      \begin{array}{l}
                                                                                                                                      
                                                                                                                                      \\
                                                                                                                                      \frac{x \cdot \frac{1}{a}}{y}
                                                                                                                                      \end{array}
                                                                                                                                      
                                                                                                                                      Derivation
                                                                                                                                      1. Initial program 98.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 \frac{x \cdot \color{blue}{e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}}{y} \]
                                                                                                                                      4. Step-by-step derivation
                                                                                                                                        1. Applied rewrites71.0%

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

                                                                                                                                          \[\leadsto \frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y} \]
                                                                                                                                        3. Step-by-step derivation
                                                                                                                                          1. Applied rewrites64.2%

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

                                                                                                                                            \[\leadsto \frac{x \cdot \frac{1}{a}}{y} \]
                                                                                                                                          3. Step-by-step derivation
                                                                                                                                            1. Applied rewrites34.8%

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

                                                                                                                                            Developer Target 1: 71.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 2025018 
                                                                                                                                            (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))