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

Percentage Accurate: 98.4% → 98.4%
Time: 5.6s
Alternatives: 16
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
	return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b):
	return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b)
	return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y)
end
function tmp = code(x, y, z, t, a, b)
	tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 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.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
	return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b):
	return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b)
	return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y)
end
function tmp = code(x, y, z, t, a, b)
	tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 98.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \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.4%

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

Alternative 2: 93.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - 1\right) \cdot \log a\\ t_2 := \frac{x \cdot e^{\log a \cdot \left(t - 1\right) - b}}{y}\\ \mathbf{if}\;t\_1 \leq -4000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 650:\\ \;\;\;\;x \cdot \frac{\frac{1}{a} \cdot e^{\log z \cdot y - b}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (- t 1.0) (log a)))
        (t_2 (/ (* x (exp (- (* (log a) (- t 1.0)) b))) y)))
   (if (<= t_1 -4000.0)
     t_2
     (if (<= t_1 650.0)
       (* x (/ (* (/ 1.0 a) (exp (- (* (log z) y) b))) y))
       t_2))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - 1.0) * log(a);
	double t_2 = (x * exp(((log(a) * (t - 1.0)) - b))) / y;
	double tmp;
	if (t_1 <= -4000.0) {
		tmp = t_2;
	} else if (t_1 <= 650.0) {
		tmp = x * (((1.0 / a) * exp(((log(z) * y) - b))) / y);
	} else {
		tmp = t_2;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (t - 1.0d0) * log(a)
    t_2 = (x * exp(((log(a) * (t - 1.0d0)) - b))) / y
    if (t_1 <= (-4000.0d0)) then
        tmp = t_2
    else if (t_1 <= 650.0d0) then
        tmp = x * (((1.0d0 / a) * exp(((log(z) * y) - b))) / y)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - 1.0) * Math.log(a);
	double t_2 = (x * Math.exp(((Math.log(a) * (t - 1.0)) - b))) / y;
	double tmp;
	if (t_1 <= -4000.0) {
		tmp = t_2;
	} else if (t_1 <= 650.0) {
		tmp = x * (((1.0 / a) * Math.exp(((Math.log(z) * y) - b))) / y);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (t - 1.0) * math.log(a)
	t_2 = (x * math.exp(((math.log(a) * (t - 1.0)) - b))) / y
	tmp = 0
	if t_1 <= -4000.0:
		tmp = t_2
	elif t_1 <= 650.0:
		tmp = x * (((1.0 / a) * math.exp(((math.log(z) * y) - b))) / y)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(t - 1.0) * log(a))
	t_2 = Float64(Float64(x * exp(Float64(Float64(log(a) * Float64(t - 1.0)) - b))) / y)
	tmp = 0.0
	if (t_1 <= -4000.0)
		tmp = t_2;
	elseif (t_1 <= 650.0)
		tmp = Float64(x * Float64(Float64(Float64(1.0 / a) * exp(Float64(Float64(log(z) * y) - b))) / y));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (t - 1.0) * log(a);
	t_2 = (x * exp(((log(a) * (t - 1.0)) - b))) / y;
	tmp = 0.0;
	if (t_1 <= -4000.0)
		tmp = t_2;
	elseif (t_1 <= 650.0)
		tmp = x * (((1.0 / a) * exp(((log(z) * y) - b))) / y);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -4000.0], t$95$2, If[LessEqual[t$95$1, 650.0], N[(x * N[(N[(N[(1.0 / a), $MachinePrecision] * N[Exp[N[(N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq 650:\\
\;\;\;\;x \cdot \frac{\frac{1}{a} \cdot e^{\log z \cdot y - b}}{y}\\

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

    1. Initial program 96.6%

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

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

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

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

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

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

Alternative 3: 92.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x \cdot e^{\log a \cdot \left(t - 1\right) - b}}{y}\\ \mathbf{if}\;t \leq -4 \cdot 10^{+78}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 9:\\ \;\;\;\;\frac{x \cdot \frac{e^{0 + \left(\log z \cdot y - b\right)}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (* x (exp (- (* (log a) (- t 1.0)) b))) y)))
   (if (<= t -4e+78)
     t_1
     (if (<= t 9.0) (/ (* x (/ (exp (+ 0.0 (- (* (log z) y) b))) a)) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x * exp(((log(a) * (t - 1.0)) - b))) / y;
	double tmp;
	if (t <= -4e+78) {
		tmp = t_1;
	} else if (t <= 9.0) {
		tmp = (x * (exp((0.0 + ((log(z) * y) - b))) / a)) / y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x * exp(((log(a) * (t - 1.0d0)) - b))) / y
    if (t <= (-4d+78)) then
        tmp = t_1
    else if (t <= 9.0d0) then
        tmp = (x * (exp((0.0d0 + ((log(z) * y) - b))) / a)) / y
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x * Math.exp(((Math.log(a) * (t - 1.0)) - b))) / y;
	double tmp;
	if (t <= -4e+78) {
		tmp = t_1;
	} else if (t <= 9.0) {
		tmp = (x * (Math.exp((0.0 + ((Math.log(z) * y) - b))) / a)) / y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x * math.exp(((math.log(a) * (t - 1.0)) - b))) / y
	tmp = 0
	if t <= -4e+78:
		tmp = t_1
	elif t <= 9.0:
		tmp = (x * (math.exp((0.0 + ((math.log(z) * y) - b))) / a)) / y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x * exp(Float64(Float64(log(a) * Float64(t - 1.0)) - b))) / y)
	tmp = 0.0
	if (t <= -4e+78)
		tmp = t_1;
	elseif (t <= 9.0)
		tmp = Float64(Float64(x * Float64(exp(Float64(0.0 + Float64(Float64(log(z) * y) - b))) / a)) / y);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x * exp(((log(a) * (t - 1.0)) - b))) / y;
	tmp = 0.0;
	if (t <= -4e+78)
		tmp = t_1;
	elseif (t <= 9.0)
		tmp = (x * (exp((0.0 + ((log(z) * y) - b))) / a)) / y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -4e+78], t$95$1, If[LessEqual[t, 9.0], N[(N[(x * N[(N[Exp[N[(0.0 + N[(N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 9:\\
\;\;\;\;\frac{x \cdot \frac{e^{0 + \left(\log z \cdot y - b\right)}}{a}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.00000000000000003e78 or 9 < 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. Taylor expanded in y around 0

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

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

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

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

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

    if -4.00000000000000003e78 < t < 9

    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. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot \frac{1 \cdot e^{\log z \cdot y - b}}{\color{blue}{a}}}{y} \]
      8. lower-/.f64N/A

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

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

Alternative 4: 89.1% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x \cdot e^{\log z \cdot y}}{y}\\ \mathbf{if}\;y \leq -9.2 \cdot 10^{+52}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+89}:\\ \;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t - 1\right) - b}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (* x (exp (* (log z) y))) y)))
   (if (<= y -9.2e+52)
     t_1
     (if (<= y 2.5e+89) (/ (* x (exp (- (* (log a) (- t 1.0)) b))) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x * exp((log(z) * y))) / y;
	double tmp;
	if (y <= -9.2e+52) {
		tmp = t_1;
	} else if (y <= 2.5e+89) {
		tmp = (x * exp(((log(a) * (t - 1.0)) - b))) / y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x * exp((log(z) * y))) / y
    if (y <= (-9.2d+52)) then
        tmp = t_1
    else if (y <= 2.5d+89) then
        tmp = (x * exp(((log(a) * (t - 1.0d0)) - b))) / y
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x * Math.exp((Math.log(z) * y))) / y;
	double tmp;
	if (y <= -9.2e+52) {
		tmp = t_1;
	} else if (y <= 2.5e+89) {
		tmp = (x * Math.exp(((Math.log(a) * (t - 1.0)) - b))) / y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x * math.exp((math.log(z) * y))) / y
	tmp = 0
	if y <= -9.2e+52:
		tmp = t_1
	elif y <= 2.5e+89:
		tmp = (x * math.exp(((math.log(a) * (t - 1.0)) - b))) / y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x * exp(Float64(log(z) * y))) / y)
	tmp = 0.0
	if (y <= -9.2e+52)
		tmp = t_1;
	elseif (y <= 2.5e+89)
		tmp = Float64(Float64(x * exp(Float64(Float64(log(a) * Float64(t - 1.0)) - b))) / y);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x * exp((log(z) * y))) / y;
	tmp = 0.0;
	if (y <= -9.2e+52)
		tmp = t_1;
	elseif (y <= 2.5e+89)
		tmp = (x * exp(((log(a) * (t - 1.0)) - b))) / y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[Exp[N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -9.2e+52], t$95$1, If[LessEqual[y, 2.5e+89], N[(N[(x * N[Exp[N[(N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x \cdot e^{\log z \cdot y}}{y}\\
\mathbf{if}\;y \leq -9.2 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 2.5 \cdot 10^{+89}:\\
\;\;\;\;\frac{x \cdot e^{\log a \cdot \left(t - 1\right) - b}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.1999999999999999e52 or 2.49999999999999992e89 < y

    1. Initial program 100.0%

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

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

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

        \[\leadsto \frac{x \cdot e^{\log z \cdot \color{blue}{y}}}{y} \]
      3. lift-log.f6483.5

        \[\leadsto \frac{x \cdot e^{\log z \cdot y}}{y} \]
    4. Applied rewrites83.5%

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

    if -9.1999999999999999e52 < y < 2.49999999999999992e89

    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. Taylor expanded in y around 0

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

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

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

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

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

Alternative 5: 76.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - 1\right) \cdot \log a\\ t_2 := \frac{x \cdot e^{\log a \cdot t}}{y}\\ \mathbf{if}\;t\_1 \leq -4000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 100:\\ \;\;\;\;x \cdot \frac{\frac{e^{-b}}{a}}{y}\\ \mathbf{elif}\;t\_1 \leq 1000:\\ \;\;\;\;\frac{{z}^{y} \cdot x}{a \cdot y}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (- t 1.0) (log a))) (t_2 (/ (* x (exp (* (log a) t))) y)))
   (if (<= t_1 -4000.0)
     t_2
     (if (<= t_1 100.0)
       (* x (/ (/ (exp (- b)) a) y))
       (if (<= t_1 1000.0) (/ (* (pow z y) x) (* a y)) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - 1.0) * log(a);
	double t_2 = (x * exp((log(a) * t))) / y;
	double tmp;
	if (t_1 <= -4000.0) {
		tmp = t_2;
	} else if (t_1 <= 100.0) {
		tmp = x * ((exp(-b) / a) / y);
	} else if (t_1 <= 1000.0) {
		tmp = (pow(z, y) * x) / (a * y);
	} else {
		tmp = t_2;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (t - 1.0d0) * log(a)
    t_2 = (x * exp((log(a) * t))) / y
    if (t_1 <= (-4000.0d0)) then
        tmp = t_2
    else if (t_1 <= 100.0d0) then
        tmp = x * ((exp(-b) / a) / y)
    else if (t_1 <= 1000.0d0) then
        tmp = ((z ** y) * x) / (a * y)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - 1.0) * Math.log(a);
	double t_2 = (x * Math.exp((Math.log(a) * t))) / y;
	double tmp;
	if (t_1 <= -4000.0) {
		tmp = t_2;
	} else if (t_1 <= 100.0) {
		tmp = x * ((Math.exp(-b) / a) / y);
	} else if (t_1 <= 1000.0) {
		tmp = (Math.pow(z, y) * x) / (a * y);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (t - 1.0) * math.log(a)
	t_2 = (x * math.exp((math.log(a) * t))) / y
	tmp = 0
	if t_1 <= -4000.0:
		tmp = t_2
	elif t_1 <= 100.0:
		tmp = x * ((math.exp(-b) / a) / y)
	elif t_1 <= 1000.0:
		tmp = (math.pow(z, y) * x) / (a * y)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(t - 1.0) * log(a))
	t_2 = Float64(Float64(x * exp(Float64(log(a) * t))) / y)
	tmp = 0.0
	if (t_1 <= -4000.0)
		tmp = t_2;
	elseif (t_1 <= 100.0)
		tmp = Float64(x * Float64(Float64(exp(Float64(-b)) / a) / y));
	elseif (t_1 <= 1000.0)
		tmp = Float64(Float64((z ^ y) * x) / Float64(a * y));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (t - 1.0) * log(a);
	t_2 = (x * exp((log(a) * t))) / y;
	tmp = 0.0;
	if (t_1 <= -4000.0)
		tmp = t_2;
	elseif (t_1 <= 100.0)
		tmp = x * ((exp(-b) / a) / y);
	elseif (t_1 <= 1000.0)
		tmp = ((z ^ y) * x) / (a * y);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Exp[N[(N[Log[a], $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -4000.0], t$95$2, If[LessEqual[t$95$1, 100.0], N[(x * N[(N[(N[Exp[(-b)], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1000.0], N[(N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision] / N[(a * y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq 100:\\
\;\;\;\;x \cdot \frac{\frac{e^{-b}}{a}}{y}\\

\mathbf{elif}\;t\_1 \leq 1000:\\
\;\;\;\;\frac{{z}^{y} \cdot x}{a \cdot y}\\

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


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

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto \frac{x \cdot e^{\log a \cdot t}}{y} \]
    4. Applied rewrites79.1%

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

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

    1. Initial program 95.3%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{\frac{e^{\mathsf{neg}\left(b\right)}}{a}}{y} \]
      2. lower-exp.f64N/A

        \[\leadsto x \cdot \frac{\frac{e^{\mathsf{neg}\left(b\right)}}{a}}{y} \]
      3. lift-neg.f6474.6

        \[\leadsto x \cdot \frac{\frac{e^{-b}}{a}}{y} \]
    7. Applied rewrites74.6%

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

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

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 72.4% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{e^{-b}}{y}\\ \mathbf{if}\;b \leq -5.8 \cdot 10^{+30}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 1650:\\ \;\;\;\;\frac{{z}^{y}}{a \cdot y} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (/ (exp (- b)) y))))
   (if (<= b -5.8e+30)
     t_1
     (if (<= b 1650.0) (* (/ (pow z y) (* a y)) x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * (exp(-b) / y);
	double tmp;
	if (b <= -5.8e+30) {
		tmp = t_1;
	} else if (b <= 1650.0) {
		tmp = (pow(z, y) / (a * y)) * x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (exp(-b) / y)
    if (b <= (-5.8d+30)) then
        tmp = t_1
    else if (b <= 1650.0d0) then
        tmp = ((z ** y) / (a * y)) * x
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * (Math.exp(-b) / y);
	double tmp;
	if (b <= -5.8e+30) {
		tmp = t_1;
	} else if (b <= 1650.0) {
		tmp = (Math.pow(z, y) / (a * y)) * x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x * (math.exp(-b) / y)
	tmp = 0
	if b <= -5.8e+30:
		tmp = t_1
	elif b <= 1650.0:
		tmp = (math.pow(z, y) / (a * y)) * x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x * Float64(exp(Float64(-b)) / y))
	tmp = 0.0
	if (b <= -5.8e+30)
		tmp = t_1;
	elseif (b <= 1650.0)
		tmp = Float64(Float64((z ^ y) / Float64(a * y)) * x);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x * (exp(-b) / y);
	tmp = 0.0;
	if (b <= -5.8e+30)
		tmp = t_1;
	elseif (b <= 1650.0)
		tmp = ((z ^ y) / (a * y)) * x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.8e+30], t$95$1, If[LessEqual[b, 1650.0], N[(N[(N[Power[z, y], $MachinePrecision] / N[(a * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{e^{-b}}{y}\\
\mathbf{if}\;b \leq -5.8 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 1650:\\
\;\;\;\;\frac{{z}^{y}}{a \cdot y} \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -5.7999999999999996e30 or 1650 < 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. Taylor expanded in b around inf

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

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

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

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

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

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

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

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

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

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

    if -5.7999999999999996e30 < b < 1650

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{{z}^{y}}{a \cdot y} \cdot \color{blue}{x} \]
    9. Applied rewrites65.2%

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

Alternative 7: 72.3% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{e^{-b}}{y}\\ \mathbf{if}\;b \leq -5.8 \cdot 10^{+30}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 390:\\ \;\;\;\;\frac{{z}^{y} \cdot x}{a \cdot y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (/ (exp (- b)) y))))
   (if (<= b -5.8e+30) t_1 (if (<= b 390.0) (/ (* (pow z y) x) (* a y)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * (exp(-b) / y);
	double tmp;
	if (b <= -5.8e+30) {
		tmp = t_1;
	} else if (b <= 390.0) {
		tmp = (pow(z, y) * x) / (a * y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (exp(-b) / y)
    if (b <= (-5.8d+30)) then
        tmp = t_1
    else if (b <= 390.0d0) then
        tmp = ((z ** y) * x) / (a * y)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * (Math.exp(-b) / y);
	double tmp;
	if (b <= -5.8e+30) {
		tmp = t_1;
	} else if (b <= 390.0) {
		tmp = (Math.pow(z, y) * x) / (a * y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x * (math.exp(-b) / y)
	tmp = 0
	if b <= -5.8e+30:
		tmp = t_1
	elif b <= 390.0:
		tmp = (math.pow(z, y) * x) / (a * y)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x * Float64(exp(Float64(-b)) / y))
	tmp = 0.0
	if (b <= -5.8e+30)
		tmp = t_1;
	elseif (b <= 390.0)
		tmp = Float64(Float64((z ^ y) * x) / Float64(a * y));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x * (exp(-b) / y);
	tmp = 0.0;
	if (b <= -5.8e+30)
		tmp = t_1;
	elseif (b <= 390.0)
		tmp = ((z ^ y) * x) / (a * y);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.8e+30], t$95$1, If[LessEqual[b, 390.0], N[(N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision] / N[(a * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{e^{-b}}{y}\\
\mathbf{if}\;b \leq -5.8 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 390:\\
\;\;\;\;\frac{{z}^{y} \cdot x}{a \cdot y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -5.7999999999999996e30 or 390 < 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. Taylor expanded in b around inf

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

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

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

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

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

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

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

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

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

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

    if -5.7999999999999996e30 < b < 390

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 60.2% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{\frac{e^{-b}}{a}}{y}\\ \mathbf{if}\;b \leq -4.4 \cdot 10^{-73}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 4.3 \cdot 10^{-52}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\log z \cdot y, x, x\right)}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (/ (/ (exp (- b)) a) y))))
   (if (<= b -4.4e-73)
     t_1
     (if (<= b 4.3e-52) (/ (/ (fma (* (log z) y) x x) a) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * ((exp(-b) / a) / y);
	double tmp;
	if (b <= -4.4e-73) {
		tmp = t_1;
	} else if (b <= 4.3e-52) {
		tmp = (fma((log(z) * y), x, x) / a) / y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(x * Float64(Float64(exp(Float64(-b)) / a) / y))
	tmp = 0.0
	if (b <= -4.4e-73)
		tmp = t_1;
	elseif (b <= 4.3e-52)
		tmp = Float64(Float64(fma(Float64(log(z) * y), x, x) / a) / y);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[(N[Exp[(-b)], $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.4e-73], t$95$1, If[LessEqual[b, 4.3e-52], N[(N[(N[(N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision] * x + x), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{\frac{e^{-b}}{a}}{y}\\
\mathbf{if}\;b \leq -4.4 \cdot 10^{-73}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 4.3 \cdot 10^{-52}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\log z \cdot y, x, x\right)}{a}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.4e-73 or 4.3000000000000003e-52 < b

    1. Initial program 99.4%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{\frac{e^{\mathsf{neg}\left(b\right)}}{a}}{y} \]
      2. lower-exp.f64N/A

        \[\leadsto x \cdot \frac{\frac{e^{\mathsf{neg}\left(b\right)}}{a}}{y} \]
      3. lift-neg.f6472.3

        \[\leadsto x \cdot \frac{\frac{e^{-b}}{a}}{y} \]
    7. Applied rewrites72.3%

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

    if -4.4e-73 < b < 4.3000000000000003e-52

    1. Initial program 97.0%

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{x \cdot e^{\mathsf{neg}\left(b\right)}}{a} + \frac{x \cdot \left(y \cdot \left(e^{\mathsf{neg}\left(b\right)} \cdot \log z\right)\right)}{a}}{y} \]
    7. Applied rewrites42.6%

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

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

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

        \[\leadsto \frac{\frac{\left(y \cdot \log z\right) \cdot x + x}{a}}{y} \]
      3. lower-fma.f64N/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot \log z, x, x\right)}{a}}{y} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\log z \cdot y, x, x\right)}{a}}{y} \]
      5. lift-log.f64N/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\log z \cdot y, x, x\right)}{a}}{y} \]
      6. lift-*.f6442.6

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\log z \cdot y, x, x\right)}{a}}{y} \]
    10. Applied rewrites42.6%

      \[\leadsto \frac{\frac{\mathsf{fma}\left(\log z \cdot y, x, x\right)}{a}}{y} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 9: 59.4% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{e^{-b}}{y}\\ \mathbf{if}\;b \leq -2.7 \cdot 10^{-55}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 16:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\log z \cdot y, x, x\right)}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (/ (exp (- b)) y))))
   (if (<= b -2.7e-55)
     t_1
     (if (<= b 16.0) (/ (/ (fma (* (log z) y) x x) a) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * (exp(-b) / y);
	double tmp;
	if (b <= -2.7e-55) {
		tmp = t_1;
	} else if (b <= 16.0) {
		tmp = (fma((log(z) * y), x, x) / a) / y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(x * Float64(exp(Float64(-b)) / y))
	tmp = 0.0
	if (b <= -2.7e-55)
		tmp = t_1;
	elseif (b <= 16.0)
		tmp = Float64(Float64(fma(Float64(log(z) * y), x, x) / a) / y);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.7e-55], t$95$1, If[LessEqual[b, 16.0], N[(N[(N[(N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision] * x + x), $MachinePrecision] / a), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{e^{-b}}{y}\\
\mathbf{if}\;b \leq -2.7 \cdot 10^{-55}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 16:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\log z \cdot y, x, x\right)}{a}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.70000000000000004e-55 or 16 < b

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

    if -2.70000000000000004e-55 < b < 16

    1. Initial program 96.9%

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{x \cdot e^{\mathsf{neg}\left(b\right)}}{a} + \frac{x \cdot \left(y \cdot \left(e^{\mathsf{neg}\left(b\right)} \cdot \log z\right)\right)}{a}}{y} \]
    7. Applied rewrites42.1%

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

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

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

        \[\leadsto \frac{\frac{\left(y \cdot \log z\right) \cdot x + x}{a}}{y} \]
      3. lower-fma.f64N/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot \log z, x, x\right)}{a}}{y} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\log z \cdot y, x, x\right)}{a}}{y} \]
      5. lift-log.f64N/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\log z \cdot y, x, x\right)}{a}}{y} \]
      6. lift-*.f6441.9

        \[\leadsto \frac{\frac{\mathsf{fma}\left(\log z \cdot y, x, x\right)}{a}}{y} \]
    10. Applied rewrites41.9%

      \[\leadsto \frac{\frac{\mathsf{fma}\left(\log z \cdot y, x, x\right)}{a}}{y} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 10: 59.0% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{e^{-b}}{y}\\ \mathbf{if}\;b \leq -6 \cdot 10^{-57}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 76:\\ \;\;\;\;\frac{\mathsf{fma}\left(\log z \cdot y, x, x\right)}{a \cdot y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (/ (exp (- b)) y))))
   (if (<= b -6e-57)
     t_1
     (if (<= b 76.0) (/ (fma (* (log z) y) x x) (* a y)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * (exp(-b) / y);
	double tmp;
	if (b <= -6e-57) {
		tmp = t_1;
	} else if (b <= 76.0) {
		tmp = fma((log(z) * y), x, x) / (a * y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(x * Float64(exp(Float64(-b)) / y))
	tmp = 0.0
	if (b <= -6e-57)
		tmp = t_1;
	elseif (b <= 76.0)
		tmp = Float64(fma(Float64(log(z) * y), x, x) / Float64(a * y));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6e-57], t$95$1, If[LessEqual[b, 76.0], N[(N[(N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision] * x + x), $MachinePrecision] / N[(a * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{e^{-b}}{y}\\
\mathbf{if}\;b \leq -6 \cdot 10^{-57}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 76:\\
\;\;\;\;\frac{\mathsf{fma}\left(\log z \cdot y, x, x\right)}{a \cdot y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -6.00000000000000001e-57 or 76 < b

    1. Initial program 99.7%

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

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

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

        \[\leadsto \frac{x \cdot e^{-b}}{y} \]
    4. Applied rewrites73.9%

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

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

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

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

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

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

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

    if -6.00000000000000001e-57 < b < 76

    1. Initial program 96.9%

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{x \cdot e^{\mathsf{neg}\left(b\right)}}{a} + \frac{x \cdot \left(y \cdot \left(e^{\mathsf{neg}\left(b\right)} \cdot \log z\right)\right)}{a}}{y} \]
    7. Applied rewrites42.2%

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

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

        \[\leadsto \frac{x + x \cdot \left(y \cdot \log z\right)}{a \cdot y} \]
      2. +-commutativeN/A

        \[\leadsto \frac{x \cdot \left(y \cdot \log z\right) + x}{a \cdot y} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\left(y \cdot \log z\right) \cdot x + x}{a \cdot y} \]
      4. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(y \cdot \log z, x, x\right)}{a \cdot y} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(\log z \cdot y, x, x\right)}{a \cdot y} \]
      6. lift-log.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\log z \cdot y, x, x\right)}{a \cdot y} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\log z \cdot y, x, x\right)}{a \cdot y} \]
      8. lift-*.f6439.8

        \[\leadsto \frac{\mathsf{fma}\left(\log z \cdot y, x, x\right)}{a \cdot y} \]
    10. Applied rewrites39.8%

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

Alternative 11: 58.8% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{e^{-b}}{y}\\ \mathbf{if}\;b \leq -28500000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 540:\\ \;\;\;\;x \cdot \frac{\mathsf{fma}\left(\log z, y, 1\right)}{a \cdot y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (/ (exp (- b)) y))))
   (if (<= b -28500000000.0)
     t_1
     (if (<= b 540.0) (* x (/ (fma (log z) y 1.0) (* a y))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * (exp(-b) / y);
	double tmp;
	if (b <= -28500000000.0) {
		tmp = t_1;
	} else if (b <= 540.0) {
		tmp = x * (fma(log(z), y, 1.0) / (a * y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(x * Float64(exp(Float64(-b)) / y))
	tmp = 0.0
	if (b <= -28500000000.0)
		tmp = t_1;
	elseif (b <= 540.0)
		tmp = Float64(x * Float64(fma(log(z), y, 1.0) / Float64(a * y)));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -28500000000.0], t$95$1, If[LessEqual[b, 540.0], N[(x * N[(N[(N[Log[z], $MachinePrecision] * y + 1.0), $MachinePrecision] / N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{e^{-b}}{y}\\
\mathbf{if}\;b \leq -28500000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 540:\\
\;\;\;\;x \cdot \frac{\mathsf{fma}\left(\log z, y, 1\right)}{a \cdot y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.85e10 or 540 < 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. Taylor expanded in b around inf

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

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

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

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

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

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

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

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

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

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

    if -2.85e10 < b < 540

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x \cdot \frac{1 + y \cdot \log z}{a \cdot y} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x \cdot \frac{y \cdot \log z + 1}{a \cdot y} \]
      2. *-commutativeN/A

        \[\leadsto x \cdot \frac{\log z \cdot y + 1}{a \cdot y} \]
      3. lower-fma.f64N/A

        \[\leadsto x \cdot \frac{\mathsf{fma}\left(\log z, y, 1\right)}{a \cdot y} \]
      4. lift-log.f6439.3

        \[\leadsto x \cdot \frac{\mathsf{fma}\left(\log z, y, 1\right)}{a \cdot y} \]
    10. Applied rewrites39.3%

      \[\leadsto x \cdot \frac{\mathsf{fma}\left(\log z, y, 1\right)}{a \cdot y} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 12: 58.2% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{e^{-b}}{y}\\ \mathbf{if}\;b \leq -6 \cdot 10^{-57}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 1:\\ \;\;\;\;\frac{x \cdot \frac{\left(-b\right) + 1}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (/ (exp (- b)) y))))
   (if (<= b -6e-57) t_1 (if (<= b 1.0) (/ (* x (/ (+ (- b) 1.0) a)) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * (exp(-b) / y);
	double tmp;
	if (b <= -6e-57) {
		tmp = t_1;
	} else if (b <= 1.0) {
		tmp = (x * ((-b + 1.0) / a)) / y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (exp(-b) / y)
    if (b <= (-6d-57)) then
        tmp = t_1
    else if (b <= 1.0d0) then
        tmp = (x * ((-b + 1.0d0) / a)) / y
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * (Math.exp(-b) / y);
	double tmp;
	if (b <= -6e-57) {
		tmp = t_1;
	} else if (b <= 1.0) {
		tmp = (x * ((-b + 1.0) / a)) / y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x * (math.exp(-b) / y)
	tmp = 0
	if b <= -6e-57:
		tmp = t_1
	elif b <= 1.0:
		tmp = (x * ((-b + 1.0) / a)) / y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x * Float64(exp(Float64(-b)) / y))
	tmp = 0.0
	if (b <= -6e-57)
		tmp = t_1;
	elseif (b <= 1.0)
		tmp = Float64(Float64(x * Float64(Float64(Float64(-b) + 1.0) / a)) / y);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x * (exp(-b) / y);
	tmp = 0.0;
	if (b <= -6e-57)
		tmp = t_1;
	elseif (b <= 1.0)
		tmp = (x * ((-b + 1.0) / a)) / y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6e-57], t$95$1, If[LessEqual[b, 1.0], N[(N[(x * N[(N[((-b) + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{e^{-b}}{y}\\
\mathbf{if}\;b \leq -6 \cdot 10^{-57}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 1:\\
\;\;\;\;\frac{x \cdot \frac{\left(-b\right) + 1}{a}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -6.00000000000000001e-57 or 1 < b

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

    if -6.00000000000000001e-57 < b < 1

    1. Initial program 96.9%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{\frac{e^{\mathsf{neg}\left(b\right)}}{a}}{y} \]
      2. lower-exp.f64N/A

        \[\leadsto x \cdot \frac{\frac{e^{\mathsf{neg}\left(b\right)}}{a}}{y} \]
      3. lift-neg.f6439.6

        \[\leadsto x \cdot \frac{\frac{e^{-b}}{a}}{y} \]
    7. Applied rewrites39.6%

      \[\leadsto x \cdot \frac{\frac{e^{-b}}{a}}{y} \]
    8. Taylor expanded in b around 0

      \[\leadsto x \cdot \frac{\frac{1 + -1 \cdot b}{a}}{y} \]
    9. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot \frac{\frac{1 + \left(\mathsf{neg}\left(b\right)\right)}{a}}{y} \]
      2. lift-neg.f64N/A

        \[\leadsto x \cdot \frac{\frac{1 + \left(-b\right)}{a}}{y} \]
      3. +-commutativeN/A

        \[\leadsto x \cdot \frac{\frac{\left(-b\right) + 1}{a}}{y} \]
      4. lower-+.f6439.4

        \[\leadsto x \cdot \frac{\frac{\left(-b\right) + 1}{a}}{y} \]
    10. Applied rewrites39.4%

      \[\leadsto x \cdot \frac{\frac{\left(-b\right) + 1}{a}}{y} \]
    11. Step-by-step derivation
      1. lift-*.f64N/A

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

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

        \[\leadsto \frac{x \cdot \frac{\left(-b\right) + 1}{a}}{\color{blue}{y}} \]
      4. lower-/.f64N/A

        \[\leadsto \frac{x \cdot \frac{\left(-b\right) + 1}{a}}{\color{blue}{y}} \]
      5. lower-*.f6440.2

        \[\leadsto \frac{x \cdot \frac{\left(-b\right) + 1}{a}}{y} \]
    12. Applied rewrites40.2%

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

Alternative 13: 58.0% accurate, 2.0× speedup?

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

\\
\frac{x \cdot \frac{e^{-b}}{a}}{y}
\end{array}
Derivation
  1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{x \cdot \frac{1 \cdot e^{\log z \cdot y - b}}{\color{blue}{a}}}{y} \]
    8. lower-/.f64N/A

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

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

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

      \[\leadsto \frac{x \cdot \frac{e^{\mathsf{neg}\left(b\right)}}{a}}{y} \]
    2. lift-neg.f6459.4

      \[\leadsto \frac{x \cdot \frac{e^{-b}}{a}}{y} \]
  10. Applied rewrites59.4%

    \[\leadsto \frac{x \cdot \frac{e^{-b}}{a}}{y} \]
  11. Add Preprocessing

Alternative 14: 36.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\\ t_2 := \frac{x \cdot \frac{\left(-b\right) + 1}{a}}{y}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+26}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;x \cdot \frac{\frac{-b}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
        (t_2 (/ (* x (/ (+ (- b) 1.0) a)) y)))
   (if (<= t_1 -2e+26) t_2 (if (<= t_1 0.0) (* x (/ (/ (- b) a) y)) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
	double t_2 = (x * ((-b + 1.0) / a)) / y;
	double tmp;
	if (t_1 <= -2e+26) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = x * ((-b / a) / y);
	} else {
		tmp = t_2;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

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

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;x \cdot \frac{\frac{-b}{a}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < -2.0000000000000001e26 or -0.0 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y)

    1. Initial program 99.0%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{\frac{e^{\mathsf{neg}\left(b\right)}}{a}}{y} \]
      2. lower-exp.f64N/A

        \[\leadsto x \cdot \frac{\frac{e^{\mathsf{neg}\left(b\right)}}{a}}{y} \]
      3. lift-neg.f6458.5

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

      \[\leadsto x \cdot \frac{\frac{e^{-b}}{a}}{y} \]
    8. Taylor expanded in b around 0

      \[\leadsto x \cdot \frac{\frac{1 + -1 \cdot b}{a}}{y} \]
    9. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot \frac{\frac{1 + \left(\mathsf{neg}\left(b\right)\right)}{a}}{y} \]
      2. lift-neg.f64N/A

        \[\leadsto x \cdot \frac{\frac{1 + \left(-b\right)}{a}}{y} \]
      3. +-commutativeN/A

        \[\leadsto x \cdot \frac{\frac{\left(-b\right) + 1}{a}}{y} \]
      4. lower-+.f6440.8

        \[\leadsto x \cdot \frac{\frac{\left(-b\right) + 1}{a}}{y} \]
    10. Applied rewrites40.8%

      \[\leadsto x \cdot \frac{\frac{\left(-b\right) + 1}{a}}{y} \]
    11. Step-by-step derivation
      1. lift-*.f64N/A

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

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

        \[\leadsto \frac{x \cdot \frac{\left(-b\right) + 1}{a}}{\color{blue}{y}} \]
      4. lower-/.f64N/A

        \[\leadsto \frac{x \cdot \frac{\left(-b\right) + 1}{a}}{\color{blue}{y}} \]
      5. lower-*.f6443.4

        \[\leadsto \frac{x \cdot \frac{\left(-b\right) + 1}{a}}{y} \]
    12. Applied rewrites43.4%

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

    if -2.0000000000000001e26 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < -0.0

    1. Initial program 97.6%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{\frac{e^{\mathsf{neg}\left(b\right)}}{a}}{y} \]
      2. lower-exp.f64N/A

        \[\leadsto x \cdot \frac{\frac{e^{\mathsf{neg}\left(b\right)}}{a}}{y} \]
      3. lift-neg.f6459.7

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

      \[\leadsto x \cdot \frac{\frac{e^{-b}}{a}}{y} \]
    8. Taylor expanded in b around 0

      \[\leadsto x \cdot \frac{\frac{1 + -1 \cdot b}{a}}{y} \]
    9. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot \frac{\frac{1 + \left(\mathsf{neg}\left(b\right)\right)}{a}}{y} \]
      2. lift-neg.f64N/A

        \[\leadsto x \cdot \frac{\frac{1 + \left(-b\right)}{a}}{y} \]
      3. +-commutativeN/A

        \[\leadsto x \cdot \frac{\frac{\left(-b\right) + 1}{a}}{y} \]
      4. lower-+.f6422.8

        \[\leadsto x \cdot \frac{\frac{\left(-b\right) + 1}{a}}{y} \]
    10. Applied rewrites22.8%

      \[\leadsto x \cdot \frac{\frac{\left(-b\right) + 1}{a}}{y} \]
    11. Taylor expanded in b around inf

      \[\leadsto x \cdot \frac{\frac{-1 \cdot b}{a}}{y} \]
    12. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot \frac{\frac{\mathsf{neg}\left(b\right)}{a}}{y} \]
      2. lift-neg.f6427.4

        \[\leadsto x \cdot \frac{\frac{-b}{a}}{y} \]
    13. Applied rewrites27.4%

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

Alternative 15: 32.4% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.2 \cdot 10^{-300}:\\ \;\;\;\;x \cdot \frac{\frac{-b}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{1}{a \cdot y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= b -1.2e-300) (* x (/ (/ (- b) a) y)) (* x (/ 1.0 (* a y)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -1.2e-300) {
		tmp = x * ((-b / a) / y);
	} else {
		tmp = x * (1.0 / (a * y));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (b <= (-1.2d-300)) then
        tmp = x * ((-b / a) / y)
    else
        tmp = x * (1.0d0 / (a * y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -1.2e-300) {
		tmp = x * ((-b / a) / y);
	} else {
		tmp = x * (1.0 / (a * y));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if b <= -1.2e-300:
		tmp = x * ((-b / a) / y)
	else:
		tmp = x * (1.0 / (a * y))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (b <= -1.2e-300)
		tmp = Float64(x * Float64(Float64(Float64(-b) / a) / y));
	else
		tmp = Float64(x * Float64(1.0 / Float64(a * y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (b <= -1.2e-300)
		tmp = x * ((-b / a) / y);
	else
		tmp = x * (1.0 / (a * y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.2e-300], N[(x * N[(N[((-b) / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.2 \cdot 10^{-300}:\\
\;\;\;\;x \cdot \frac{\frac{-b}{a}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.2e-300

    1. Initial program 98.4%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{\frac{e^{\mathsf{neg}\left(b\right)}}{a}}{y} \]
      2. lower-exp.f64N/A

        \[\leadsto x \cdot \frac{\frac{e^{\mathsf{neg}\left(b\right)}}{a}}{y} \]
      3. lift-neg.f6460.3

        \[\leadsto x \cdot \frac{\frac{e^{-b}}{a}}{y} \]
    7. Applied rewrites60.3%

      \[\leadsto x \cdot \frac{\frac{e^{-b}}{a}}{y} \]
    8. Taylor expanded in b around 0

      \[\leadsto x \cdot \frac{\frac{1 + -1 \cdot b}{a}}{y} \]
    9. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot \frac{\frac{1 + \left(\mathsf{neg}\left(b\right)\right)}{a}}{y} \]
      2. lift-neg.f64N/A

        \[\leadsto x \cdot \frac{\frac{1 + \left(-b\right)}{a}}{y} \]
      3. +-commutativeN/A

        \[\leadsto x \cdot \frac{\frac{\left(-b\right) + 1}{a}}{y} \]
      4. lower-+.f6442.3

        \[\leadsto x \cdot \frac{\frac{\left(-b\right) + 1}{a}}{y} \]
    10. Applied rewrites42.3%

      \[\leadsto x \cdot \frac{\frac{\left(-b\right) + 1}{a}}{y} \]
    11. Taylor expanded in b around inf

      \[\leadsto x \cdot \frac{\frac{-1 \cdot b}{a}}{y} \]
    12. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot \frac{\frac{\mathsf{neg}\left(b\right)}{a}}{y} \]
      2. lift-neg.f6435.7

        \[\leadsto x \cdot \frac{\frac{-b}{a}}{y} \]
    13. Applied rewrites35.7%

      \[\leadsto x \cdot \frac{\frac{-b}{a}}{y} \]

    if -1.2e-300 < b

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{{z}^{y}}{a \cdot y} \]
      3. lower-*.f6451.9

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

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

      \[\leadsto x \cdot \frac{1}{a \cdot y} \]
    9. Step-by-step derivation
      1. Applied rewrites29.2%

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

    Alternative 16: 31.2% accurate, 4.2× speedup?

    \[\begin{array}{l} \\ x \cdot \frac{1}{a \cdot 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(x * Float64(1.0 / Float64(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[(x * N[(1.0 / N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    x \cdot \frac{1}{a \cdot y}
    \end{array}
    
    Derivation
    1. Initial program 98.4%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{{z}^{y}}{a \cdot y} \]
      3. lower-*.f6454.1

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

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

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

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

      Reproduce

      ?
      herbie shell --seed 2025110 
      (FPCore (x y z t a b)
        :name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
        :precision binary64
        (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))