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

Percentage Accurate: 98.3% → 98.9%
Time: 9.5s
Alternatives: 19
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 19 alternatives:

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

Initial Program: 98.3% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 98.9% accurate, 0.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log a, t, \color{blue}{\left(\mathsf{neg}\left(\log a\right)\right) + \left(y \cdot \log z + \left(\mathsf{neg}\left(b\right)\right)\right)}\right)}}{y} \]
  3. Applied rewrites98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 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.3%

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

Alternative 3: 98.3% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 98.3% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

Alternative 5: 92.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{e^{\left(y \cdot \log z - \log a\right) - b}}{y} \cdot x\\ \mathbf{if}\;y \leq -6.2 \cdot 10^{+97}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 29.5:\\ \;\;\;\;\frac{x \cdot \frac{e^{t \cdot \log a - b}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (/ (exp (- (- (* y (log z)) (log a)) b)) y) x)))
   (if (<= y -6.2e+97)
     t_1
     (if (<= y 29.5) (/ (* x (/ (exp (- (* t (log a)) b)) a)) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (exp((((y * log(z)) - log(a)) - b)) / y) * x;
	double tmp;
	if (y <= -6.2e+97) {
		tmp = t_1;
	} else if (y <= 29.5) {
		tmp = (x * (exp(((t * log(a)) - 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 = (exp((((y * log(z)) - log(a)) - b)) / y) * x
    if (y <= (-6.2d+97)) then
        tmp = t_1
    else if (y <= 29.5d0) then
        tmp = (x * (exp(((t * log(a)) - 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 = (Math.exp((((y * Math.log(z)) - Math.log(a)) - b)) / y) * x;
	double tmp;
	if (y <= -6.2e+97) {
		tmp = t_1;
	} else if (y <= 29.5) {
		tmp = (x * (Math.exp(((t * Math.log(a)) - b)) / a)) / y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (math.exp((((y * math.log(z)) - math.log(a)) - b)) / y) * x
	tmp = 0
	if y <= -6.2e+97:
		tmp = t_1
	elif y <= 29.5:
		tmp = (x * (math.exp(((t * math.log(a)) - b)) / a)) / y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(exp(Float64(Float64(Float64(y * log(z)) - log(a)) - b)) / y) * x)
	tmp = 0.0
	if (y <= -6.2e+97)
		tmp = t_1;
	elseif (y <= 29.5)
		tmp = Float64(Float64(x * Float64(exp(Float64(Float64(t * log(a)) - b)) / a)) / y);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (exp((((y * log(z)) - log(a)) - b)) / y) * x;
	tmp = 0.0;
	if (y <= -6.2e+97)
		tmp = t_1;
	elseif (y <= 29.5)
		tmp = (x * (exp(((t * log(a)) - 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[(N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] - N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[y, -6.2e+97], t$95$1, If[LessEqual[y, 29.5], N[(N[(x * N[(N[Exp[N[(N[(t * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.19999999999999962e97 or 29.5 < y

    1. Initial program 98.3%

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

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

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

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

        \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(-1, \log a, y \cdot \log z\right) - b}}{y} \]
      4. lower-log.f6480.3

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

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

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

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

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

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

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

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

    if -6.19999999999999962e97 < y < 29.5

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log a, t, \color{blue}{\left(\mathsf{neg}\left(\log a\right)\right) + \left(y \cdot \log z + \left(\mathsf{neg}\left(b\right)\right)\right)}\right)}}{y} \]
    3. Applied rewrites98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot \frac{e^{t \cdot \log a - b}}{a}}{y} \]
      5. lower-log.f6480.4

        \[\leadsto \frac{x \cdot \frac{e^{t \cdot \log a - b}}{a}}{y} \]
    8. Applied rewrites80.4%

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

Alternative 6: 92.8% accurate, 0.9× speedup?

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

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

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

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

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

\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{y} \cdot t\_1\right) \cdot x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.19999999999999962e97

    1. Initial program 98.3%

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

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

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

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

        \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(-1, \log a, y \cdot \log z\right) - b}}{y} \]
      4. lower-log.f6480.3

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

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

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

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

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

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

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

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

    if -6.19999999999999962e97 < y < 29.5

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log a, t, \color{blue}{\left(\mathsf{neg}\left(\log a\right)\right) + \left(y \cdot \log z + \left(\mathsf{neg}\left(b\right)\right)\right)}\right)}}{y} \]
    3. Applied rewrites98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot \frac{e^{t \cdot \log a - b}}{a}}{y} \]
      5. lower-log.f6480.4

        \[\leadsto \frac{x \cdot \frac{e^{t \cdot \log a - b}}{a}}{y} \]
    8. Applied rewrites80.4%

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

    if 29.5 < y

    1. Initial program 98.3%

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

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

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

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

        \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(-1, \log a, y \cdot \log z\right) - b}}{y} \]
      4. lower-log.f6480.3

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

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

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

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

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

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

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

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

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

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

Alternative 7: 89.3% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{e^{\left(-y\right) \cdot \log z} \cdot y}\\ \mathbf{if}\;y \leq -7.8 \cdot 10^{+99}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 15500000:\\ \;\;\;\;\frac{x \cdot \frac{e^{t \cdot \log a - b}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ x (* (exp (* (- y) (log z))) y))))
   (if (<= y -7.8e+99)
     t_1
     (if (<= y 15500000.0) (/ (* x (/ (exp (- (* t (log a)) b)) a)) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (exp((-y * log(z))) * y);
	double tmp;
	if (y <= -7.8e+99) {
		tmp = t_1;
	} else if (y <= 15500000.0) {
		tmp = (x * (exp(((t * log(a)) - 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((-y * log(z))) * y)
    if (y <= (-7.8d+99)) then
        tmp = t_1
    else if (y <= 15500000.0d0) then
        tmp = (x * (exp(((t * log(a)) - 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((-y * Math.log(z))) * y);
	double tmp;
	if (y <= -7.8e+99) {
		tmp = t_1;
	} else if (y <= 15500000.0) {
		tmp = (x * (Math.exp(((t * Math.log(a)) - b)) / a)) / y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x / (math.exp((-y * math.log(z))) * y)
	tmp = 0
	if y <= -7.8e+99:
		tmp = t_1
	elif y <= 15500000.0:
		tmp = (x * (math.exp(((t * math.log(a)) - b)) / a)) / y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x / Float64(exp(Float64(Float64(-y) * log(z))) * y))
	tmp = 0.0
	if (y <= -7.8e+99)
		tmp = t_1;
	elseif (y <= 15500000.0)
		tmp = Float64(Float64(x * Float64(exp(Float64(Float64(t * log(a)) - 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((-y * log(z))) * y);
	tmp = 0.0;
	if (y <= -7.8e+99)
		tmp = t_1;
	elseif (y <= 15500000.0)
		tmp = (x * (exp(((t * log(a)) - b)) / 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[N[((-y) * N[Log[z], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.8e+99], t$95$1, If[LessEqual[y, 15500000.0], N[(N[(x * N[(N[Exp[N[(N[(t * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x}{e^{\left(-y\right) \cdot \log z} \cdot y}\\
\mathbf{if}\;y \leq -7.8 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.79999999999999989e99 or 1.55e7 < y

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{x}{e^{-1 \cdot \left(y \cdot \color{blue}{\log z}\right)}}}{y} \]
      3. lower-log.f6448.5

        \[\leadsto \frac{\frac{x}{e^{-1 \cdot \left(y \cdot \log z\right)}}}{y} \]
    6. Applied rewrites48.5%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{e^{-1 \cdot \left(y \cdot \log z\right)} \cdot y}} \]
      5. lower-*.f6448.5

        \[\leadsto \frac{x}{\color{blue}{e^{-1 \cdot \left(y \cdot \log z\right)} \cdot y}} \]
    8. Applied rewrites48.5%

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

    if -7.79999999999999989e99 < y < 1.55e7

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(\log a, t, \color{blue}{\left(\mathsf{neg}\left(\log a\right)\right) + \left(y \cdot \log z + \left(\mathsf{neg}\left(b\right)\right)\right)}\right)}}{y} \]
    3. Applied rewrites98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot \frac{e^{t \cdot \log a - b}}{a}}{y} \]
      5. lower-log.f6480.4

        \[\leadsto \frac{x \cdot \frac{e^{t \cdot \log a - b}}{a}}{y} \]
    8. Applied rewrites80.4%

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

Alternative 8: 89.0% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{e^{\left(-y\right) \cdot \log z} \cdot y}\\ \mathbf{if}\;y \leq -7.8 \cdot 10^{+99}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 15500000:\\ \;\;\;\;\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 (* (- y) (log z))) y))))
   (if (<= y -7.8e+99)
     t_1
     (if (<= y 15500000.0)
       (/ (* 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((-y * log(z))) * y);
	double tmp;
	if (y <= -7.8e+99) {
		tmp = t_1;
	} else if (y <= 15500000.0) {
		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((-y * log(z))) * y)
    if (y <= (-7.8d+99)) then
        tmp = t_1
    else if (y <= 15500000.0d0) 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((-y * Math.log(z))) * y);
	double tmp;
	if (y <= -7.8e+99) {
		tmp = t_1;
	} else if (y <= 15500000.0) {
		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((-y * math.log(z))) * y)
	tmp = 0
	if y <= -7.8e+99:
		tmp = t_1
	elif y <= 15500000.0:
		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(x / Float64(exp(Float64(Float64(-y) * log(z))) * y))
	tmp = 0.0
	if (y <= -7.8e+99)
		tmp = t_1;
	elseif (y <= 15500000.0)
		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((-y * log(z))) * y);
	tmp = 0.0;
	if (y <= -7.8e+99)
		tmp = t_1;
	elseif (y <= 15500000.0)
		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[(x / N[(N[Exp[N[((-y) * N[Log[z], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.8e+99], t$95$1, If[LessEqual[y, 15500000.0], 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}{e^{\left(-y\right) \cdot \log z} \cdot y}\\
\mathbf{if}\;y \leq -7.8 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 15500000:\\
\;\;\;\;\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 < -7.79999999999999989e99 or 1.55e7 < y

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{x}{e^{-1 \cdot \left(y \cdot \color{blue}{\log z}\right)}}}{y} \]
      3. lower-log.f6448.5

        \[\leadsto \frac{\frac{x}{e^{-1 \cdot \left(y \cdot \log z\right)}}}{y} \]
    6. Applied rewrites48.5%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{e^{-1 \cdot \left(y \cdot \log z\right)} \cdot y}} \]
      5. lower-*.f6448.5

        \[\leadsto \frac{x}{\color{blue}{e^{-1 \cdot \left(y \cdot \log z\right)} \cdot y}} \]
    8. Applied rewrites48.5%

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

    if -7.79999999999999989e99 < y < 1.55e7

    1. Initial program 98.3%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. 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. lower-log.f64N/A

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

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

      \[\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 9: 88.7% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{e^{\left(-y\right) \cdot \log z} \cdot y}\\ \mathbf{if}\;y \leq -7.8 \cdot 10^{+99}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 15500000:\\ \;\;\;\;\frac{\frac{x}{e^{\mathsf{fma}\left(1 - t, \log a, b\right)}}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ x (* (exp (* (- y) (log z))) y))))
   (if (<= y -7.8e+99)
     t_1
     (if (<= y 15500000.0) (/ (/ x (exp (fma (- 1.0 t) (log a) b))) y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (exp((-y * log(z))) * y);
	double tmp;
	if (y <= -7.8e+99) {
		tmp = t_1;
	} else if (y <= 15500000.0) {
		tmp = (x / exp(fma((1.0 - t), log(a), b))) / y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(x / Float64(exp(Float64(Float64(-y) * log(z))) * y))
	tmp = 0.0
	if (y <= -7.8e+99)
		tmp = t_1;
	elseif (y <= 15500000.0)
		tmp = Float64(Float64(x / exp(fma(Float64(1.0 - t), log(a), b))) / 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[N[((-y) * N[Log[z], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.8e+99], t$95$1, If[LessEqual[y, 15500000.0], N[(N[(x / N[Exp[N[(N[(1.0 - t), $MachinePrecision] * N[Log[a], $MachinePrecision] + b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x}{e^{\left(-y\right) \cdot \log z} \cdot y}\\
\mathbf{if}\;y \leq -7.8 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 15500000:\\
\;\;\;\;\frac{\frac{x}{e^{\mathsf{fma}\left(1 - t, \log a, b\right)}}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.79999999999999989e99 or 1.55e7 < y

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{x}{e^{-1 \cdot \left(y \cdot \color{blue}{\log z}\right)}}}{y} \]
      3. lower-log.f6448.5

        \[\leadsto \frac{\frac{x}{e^{-1 \cdot \left(y \cdot \log z\right)}}}{y} \]
    6. Applied rewrites48.5%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{e^{-1 \cdot \left(y \cdot \log z\right)} \cdot y}} \]
      5. lower-*.f6448.5

        \[\leadsto \frac{x}{\color{blue}{e^{-1 \cdot \left(y \cdot \log z\right)} \cdot y}} \]
    8. Applied rewrites48.5%

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

    if -7.79999999999999989e99 < y < 1.55e7

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{x}{e^{\mathsf{fma}\left(1 - t, \log a, \color{blue}{b}\right)}}}{y} \]
    5. Step-by-step derivation
      1. Applied rewrites79.8%

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

    Alternative 10: 88.7% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{e^{\left(-y\right) \cdot \log z} \cdot y}\\ \mathbf{if}\;y \leq -7.8 \cdot 10^{+99}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 15500000:\\ \;\;\;\;\frac{x}{e^{\mathsf{fma}\left(1 - t, \log a, b\right)} \cdot y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (/ x (* (exp (* (- y) (log z))) y))))
       (if (<= y -7.8e+99)
         t_1
         (if (<= y 15500000.0) (/ x (* (exp (fma (- 1.0 t) (log a) b)) y)) t_1))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = x / (exp((-y * log(z))) * y);
    	double tmp;
    	if (y <= -7.8e+99) {
    		tmp = t_1;
    	} else if (y <= 15500000.0) {
    		tmp = x / (exp(fma((1.0 - t), log(a), b)) * y);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(x / Float64(exp(Float64(Float64(-y) * log(z))) * y))
    	tmp = 0.0
    	if (y <= -7.8e+99)
    		tmp = t_1;
    	elseif (y <= 15500000.0)
    		tmp = Float64(x / Float64(exp(fma(Float64(1.0 - t), log(a), b)) * 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[N[((-y) * N[Log[z], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.8e+99], t$95$1, If[LessEqual[y, 15500000.0], N[(x / N[(N[Exp[N[(N[(1.0 - t), $MachinePrecision] * N[Log[a], $MachinePrecision] + b), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{x}{e^{\left(-y\right) \cdot \log z} \cdot y}\\
    \mathbf{if}\;y \leq -7.8 \cdot 10^{+99}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;y \leq 15500000:\\
    \;\;\;\;\frac{x}{e^{\mathsf{fma}\left(1 - t, \log a, b\right)} \cdot y}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < -7.79999999999999989e99 or 1.55e7 < y

      1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{x}{e^{-1 \cdot \left(y \cdot \color{blue}{\log z}\right)}}}{y} \]
        3. lower-log.f6448.5

          \[\leadsto \frac{\frac{x}{e^{-1 \cdot \left(y \cdot \log z\right)}}}{y} \]
      6. Applied rewrites48.5%

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

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

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

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

          \[\leadsto \color{blue}{\frac{x}{e^{-1 \cdot \left(y \cdot \log z\right)} \cdot y}} \]
        5. lower-*.f6448.5

          \[\leadsto \frac{x}{\color{blue}{e^{-1 \cdot \left(y \cdot \log z\right)} \cdot y}} \]
      8. Applied rewrites48.5%

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

      if -7.79999999999999989e99 < y < 1.55e7

      1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{x}{e^{\mathsf{fma}\left(1 - t, \log a, \color{blue}{b}\right)}}}{y} \]
      5. Step-by-step derivation
        1. Applied rewrites79.8%

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

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

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

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

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

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

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

      Alternative 11: 74.3% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x \cdot e^{t \cdot \log a}}{y}\\ \mathbf{if}\;t \leq -1.15 \cdot 10^{+136}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{-231}:\\ \;\;\;\;\frac{x \cdot e^{-1 \cdot \log a - b}}{y}\\ \mathbf{elif}\;t \leq 3600000000000:\\ \;\;\;\;\frac{x \cdot {z}^{y}}{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 (* t (log a)))) y)))
         (if (<= t -1.15e+136)
           t_1
           (if (<= t 1.02e-231)
             (/ (* x (exp (- (* -1.0 (log a)) b))) y)
             (if (<= t 3600000000000.0) (/ (* x (pow z y)) (* a y)) t_1)))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = (x * exp((t * log(a)))) / y;
      	double tmp;
      	if (t <= -1.15e+136) {
      		tmp = t_1;
      	} else if (t <= 1.02e-231) {
      		tmp = (x * exp(((-1.0 * log(a)) - b))) / y;
      	} else if (t <= 3600000000000.0) {
      		tmp = (x * pow(z, y)) / (a * y);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y, z, t, a, b)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: tmp
          t_1 = (x * exp((t * log(a)))) / y
          if (t <= (-1.15d+136)) then
              tmp = t_1
          else if (t <= 1.02d-231) then
              tmp = (x * exp((((-1.0d0) * log(a)) - b))) / y
          else if (t <= 3600000000000.0d0) then
              tmp = (x * (z ** y)) / (a * y)
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = (x * Math.exp((t * Math.log(a)))) / y;
      	double tmp;
      	if (t <= -1.15e+136) {
      		tmp = t_1;
      	} else if (t <= 1.02e-231) {
      		tmp = (x * Math.exp(((-1.0 * Math.log(a)) - b))) / y;
      	} else if (t <= 3600000000000.0) {
      		tmp = (x * Math.pow(z, y)) / (a * y);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = (x * math.exp((t * math.log(a)))) / y
      	tmp = 0
      	if t <= -1.15e+136:
      		tmp = t_1
      	elif t <= 1.02e-231:
      		tmp = (x * math.exp(((-1.0 * math.log(a)) - b))) / y
      	elif t <= 3600000000000.0:
      		tmp = (x * math.pow(z, y)) / (a * y)
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(Float64(x * exp(Float64(t * log(a)))) / y)
      	tmp = 0.0
      	if (t <= -1.15e+136)
      		tmp = t_1;
      	elseif (t <= 1.02e-231)
      		tmp = Float64(Float64(x * exp(Float64(Float64(-1.0 * log(a)) - b))) / y);
      	elseif (t <= 3600000000000.0)
      		tmp = Float64(Float64(x * (z ^ y)) / 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((t * log(a)))) / y;
      	tmp = 0.0;
      	if (t <= -1.15e+136)
      		tmp = t_1;
      	elseif (t <= 1.02e-231)
      		tmp = (x * exp(((-1.0 * log(a)) - b))) / y;
      	elseif (t <= 3600000000000.0)
      		tmp = (x * (z ^ y)) / (a * y);
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[Exp[N[(t * N[Log[a], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -1.15e+136], t$95$1, If[LessEqual[t, 1.02e-231], N[(N[(x * N[Exp[N[(N[(-1.0 * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 3600000000000.0], N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / N[(a * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{x \cdot e^{t \cdot \log a}}{y}\\
      \mathbf{if}\;t \leq -1.15 \cdot 10^{+136}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t \leq 1.02 \cdot 10^{-231}:\\
      \;\;\;\;\frac{x \cdot e^{-1 \cdot \log a - b}}{y}\\
      
      \mathbf{elif}\;t \leq 3600000000000:\\
      \;\;\;\;\frac{x \cdot {z}^{y}}{a \cdot y}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if t < -1.15e136 or 3.6e12 < t

        1. Initial program 98.3%

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

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

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

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

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

        if -1.15e136 < t < 1.02000000000000006e-231

        1. Initial program 98.3%

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

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

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

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

            \[\leadsto \frac{x \cdot e^{\mathsf{fma}\left(-1, \log a, y \cdot \log z\right) - b}}{y} \]
          4. lower-log.f6480.3

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

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

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

            \[\leadsto \frac{x \cdot e^{-1 \cdot \log a - b}}{y} \]
          2. lower-log.f6458.3

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

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

        if 1.02000000000000006e-231 < t < 3.6e12

        1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{x \cdot \frac{{z}^{y}}{\color{blue}{e^{b - \left(t - 1\right) \cdot \log a}}}}{y} \]
          15. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
          6. lower-+.f64N/A

            \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
          7. lower-log.f6466.1

            \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
        6. Applied rewrites66.1%

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

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

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

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

      Alternative 12: 72.8% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x \cdot e^{t \cdot \log a}}{y}\\ \mathbf{if}\;t \leq -1.15 \cdot 10^{+136}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{-231}:\\ \;\;\;\;\frac{\frac{x}{e^{\mathsf{fma}\left(1, \log a, b\right)}}}{y}\\ \mathbf{elif}\;t \leq 3600000000000:\\ \;\;\;\;\frac{x \cdot {z}^{y}}{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 (* t (log a)))) y)))
         (if (<= t -1.15e+136)
           t_1
           (if (<= t 1.02e-231)
             (/ (/ x (exp (fma 1.0 (log a) b))) y)
             (if (<= t 3600000000000.0) (/ (* x (pow z y)) (* a y)) t_1)))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = (x * exp((t * log(a)))) / y;
      	double tmp;
      	if (t <= -1.15e+136) {
      		tmp = t_1;
      	} else if (t <= 1.02e-231) {
      		tmp = (x / exp(fma(1.0, log(a), b))) / y;
      	} else if (t <= 3600000000000.0) {
      		tmp = (x * pow(z, y)) / (a * y);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(Float64(x * exp(Float64(t * log(a)))) / y)
      	tmp = 0.0
      	if (t <= -1.15e+136)
      		tmp = t_1;
      	elseif (t <= 1.02e-231)
      		tmp = Float64(Float64(x / exp(fma(1.0, log(a), b))) / y);
      	elseif (t <= 3600000000000.0)
      		tmp = Float64(Float64(x * (z ^ y)) / Float64(a * y));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[Exp[N[(t * N[Log[a], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -1.15e+136], t$95$1, If[LessEqual[t, 1.02e-231], N[(N[(x / N[Exp[N[(1.0 * N[Log[a], $MachinePrecision] + b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 3600000000000.0], N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / N[(a * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{x \cdot e^{t \cdot \log a}}{y}\\
      \mathbf{if}\;t \leq -1.15 \cdot 10^{+136}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t \leq 1.02 \cdot 10^{-231}:\\
      \;\;\;\;\frac{\frac{x}{e^{\mathsf{fma}\left(1, \log a, b\right)}}}{y}\\
      
      \mathbf{elif}\;t \leq 3600000000000:\\
      \;\;\;\;\frac{x \cdot {z}^{y}}{a \cdot y}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if t < -1.15e136 or 3.6e12 < t

        1. Initial program 98.3%

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

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

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

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

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

        if -1.15e136 < t < 1.02000000000000006e-231

        1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{x}{e^{\mathsf{fma}\left(1 - t, \log a, \color{blue}{b}\right)}}}{y} \]
        5. Step-by-step derivation
          1. Applied rewrites79.8%

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

            \[\leadsto \frac{\frac{x}{e^{\mathsf{fma}\left(\color{blue}{1}, \log a, b\right)}}}{y} \]
          3. Step-by-step derivation
            1. Applied rewrites58.3%

              \[\leadsto \frac{\frac{x}{e^{\mathsf{fma}\left(\color{blue}{1}, \log a, b\right)}}}{y} \]

            if 1.02000000000000006e-231 < t < 3.6e12

            1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x \cdot \frac{{z}^{y}}{\color{blue}{e^{b - \left(t - 1\right) \cdot \log a}}}}{y} \]
              15. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
              6. lower-+.f64N/A

                \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
              7. lower-log.f6466.1

                \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
            6. Applied rewrites66.1%

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

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

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

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

          Alternative 13: 72.8% 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^{t \cdot \log a}}{y}\\ \mathbf{if}\;t\_1 \leq -1.2 \cdot 10^{+99}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -180:\\ \;\;\;\;\frac{x}{y \cdot e^{b + \log a}}\\ \mathbf{elif}\;t\_1 \leq 10^{+80}:\\ \;\;\;\;\frac{x \cdot {z}^{y}}{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 (* t (log a)))) y)))
             (if (<= t_1 -1.2e+99)
               t_2
               (if (<= t_1 -180.0)
                 (/ x (* y (exp (+ b (log a)))))
                 (if (<= t_1 1e+80) (/ (* x (pow z y)) (* a y)) t_2)))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = (t - 1.0) * log(a);
          	double t_2 = (x * exp((t * log(a)))) / y;
          	double tmp;
          	if (t_1 <= -1.2e+99) {
          		tmp = t_2;
          	} else if (t_1 <= -180.0) {
          		tmp = x / (y * exp((b + log(a))));
          	} else if (t_1 <= 1e+80) {
          		tmp = (x * pow(z, y)) / (a * y);
          	} else {
          		tmp = t_2;
          	}
          	return tmp;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x, y, z, t, a, b)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8), intent (in) :: b
              real(8) :: t_1
              real(8) :: t_2
              real(8) :: tmp
              t_1 = (t - 1.0d0) * log(a)
              t_2 = (x * exp((t * log(a)))) / y
              if (t_1 <= (-1.2d+99)) then
                  tmp = t_2
              else if (t_1 <= (-180.0d0)) then
                  tmp = x / (y * exp((b + log(a))))
              else if (t_1 <= 1d+80) then
                  tmp = (x * (z ** y)) / (a * y)
              else
                  tmp = t_2
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = (t - 1.0) * Math.log(a);
          	double t_2 = (x * Math.exp((t * Math.log(a)))) / y;
          	double tmp;
          	if (t_1 <= -1.2e+99) {
          		tmp = t_2;
          	} else if (t_1 <= -180.0) {
          		tmp = x / (y * Math.exp((b + Math.log(a))));
          	} else if (t_1 <= 1e+80) {
          		tmp = (x * Math.pow(z, y)) / (a * y);
          	} else {
          		tmp = t_2;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	t_1 = (t - 1.0) * math.log(a)
          	t_2 = (x * math.exp((t * math.log(a)))) / y
          	tmp = 0
          	if t_1 <= -1.2e+99:
          		tmp = t_2
          	elif t_1 <= -180.0:
          		tmp = x / (y * math.exp((b + math.log(a))))
          	elif t_1 <= 1e+80:
          		tmp = (x * math.pow(z, y)) / (a * y)
          	else:
          		tmp = t_2
          	return tmp
          
          function code(x, y, z, t, a, b)
          	t_1 = Float64(Float64(t - 1.0) * log(a))
          	t_2 = Float64(Float64(x * exp(Float64(t * log(a)))) / y)
          	tmp = 0.0
          	if (t_1 <= -1.2e+99)
          		tmp = t_2;
          	elseif (t_1 <= -180.0)
          		tmp = Float64(x / Float64(y * exp(Float64(b + log(a)))));
          	elseif (t_1 <= 1e+80)
          		tmp = Float64(Float64(x * (z ^ y)) / 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((t * log(a)))) / y;
          	tmp = 0.0;
          	if (t_1 <= -1.2e+99)
          		tmp = t_2;
          	elseif (t_1 <= -180.0)
          		tmp = x / (y * exp((b + log(a))));
          	elseif (t_1 <= 1e+80)
          		tmp = (x * (z ^ y)) / (a * y);
          	else
          		tmp = t_2;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Exp[N[(t * N[Log[a], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$1, -1.2e+99], t$95$2, If[LessEqual[t$95$1, -180.0], N[(x / N[(y * N[Exp[N[(b + N[Log[a], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+80], N[(N[(x * N[Power[z, y], $MachinePrecision]), $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^{t \cdot \log a}}{y}\\
          \mathbf{if}\;t\_1 \leq -1.2 \cdot 10^{+99}:\\
          \;\;\;\;t\_2\\
          
          \mathbf{elif}\;t\_1 \leq -180:\\
          \;\;\;\;\frac{x}{y \cdot e^{b + \log a}}\\
          
          \mathbf{elif}\;t\_1 \leq 10^{+80}:\\
          \;\;\;\;\frac{x \cdot {z}^{y}}{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)) < -1.2000000000000001e99 or 1e80 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))

            1. Initial program 98.3%

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

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

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

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

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

            if -1.2000000000000001e99 < (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a)) < -180

            1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x \cdot \frac{{z}^{y}}{\color{blue}{e^{b - \left(t - 1\right) \cdot \log a}}}}{y} \]
              15. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
              6. lower-+.f64N/A

                \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
              7. lower-log.f6466.1

                \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
            6. Applied rewrites66.1%

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

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

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

                \[\leadsto \frac{x}{y \cdot e^{b + \log a}} \]
              3. lower-exp.f64N/A

                \[\leadsto \frac{x}{y \cdot e^{b + \log a}} \]
              4. lower-+.f64N/A

                \[\leadsto \frac{x}{y \cdot e^{b + \log a}} \]
              5. lower-log.f6458.3

                \[\leadsto \frac{x}{y \cdot e^{b + \log a}} \]
            9. Applied rewrites58.3%

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

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

            1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x \cdot \frac{{z}^{y}}{\color{blue}{e^{b - \left(t - 1\right) \cdot \log a}}}}{y} \]
              15. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
              6. lower-+.f64N/A

                \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
              7. lower-log.f6466.1

                \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
            6. Applied rewrites66.1%

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

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

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

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

          Alternative 14: 72.3% accurate, 1.3× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{e^{-b}}{y} \cdot x\\ \mathbf{if}\;b \leq -1100000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 0.0022:\\ \;\;\;\;\frac{x \cdot {z}^{y}}{a \cdot y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (let* ((t_1 (* (/ (exp (- b)) y) x)))
             (if (<= b -1100000000000.0)
               t_1
               (if (<= b 0.0022) (/ (* x (pow z y)) (* a y)) t_1))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = (exp(-b) / y) * x;
          	double tmp;
          	if (b <= -1100000000000.0) {
          		tmp = t_1;
          	} else if (b <= 0.0022) {
          		tmp = (x * pow(z, y)) / (a * y);
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x, y, z, t, a, b)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8), intent (in) :: b
              real(8) :: t_1
              real(8) :: tmp
              t_1 = (exp(-b) / y) * x
              if (b <= (-1100000000000.0d0)) then
                  tmp = t_1
              else if (b <= 0.0022d0) then
                  tmp = (x * (z ** y)) / (a * y)
              else
                  tmp = t_1
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = (Math.exp(-b) / y) * x;
          	double tmp;
          	if (b <= -1100000000000.0) {
          		tmp = t_1;
          	} else if (b <= 0.0022) {
          		tmp = (x * Math.pow(z, y)) / (a * y);
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	t_1 = (math.exp(-b) / y) * x
          	tmp = 0
          	if b <= -1100000000000.0:
          		tmp = t_1
          	elif b <= 0.0022:
          		tmp = (x * math.pow(z, y)) / (a * y)
          	else:
          		tmp = t_1
          	return tmp
          
          function code(x, y, z, t, a, b)
          	t_1 = Float64(Float64(exp(Float64(-b)) / y) * x)
          	tmp = 0.0
          	if (b <= -1100000000000.0)
          		tmp = t_1;
          	elseif (b <= 0.0022)
          		tmp = Float64(Float64(x * (z ^ y)) / Float64(a * y));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b)
          	t_1 = (exp(-b) / y) * x;
          	tmp = 0.0;
          	if (b <= -1100000000000.0)
          		tmp = t_1;
          	elseif (b <= 0.0022)
          		tmp = (x * (z ^ y)) / (a * y);
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[Exp[(-b)], $MachinePrecision] / y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[b, -1100000000000.0], t$95$1, If[LessEqual[b, 0.0022], N[(N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision] / N[(a * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \frac{e^{-b}}{y} \cdot x\\
          \mathbf{if}\;b \leq -1100000000000:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;b \leq 0.0022:\\
          \;\;\;\;\frac{x \cdot {z}^{y}}{a \cdot y}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if b < -1.1e12 or 0.00220000000000000013 < b

            1. Initial program 98.3%

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

              \[\leadsto \frac{x \cdot e^{\color{blue}{-1 \cdot b}}}{y} \]
            3. Step-by-step derivation
              1. lower-*.f6447.2

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

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

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

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

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

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

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

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

                \[\leadsto \frac{e^{-1 \cdot \color{blue}{b}}}{y} \cdot x \]
              8. mul-1-negN/A

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

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

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

            if -1.1e12 < b < 0.00220000000000000013

            1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x \cdot \frac{{z}^{y}}{\color{blue}{e^{b - \left(t - 1\right) \cdot \log a}}}}{y} \]
              15. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
              6. lower-+.f64N/A

                \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
              7. lower-log.f6466.1

                \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
            6. Applied rewrites66.1%

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

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

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

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

          Alternative 15: 58.3% accurate, 1.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := e^{-b}\\ t_2 := \frac{t\_1}{y} \cdot x\\ \mathbf{if}\;b \leq -1 \cdot 10^{+48}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq 8 \cdot 10^{-18}:\\ \;\;\;\;\frac{x \cdot t\_1}{a \cdot y}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (let* ((t_1 (exp (- b))) (t_2 (* (/ t_1 y) x)))
             (if (<= b -1e+48) t_2 (if (<= b 8e-18) (/ (* x t_1) (* a y)) t_2))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = exp(-b);
          	double t_2 = (t_1 / y) * x;
          	double tmp;
          	if (b <= -1e+48) {
          		tmp = t_2;
          	} else if (b <= 8e-18) {
          		tmp = (x * t_1) / (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 = exp(-b)
              t_2 = (t_1 / y) * x
              if (b <= (-1d+48)) then
                  tmp = t_2
              else if (b <= 8d-18) then
                  tmp = (x * t_1) / (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 = Math.exp(-b);
          	double t_2 = (t_1 / y) * x;
          	double tmp;
          	if (b <= -1e+48) {
          		tmp = t_2;
          	} else if (b <= 8e-18) {
          		tmp = (x * t_1) / (a * y);
          	} else {
          		tmp = t_2;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	t_1 = math.exp(-b)
          	t_2 = (t_1 / y) * x
          	tmp = 0
          	if b <= -1e+48:
          		tmp = t_2
          	elif b <= 8e-18:
          		tmp = (x * t_1) / (a * y)
          	else:
          		tmp = t_2
          	return tmp
          
          function code(x, y, z, t, a, b)
          	t_1 = exp(Float64(-b))
          	t_2 = Float64(Float64(t_1 / y) * x)
          	tmp = 0.0
          	if (b <= -1e+48)
          		tmp = t_2;
          	elseif (b <= 8e-18)
          		tmp = Float64(Float64(x * t_1) / Float64(a * y));
          	else
          		tmp = t_2;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b)
          	t_1 = exp(-b);
          	t_2 = (t_1 / y) * x;
          	tmp = 0.0;
          	if (b <= -1e+48)
          		tmp = t_2;
          	elseif (b <= 8e-18)
          		tmp = (x * t_1) / (a * y);
          	else
          		tmp = t_2;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Exp[(-b)], $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 / y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[b, -1e+48], t$95$2, If[LessEqual[b, 8e-18], N[(N[(x * t$95$1), $MachinePrecision] / N[(a * y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := e^{-b}\\
          t_2 := \frac{t\_1}{y} \cdot x\\
          \mathbf{if}\;b \leq -1 \cdot 10^{+48}:\\
          \;\;\;\;t\_2\\
          
          \mathbf{elif}\;b \leq 8 \cdot 10^{-18}:\\
          \;\;\;\;\frac{x \cdot t\_1}{a \cdot y}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_2\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if b < -1.00000000000000004e48 or 8.0000000000000006e-18 < b

            1. Initial program 98.3%

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

              \[\leadsto \frac{x \cdot e^{\color{blue}{-1 \cdot b}}}{y} \]
            3. Step-by-step derivation
              1. lower-*.f6447.2

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

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

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

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

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

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

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

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

                \[\leadsto \frac{e^{-1 \cdot \color{blue}{b}}}{y} \cdot x \]
              8. mul-1-negN/A

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

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

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

            if -1.00000000000000004e48 < b < 8.0000000000000006e-18

            1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x \cdot \frac{{z}^{y}}{\color{blue}{e^{b - \left(t - 1\right) \cdot \log a}}}}{y} \]
              15. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
              6. lower-+.f64N/A

                \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
              7. lower-log.f6466.1

                \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
            6. Applied rewrites66.1%

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x \cdot e^{-b}}{a \cdot y} \]
              5. lower-*.f6454.5

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

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

          Alternative 16: 58.3% accurate, 1.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := e^{-b}\\ t_2 := \frac{t\_1}{y} \cdot x\\ \mathbf{if}\;b \leq -1 \cdot 10^{+48}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq 8 \cdot 10^{-18}:\\ \;\;\;\;\frac{t\_1}{a \cdot y} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (let* ((t_1 (exp (- b))) (t_2 (* (/ t_1 y) x)))
             (if (<= b -1e+48) t_2 (if (<= b 8e-18) (* (/ t_1 (* a y)) x) t_2))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = exp(-b);
          	double t_2 = (t_1 / y) * x;
          	double tmp;
          	if (b <= -1e+48) {
          		tmp = t_2;
          	} else if (b <= 8e-18) {
          		tmp = (t_1 / (a * y)) * x;
          	} else {
          		tmp = t_2;
          	}
          	return tmp;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x, y, z, t, a, b)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8), intent (in) :: b
              real(8) :: t_1
              real(8) :: t_2
              real(8) :: tmp
              t_1 = exp(-b)
              t_2 = (t_1 / y) * x
              if (b <= (-1d+48)) then
                  tmp = t_2
              else if (b <= 8d-18) then
                  tmp = (t_1 / (a * y)) * x
              else
                  tmp = t_2
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = Math.exp(-b);
          	double t_2 = (t_1 / y) * x;
          	double tmp;
          	if (b <= -1e+48) {
          		tmp = t_2;
          	} else if (b <= 8e-18) {
          		tmp = (t_1 / (a * y)) * x;
          	} else {
          		tmp = t_2;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	t_1 = math.exp(-b)
          	t_2 = (t_1 / y) * x
          	tmp = 0
          	if b <= -1e+48:
          		tmp = t_2
          	elif b <= 8e-18:
          		tmp = (t_1 / (a * y)) * x
          	else:
          		tmp = t_2
          	return tmp
          
          function code(x, y, z, t, a, b)
          	t_1 = exp(Float64(-b))
          	t_2 = Float64(Float64(t_1 / y) * x)
          	tmp = 0.0
          	if (b <= -1e+48)
          		tmp = t_2;
          	elseif (b <= 8e-18)
          		tmp = Float64(Float64(t_1 / Float64(a * y)) * x);
          	else
          		tmp = t_2;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b)
          	t_1 = exp(-b);
          	t_2 = (t_1 / y) * x;
          	tmp = 0.0;
          	if (b <= -1e+48)
          		tmp = t_2;
          	elseif (b <= 8e-18)
          		tmp = (t_1 / (a * y)) * x;
          	else
          		tmp = t_2;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Exp[(-b)], $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 / y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[b, -1e+48], t$95$2, If[LessEqual[b, 8e-18], N[(N[(t$95$1 / N[(a * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$2]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := e^{-b}\\
          t_2 := \frac{t\_1}{y} \cdot x\\
          \mathbf{if}\;b \leq -1 \cdot 10^{+48}:\\
          \;\;\;\;t\_2\\
          
          \mathbf{elif}\;b \leq 8 \cdot 10^{-18}:\\
          \;\;\;\;\frac{t\_1}{a \cdot y} \cdot x\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_2\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if b < -1.00000000000000004e48 or 8.0000000000000006e-18 < b

            1. Initial program 98.3%

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

              \[\leadsto \frac{x \cdot e^{\color{blue}{-1 \cdot b}}}{y} \]
            3. Step-by-step derivation
              1. lower-*.f6447.2

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

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

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

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

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

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

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

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

                \[\leadsto \frac{e^{-1 \cdot \color{blue}{b}}}{y} \cdot x \]
              8. mul-1-negN/A

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

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

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

            if -1.00000000000000004e48 < b < 8.0000000000000006e-18

            1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x \cdot \frac{{z}^{y}}{\color{blue}{e^{b - \left(t - 1\right) \cdot \log a}}}}{y} \]
              15. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
              6. lower-+.f64N/A

                \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
              7. lower-log.f6466.1

                \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
            6. Applied rewrites66.1%

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

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

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

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

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

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

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

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

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

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

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

          Alternative 17: 58.2% accurate, 1.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{x \cdot \frac{{z}^{y}}{\color{blue}{e^{b - \left(t - 1\right) \cdot \log a}}}}{y} \]
            15. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
            6. lower-+.f64N/A

              \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
            7. lower-log.f6466.1

              \[\leadsto \frac{x \cdot {z}^{y}}{y \cdot e^{b + \log a}} \]
          6. Applied rewrites66.1%

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

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

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

              \[\leadsto \frac{x}{y \cdot e^{b + \log a}} \]
            3. lower-exp.f64N/A

              \[\leadsto \frac{x}{y \cdot e^{b + \log a}} \]
            4. lower-+.f64N/A

              \[\leadsto \frac{x}{y \cdot e^{b + \log a}} \]
            5. lower-log.f6458.3

              \[\leadsto \frac{x}{y \cdot e^{b + \log a}} \]
          9. Applied rewrites58.3%

            \[\leadsto \frac{x}{\color{blue}{y \cdot e^{b + \log a}}} \]
          10. Add Preprocessing

          Alternative 18: 47.2% accurate, 2.3× speedup?

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

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

            \[\leadsto \frac{x \cdot e^{\color{blue}{-1 \cdot b}}}{y} \]
          3. Step-by-step derivation
            1. lower-*.f6447.2

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

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

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

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

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

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

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

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

              \[\leadsto \frac{e^{-1 \cdot \color{blue}{b}}}{y} \cdot x \]
            8. mul-1-negN/A

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

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

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

          Alternative 19: 42.9% accurate, 2.3× speedup?

          \[\begin{array}{l} \\ e^{-b} \cdot \frac{x}{y} \end{array} \]
          (FPCore (x y z t a b) :precision binary64 (* (exp (- b)) (/ x y)))
          double code(double x, double y, double z, double t, double a, double b) {
          	return exp(-b) * (x / y);
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x, y, z, t, a, b)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8), intent (in) :: b
              code = exp(-b) * (x / y)
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b) {
          	return Math.exp(-b) * (x / y);
          }
          
          def code(x, y, z, t, a, b):
          	return math.exp(-b) * (x / y)
          
          function code(x, y, z, t, a, b)
          	return Float64(exp(Float64(-b)) * Float64(x / y))
          end
          
          function tmp = code(x, y, z, t, a, b)
          	tmp = exp(-b) * (x / y);
          end
          
          code[x_, y_, z_, t_, a_, b_] := N[(N[Exp[(-b)], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          e^{-b} \cdot \frac{x}{y}
          \end{array}
          
          Derivation
          1. Initial program 98.3%

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

            \[\leadsto \frac{x \cdot e^{\color{blue}{-1 \cdot b}}}{y} \]
          3. Step-by-step derivation
            1. lower-*.f6447.2

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

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

              \[\leadsto \color{blue}{\frac{x \cdot e^{-1 \cdot b}}{y}} \]
            2. mult-flipN/A

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

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

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

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

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

              \[\leadsto e^{-1 \cdot \color{blue}{b}} \cdot \left(x \cdot \frac{1}{y}\right) \]
            8. mul-1-negN/A

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

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

              \[\leadsto e^{-b} \cdot \mathsf{Rewrite=>}\left(mult-flip-rev, \left(\frac{x}{y}\right)\right) \]
            11. lower-neg.f64N/A

              \[\leadsto e^{-b} \cdot \mathsf{Rewrite=>}\left(lower-/.f64, \left(\frac{x}{y}\right)\right) \]
          6. Applied rewrites42.9%

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

          Reproduce

          ?
          herbie shell --seed 2025143 
          (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))