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

Percentage Accurate: 98.5% → 98.5%
Time: 10.1s
Alternatives: 14
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 14 alternatives:

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

Initial Program: 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: 92.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -6.8 \cdot 10^{+21} \lor \neg \left(t \leq 14.5\right):\\ \;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot e^{\mathsf{fma}\left(\log z, y, -\log a\right) - b}}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= t -6.8e+21) (not (<= t 14.5)))
   (/ (* x (exp (- (* (log a) t) b))) y)
   (/ (* x (exp (- (fma (log z) y (- (log a))) b))) y)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -6.8e+21) || !(t <= 14.5)) {
		tmp = (x * exp(((log(a) * t) - b))) / y;
	} else {
		tmp = (x * exp((fma(log(z), y, -log(a)) - b))) / y;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((t <= -6.8e+21) || !(t <= 14.5))
		tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y);
	else
		tmp = Float64(Float64(x * exp(Float64(fma(log(z), y, Float64(-log(a))) - b))) / y);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -6.8e+21], N[Not[LessEqual[t, 14.5]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(x * N[Exp[N[(N[(N[Log[z], $MachinePrecision] * y + (-N[Log[a], $MachinePrecision])), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{+21} \lor \neg \left(t \leq 14.5\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\

\mathbf{else}:\\
\;\;\;\;\frac{x \cdot e^{\mathsf{fma}\left(\log z, y, -\log a\right) - b}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.8e21 or 14.5 < t

    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 t around inf

      \[\leadsto \frac{x \cdot e^{\color{blue}{t \cdot \log a} - b}}{y} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \frac{x \cdot e^{\color{blue}{\log a \cdot t} - b}}{y} \]
      3. lower-log.f6494.4

        \[\leadsto \frac{x \cdot e^{\color{blue}{\log a} \cdot t - b}}{y} \]
    5. Applied rewrites94.4%

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

    if -6.8e21 < t < 14.5

    1. Initial program 97.4%

      \[\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 t around 0

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

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

        \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z + \color{blue}{\log a \cdot -1}\right) - b}}{y} \]
      3. fp-cancel-sign-sub-invN/A

        \[\leadsto \frac{x \cdot e^{\color{blue}{\left(y \cdot \log z - \left(\mathsf{neg}\left(\log a\right)\right) \cdot -1\right)} - b}}{y} \]
      4. distribute-lft-neg-inN/A

        \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z - \color{blue}{\left(\mathsf{neg}\left(\log a \cdot -1\right)\right)}\right) - b}}{y} \]
      5. distribute-rgt-neg-outN/A

        \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z - \color{blue}{\log a \cdot \left(\mathsf{neg}\left(-1\right)\right)}\right) - b}}{y} \]
      6. metadata-evalN/A

        \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z - \log a \cdot \color{blue}{1}\right) - b}}{y} \]
      7. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \frac{x \cdot e^{\left(\color{blue}{\log z \cdot y} + \left(\mathsf{neg}\left(\log a\right)\right) \cdot 1\right) - b}}{y} \]
      9. distribute-lft-neg-inN/A

        \[\leadsto \frac{x \cdot e^{\left(\log z \cdot y + \color{blue}{\left(\mathsf{neg}\left(\log a \cdot 1\right)\right)}\right) - b}}{y} \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \frac{x \cdot e^{\left(\log z \cdot y + \color{blue}{\log a \cdot \left(\mathsf{neg}\left(1\right)\right)}\right) - b}}{y} \]
      11. metadata-evalN/A

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

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

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

        \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\color{blue}{\log z}, y, -1 \cdot \log a\right) - b}}{y} \]
      15. mul-1-negN/A

        \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log z, y, \color{blue}{\mathsf{neg}\left(\log a\right)}\right) - b}}{y} \]
      16. lower-neg.f64N/A

        \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log z, y, \color{blue}{-\log a}\right) - b}}{y} \]
      17. lower-log.f6497.4

        \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log z, y, -\color{blue}{\log a}\right) - b}}{y} \]
    5. Applied rewrites97.4%

      \[\leadsto \frac{x \cdot e^{\color{blue}{\mathsf{fma}\left(\log z, y, -\log a\right)} - b}}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification96.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.8 \cdot 10^{+21} \lor \neg \left(t \leq 14.5\right):\\ \;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot e^{\mathsf{fma}\left(\log z, y, -\log a\right) - b}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 85.5% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -3 \cdot 10^{+76} \lor \neg \left(b \leq 6 \cdot 10^{+40}\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\

\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left({a}^{\left(t - 1\right)} \cdot {z}^{y}\right)}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.9999999999999998e76 or 6.0000000000000004e40 < 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 t around inf

      \[\leadsto \frac{x \cdot e^{\color{blue}{t \cdot \log a} - b}}{y} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \frac{x \cdot e^{\color{blue}{\log a \cdot t} - b}}{y} \]
      3. lower-log.f6493.7

        \[\leadsto \frac{x \cdot e^{\color{blue}{\log a} \cdot t - b}}{y} \]
    5. Applied rewrites93.7%

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

    if -2.9999999999999998e76 < b < 6.0000000000000004e40

    1. Initial program 97.7%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Add Preprocessing
    3. Taylor expanded in 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 81.2% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.4 \cdot 10^{+33} \lor \neg \left(b \leq 7.5 \cdot 10^{-64}\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\

\mathbf{else}:\\
\;\;\;\;\left({a}^{\left(t - 1\right)} \cdot {z}^{y}\right) \cdot \frac{x}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -7.3999999999999997e33 or 7.49999999999999949e-64 < 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 t around inf

      \[\leadsto \frac{x \cdot e^{\color{blue}{t \cdot \log a} - b}}{y} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \frac{x \cdot e^{\color{blue}{\log a \cdot t} - b}}{y} \]
      3. lower-log.f6490.2

        \[\leadsto \frac{x \cdot e^{\color{blue}{\log a} \cdot t - b}}{y} \]
    5. Applied rewrites90.2%

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

    if -7.3999999999999997e33 < b < 7.49999999999999949e-64

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left({a}^{\left(t - 1\right)} \cdot \color{blue}{{z}^{y}}\right) \cdot \frac{x}{y} \]
      13. lower-/.f6486.4

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

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

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

Alternative 5: 79.9% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.16 \cdot 10^{-18} \lor \neg \left(t \leq 4.2 \cdot 10^{-17}\right):\\ \;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{{z}^{y} \cdot x}{y}}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= t -1.16e-18) (not (<= t 4.2e-17)))
   (/ (* x (exp (- (* (log a) t) b))) y)
   (/ (/ (* (pow z y) x) y) a)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -1.16e-18) || !(t <= 4.2e-17)) {
		tmp = (x * exp(((log(a) * t) - b))) / y;
	} else {
		tmp = ((pow(z, y) * x) / y) / a;
	}
	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.16d-18)) .or. (.not. (t <= 4.2d-17))) then
        tmp = (x * exp(((log(a) * t) - b))) / y
    else
        tmp = (((z ** y) * x) / y) / a
    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.16e-18) || !(t <= 4.2e-17)) {
		tmp = (x * Math.exp(((Math.log(a) * t) - b))) / y;
	} else {
		tmp = ((Math.pow(z, y) * x) / y) / a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (t <= -1.16e-18) or not (t <= 4.2e-17):
		tmp = (x * math.exp(((math.log(a) * t) - b))) / y
	else:
		tmp = ((math.pow(z, y) * x) / y) / a
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((t <= -1.16e-18) || !(t <= 4.2e-17))
		tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * t) - b))) / y);
	else
		tmp = Float64(Float64(Float64((z ^ y) * x) / y) / a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((t <= -1.16e-18) || ~((t <= 4.2e-17)))
		tmp = (x * exp(((log(a) * t) - b))) / y;
	else
		tmp = (((z ^ y) * x) / y) / a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.16e-18], N[Not[LessEqual[t, 4.2e-17]], $MachinePrecision]], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.16 \cdot 10^{-18} \lor \neg \left(t \leq 4.2 \cdot 10^{-17}\right):\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{{z}^{y} \cdot x}{y}}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.16e-18 or 4.19999999999999984e-17 < t

    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 t around inf

      \[\leadsto \frac{x \cdot e^{\color{blue}{t \cdot \log a} - b}}{y} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \frac{x \cdot e^{\color{blue}{\log a \cdot t} - b}}{y} \]
      3. lower-log.f6494.1

        \[\leadsto \frac{x \cdot e^{\color{blue}{\log a} \cdot t - b}}{y} \]
    5. Applied rewrites94.1%

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

    if -1.16e-18 < t < 4.19999999999999984e-17

    1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left({a}^{\left(t - 1\right)} \cdot \color{blue}{{z}^{y}}\right) \cdot \frac{x}{y} \]
      13. lower-/.f6477.7

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

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

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

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

          \[\leadsto \frac{\frac{{z}^{y} \cdot x}{y}}{\color{blue}{a}} \]
      4. Recombined 2 regimes into one program.
      5. Final simplification87.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.16 \cdot 10^{-18} \lor \neg \left(t \leq 4.2 \cdot 10^{-17}\right):\\ \;\;\;\;\frac{x \cdot e^{\log a \cdot t - b}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{{z}^{y} \cdot x}{y}}{a}\\ \end{array} \]
      6. Add Preprocessing

      Alternative 6: 75.3% accurate, 2.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := {a}^{\left(t - 1\right)}\\ \mathbf{if}\;t \leq -0.0072:\\ \;\;\;\;\frac{t\_1}{y} \cdot x\\ \mathbf{elif}\;t \leq 5.1 \cdot 10^{-17}:\\ \;\;\;\;\frac{\frac{{z}^{y} \cdot x}{y}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot t\_1}{y}\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (pow a (- t 1.0))))
         (if (<= t -0.0072)
           (* (/ t_1 y) x)
           (if (<= t 5.1e-17) (/ (/ (* (pow z y) x) y) a) (/ (* x t_1) y)))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = pow(a, (t - 1.0));
      	double tmp;
      	if (t <= -0.0072) {
      		tmp = (t_1 / y) * x;
      	} else if (t <= 5.1e-17) {
      		tmp = ((pow(z, y) * x) / y) / a;
      	} else {
      		tmp = (x * t_1) / 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) :: t_1
          real(8) :: tmp
          t_1 = a ** (t - 1.0d0)
          if (t <= (-0.0072d0)) then
              tmp = (t_1 / y) * x
          else if (t <= 5.1d-17) then
              tmp = (((z ** y) * x) / y) / a
          else
              tmp = (x * t_1) / y
          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 tmp;
      	if (t <= -0.0072) {
      		tmp = (t_1 / y) * x;
      	} else if (t <= 5.1e-17) {
      		tmp = ((Math.pow(z, y) * x) / y) / a;
      	} else {
      		tmp = (x * t_1) / y;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = math.pow(a, (t - 1.0))
      	tmp = 0
      	if t <= -0.0072:
      		tmp = (t_1 / y) * x
      	elif t <= 5.1e-17:
      		tmp = ((math.pow(z, y) * x) / y) / a
      	else:
      		tmp = (x * t_1) / y
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = a ^ Float64(t - 1.0)
      	tmp = 0.0
      	if (t <= -0.0072)
      		tmp = Float64(Float64(t_1 / y) * x);
      	elseif (t <= 5.1e-17)
      		tmp = Float64(Float64(Float64((z ^ y) * x) / y) / a);
      	else
      		tmp = Float64(Float64(x * t_1) / y);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = a ^ (t - 1.0);
      	tmp = 0.0;
      	if (t <= -0.0072)
      		tmp = (t_1 / y) * x;
      	elseif (t <= 5.1e-17)
      		tmp = (((z ^ y) * x) / y) / a;
      	else
      		tmp = (x * t_1) / y;
      	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]}, If[LessEqual[t, -0.0072], N[(N[(t$95$1 / y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 5.1e-17], N[(N[(N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision] / a), $MachinePrecision], N[(N[(x * t$95$1), $MachinePrecision] / y), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := {a}^{\left(t - 1\right)}\\
      \mathbf{if}\;t \leq -0.0072:\\
      \;\;\;\;\frac{t\_1}{y} \cdot x\\
      
      \mathbf{elif}\;t \leq 5.1 \cdot 10^{-17}:\\
      \;\;\;\;\frac{\frac{{z}^{y} \cdot x}{y}}{a}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{x \cdot t\_1}{y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if t < -0.0071999999999999998

        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. +-commutativeN/A

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

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

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

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

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

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

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

            \[\leadsto \frac{x \cdot \left({a}^{\left(t - 1\right)} \cdot \color{blue}{{z}^{y}}\right)}{y} \]
          9. lower-pow.f6474.4

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{{a}^{\left(t - 1\right)}}{y} \cdot x} \]
            6. lower-/.f6487.3

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

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

          if -0.0071999999999999998 < t < 5.1000000000000003e-17

          1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left({a}^{\left(t - 1\right)} \cdot \color{blue}{{z}^{y}}\right) \cdot \frac{x}{y} \]
            13. lower-/.f6476.9

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

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

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

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

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

              if 5.1000000000000003e-17 < t

              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. +-commutativeN/A

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

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

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

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

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

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

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

                  \[\leadsto \frac{x \cdot \left({a}^{\left(t - 1\right)} \cdot \color{blue}{{z}^{y}}\right)}{y} \]
                9. lower-pow.f6471.4

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

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

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

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

              Alternative 7: 72.7% accurate, 2.4× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := {a}^{\left(t - 1\right)}\\ \mathbf{if}\;t \leq -0.0072:\\ \;\;\;\;\frac{t\_1}{y} \cdot x\\ \mathbf{elif}\;t \leq 5.1 \cdot 10^{-17}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{{z}^{y}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot t\_1}{y}\\ \end{array} \end{array} \]
              (FPCore (x y z t a b)
               :precision binary64
               (let* ((t_1 (pow a (- t 1.0))))
                 (if (<= t -0.0072)
                   (* (/ t_1 y) x)
                   (if (<= t 5.1e-17) (* (/ x y) (/ (pow z y) a)) (/ (* x t_1) y)))))
              double code(double x, double y, double z, double t, double a, double b) {
              	double t_1 = pow(a, (t - 1.0));
              	double tmp;
              	if (t <= -0.0072) {
              		tmp = (t_1 / y) * x;
              	} else if (t <= 5.1e-17) {
              		tmp = (x / y) * (pow(z, y) / a);
              	} else {
              		tmp = (x * t_1) / 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) :: t_1
                  real(8) :: tmp
                  t_1 = a ** (t - 1.0d0)
                  if (t <= (-0.0072d0)) then
                      tmp = (t_1 / y) * x
                  else if (t <= 5.1d-17) then
                      tmp = (x / y) * ((z ** y) / a)
                  else
                      tmp = (x * t_1) / y
                  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 tmp;
              	if (t <= -0.0072) {
              		tmp = (t_1 / y) * x;
              	} else if (t <= 5.1e-17) {
              		tmp = (x / y) * (Math.pow(z, y) / a);
              	} else {
              		tmp = (x * t_1) / y;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b):
              	t_1 = math.pow(a, (t - 1.0))
              	tmp = 0
              	if t <= -0.0072:
              		tmp = (t_1 / y) * x
              	elif t <= 5.1e-17:
              		tmp = (x / y) * (math.pow(z, y) / a)
              	else:
              		tmp = (x * t_1) / y
              	return tmp
              
              function code(x, y, z, t, a, b)
              	t_1 = a ^ Float64(t - 1.0)
              	tmp = 0.0
              	if (t <= -0.0072)
              		tmp = Float64(Float64(t_1 / y) * x);
              	elseif (t <= 5.1e-17)
              		tmp = Float64(Float64(x / y) * Float64((z ^ y) / a));
              	else
              		tmp = Float64(Float64(x * t_1) / y);
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b)
              	t_1 = a ^ (t - 1.0);
              	tmp = 0.0;
              	if (t <= -0.0072)
              		tmp = (t_1 / y) * x;
              	elseif (t <= 5.1e-17)
              		tmp = (x / y) * ((z ^ y) / a);
              	else
              		tmp = (x * t_1) / y;
              	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]}, If[LessEqual[t, -0.0072], N[(N[(t$95$1 / y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 5.1e-17], N[(N[(x / y), $MachinePrecision] * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(x * t$95$1), $MachinePrecision] / y), $MachinePrecision]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := {a}^{\left(t - 1\right)}\\
              \mathbf{if}\;t \leq -0.0072:\\
              \;\;\;\;\frac{t\_1}{y} \cdot x\\
              
              \mathbf{elif}\;t \leq 5.1 \cdot 10^{-17}:\\
              \;\;\;\;\frac{x}{y} \cdot \frac{{z}^{y}}{a}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{x \cdot t\_1}{y}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if t < -0.0071999999999999998

                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. +-commutativeN/A

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

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

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

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

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

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

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

                    \[\leadsto \frac{x \cdot \left({a}^{\left(t - 1\right)} \cdot \color{blue}{{z}^{y}}\right)}{y} \]
                  9. lower-pow.f6474.4

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{{a}^{\left(t - 1\right)}}{y} \cdot x} \]
                    6. lower-/.f6487.3

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

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

                  if -0.0071999999999999998 < t < 5.1000000000000003e-17

                  1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left({a}^{\left(t - 1\right)} \cdot \color{blue}{{z}^{y}}\right) \cdot \frac{x}{y} \]
                    13. lower-/.f6476.9

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

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

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

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

                    if 5.1000000000000003e-17 < t

                    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. +-commutativeN/A

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

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

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

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

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

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

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

                        \[\leadsto \frac{x \cdot \left({a}^{\left(t - 1\right)} \cdot \color{blue}{{z}^{y}}\right)}{y} \]
                      9. lower-pow.f6471.4

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

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

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -0.0072:\\ \;\;\;\;\frac{{a}^{\left(t - 1\right)}}{y} \cdot x\\ \mathbf{elif}\;t \leq 5.1 \cdot 10^{-17}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{{z}^{y}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot {a}^{\left(t - 1\right)}}{y}\\ \end{array} \]
                    10. Add Preprocessing

                    Alternative 8: 74.0% accurate, 2.4× speedup?

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

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

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

                          \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z + \color{blue}{\log a \cdot -1}\right) - b}}{y} \]
                        3. fp-cancel-sign-sub-invN/A

                          \[\leadsto \frac{x \cdot e^{\color{blue}{\left(y \cdot \log z - \left(\mathsf{neg}\left(\log a\right)\right) \cdot -1\right)} - b}}{y} \]
                        4. distribute-lft-neg-inN/A

                          \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z - \color{blue}{\left(\mathsf{neg}\left(\log a \cdot -1\right)\right)}\right) - b}}{y} \]
                        5. distribute-rgt-neg-outN/A

                          \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z - \color{blue}{\log a \cdot \left(\mathsf{neg}\left(-1\right)\right)}\right) - b}}{y} \]
                        6. metadata-evalN/A

                          \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z - \log a \cdot \color{blue}{1}\right) - b}}{y} \]
                        7. fp-cancel-sub-sign-invN/A

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

                          \[\leadsto \frac{x \cdot e^{\left(\color{blue}{\log z \cdot y} + \left(\mathsf{neg}\left(\log a\right)\right) \cdot 1\right) - b}}{y} \]
                        9. distribute-lft-neg-inN/A

                          \[\leadsto \frac{x \cdot e^{\left(\log z \cdot y + \color{blue}{\left(\mathsf{neg}\left(\log a \cdot 1\right)\right)}\right) - b}}{y} \]
                        10. distribute-rgt-neg-inN/A

                          \[\leadsto \frac{x \cdot e^{\left(\log z \cdot y + \color{blue}{\log a \cdot \left(\mathsf{neg}\left(1\right)\right)}\right) - b}}{y} \]
                        11. metadata-evalN/A

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

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

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

                          \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\color{blue}{\log z}, y, -1 \cdot \log a\right) - b}}{y} \]
                        15. mul-1-negN/A

                          \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log z, y, \color{blue}{\mathsf{neg}\left(\log a\right)}\right) - b}}{y} \]
                        16. lower-neg.f64N/A

                          \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log z, y, \color{blue}{-\log a}\right) - b}}{y} \]
                        17. lower-log.f6495.4

                          \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log z, y, -\color{blue}{\log a}\right) - b}}{y} \]
                      5. Applied rewrites95.4%

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

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

                          \[\leadsto \frac{x \cdot e^{\color{blue}{\mathsf{neg}\left(b\right)}}}{y} \]
                        2. lower-neg.f6489.1

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

                        \[\leadsto \frac{x \cdot e^{\color{blue}{-b}}}{y} \]
                      9. 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-/.f6489.1

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

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

                      if -3.89999999999999989e76 < b < 8.19999999999999999e46

                      1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 9: 74.0% accurate, 2.5× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.9 \cdot 10^{+76} \lor \neg \left(b \leq 8.2 \cdot 10^{+46}\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 -3.9e+76) (not (<= b 8.2e+46)))
                           (* (/ (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 <= -3.9e+76) || !(b <= 8.2e+46)) {
                        		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 <= (-3.9d+76)) .or. (.not. (b <= 8.2d+46))) 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 <= -3.9e+76) || !(b <= 8.2e+46)) {
                        		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 <= -3.9e+76) or not (b <= 8.2e+46):
                        		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 <= -3.9e+76) || !(b <= 8.2e+46))
                        		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 <= -3.9e+76) || ~((b <= 8.2e+46)))
                        		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, -3.9e+76], N[Not[LessEqual[b, 8.2e+46]], $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 -3.9 \cdot 10^{+76} \lor \neg \left(b \leq 8.2 \cdot 10^{+46}\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 < -3.89999999999999989e76 or 8.19999999999999999e46 < 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 t around 0

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

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

                              \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z + \color{blue}{\log a \cdot -1}\right) - b}}{y} \]
                            3. fp-cancel-sign-sub-invN/A

                              \[\leadsto \frac{x \cdot e^{\color{blue}{\left(y \cdot \log z - \left(\mathsf{neg}\left(\log a\right)\right) \cdot -1\right)} - b}}{y} \]
                            4. distribute-lft-neg-inN/A

                              \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z - \color{blue}{\left(\mathsf{neg}\left(\log a \cdot -1\right)\right)}\right) - b}}{y} \]
                            5. distribute-rgt-neg-outN/A

                              \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z - \color{blue}{\log a \cdot \left(\mathsf{neg}\left(-1\right)\right)}\right) - b}}{y} \]
                            6. metadata-evalN/A

                              \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z - \log a \cdot \color{blue}{1}\right) - b}}{y} \]
                            7. fp-cancel-sub-sign-invN/A

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

                              \[\leadsto \frac{x \cdot e^{\left(\color{blue}{\log z \cdot y} + \left(\mathsf{neg}\left(\log a\right)\right) \cdot 1\right) - b}}{y} \]
                            9. distribute-lft-neg-inN/A

                              \[\leadsto \frac{x \cdot e^{\left(\log z \cdot y + \color{blue}{\left(\mathsf{neg}\left(\log a \cdot 1\right)\right)}\right) - b}}{y} \]
                            10. distribute-rgt-neg-inN/A

                              \[\leadsto \frac{x \cdot e^{\left(\log z \cdot y + \color{blue}{\log a \cdot \left(\mathsf{neg}\left(1\right)\right)}\right) - b}}{y} \]
                            11. metadata-evalN/A

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

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

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

                              \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\color{blue}{\log z}, y, -1 \cdot \log a\right) - b}}{y} \]
                            15. mul-1-negN/A

                              \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log z, y, \color{blue}{\mathsf{neg}\left(\log a\right)}\right) - b}}{y} \]
                            16. lower-neg.f64N/A

                              \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log z, y, \color{blue}{-\log a}\right) - b}}{y} \]
                            17. lower-log.f6495.4

                              \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log z, y, -\color{blue}{\log a}\right) - b}}{y} \]
                          5. Applied rewrites95.4%

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

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

                              \[\leadsto \frac{x \cdot e^{\color{blue}{\mathsf{neg}\left(b\right)}}}{y} \]
                            2. lower-neg.f6489.1

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

                            \[\leadsto \frac{x \cdot e^{\color{blue}{-b}}}{y} \]
                          9. 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-/.f6489.1

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

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

                          if -3.89999999999999989e76 < b < 8.19999999999999999e46

                          1. Initial program 97.7%

                            \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
                          2. Add Preprocessing
                          3. Taylor expanded in 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. +-commutativeN/A

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

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

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

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

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

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

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

                              \[\leadsto \frac{x \cdot \left({a}^{\left(t - 1\right)} \cdot \color{blue}{{z}^{y}}\right)}{y} \]
                            9. lower-pow.f6489.2

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

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

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

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

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

                          Alternative 10: 73.7% accurate, 2.5× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -2.1 \cdot 10^{+64} \lor \neg \left(b \leq 4.2 \cdot 10^{+73}\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 -2.1e+64) (not (<= b 4.2e+73)))
                             (* (/ (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 <= -2.1e+64) || !(b <= 4.2e+73)) {
                          		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 <= (-2.1d+64)) .or. (.not. (b <= 4.2d+73))) 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 <= -2.1e+64) || !(b <= 4.2e+73)) {
                          		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 <= -2.1e+64) or not (b <= 4.2e+73):
                          		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 <= -2.1e+64) || !(b <= 4.2e+73))
                          		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 <= -2.1e+64) || ~((b <= 4.2e+73)))
                          		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, -2.1e+64], N[Not[LessEqual[b, 4.2e+73]], $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 -2.1 \cdot 10^{+64} \lor \neg \left(b \leq 4.2 \cdot 10^{+73}\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 < -2.1e64 or 4.2000000000000003e73 < 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 t around 0

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

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

                                \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z + \color{blue}{\log a \cdot -1}\right) - b}}{y} \]
                              3. fp-cancel-sign-sub-invN/A

                                \[\leadsto \frac{x \cdot e^{\color{blue}{\left(y \cdot \log z - \left(\mathsf{neg}\left(\log a\right)\right) \cdot -1\right)} - b}}{y} \]
                              4. distribute-lft-neg-inN/A

                                \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z - \color{blue}{\left(\mathsf{neg}\left(\log a \cdot -1\right)\right)}\right) - b}}{y} \]
                              5. distribute-rgt-neg-outN/A

                                \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z - \color{blue}{\log a \cdot \left(\mathsf{neg}\left(-1\right)\right)}\right) - b}}{y} \]
                              6. metadata-evalN/A

                                \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z - \log a \cdot \color{blue}{1}\right) - b}}{y} \]
                              7. fp-cancel-sub-sign-invN/A

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

                                \[\leadsto \frac{x \cdot e^{\left(\color{blue}{\log z \cdot y} + \left(\mathsf{neg}\left(\log a\right)\right) \cdot 1\right) - b}}{y} \]
                              9. distribute-lft-neg-inN/A

                                \[\leadsto \frac{x \cdot e^{\left(\log z \cdot y + \color{blue}{\left(\mathsf{neg}\left(\log a \cdot 1\right)\right)}\right) - b}}{y} \]
                              10. distribute-rgt-neg-inN/A

                                \[\leadsto \frac{x \cdot e^{\left(\log z \cdot y + \color{blue}{\log a \cdot \left(\mathsf{neg}\left(1\right)\right)}\right) - b}}{y} \]
                              11. metadata-evalN/A

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

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

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

                                \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\color{blue}{\log z}, y, -1 \cdot \log a\right) - b}}{y} \]
                              15. mul-1-negN/A

                                \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log z, y, \color{blue}{\mathsf{neg}\left(\log a\right)}\right) - b}}{y} \]
                              16. lower-neg.f64N/A

                                \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log z, y, \color{blue}{-\log a}\right) - b}}{y} \]
                              17. lower-log.f6496.2

                                \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log z, y, -\color{blue}{\log a}\right) - b}}{y} \]
                            5. Applied rewrites96.2%

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

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

                                \[\leadsto \frac{x \cdot e^{\color{blue}{\mathsf{neg}\left(b\right)}}}{y} \]
                              2. lower-neg.f6488.6

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

                              \[\leadsto \frac{x \cdot e^{\color{blue}{-b}}}{y} \]
                            9. 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-/.f6488.6

                                \[\leadsto \color{blue}{\frac{e^{-b}}{y}} \cdot x \]
                            10. Applied rewrites88.6%

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

                            if -2.1e64 < b < 4.2000000000000003e73

                            1. Initial program 97.8%

                              \[\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. +-commutativeN/A

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

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

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

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

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

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

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

                                \[\leadsto \frac{x \cdot \left({a}^{\left(t - 1\right)} \cdot \color{blue}{{z}^{y}}\right)}{y} \]
                              9. lower-pow.f6489.5

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 11: 71.4% accurate, 2.5× speedup?

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

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

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

                                  \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z + \color{blue}{\log a \cdot -1}\right) - b}}{y} \]
                                3. fp-cancel-sign-sub-invN/A

                                  \[\leadsto \frac{x \cdot e^{\color{blue}{\left(y \cdot \log z - \left(\mathsf{neg}\left(\log a\right)\right) \cdot -1\right)} - b}}{y} \]
                                4. distribute-lft-neg-inN/A

                                  \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z - \color{blue}{\left(\mathsf{neg}\left(\log a \cdot -1\right)\right)}\right) - b}}{y} \]
                                5. distribute-rgt-neg-outN/A

                                  \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z - \color{blue}{\log a \cdot \left(\mathsf{neg}\left(-1\right)\right)}\right) - b}}{y} \]
                                6. metadata-evalN/A

                                  \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z - \log a \cdot \color{blue}{1}\right) - b}}{y} \]
                                7. fp-cancel-sub-sign-invN/A

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

                                  \[\leadsto \frac{x \cdot e^{\left(\color{blue}{\log z \cdot y} + \left(\mathsf{neg}\left(\log a\right)\right) \cdot 1\right) - b}}{y} \]
                                9. distribute-lft-neg-inN/A

                                  \[\leadsto \frac{x \cdot e^{\left(\log z \cdot y + \color{blue}{\left(\mathsf{neg}\left(\log a \cdot 1\right)\right)}\right) - b}}{y} \]
                                10. distribute-rgt-neg-inN/A

                                  \[\leadsto \frac{x \cdot e^{\left(\log z \cdot y + \color{blue}{\log a \cdot \left(\mathsf{neg}\left(1\right)\right)}\right) - b}}{y} \]
                                11. metadata-evalN/A

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

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

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

                                  \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\color{blue}{\log z}, y, -1 \cdot \log a\right) - b}}{y} \]
                                15. mul-1-negN/A

                                  \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log z, y, \color{blue}{\mathsf{neg}\left(\log a\right)}\right) - b}}{y} \]
                                16. lower-neg.f64N/A

                                  \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log z, y, \color{blue}{-\log a}\right) - b}}{y} \]
                                17. lower-log.f6494.2

                                  \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log z, y, -\color{blue}{\log a}\right) - b}}{y} \]
                              5. Applied rewrites94.2%

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

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

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

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

                                \[\leadsto \frac{x \cdot e^{\color{blue}{-b}}}{y} \]
                              9. 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-/.f6485.8

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

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

                              if -2.6999999999999999e23 < b < 7.9999999999999999e46

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \left({a}^{\left(t - 1\right)} \cdot \color{blue}{{z}^{y}}\right) \cdot \frac{x}{y} \]
                                13. lower-/.f6484.7

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

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

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

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

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

                              Alternative 12: 58.3% accurate, 2.6× speedup?

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

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

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

                                    \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z + \color{blue}{\log a \cdot -1}\right) - b}}{y} \]
                                  3. fp-cancel-sign-sub-invN/A

                                    \[\leadsto \frac{x \cdot e^{\color{blue}{\left(y \cdot \log z - \left(\mathsf{neg}\left(\log a\right)\right) \cdot -1\right)} - b}}{y} \]
                                  4. distribute-lft-neg-inN/A

                                    \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z - \color{blue}{\left(\mathsf{neg}\left(\log a \cdot -1\right)\right)}\right) - b}}{y} \]
                                  5. distribute-rgt-neg-outN/A

                                    \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z - \color{blue}{\log a \cdot \left(\mathsf{neg}\left(-1\right)\right)}\right) - b}}{y} \]
                                  6. metadata-evalN/A

                                    \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z - \log a \cdot \color{blue}{1}\right) - b}}{y} \]
                                  7. fp-cancel-sub-sign-invN/A

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

                                    \[\leadsto \frac{x \cdot e^{\left(\color{blue}{\log z \cdot y} + \left(\mathsf{neg}\left(\log a\right)\right) \cdot 1\right) - b}}{y} \]
                                  9. distribute-lft-neg-inN/A

                                    \[\leadsto \frac{x \cdot e^{\left(\log z \cdot y + \color{blue}{\left(\mathsf{neg}\left(\log a \cdot 1\right)\right)}\right) - b}}{y} \]
                                  10. distribute-rgt-neg-inN/A

                                    \[\leadsto \frac{x \cdot e^{\left(\log z \cdot y + \color{blue}{\log a \cdot \left(\mathsf{neg}\left(1\right)\right)}\right) - b}}{y} \]
                                  11. metadata-evalN/A

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

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

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

                                    \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\color{blue}{\log z}, y, -1 \cdot \log a\right) - b}}{y} \]
                                  15. mul-1-negN/A

                                    \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log z, y, \color{blue}{\mathsf{neg}\left(\log a\right)}\right) - b}}{y} \]
                                  16. lower-neg.f64N/A

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

                                    \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log z, y, -\color{blue}{\log a}\right) - b}}{y} \]
                                5. Applied rewrites91.6%

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

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

                                    \[\leadsto \frac{x \cdot e^{\color{blue}{\mathsf{neg}\left(b\right)}}}{y} \]
                                  2. lower-neg.f6479.1

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

                                  \[\leadsto \frac{x \cdot e^{\color{blue}{-b}}}{y} \]
                                9. 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-/.f6479.1

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

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

                                if -4.6e-6 < b < 7.0000000000000006e-64

                                1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{x \cdot \left({a}^{\left(t - 1\right)} \cdot \color{blue}{{z}^{y}}\right)}{y} \]
                                  9. lower-pow.f6492.3

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

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

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

                                    \[\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.2%

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

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

                                  Alternative 13: 31.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. +-commutativeN/A

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

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

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

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

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

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

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

                                      \[\leadsto \frac{x \cdot \left({a}^{\left(t - 1\right)} \cdot \color{blue}{{z}^{y}}\right)}{y} \]
                                    9. lower-pow.f6475.0

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

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

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

                                      \[\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.6%

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

                                      Alternative 14: 31.3% accurate, 12.0× speedup?

                                      \[\begin{array}{l} \\ \frac{1}{a} \cdot \frac{x}{y} \end{array} \]
                                      (FPCore (x y z t a b) :precision binary64 (* (/ 1.0 a) (/ x y)))
                                      double code(double x, double y, double z, double t, double a, double b) {
                                      	return (1.0 / a) * (x / 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 = (1.0d0 / a) * (x / y)
                                      end function
                                      
                                      public static double code(double x, double y, double z, double t, double a, double b) {
                                      	return (1.0 / a) * (x / y);
                                      }
                                      
                                      def code(x, y, z, t, a, b):
                                      	return (1.0 / a) * (x / y)
                                      
                                      function code(x, y, z, t, a, b)
                                      	return Float64(Float64(1.0 / a) * Float64(x / y))
                                      end
                                      
                                      function tmp = code(x, y, z, t, a, b)
                                      	tmp = (1.0 / a) * (x / y);
                                      end
                                      
                                      code[x_, y_, z_, t_, a_, b_] := N[(N[(1.0 / a), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \frac{1}{a} \cdot \frac{x}{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. +-commutativeN/A

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

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

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

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

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

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

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

                                          \[\leadsto \frac{x \cdot \left({a}^{\left(t - 1\right)} \cdot \color{blue}{{z}^{y}}\right)}{y} \]
                                        9. lower-pow.f6475.0

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

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

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

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

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

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

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

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

                                            \[\leadsto {a}^{\left(t - 1\right)} \cdot \color{blue}{\frac{x}{y}} \]
                                          6. lower-*.f6458.3

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

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

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

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

                                          Developer Target 1: 71.8% 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 2025008 
                                          (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))