Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B

Percentage Accurate: 89.3% → 97.5%
Time: 3.5s
Alternatives: 16
Speedup: 0.7×

Specification

?
\[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
(FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
double code(double x, double y, double z, double t) {
	return x / ((y - z) * (t - z));
}
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)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x / ((y - z) * (t - z))
end function
public static double code(double x, double y, double z, double t) {
	return x / ((y - z) * (t - z));
}
def code(x, y, z, t):
	return x / ((y - z) * (t - z))
function code(x, y, z, t)
	return Float64(x / Float64(Float64(y - z) * Float64(t - z)))
end
function tmp = code(x, y, z, t)
	tmp = x / ((y - z) * (t - z));
end
code[x_, y_, z_, t_] := N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 89.3% accurate, 1.0× speedup?

\[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
(FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
double code(double x, double y, double z, double t) {
	return x / ((y - z) * (t - z));
}
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)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x / ((y - z) * (t - z))
end function
public static double code(double x, double y, double z, double t) {
	return x / ((y - z) * (t - z));
}
def code(x, y, z, t):
	return x / ((y - z) * (t - z))
function code(x, y, z, t)
	return Float64(x / Float64(Float64(y - z) * Float64(t - z)))
end
function tmp = code(x, y, z, t)
	tmp = x / ((y - z) * (t - z));
end
code[x_, y_, z_, t_] := N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}

Alternative 1: 97.5% accurate, 0.3× speedup?

\[\begin{array}{l} t_1 := \frac{\left|x\right|}{\left(y - z\right) \cdot \left(t - z\right)}\\ \mathsf{copysign}\left(1, x\right) \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq 10^{-275}:\\ \;\;\;\;\frac{\frac{\left|x\right|}{z - t}}{z - y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (fabs x) (* (- y z) (- t z)))))
   (*
    (copysign 1.0 x)
    (if (<= t_1 1e-275) (/ (/ (fabs x) (- z t)) (- z y)) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = fabs(x) / ((y - z) * (t - z));
	double tmp;
	if (t_1 <= 1e-275) {
		tmp = (fabs(x) / (z - t)) / (z - y);
	} else {
		tmp = t_1;
	}
	return copysign(1.0, x) * tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = Math.abs(x) / ((y - z) * (t - z));
	double tmp;
	if (t_1 <= 1e-275) {
		tmp = (Math.abs(x) / (z - t)) / (z - y);
	} else {
		tmp = t_1;
	}
	return Math.copySign(1.0, x) * tmp;
}
def code(x, y, z, t):
	t_1 = math.fabs(x) / ((y - z) * (t - z))
	tmp = 0
	if t_1 <= 1e-275:
		tmp = (math.fabs(x) / (z - t)) / (z - y)
	else:
		tmp = t_1
	return math.copysign(1.0, x) * tmp
function code(x, y, z, t)
	t_1 = Float64(abs(x) / Float64(Float64(y - z) * Float64(t - z)))
	tmp = 0.0
	if (t_1 <= 1e-275)
		tmp = Float64(Float64(abs(x) / Float64(z - t)) / Float64(z - y));
	else
		tmp = t_1;
	end
	return Float64(copysign(1.0, x) * tmp)
end
function tmp_2 = code(x, y, z, t)
	t_1 = abs(x) / ((y - z) * (t - z));
	tmp = 0.0;
	if (t_1 <= 1e-275)
		tmp = (abs(x) / (z - t)) / (z - y);
	else
		tmp = t_1;
	end
	tmp_2 = (sign(x) * abs(1.0)) * tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Abs[x], $MachinePrecision] / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[t$95$1, 1e-275], N[(N[(N[Abs[x], $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], t$95$1]), $MachinePrecision]]
\begin{array}{l}
t_1 := \frac{\left|x\right|}{\left(y - z\right) \cdot \left(t - z\right)}\\
\mathsf{copysign}\left(1, x\right) \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq 10^{-275}:\\
\;\;\;\;\frac{\frac{\left|x\right|}{z - t}}{z - y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z))) < 9.99999999999999934e-276

    1. Initial program 89.3%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y - z}} \]
      5. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{t - z}}}{y - z} \]
      6. sub-negate-revN/A

        \[\leadsto \frac{\frac{x}{\color{blue}{\mathsf{neg}\left(\left(z - t\right)\right)}}}{y - z} \]
      7. distribute-frac-neg2N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\frac{x}{z - t}\right)}}{y - z} \]
      8. lift--.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{z - t}\right)}{\color{blue}{y - z}} \]
      9. sub-negate-revN/A

        \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{z - t}\right)}{\color{blue}{\mathsf{neg}\left(\left(z - y\right)\right)}} \]
      10. frac-2neg-revN/A

        \[\leadsto \color{blue}{\frac{\frac{x}{z - t}}{z - y}} \]
      11. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{z - t}}{z - y}} \]
      12. lower-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{z - t}}}{z - y} \]
      13. lower--.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{z - t}}}{z - y} \]
      14. lower--.f6496.8%

        \[\leadsto \frac{\frac{x}{z - t}}{\color{blue}{z - y}} \]
    3. Applied rewrites96.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{z - t}}{z - y}} \]

    if 9.99999999999999934e-276 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 t z)))

    1. Initial program 89.3%

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

Alternative 2: 96.7% accurate, 0.7× speedup?

\[\frac{\frac{x}{z - \mathsf{min}\left(y, t\right)}}{z - \mathsf{max}\left(y, t\right)} \]
(FPCore (x y z t)
 :precision binary64
 (/ (/ x (- z (fmin y t))) (- z (fmax y t))))
double code(double x, double y, double z, double t) {
	return (x / (z - fmin(y, t))) / (z - fmax(y, t));
}
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)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (x / (z - fmin(y, t))) / (z - fmax(y, t))
end function
public static double code(double x, double y, double z, double t) {
	return (x / (z - fmin(y, t))) / (z - fmax(y, t));
}
def code(x, y, z, t):
	return (x / (z - fmin(y, t))) / (z - fmax(y, t))
function code(x, y, z, t)
	return Float64(Float64(x / Float64(z - fmin(y, t))) / Float64(z - fmax(y, t)))
end
function tmp = code(x, y, z, t)
	tmp = (x / (z - min(y, t))) / (z - max(y, t));
end
code[x_, y_, z_, t_] := N[(N[(x / N[(z - N[Min[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z - N[Max[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{\frac{x}{z - \mathsf{min}\left(y, t\right)}}{z - \mathsf{max}\left(y, t\right)}
Derivation
  1. Initial program 89.3%

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
    4. frac-2negN/A

      \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
    5. lift--.f64N/A

      \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
    6. sub-negate-revN/A

      \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
    7. lower-/.f64N/A

      \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
    8. distribute-neg-frac2N/A

      \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
    9. lift--.f64N/A

      \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
    10. sub-negate-revN/A

      \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
    11. lower-/.f64N/A

      \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
    12. lower--.f64N/A

      \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
    13. lower--.f6496.8%

      \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
  3. Applied rewrites96.8%

    \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
  4. Add Preprocessing

Alternative 3: 93.3% accurate, 0.6× speedup?

\[\begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+164}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - y}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+81}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -3.3e+164)
   (/ (/ x z) (- z y))
   (if (<= z 1.3e+81) (/ x (* (- y z) (- t z))) (/ (/ x z) (- z t)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -3.3e+164) {
		tmp = (x / z) / (z - y);
	} else if (z <= 1.3e+81) {
		tmp = x / ((y - z) * (t - z));
	} else {
		tmp = (x / z) / (z - t);
	}
	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)
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) :: tmp
    if (z <= (-3.3d+164)) then
        tmp = (x / z) / (z - y)
    else if (z <= 1.3d+81) then
        tmp = x / ((y - z) * (t - z))
    else
        tmp = (x / z) / (z - t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -3.3e+164) {
		tmp = (x / z) / (z - y);
	} else if (z <= 1.3e+81) {
		tmp = x / ((y - z) * (t - z));
	} else {
		tmp = (x / z) / (z - t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -3.3e+164:
		tmp = (x / z) / (z - y)
	elif z <= 1.3e+81:
		tmp = x / ((y - z) * (t - z))
	else:
		tmp = (x / z) / (z - t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -3.3e+164)
		tmp = Float64(Float64(x / z) / Float64(z - y));
	elseif (z <= 1.3e+81)
		tmp = Float64(x / Float64(Float64(y - z) * Float64(t - z)));
	else
		tmp = Float64(Float64(x / z) / Float64(z - t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -3.3e+164)
		tmp = (x / z) / (z - y);
	elseif (z <= 1.3e+81)
		tmp = x / ((y - z) * (t - z));
	else
		tmp = (x / z) / (z - t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.3e+164], N[(N[(x / z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+81], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+164}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - y}\\

\mathbf{elif}\;z \leq 1.3 \cdot 10^{+81}:\\
\;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{z - t}\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.29999999999999995e164

    1. Initial program 89.3%

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      4. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
      5. lift--.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
      6. sub-negate-revN/A

        \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
      7. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
      8. distribute-neg-frac2N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
      9. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
      10. sub-negate-revN/A

        \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
      11. lower-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
      12. lower--.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
      13. lower--.f6496.8%

        \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
    3. Applied rewrites96.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
    4. Taylor expanded in t around 0

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

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

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z - y\right)}} \]
      3. lower--.f6452.8%

        \[\leadsto \frac{x}{z \cdot \left(z - \color{blue}{y}\right)} \]
    6. Applied rewrites52.8%

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

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

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

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z - y}} \]
      4. lower-/.f64N/A

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z - y}} \]
      5. lower-/.f6457.5%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z} - y} \]
    8. Applied rewrites57.5%

      \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z - y}} \]

    if -3.29999999999999995e164 < z < 1.29999999999999996e81

    1. Initial program 89.3%

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]

    if 1.29999999999999996e81 < z

    1. Initial program 89.3%

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
      4. frac-2negN/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
      5. lift--.f64N/A

        \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
      6. sub-negate-revN/A

        \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
      7. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
      8. distribute-neg-frac2N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
      9. lift--.f64N/A

        \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
      10. sub-negate-revN/A

        \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
      11. lower-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
      12. lower--.f64N/A

        \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
      13. lower--.f6496.8%

        \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
    3. Applied rewrites96.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
    4. Taylor expanded in y around 0

      \[\leadsto \frac{\frac{x}{\color{blue}{z}}}{z - t} \]
    5. Step-by-step derivation
      1. Applied rewrites57.4%

        \[\leadsto \frac{\frac{x}{\color{blue}{z}}}{z - t} \]
    6. Recombined 3 regimes into one program.
    7. Add Preprocessing

    Alternative 4: 78.8% accurate, 0.5× speedup?

    \[\begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{-17}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - \mathsf{max}\left(y, t\right)}\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{-185}:\\ \;\;\;\;\frac{x}{\mathsf{min}\left(y, t\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-38}:\\ \;\;\;\;\frac{\frac{x}{\mathsf{min}\left(y, t\right) - z}}{\mathsf{max}\left(y, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - \mathsf{min}\left(y, t\right)}\\ \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (if (<= z -8.2e-17)
       (/ (/ x z) (- z (fmax y t)))
       (if (<= z 7.6e-185)
         (/ x (* (fmin y t) (- (fmax y t) z)))
         (if (<= z 8e-38)
           (/ (/ x (- (fmin y t) z)) (fmax y t))
           (/ (/ x z) (- z (fmin y t)))))))
    double code(double x, double y, double z, double t) {
    	double tmp;
    	if (z <= -8.2e-17) {
    		tmp = (x / z) / (z - fmax(y, t));
    	} else if (z <= 7.6e-185) {
    		tmp = x / (fmin(y, t) * (fmax(y, t) - z));
    	} else if (z <= 8e-38) {
    		tmp = (x / (fmin(y, t) - z)) / fmax(y, t);
    	} else {
    		tmp = (x / z) / (z - fmin(y, t));
    	}
    	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)
    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) :: tmp
        if (z <= (-8.2d-17)) then
            tmp = (x / z) / (z - fmax(y, t))
        else if (z <= 7.6d-185) then
            tmp = x / (fmin(y, t) * (fmax(y, t) - z))
        else if (z <= 8d-38) then
            tmp = (x / (fmin(y, t) - z)) / fmax(y, t)
        else
            tmp = (x / z) / (z - fmin(y, t))
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t) {
    	double tmp;
    	if (z <= -8.2e-17) {
    		tmp = (x / z) / (z - fmax(y, t));
    	} else if (z <= 7.6e-185) {
    		tmp = x / (fmin(y, t) * (fmax(y, t) - z));
    	} else if (z <= 8e-38) {
    		tmp = (x / (fmin(y, t) - z)) / fmax(y, t);
    	} else {
    		tmp = (x / z) / (z - fmin(y, t));
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	tmp = 0
    	if z <= -8.2e-17:
    		tmp = (x / z) / (z - fmax(y, t))
    	elif z <= 7.6e-185:
    		tmp = x / (fmin(y, t) * (fmax(y, t) - z))
    	elif z <= 8e-38:
    		tmp = (x / (fmin(y, t) - z)) / fmax(y, t)
    	else:
    		tmp = (x / z) / (z - fmin(y, t))
    	return tmp
    
    function code(x, y, z, t)
    	tmp = 0.0
    	if (z <= -8.2e-17)
    		tmp = Float64(Float64(x / z) / Float64(z - fmax(y, t)));
    	elseif (z <= 7.6e-185)
    		tmp = Float64(x / Float64(fmin(y, t) * Float64(fmax(y, t) - z)));
    	elseif (z <= 8e-38)
    		tmp = Float64(Float64(x / Float64(fmin(y, t) - z)) / fmax(y, t));
    	else
    		tmp = Float64(Float64(x / z) / Float64(z - fmin(y, t)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	tmp = 0.0;
    	if (z <= -8.2e-17)
    		tmp = (x / z) / (z - max(y, t));
    	elseif (z <= 7.6e-185)
    		tmp = x / (min(y, t) * (max(y, t) - z));
    	elseif (z <= 8e-38)
    		tmp = (x / (min(y, t) - z)) / max(y, t);
    	else
    		tmp = (x / z) / (z - min(y, t));
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_] := If[LessEqual[z, -8.2e-17], N[(N[(x / z), $MachinePrecision] / N[(z - N[Max[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.6e-185], N[(x / N[(N[Min[y, t], $MachinePrecision] * N[(N[Max[y, t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-38], N[(N[(x / N[(N[Min[y, t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] / N[Max[y, t], $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / N[(z - N[Min[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    \mathbf{if}\;z \leq -8.2 \cdot 10^{-17}:\\
    \;\;\;\;\frac{\frac{x}{z}}{z - \mathsf{max}\left(y, t\right)}\\
    
    \mathbf{elif}\;z \leq 7.6 \cdot 10^{-185}:\\
    \;\;\;\;\frac{x}{\mathsf{min}\left(y, t\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\
    
    \mathbf{elif}\;z \leq 8 \cdot 10^{-38}:\\
    \;\;\;\;\frac{\frac{x}{\mathsf{min}\left(y, t\right) - z}}{\mathsf{max}\left(y, t\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\frac{x}{z}}{z - \mathsf{min}\left(y, t\right)}\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if z < -8.2000000000000001e-17

      1. Initial program 89.3%

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

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

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

          \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
        4. frac-2negN/A

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
        5. lift--.f64N/A

          \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
        6. sub-negate-revN/A

          \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
        7. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
        8. distribute-neg-frac2N/A

          \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
        9. lift--.f64N/A

          \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
        10. sub-negate-revN/A

          \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
        11. lower-/.f64N/A

          \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
        12. lower--.f64N/A

          \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
        13. lower--.f6496.8%

          \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
      3. Applied rewrites96.8%

        \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
      4. Taylor expanded in y around 0

        \[\leadsto \frac{\frac{x}{\color{blue}{z}}}{z - t} \]
      5. Step-by-step derivation
        1. Applied rewrites57.4%

          \[\leadsto \frac{\frac{x}{\color{blue}{z}}}{z - t} \]

        if -8.2000000000000001e-17 < z < 7.5999999999999998e-185

        1. Initial program 89.3%

          \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
        2. Taylor expanded in y around inf

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

            \[\leadsto \frac{x}{y \cdot \color{blue}{\left(t - z\right)}} \]
          2. lower--.f6457.9%

            \[\leadsto \frac{x}{y \cdot \left(t - \color{blue}{z}\right)} \]
        4. Applied rewrites57.9%

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

        if 7.5999999999999998e-185 < z < 7.9999999999999997e-38

        1. Initial program 89.3%

          \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
        2. Taylor expanded in z around 0

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

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

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

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

              \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t}} \]
            4. lift--.f64N/A

              \[\leadsto \frac{\frac{x}{\color{blue}{y - z}}}{t} \]
            5. sub-negate-revN/A

              \[\leadsto \frac{\frac{x}{\color{blue}{\mathsf{neg}\left(\left(z - y\right)\right)}}}{t} \]
            6. lift--.f64N/A

              \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(z - y\right)}\right)}}{t} \]
            7. distribute-neg-frac2N/A

              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\frac{x}{z - y}\right)}}{t} \]
            8. lift-/.f64N/A

              \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\frac{x}{z - y}}\right)}{t} \]
            9. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{z - y}\right)}{t}} \]
            10. *-rgt-identityN/A

              \[\leadsto \frac{\mathsf{neg}\left(\frac{\color{blue}{x \cdot 1}}{z - y}\right)}{t} \]
            11. metadata-evalN/A

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

              \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\frac{x \cdot \left(\mathsf{neg}\left(-1\right)\right)}{z - y}}\right)}{t} \]
            13. distribute-neg-frac2N/A

              \[\leadsto \frac{\color{blue}{\frac{x \cdot \left(\mathsf{neg}\left(-1\right)\right)}{\mathsf{neg}\left(\left(z - y\right)\right)}}}{t} \]
            14. lift--.f64N/A

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

              \[\leadsto \frac{\frac{x \cdot \left(\mathsf{neg}\left(-1\right)\right)}{\color{blue}{y - z}}}{t} \]
            16. lift--.f64N/A

              \[\leadsto \frac{\frac{x \cdot \left(\mathsf{neg}\left(-1\right)\right)}{\color{blue}{y - z}}}{t} \]
            17. lower-/.f64N/A

              \[\leadsto \frac{\color{blue}{\frac{x \cdot \left(\mathsf{neg}\left(-1\right)\right)}{y - z}}}{t} \]
            18. metadata-evalN/A

              \[\leadsto \frac{\frac{x \cdot \color{blue}{1}}{y - z}}{t} \]
            19. *-rgt-identity63.1%

              \[\leadsto \frac{\frac{\color{blue}{x}}{y - z}}{t} \]
          3. Applied rewrites63.1%

            \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t}} \]

          if 7.9999999999999997e-38 < z

          1. Initial program 89.3%

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

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

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

              \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
            4. frac-2negN/A

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
            5. lift--.f64N/A

              \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
            6. sub-negate-revN/A

              \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
            7. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
            8. distribute-neg-frac2N/A

              \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
            9. lift--.f64N/A

              \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
            10. sub-negate-revN/A

              \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
            11. lower-/.f64N/A

              \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
            12. lower--.f64N/A

              \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
            13. lower--.f6496.8%

              \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
          3. Applied rewrites96.8%

            \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
          4. Taylor expanded in t around 0

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

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

              \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z - y\right)}} \]
            3. lower--.f6452.8%

              \[\leadsto \frac{x}{z \cdot \left(z - \color{blue}{y}\right)} \]
          6. Applied rewrites52.8%

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

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

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

              \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z - y}} \]
            4. lower-/.f64N/A

              \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z - y}} \]
            5. lower-/.f6457.5%

              \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z} - y} \]
          8. Applied rewrites57.5%

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

        Alternative 5: 78.8% accurate, 0.5× speedup?

        \[\begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{-17}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - \mathsf{max}\left(y, t\right)}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-172}:\\ \;\;\;\;\frac{x}{\mathsf{min}\left(y, t\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-38}:\\ \;\;\;\;\frac{\frac{x}{\mathsf{max}\left(y, t\right)}}{\mathsf{min}\left(y, t\right) - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - \mathsf{min}\left(y, t\right)}\\ \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (if (<= z -8.2e-17)
           (/ (/ x z) (- z (fmax y t)))
           (if (<= z 1.35e-172)
             (/ x (* (fmin y t) (- (fmax y t) z)))
             (if (<= z 8e-38)
               (/ (/ x (fmax y t)) (- (fmin y t) z))
               (/ (/ x z) (- z (fmin y t)))))))
        double code(double x, double y, double z, double t) {
        	double tmp;
        	if (z <= -8.2e-17) {
        		tmp = (x / z) / (z - fmax(y, t));
        	} else if (z <= 1.35e-172) {
        		tmp = x / (fmin(y, t) * (fmax(y, t) - z));
        	} else if (z <= 8e-38) {
        		tmp = (x / fmax(y, t)) / (fmin(y, t) - z);
        	} else {
        		tmp = (x / z) / (z - fmin(y, t));
        	}
        	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)
        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) :: tmp
            if (z <= (-8.2d-17)) then
                tmp = (x / z) / (z - fmax(y, t))
            else if (z <= 1.35d-172) then
                tmp = x / (fmin(y, t) * (fmax(y, t) - z))
            else if (z <= 8d-38) then
                tmp = (x / fmax(y, t)) / (fmin(y, t) - z)
            else
                tmp = (x / z) / (z - fmin(y, t))
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t) {
        	double tmp;
        	if (z <= -8.2e-17) {
        		tmp = (x / z) / (z - fmax(y, t));
        	} else if (z <= 1.35e-172) {
        		tmp = x / (fmin(y, t) * (fmax(y, t) - z));
        	} else if (z <= 8e-38) {
        		tmp = (x / fmax(y, t)) / (fmin(y, t) - z);
        	} else {
        		tmp = (x / z) / (z - fmin(y, t));
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	tmp = 0
        	if z <= -8.2e-17:
        		tmp = (x / z) / (z - fmax(y, t))
        	elif z <= 1.35e-172:
        		tmp = x / (fmin(y, t) * (fmax(y, t) - z))
        	elif z <= 8e-38:
        		tmp = (x / fmax(y, t)) / (fmin(y, t) - z)
        	else:
        		tmp = (x / z) / (z - fmin(y, t))
        	return tmp
        
        function code(x, y, z, t)
        	tmp = 0.0
        	if (z <= -8.2e-17)
        		tmp = Float64(Float64(x / z) / Float64(z - fmax(y, t)));
        	elseif (z <= 1.35e-172)
        		tmp = Float64(x / Float64(fmin(y, t) * Float64(fmax(y, t) - z)));
        	elseif (z <= 8e-38)
        		tmp = Float64(Float64(x / fmax(y, t)) / Float64(fmin(y, t) - z));
        	else
        		tmp = Float64(Float64(x / z) / Float64(z - fmin(y, t)));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t)
        	tmp = 0.0;
        	if (z <= -8.2e-17)
        		tmp = (x / z) / (z - max(y, t));
        	elseif (z <= 1.35e-172)
        		tmp = x / (min(y, t) * (max(y, t) - z));
        	elseif (z <= 8e-38)
        		tmp = (x / max(y, t)) / (min(y, t) - z);
        	else
        		tmp = (x / z) / (z - min(y, t));
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_] := If[LessEqual[z, -8.2e-17], N[(N[(x / z), $MachinePrecision] / N[(z - N[Max[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e-172], N[(x / N[(N[Min[y, t], $MachinePrecision] * N[(N[Max[y, t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-38], N[(N[(x / N[Max[y, t], $MachinePrecision]), $MachinePrecision] / N[(N[Min[y, t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / N[(z - N[Min[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
        
        \begin{array}{l}
        \mathbf{if}\;z \leq -8.2 \cdot 10^{-17}:\\
        \;\;\;\;\frac{\frac{x}{z}}{z - \mathsf{max}\left(y, t\right)}\\
        
        \mathbf{elif}\;z \leq 1.35 \cdot 10^{-172}:\\
        \;\;\;\;\frac{x}{\mathsf{min}\left(y, t\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\
        
        \mathbf{elif}\;z \leq 8 \cdot 10^{-38}:\\
        \;\;\;\;\frac{\frac{x}{\mathsf{max}\left(y, t\right)}}{\mathsf{min}\left(y, t\right) - z}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\frac{x}{z}}{z - \mathsf{min}\left(y, t\right)}\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if z < -8.2000000000000001e-17

          1. Initial program 89.3%

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

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

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

              \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
            4. frac-2negN/A

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
            5. lift--.f64N/A

              \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
            6. sub-negate-revN/A

              \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
            7. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
            8. distribute-neg-frac2N/A

              \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
            9. lift--.f64N/A

              \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
            10. sub-negate-revN/A

              \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
            11. lower-/.f64N/A

              \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
            12. lower--.f64N/A

              \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
            13. lower--.f6496.8%

              \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
          3. Applied rewrites96.8%

            \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
          4. Taylor expanded in y around 0

            \[\leadsto \frac{\frac{x}{\color{blue}{z}}}{z - t} \]
          5. Step-by-step derivation
            1. Applied rewrites57.4%

              \[\leadsto \frac{\frac{x}{\color{blue}{z}}}{z - t} \]

            if -8.2000000000000001e-17 < z < 1.35000000000000013e-172

            1. Initial program 89.3%

              \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
            2. Taylor expanded in y around inf

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

                \[\leadsto \frac{x}{y \cdot \color{blue}{\left(t - z\right)}} \]
              2. lower--.f6457.9%

                \[\leadsto \frac{x}{y \cdot \left(t - \color{blue}{z}\right)} \]
            4. Applied rewrites57.9%

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

            if 1.35000000000000013e-172 < z < 7.9999999999999997e-38

            1. Initial program 89.3%

              \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
            2. Taylor expanded in z around 0

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

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

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

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

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

                  \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y - z}} \]
                5. lower-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y - z}} \]
                6. *-rgt-identityN/A

                  \[\leadsto \frac{\frac{\color{blue}{x \cdot 1}}{t}}{y - z} \]
                7. metadata-evalN/A

                  \[\leadsto \frac{\frac{x \cdot \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)}}{t}}{y - z} \]
                8. lower-/.f64N/A

                  \[\leadsto \frac{\color{blue}{\frac{x \cdot \left(\mathsf{neg}\left(-1\right)\right)}{t}}}{y - z} \]
                9. metadata-evalN/A

                  \[\leadsto \frac{\frac{x \cdot \color{blue}{1}}{t}}{y - z} \]
                10. *-rgt-identity59.0%

                  \[\leadsto \frac{\frac{\color{blue}{x}}{t}}{y - z} \]
              3. Applied rewrites59.0%

                \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y - z}} \]

              if 7.9999999999999997e-38 < z

              1. Initial program 89.3%

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

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

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

                  \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
                4. frac-2negN/A

                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                5. lift--.f64N/A

                  \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                6. sub-negate-revN/A

                  \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
                7. lower-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
                8. distribute-neg-frac2N/A

                  \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
                9. lift--.f64N/A

                  \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
                10. sub-negate-revN/A

                  \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                11. lower-/.f64N/A

                  \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
                12. lower--.f64N/A

                  \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                13. lower--.f6496.8%

                  \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
              3. Applied rewrites96.8%

                \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
              4. Taylor expanded in t around 0

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

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

                  \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z - y\right)}} \]
                3. lower--.f6452.8%

                  \[\leadsto \frac{x}{z \cdot \left(z - \color{blue}{y}\right)} \]
              6. Applied rewrites52.8%

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

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

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

                  \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z - y}} \]
                4. lower-/.f64N/A

                  \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z - y}} \]
                5. lower-/.f6457.5%

                  \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z} - y} \]
              8. Applied rewrites57.5%

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

            Alternative 6: 78.4% accurate, 0.4× speedup?

            \[\begin{array}{l} t_1 := \frac{\frac{x}{\mathsf{max}\left(y, t\right)}}{\mathsf{min}\left(y, t\right) - z}\\ t_2 := z - \mathsf{min}\left(y, t\right)\\ \mathbf{if}\;z \leq -1.06 \cdot 10^{+30}:\\ \;\;\;\;\frac{\frac{x}{t\_2}}{z}\\ \mathbf{elif}\;z \leq -1.4 \cdot 10^{-31}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-172}:\\ \;\;\;\;\frac{x}{\mathsf{min}\left(y, t\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-38}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{t\_2}\\ \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (let* ((t_1 (/ (/ x (fmax y t)) (- (fmin y t) z))) (t_2 (- z (fmin y t))))
               (if (<= z -1.06e+30)
                 (/ (/ x t_2) z)
                 (if (<= z -1.4e-31)
                   t_1
                   (if (<= z 1.35e-172)
                     (/ x (* (fmin y t) (- (fmax y t) z)))
                     (if (<= z 8e-38) t_1 (/ (/ x z) t_2)))))))
            double code(double x, double y, double z, double t) {
            	double t_1 = (x / fmax(y, t)) / (fmin(y, t) - z);
            	double t_2 = z - fmin(y, t);
            	double tmp;
            	if (z <= -1.06e+30) {
            		tmp = (x / t_2) / z;
            	} else if (z <= -1.4e-31) {
            		tmp = t_1;
            	} else if (z <= 1.35e-172) {
            		tmp = x / (fmin(y, t) * (fmax(y, t) - z));
            	} else if (z <= 8e-38) {
            		tmp = t_1;
            	} else {
            		tmp = (x / z) / 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)
            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) :: t_1
                real(8) :: t_2
                real(8) :: tmp
                t_1 = (x / fmax(y, t)) / (fmin(y, t) - z)
                t_2 = z - fmin(y, t)
                if (z <= (-1.06d+30)) then
                    tmp = (x / t_2) / z
                else if (z <= (-1.4d-31)) then
                    tmp = t_1
                else if (z <= 1.35d-172) then
                    tmp = x / (fmin(y, t) * (fmax(y, t) - z))
                else if (z <= 8d-38) then
                    tmp = t_1
                else
                    tmp = (x / z) / t_2
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t) {
            	double t_1 = (x / fmax(y, t)) / (fmin(y, t) - z);
            	double t_2 = z - fmin(y, t);
            	double tmp;
            	if (z <= -1.06e+30) {
            		tmp = (x / t_2) / z;
            	} else if (z <= -1.4e-31) {
            		tmp = t_1;
            	} else if (z <= 1.35e-172) {
            		tmp = x / (fmin(y, t) * (fmax(y, t) - z));
            	} else if (z <= 8e-38) {
            		tmp = t_1;
            	} else {
            		tmp = (x / z) / t_2;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	t_1 = (x / fmax(y, t)) / (fmin(y, t) - z)
            	t_2 = z - fmin(y, t)
            	tmp = 0
            	if z <= -1.06e+30:
            		tmp = (x / t_2) / z
            	elif z <= -1.4e-31:
            		tmp = t_1
            	elif z <= 1.35e-172:
            		tmp = x / (fmin(y, t) * (fmax(y, t) - z))
            	elif z <= 8e-38:
            		tmp = t_1
            	else:
            		tmp = (x / z) / t_2
            	return tmp
            
            function code(x, y, z, t)
            	t_1 = Float64(Float64(x / fmax(y, t)) / Float64(fmin(y, t) - z))
            	t_2 = Float64(z - fmin(y, t))
            	tmp = 0.0
            	if (z <= -1.06e+30)
            		tmp = Float64(Float64(x / t_2) / z);
            	elseif (z <= -1.4e-31)
            		tmp = t_1;
            	elseif (z <= 1.35e-172)
            		tmp = Float64(x / Float64(fmin(y, t) * Float64(fmax(y, t) - z)));
            	elseif (z <= 8e-38)
            		tmp = t_1;
            	else
            		tmp = Float64(Float64(x / z) / t_2);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	t_1 = (x / max(y, t)) / (min(y, t) - z);
            	t_2 = z - min(y, t);
            	tmp = 0.0;
            	if (z <= -1.06e+30)
            		tmp = (x / t_2) / z;
            	elseif (z <= -1.4e-31)
            		tmp = t_1;
            	elseif (z <= 1.35e-172)
            		tmp = x / (min(y, t) * (max(y, t) - z));
            	elseif (z <= 8e-38)
            		tmp = t_1;
            	else
            		tmp = (x / z) / t_2;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / N[Max[y, t], $MachinePrecision]), $MachinePrecision] / N[(N[Min[y, t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z - N[Min[y, t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.06e+30], N[(N[(x / t$95$2), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -1.4e-31], t$95$1, If[LessEqual[z, 1.35e-172], N[(x / N[(N[Min[y, t], $MachinePrecision] * N[(N[Max[y, t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-38], t$95$1, N[(N[(x / z), $MachinePrecision] / t$95$2), $MachinePrecision]]]]]]]
            
            \begin{array}{l}
            t_1 := \frac{\frac{x}{\mathsf{max}\left(y, t\right)}}{\mathsf{min}\left(y, t\right) - z}\\
            t_2 := z - \mathsf{min}\left(y, t\right)\\
            \mathbf{if}\;z \leq -1.06 \cdot 10^{+30}:\\
            \;\;\;\;\frac{\frac{x}{t\_2}}{z}\\
            
            \mathbf{elif}\;z \leq -1.4 \cdot 10^{-31}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq 1.35 \cdot 10^{-172}:\\
            \;\;\;\;\frac{x}{\mathsf{min}\left(y, t\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\
            
            \mathbf{elif}\;z \leq 8 \cdot 10^{-38}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{\frac{x}{z}}{t\_2}\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 4 regimes
            2. if z < -1.06e30

              1. Initial program 89.3%

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

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

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

                  \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
                4. frac-2negN/A

                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                5. lift--.f64N/A

                  \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                6. sub-negate-revN/A

                  \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
                7. lower-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
                8. distribute-neg-frac2N/A

                  \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
                9. lift--.f64N/A

                  \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
                10. sub-negate-revN/A

                  \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                11. lower-/.f64N/A

                  \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
                12. lower--.f64N/A

                  \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                13. lower--.f6496.8%

                  \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
              3. Applied rewrites96.8%

                \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
              4. Taylor expanded in t around 0

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

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

                  \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z - y\right)}} \]
                3. lower--.f6452.8%

                  \[\leadsto \frac{x}{z \cdot \left(z - \color{blue}{y}\right)} \]
              6. Applied rewrites52.8%

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

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

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

                  \[\leadsto \frac{x}{\left(z - y\right) \cdot \color{blue}{z}} \]
                4. associate-/r*N/A

                  \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z}} \]
                5. mult-flipN/A

                  \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                6. lift-/.f64N/A

                  \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                7. *-commutativeN/A

                  \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                8. lift-*.f64N/A

                  \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                9. lower-/.f6459.6%

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

                  \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                11. *-commutativeN/A

                  \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                12. lift-/.f64N/A

                  \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                13. mult-flipN/A

                  \[\leadsto \frac{\frac{x}{z - y}}{z} \]
                14. lower-/.f6459.6%

                  \[\leadsto \frac{\frac{x}{z - y}}{z} \]
              8. Applied rewrites59.6%

                \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z}} \]

              if -1.06e30 < z < -1.3999999999999999e-31 or 1.35000000000000013e-172 < z < 7.9999999999999997e-38

              1. Initial program 89.3%

                \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
              2. Taylor expanded in z around 0

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y - z}} \]
                  5. lower-/.f64N/A

                    \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y - z}} \]
                  6. *-rgt-identityN/A

                    \[\leadsto \frac{\frac{\color{blue}{x \cdot 1}}{t}}{y - z} \]
                  7. metadata-evalN/A

                    \[\leadsto \frac{\frac{x \cdot \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)}}{t}}{y - z} \]
                  8. lower-/.f64N/A

                    \[\leadsto \frac{\color{blue}{\frac{x \cdot \left(\mathsf{neg}\left(-1\right)\right)}{t}}}{y - z} \]
                  9. metadata-evalN/A

                    \[\leadsto \frac{\frac{x \cdot \color{blue}{1}}{t}}{y - z} \]
                  10. *-rgt-identity59.0%

                    \[\leadsto \frac{\frac{\color{blue}{x}}{t}}{y - z} \]
                3. Applied rewrites59.0%

                  \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y - z}} \]

                if -1.3999999999999999e-31 < z < 1.35000000000000013e-172

                1. Initial program 89.3%

                  \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
                2. Taylor expanded in y around inf

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

                    \[\leadsto \frac{x}{y \cdot \color{blue}{\left(t - z\right)}} \]
                  2. lower--.f6457.9%

                    \[\leadsto \frac{x}{y \cdot \left(t - \color{blue}{z}\right)} \]
                4. Applied rewrites57.9%

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

                if 7.9999999999999997e-38 < z

                1. Initial program 89.3%

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

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

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

                    \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
                  4. frac-2negN/A

                    \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                  5. lift--.f64N/A

                    \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                  6. sub-negate-revN/A

                    \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
                  7. lower-/.f64N/A

                    \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
                  8. distribute-neg-frac2N/A

                    \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
                  9. lift--.f64N/A

                    \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
                  10. sub-negate-revN/A

                    \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                  11. lower-/.f64N/A

                    \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
                  12. lower--.f64N/A

                    \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                  13. lower--.f6496.8%

                    \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
                3. Applied rewrites96.8%

                  \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
                4. Taylor expanded in t around 0

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

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

                    \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z - y\right)}} \]
                  3. lower--.f6452.8%

                    \[\leadsto \frac{x}{z \cdot \left(z - \color{blue}{y}\right)} \]
                6. Applied rewrites52.8%

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

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

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

                    \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z - y}} \]
                  4. lower-/.f64N/A

                    \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z - y}} \]
                  5. lower-/.f6457.5%

                    \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z} - y} \]
                8. Applied rewrites57.5%

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

              Alternative 7: 77.8% accurate, 0.5× speedup?

              \[\begin{array}{l} t_1 := z - \mathsf{min}\left(y, t\right)\\ \mathbf{if}\;z \leq -3.7 \cdot 10^{-66}:\\ \;\;\;\;\frac{\frac{x}{t\_1}}{z}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-55}:\\ \;\;\;\;\frac{x}{\left(\mathsf{min}\left(y, t\right) - z\right) \cdot \mathsf{max}\left(y, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{t\_1}\\ \end{array} \]
              (FPCore (x y z t)
               :precision binary64
               (let* ((t_1 (- z (fmin y t))))
                 (if (<= z -3.7e-66)
                   (/ (/ x t_1) z)
                   (if (<= z 3.4e-55)
                     (/ x (* (- (fmin y t) z) (fmax y t)))
                     (/ (/ x z) t_1)))))
              double code(double x, double y, double z, double t) {
              	double t_1 = z - fmin(y, t);
              	double tmp;
              	if (z <= -3.7e-66) {
              		tmp = (x / t_1) / z;
              	} else if (z <= 3.4e-55) {
              		tmp = x / ((fmin(y, t) - z) * fmax(y, t));
              	} else {
              		tmp = (x / z) / 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)
              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) :: t_1
                  real(8) :: tmp
                  t_1 = z - fmin(y, t)
                  if (z <= (-3.7d-66)) then
                      tmp = (x / t_1) / z
                  else if (z <= 3.4d-55) then
                      tmp = x / ((fmin(y, t) - z) * fmax(y, t))
                  else
                      tmp = (x / z) / t_1
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t) {
              	double t_1 = z - fmin(y, t);
              	double tmp;
              	if (z <= -3.7e-66) {
              		tmp = (x / t_1) / z;
              	} else if (z <= 3.4e-55) {
              		tmp = x / ((fmin(y, t) - z) * fmax(y, t));
              	} else {
              		tmp = (x / z) / t_1;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t):
              	t_1 = z - fmin(y, t)
              	tmp = 0
              	if z <= -3.7e-66:
              		tmp = (x / t_1) / z
              	elif z <= 3.4e-55:
              		tmp = x / ((fmin(y, t) - z) * fmax(y, t))
              	else:
              		tmp = (x / z) / t_1
              	return tmp
              
              function code(x, y, z, t)
              	t_1 = Float64(z - fmin(y, t))
              	tmp = 0.0
              	if (z <= -3.7e-66)
              		tmp = Float64(Float64(x / t_1) / z);
              	elseif (z <= 3.4e-55)
              		tmp = Float64(x / Float64(Float64(fmin(y, t) - z) * fmax(y, t)));
              	else
              		tmp = Float64(Float64(x / z) / t_1);
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t)
              	t_1 = z - min(y, t);
              	tmp = 0.0;
              	if (z <= -3.7e-66)
              		tmp = (x / t_1) / z;
              	elseif (z <= 3.4e-55)
              		tmp = x / ((min(y, t) - z) * max(y, t));
              	else
              		tmp = (x / z) / t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z - N[Min[y, t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.7e-66], N[(N[(x / t$95$1), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 3.4e-55], N[(x / N[(N[(N[Min[y, t], $MachinePrecision] - z), $MachinePrecision] * N[Max[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / t$95$1), $MachinePrecision]]]]
              
              \begin{array}{l}
              t_1 := z - \mathsf{min}\left(y, t\right)\\
              \mathbf{if}\;z \leq -3.7 \cdot 10^{-66}:\\
              \;\;\;\;\frac{\frac{x}{t\_1}}{z}\\
              
              \mathbf{elif}\;z \leq 3.4 \cdot 10^{-55}:\\
              \;\;\;\;\frac{x}{\left(\mathsf{min}\left(y, t\right) - z\right) \cdot \mathsf{max}\left(y, t\right)}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{\frac{x}{z}}{t\_1}\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if z < -3.7000000000000002e-66

                1. Initial program 89.3%

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

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

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

                    \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
                  4. frac-2negN/A

                    \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                  5. lift--.f64N/A

                    \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                  6. sub-negate-revN/A

                    \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
                  7. lower-/.f64N/A

                    \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
                  8. distribute-neg-frac2N/A

                    \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
                  9. lift--.f64N/A

                    \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
                  10. sub-negate-revN/A

                    \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                  11. lower-/.f64N/A

                    \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
                  12. lower--.f64N/A

                    \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                  13. lower--.f6496.8%

                    \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
                3. Applied rewrites96.8%

                  \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
                4. Taylor expanded in t around 0

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

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

                    \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z - y\right)}} \]
                  3. lower--.f6452.8%

                    \[\leadsto \frac{x}{z \cdot \left(z - \color{blue}{y}\right)} \]
                6. Applied rewrites52.8%

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

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

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

                    \[\leadsto \frac{x}{\left(z - y\right) \cdot \color{blue}{z}} \]
                  4. associate-/r*N/A

                    \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z}} \]
                  5. mult-flipN/A

                    \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                  6. lift-/.f64N/A

                    \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                  7. *-commutativeN/A

                    \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                  8. lift-*.f64N/A

                    \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                  9. lower-/.f6459.6%

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

                    \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                  11. *-commutativeN/A

                    \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                  12. lift-/.f64N/A

                    \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                  13. mult-flipN/A

                    \[\leadsto \frac{\frac{x}{z - y}}{z} \]
                  14. lower-/.f6459.6%

                    \[\leadsto \frac{\frac{x}{z - y}}{z} \]
                8. Applied rewrites59.6%

                  \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z}} \]

                if -3.7000000000000002e-66 < z < 3.39999999999999973e-55

                1. Initial program 89.3%

                  \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
                2. Taylor expanded in z around 0

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

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

                  if 3.39999999999999973e-55 < z

                  1. Initial program 89.3%

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

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

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

                      \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
                    4. frac-2negN/A

                      \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                    5. lift--.f64N/A

                      \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                    6. sub-negate-revN/A

                      \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
                    7. lower-/.f64N/A

                      \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
                    8. distribute-neg-frac2N/A

                      \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
                    9. lift--.f64N/A

                      \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
                    10. sub-negate-revN/A

                      \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                    11. lower-/.f64N/A

                      \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
                    12. lower--.f64N/A

                      \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                    13. lower--.f6496.8%

                      \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
                  3. Applied rewrites96.8%

                    \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
                  4. Taylor expanded in t around 0

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

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

                      \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z - y\right)}} \]
                    3. lower--.f6452.8%

                      \[\leadsto \frac{x}{z \cdot \left(z - \color{blue}{y}\right)} \]
                  6. Applied rewrites52.8%

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

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

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

                      \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z - y}} \]
                    4. lower-/.f64N/A

                      \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z - y}} \]
                    5. lower-/.f6457.5%

                      \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z} - y} \]
                  8. Applied rewrites57.5%

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

                Alternative 8: 77.8% accurate, 0.5× speedup?

                \[\begin{array}{l} t_1 := \frac{\frac{x}{z}}{z - \mathsf{min}\left(y, t\right)}\\ \mathbf{if}\;z \leq -3.7 \cdot 10^{-66}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-55}:\\ \;\;\;\;\frac{x}{\left(\mathsf{min}\left(y, t\right) - z\right) \cdot \mathsf{max}\left(y, t\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                (FPCore (x y z t)
                 :precision binary64
                 (let* ((t_1 (/ (/ x z) (- z (fmin y t)))))
                   (if (<= z -3.7e-66)
                     t_1
                     (if (<= z 3.4e-55) (/ x (* (- (fmin y t) z) (fmax y t))) t_1))))
                double code(double x, double y, double z, double t) {
                	double t_1 = (x / z) / (z - fmin(y, t));
                	double tmp;
                	if (z <= -3.7e-66) {
                		tmp = t_1;
                	} else if (z <= 3.4e-55) {
                		tmp = x / ((fmin(y, t) - z) * fmax(y, t));
                	} 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)
                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) :: t_1
                    real(8) :: tmp
                    t_1 = (x / z) / (z - fmin(y, t))
                    if (z <= (-3.7d-66)) then
                        tmp = t_1
                    else if (z <= 3.4d-55) then
                        tmp = x / ((fmin(y, t) - z) * fmax(y, t))
                    else
                        tmp = t_1
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z, double t) {
                	double t_1 = (x / z) / (z - fmin(y, t));
                	double tmp;
                	if (z <= -3.7e-66) {
                		tmp = t_1;
                	} else if (z <= 3.4e-55) {
                		tmp = x / ((fmin(y, t) - z) * fmax(y, t));
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t):
                	t_1 = (x / z) / (z - fmin(y, t))
                	tmp = 0
                	if z <= -3.7e-66:
                		tmp = t_1
                	elif z <= 3.4e-55:
                		tmp = x / ((fmin(y, t) - z) * fmax(y, t))
                	else:
                		tmp = t_1
                	return tmp
                
                function code(x, y, z, t)
                	t_1 = Float64(Float64(x / z) / Float64(z - fmin(y, t)))
                	tmp = 0.0
                	if (z <= -3.7e-66)
                		tmp = t_1;
                	elseif (z <= 3.4e-55)
                		tmp = Float64(x / Float64(Float64(fmin(y, t) - z) * fmax(y, t)));
                	else
                		tmp = t_1;
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t)
                	t_1 = (x / z) / (z - min(y, t));
                	tmp = 0.0;
                	if (z <= -3.7e-66)
                		tmp = t_1;
                	elseif (z <= 3.4e-55)
                		tmp = x / ((min(y, t) - z) * max(y, t));
                	else
                		tmp = t_1;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / N[(z - N[Min[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.7e-66], t$95$1, If[LessEqual[z, 3.4e-55], N[(x / N[(N[(N[Min[y, t], $MachinePrecision] - z), $MachinePrecision] * N[Max[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                
                \begin{array}{l}
                t_1 := \frac{\frac{x}{z}}{z - \mathsf{min}\left(y, t\right)}\\
                \mathbf{if}\;z \leq -3.7 \cdot 10^{-66}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;z \leq 3.4 \cdot 10^{-55}:\\
                \;\;\;\;\frac{x}{\left(\mathsf{min}\left(y, t\right) - z\right) \cdot \mathsf{max}\left(y, t\right)}\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if z < -3.7000000000000002e-66 or 3.39999999999999973e-55 < z

                  1. Initial program 89.3%

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

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

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

                      \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
                    4. frac-2negN/A

                      \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                    5. lift--.f64N/A

                      \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                    6. sub-negate-revN/A

                      \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
                    7. lower-/.f64N/A

                      \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
                    8. distribute-neg-frac2N/A

                      \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
                    9. lift--.f64N/A

                      \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
                    10. sub-negate-revN/A

                      \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                    11. lower-/.f64N/A

                      \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
                    12. lower--.f64N/A

                      \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                    13. lower--.f6496.8%

                      \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
                  3. Applied rewrites96.8%

                    \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
                  4. Taylor expanded in t around 0

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

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

                      \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z - y\right)}} \]
                    3. lower--.f6452.8%

                      \[\leadsto \frac{x}{z \cdot \left(z - \color{blue}{y}\right)} \]
                  6. Applied rewrites52.8%

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

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

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

                      \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z - y}} \]
                    4. lower-/.f64N/A

                      \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z - y}} \]
                    5. lower-/.f6457.5%

                      \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z} - y} \]
                  8. Applied rewrites57.5%

                    \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z - y}} \]

                  if -3.7000000000000002e-66 < z < 3.39999999999999973e-55

                  1. Initial program 89.3%

                    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
                  2. Taylor expanded in z around 0

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

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

                  Alternative 9: 75.0% accurate, 0.6× speedup?

                  \[\begin{array}{l} t_1 := \frac{x}{z \cdot \left(z - y\right)}\\ \mathbf{if}\;z \leq -4.1 \cdot 10^{+164}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-66}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-55}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                  (FPCore (x y z t)
                   :precision binary64
                   (let* ((t_1 (/ x (* z (- z y)))))
                     (if (<= z -4.1e+164)
                       (/ (/ x z) z)
                       (if (<= z -3.7e-66) t_1 (if (<= z 3.4e-55) (/ x (* (- y z) t)) t_1)))))
                  double code(double x, double y, double z, double t) {
                  	double t_1 = x / (z * (z - y));
                  	double tmp;
                  	if (z <= -4.1e+164) {
                  		tmp = (x / z) / z;
                  	} else if (z <= -3.7e-66) {
                  		tmp = t_1;
                  	} else if (z <= 3.4e-55) {
                  		tmp = x / ((y - z) * t);
                  	} 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)
                  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) :: t_1
                      real(8) :: tmp
                      t_1 = x / (z * (z - y))
                      if (z <= (-4.1d+164)) then
                          tmp = (x / z) / z
                      else if (z <= (-3.7d-66)) then
                          tmp = t_1
                      else if (z <= 3.4d-55) then
                          tmp = x / ((y - z) * t)
                      else
                          tmp = t_1
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t) {
                  	double t_1 = x / (z * (z - y));
                  	double tmp;
                  	if (z <= -4.1e+164) {
                  		tmp = (x / z) / z;
                  	} else if (z <= -3.7e-66) {
                  		tmp = t_1;
                  	} else if (z <= 3.4e-55) {
                  		tmp = x / ((y - z) * t);
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t):
                  	t_1 = x / (z * (z - y))
                  	tmp = 0
                  	if z <= -4.1e+164:
                  		tmp = (x / z) / z
                  	elif z <= -3.7e-66:
                  		tmp = t_1
                  	elif z <= 3.4e-55:
                  		tmp = x / ((y - z) * t)
                  	else:
                  		tmp = t_1
                  	return tmp
                  
                  function code(x, y, z, t)
                  	t_1 = Float64(x / Float64(z * Float64(z - y)))
                  	tmp = 0.0
                  	if (z <= -4.1e+164)
                  		tmp = Float64(Float64(x / z) / z);
                  	elseif (z <= -3.7e-66)
                  		tmp = t_1;
                  	elseif (z <= 3.4e-55)
                  		tmp = Float64(x / Float64(Float64(y - z) * t));
                  	else
                  		tmp = t_1;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t)
                  	t_1 = x / (z * (z - y));
                  	tmp = 0.0;
                  	if (z <= -4.1e+164)
                  		tmp = (x / z) / z;
                  	elseif (z <= -3.7e-66)
                  		tmp = t_1;
                  	elseif (z <= 3.4e-55)
                  		tmp = x / ((y - z) * t);
                  	else
                  		tmp = t_1;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.1e+164], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -3.7e-66], t$95$1, If[LessEqual[z, 3.4e-55], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                  
                  \begin{array}{l}
                  t_1 := \frac{x}{z \cdot \left(z - y\right)}\\
                  \mathbf{if}\;z \leq -4.1 \cdot 10^{+164}:\\
                  \;\;\;\;\frac{\frac{x}{z}}{z}\\
                  
                  \mathbf{elif}\;z \leq -3.7 \cdot 10^{-66}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;z \leq 3.4 \cdot 10^{-55}:\\
                  \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if z < -4.10000000000000016e164

                    1. Initial program 89.3%

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

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

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

                        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
                      4. frac-2negN/A

                        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                      5. lift--.f64N/A

                        \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                      6. sub-negate-revN/A

                        \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
                      7. lower-/.f64N/A

                        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
                      8. distribute-neg-frac2N/A

                        \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
                      9. lift--.f64N/A

                        \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
                      10. sub-negate-revN/A

                        \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                      11. lower-/.f64N/A

                        \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
                      12. lower--.f64N/A

                        \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                      13. lower--.f6496.8%

                        \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
                    3. Applied rewrites96.8%

                      \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
                    4. Taylor expanded in t around 0

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

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

                        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z - y\right)}} \]
                      3. lower--.f6452.8%

                        \[\leadsto \frac{x}{z \cdot \left(z - \color{blue}{y}\right)} \]
                    6. Applied rewrites52.8%

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

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

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

                        \[\leadsto \frac{x}{\left(z - y\right) \cdot \color{blue}{z}} \]
                      4. associate-/r*N/A

                        \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z}} \]
                      5. mult-flipN/A

                        \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                      6. lift-/.f64N/A

                        \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                      7. *-commutativeN/A

                        \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                      8. lift-*.f64N/A

                        \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                      9. lower-/.f6459.6%

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

                        \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                      11. *-commutativeN/A

                        \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                      12. lift-/.f64N/A

                        \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                      13. mult-flipN/A

                        \[\leadsto \frac{\frac{x}{z - y}}{z} \]
                      14. lower-/.f6459.6%

                        \[\leadsto \frac{\frac{x}{z - y}}{z} \]
                    8. Applied rewrites59.6%

                      \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z}} \]
                    9. Taylor expanded in y around 0

                      \[\leadsto \frac{\frac{x}{z}}{z} \]
                    10. Step-by-step derivation
                      1. lower-/.f6443.4%

                        \[\leadsto \frac{\frac{x}{z}}{z} \]
                    11. Applied rewrites43.4%

                      \[\leadsto \frac{\frac{x}{z}}{z} \]

                    if -4.10000000000000016e164 < z < -3.7000000000000002e-66 or 3.39999999999999973e-55 < z

                    1. Initial program 89.3%

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

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

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

                        \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
                      4. frac-2negN/A

                        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                      5. lift--.f64N/A

                        \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                      6. sub-negate-revN/A

                        \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
                      7. lower-/.f64N/A

                        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
                      8. distribute-neg-frac2N/A

                        \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
                      9. lift--.f64N/A

                        \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
                      10. sub-negate-revN/A

                        \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                      11. lower-/.f64N/A

                        \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
                      12. lower--.f64N/A

                        \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                      13. lower--.f6496.8%

                        \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
                    3. Applied rewrites96.8%

                      \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
                    4. Taylor expanded in t around 0

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

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

                        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z - y\right)}} \]
                      3. lower--.f6452.8%

                        \[\leadsto \frac{x}{z \cdot \left(z - \color{blue}{y}\right)} \]
                    6. Applied rewrites52.8%

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

                    if -3.7000000000000002e-66 < z < 3.39999999999999973e-55

                    1. Initial program 89.3%

                      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
                    2. Taylor expanded in z around 0

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

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

                    Alternative 10: 72.9% accurate, 0.5× speedup?

                    \[\begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+80}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-17}:\\ \;\;\;\;\frac{\frac{-x}{z}}{\mathsf{max}\left(y, t\right)}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-38}:\\ \;\;\;\;\frac{x}{\mathsf{min}\left(y, t\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - \mathsf{min}\left(y, t\right)\right)}\\ \end{array} \]
                    (FPCore (x y z t)
                     :precision binary64
                     (if (<= z -3.6e+80)
                       (/ (/ x z) z)
                       (if (<= z -8.2e-17)
                         (/ (/ (- x) z) (fmax y t))
                         (if (<= z 8e-38)
                           (/ x (* (fmin y t) (- (fmax y t) z)))
                           (/ x (* z (- z (fmin y t))))))))
                    double code(double x, double y, double z, double t) {
                    	double tmp;
                    	if (z <= -3.6e+80) {
                    		tmp = (x / z) / z;
                    	} else if (z <= -8.2e-17) {
                    		tmp = (-x / z) / fmax(y, t);
                    	} else if (z <= 8e-38) {
                    		tmp = x / (fmin(y, t) * (fmax(y, t) - z));
                    	} else {
                    		tmp = x / (z * (z - fmin(y, t)));
                    	}
                    	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)
                    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) :: tmp
                        if (z <= (-3.6d+80)) then
                            tmp = (x / z) / z
                        else if (z <= (-8.2d-17)) then
                            tmp = (-x / z) / fmax(y, t)
                        else if (z <= 8d-38) then
                            tmp = x / (fmin(y, t) * (fmax(y, t) - z))
                        else
                            tmp = x / (z * (z - fmin(y, t)))
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t) {
                    	double tmp;
                    	if (z <= -3.6e+80) {
                    		tmp = (x / z) / z;
                    	} else if (z <= -8.2e-17) {
                    		tmp = (-x / z) / fmax(y, t);
                    	} else if (z <= 8e-38) {
                    		tmp = x / (fmin(y, t) * (fmax(y, t) - z));
                    	} else {
                    		tmp = x / (z * (z - fmin(y, t)));
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t):
                    	tmp = 0
                    	if z <= -3.6e+80:
                    		tmp = (x / z) / z
                    	elif z <= -8.2e-17:
                    		tmp = (-x / z) / fmax(y, t)
                    	elif z <= 8e-38:
                    		tmp = x / (fmin(y, t) * (fmax(y, t) - z))
                    	else:
                    		tmp = x / (z * (z - fmin(y, t)))
                    	return tmp
                    
                    function code(x, y, z, t)
                    	tmp = 0.0
                    	if (z <= -3.6e+80)
                    		tmp = Float64(Float64(x / z) / z);
                    	elseif (z <= -8.2e-17)
                    		tmp = Float64(Float64(Float64(-x) / z) / fmax(y, t));
                    	elseif (z <= 8e-38)
                    		tmp = Float64(x / Float64(fmin(y, t) * Float64(fmax(y, t) - z)));
                    	else
                    		tmp = Float64(x / Float64(z * Float64(z - fmin(y, t))));
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t)
                    	tmp = 0.0;
                    	if (z <= -3.6e+80)
                    		tmp = (x / z) / z;
                    	elseif (z <= -8.2e-17)
                    		tmp = (-x / z) / max(y, t);
                    	elseif (z <= 8e-38)
                    		tmp = x / (min(y, t) * (max(y, t) - z));
                    	else
                    		tmp = x / (z * (z - min(y, t)));
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_] := If[LessEqual[z, -3.6e+80], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -8.2e-17], N[(N[((-x) / z), $MachinePrecision] / N[Max[y, t], $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-38], N[(x / N[(N[Min[y, t], $MachinePrecision] * N[(N[Max[y, t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(z * N[(z - N[Min[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                    
                    \begin{array}{l}
                    \mathbf{if}\;z \leq -3.6 \cdot 10^{+80}:\\
                    \;\;\;\;\frac{\frac{x}{z}}{z}\\
                    
                    \mathbf{elif}\;z \leq -8.2 \cdot 10^{-17}:\\
                    \;\;\;\;\frac{\frac{-x}{z}}{\mathsf{max}\left(y, t\right)}\\
                    
                    \mathbf{elif}\;z \leq 8 \cdot 10^{-38}:\\
                    \;\;\;\;\frac{x}{\mathsf{min}\left(y, t\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{x}{z \cdot \left(z - \mathsf{min}\left(y, t\right)\right)}\\
                    
                    
                    \end{array}
                    
                    Derivation
                    1. Split input into 4 regimes
                    2. if z < -3.59999999999999995e80

                      1. Initial program 89.3%

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

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

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

                          \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
                        4. frac-2negN/A

                          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                        5. lift--.f64N/A

                          \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                        6. sub-negate-revN/A

                          \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
                        7. lower-/.f64N/A

                          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
                        8. distribute-neg-frac2N/A

                          \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
                        9. lift--.f64N/A

                          \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
                        10. sub-negate-revN/A

                          \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                        11. lower-/.f64N/A

                          \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
                        12. lower--.f64N/A

                          \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                        13. lower--.f6496.8%

                          \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
                      3. Applied rewrites96.8%

                        \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
                      4. Taylor expanded in t around 0

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

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

                          \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z - y\right)}} \]
                        3. lower--.f6452.8%

                          \[\leadsto \frac{x}{z \cdot \left(z - \color{blue}{y}\right)} \]
                      6. Applied rewrites52.8%

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

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

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

                          \[\leadsto \frac{x}{\left(z - y\right) \cdot \color{blue}{z}} \]
                        4. associate-/r*N/A

                          \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z}} \]
                        5. mult-flipN/A

                          \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                        6. lift-/.f64N/A

                          \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                        7. *-commutativeN/A

                          \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                        8. lift-*.f64N/A

                          \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                        9. lower-/.f6459.6%

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

                          \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                        11. *-commutativeN/A

                          \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                        12. lift-/.f64N/A

                          \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                        13. mult-flipN/A

                          \[\leadsto \frac{\frac{x}{z - y}}{z} \]
                        14. lower-/.f6459.6%

                          \[\leadsto \frac{\frac{x}{z - y}}{z} \]
                      8. Applied rewrites59.6%

                        \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z}} \]
                      9. Taylor expanded in y around 0

                        \[\leadsto \frac{\frac{x}{z}}{z} \]
                      10. Step-by-step derivation
                        1. lower-/.f6443.4%

                          \[\leadsto \frac{\frac{x}{z}}{z} \]
                      11. Applied rewrites43.4%

                        \[\leadsto \frac{\frac{x}{z}}{z} \]

                      if -3.59999999999999995e80 < z < -8.2000000000000001e-17

                      1. Initial program 89.3%

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

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

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

                          \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
                        4. frac-2negN/A

                          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                        5. lift--.f64N/A

                          \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                        6. sub-negate-revN/A

                          \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
                        7. mult-flipN/A

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

                          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{x}{y - z}\right)\right) \cdot \frac{1}{z - t}} \]
                        9. distribute-neg-frac2N/A

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

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

                          \[\leadsto \frac{x}{\color{blue}{z - y}} \cdot \frac{1}{z - t} \]
                        12. lower-/.f64N/A

                          \[\leadsto \color{blue}{\frac{x}{z - y}} \cdot \frac{1}{z - t} \]
                        13. lower--.f64N/A

                          \[\leadsto \frac{x}{\color{blue}{z - y}} \cdot \frac{1}{z - t} \]
                        14. metadata-evalN/A

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

                          \[\leadsto \frac{x}{z - y} \cdot \frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                        16. lift--.f64N/A

                          \[\leadsto \frac{x}{z - y} \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                        17. frac-2neg-revN/A

                          \[\leadsto \frac{x}{z - y} \cdot \color{blue}{\frac{-1}{t - z}} \]
                        18. lower-/.f6496.8%

                          \[\leadsto \frac{x}{z - y} \cdot \color{blue}{\frac{-1}{t - z}} \]
                      3. Applied rewrites96.8%

                        \[\leadsto \color{blue}{\frac{x}{z - y} \cdot \frac{-1}{t - z}} \]
                      4. Taylor expanded in y around 0

                        \[\leadsto \frac{x}{\color{blue}{z}} \cdot \frac{-1}{t - z} \]
                      5. Step-by-step derivation
                        1. Applied rewrites57.4%

                          \[\leadsto \frac{x}{\color{blue}{z}} \cdot \frac{-1}{t - z} \]
                        2. Taylor expanded in z around 0

                          \[\leadsto \frac{x}{z} \cdot \frac{-1}{\color{blue}{t}} \]
                        3. Step-by-step derivation
                          1. Applied rewrites34.4%

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

                              \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{-1}{t}} \]
                            2. lift-/.f64N/A

                              \[\leadsto \frac{x}{z} \cdot \color{blue}{\frac{-1}{t}} \]
                            3. associate-*r/N/A

                              \[\leadsto \color{blue}{\frac{\frac{x}{z} \cdot -1}{t}} \]
                            4. lower-/.f64N/A

                              \[\leadsto \color{blue}{\frac{\frac{x}{z} \cdot -1}{t}} \]
                            5. lift-/.f64N/A

                              \[\leadsto \frac{\color{blue}{\frac{x}{z}} \cdot -1}{t} \]
                            6. associate-*l/N/A

                              \[\leadsto \frac{\color{blue}{\frac{x \cdot -1}{z}}}{t} \]
                            7. *-commutativeN/A

                              \[\leadsto \frac{\frac{\color{blue}{-1 \cdot x}}{z}}{t} \]
                            8. mul-1-negN/A

                              \[\leadsto \frac{\frac{\color{blue}{\mathsf{neg}\left(x\right)}}{z}}{t} \]
                            9. lower-/.f64N/A

                              \[\leadsto \frac{\color{blue}{\frac{\mathsf{neg}\left(x\right)}{z}}}{t} \]
                            10. *-rgt-identityN/A

                              \[\leadsto \frac{\frac{\mathsf{neg}\left(\color{blue}{x \cdot 1}\right)}{z}}{t} \]
                            11. metadata-evalN/A

                              \[\leadsto \frac{\frac{\mathsf{neg}\left(x \cdot \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)}\right)}{z}}{t} \]
                            12. distribute-rgt-neg-outN/A

                              \[\leadsto \frac{\frac{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x \cdot -1\right)\right)}\right)}{z}}{t} \]
                            13. *-commutativeN/A

                              \[\leadsto \frac{\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{-1 \cdot x}\right)\right)\right)}{z}}{t} \]
                            14. mul-1-negN/A

                              \[\leadsto \frac{\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right)\right)\right)}{z}}{t} \]
                            15. lower-neg.f64N/A

                              \[\leadsto \frac{\frac{\color{blue}{-\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right)}}{z}}{t} \]
                            16. mul-1-negN/A

                              \[\leadsto \frac{\frac{-\left(\mathsf{neg}\left(\color{blue}{-1 \cdot x}\right)\right)}{z}}{t} \]
                            17. *-commutativeN/A

                              \[\leadsto \frac{\frac{-\left(\mathsf{neg}\left(\color{blue}{x \cdot -1}\right)\right)}{z}}{t} \]
                            18. distribute-rgt-neg-outN/A

                              \[\leadsto \frac{\frac{-\color{blue}{x \cdot \left(\mathsf{neg}\left(-1\right)\right)}}{z}}{t} \]
                            19. metadata-evalN/A

                              \[\leadsto \frac{\frac{-x \cdot \color{blue}{1}}{z}}{t} \]
                            20. *-rgt-identity34.4%

                              \[\leadsto \frac{\frac{-\color{blue}{x}}{z}}{t} \]
                          3. Applied rewrites34.4%

                            \[\leadsto \color{blue}{\frac{\frac{-x}{z}}{t}} \]

                          if -8.2000000000000001e-17 < z < 7.9999999999999997e-38

                          1. Initial program 89.3%

                            \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
                          2. Taylor expanded in y around inf

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

                              \[\leadsto \frac{x}{y \cdot \color{blue}{\left(t - z\right)}} \]
                            2. lower--.f6457.9%

                              \[\leadsto \frac{x}{y \cdot \left(t - \color{blue}{z}\right)} \]
                          4. Applied rewrites57.9%

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

                          if 7.9999999999999997e-38 < z

                          1. Initial program 89.3%

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

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

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

                              \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
                            4. frac-2negN/A

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                            5. lift--.f64N/A

                              \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                            6. sub-negate-revN/A

                              \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
                            7. lower-/.f64N/A

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
                            8. distribute-neg-frac2N/A

                              \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
                            9. lift--.f64N/A

                              \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
                            10. sub-negate-revN/A

                              \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                            11. lower-/.f64N/A

                              \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
                            12. lower--.f64N/A

                              \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                            13. lower--.f6496.8%

                              \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
                          3. Applied rewrites96.8%

                            \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
                          4. Taylor expanded in t around 0

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

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

                              \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z - y\right)}} \]
                            3. lower--.f6452.8%

                              \[\leadsto \frac{x}{z \cdot \left(z - \color{blue}{y}\right)} \]
                          6. Applied rewrites52.8%

                            \[\leadsto \color{blue}{\frac{x}{z \cdot \left(z - y\right)}} \]
                        4. Recombined 4 regimes into one program.
                        5. Add Preprocessing

                        Alternative 11: 70.0% accurate, 0.6× speedup?

                        \[\begin{array}{l} t_1 := \frac{x}{z \cdot \left(z - y\right)}\\ \mathbf{if}\;z \leq -4.1 \cdot 10^{+164}:\\ \;\;\;\;\frac{\frac{x}{z}}{z}\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-66}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-55}:\\ \;\;\;\;\frac{x}{t \cdot y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                        (FPCore (x y z t)
                         :precision binary64
                         (let* ((t_1 (/ x (* z (- z y)))))
                           (if (<= z -4.1e+164)
                             (/ (/ x z) z)
                             (if (<= z -4.8e-66) t_1 (if (<= z 3.4e-55) (/ x (* t y)) t_1)))))
                        double code(double x, double y, double z, double t) {
                        	double t_1 = x / (z * (z - y));
                        	double tmp;
                        	if (z <= -4.1e+164) {
                        		tmp = (x / z) / z;
                        	} else if (z <= -4.8e-66) {
                        		tmp = t_1;
                        	} else if (z <= 3.4e-55) {
                        		tmp = x / (t * y);
                        	} else {
                        		tmp = t_1;
                        	}
                        	return tmp;
                        }
                        
                        module fmin_fmax_functions
                            implicit none
                            private
                            public fmax
                            public fmin
                        
                            interface fmax
                                module procedure fmax88
                                module procedure fmax44
                                module procedure fmax84
                                module procedure fmax48
                            end interface
                            interface fmin
                                module procedure fmin88
                                module procedure fmin44
                                module procedure fmin84
                                module procedure fmin48
                            end interface
                        contains
                            real(8) function fmax88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmax44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmax84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmax48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                            end function
                            real(8) function fmin88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmin44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmin84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmin48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                            end function
                        end module
                        
                        real(8) function code(x, y, z, t)
                        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) :: t_1
                            real(8) :: tmp
                            t_1 = x / (z * (z - y))
                            if (z <= (-4.1d+164)) then
                                tmp = (x / z) / z
                            else if (z <= (-4.8d-66)) then
                                tmp = t_1
                            else if (z <= 3.4d-55) then
                                tmp = x / (t * y)
                            else
                                tmp = t_1
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x, double y, double z, double t) {
                        	double t_1 = x / (z * (z - y));
                        	double tmp;
                        	if (z <= -4.1e+164) {
                        		tmp = (x / z) / z;
                        	} else if (z <= -4.8e-66) {
                        		tmp = t_1;
                        	} else if (z <= 3.4e-55) {
                        		tmp = x / (t * y);
                        	} else {
                        		tmp = t_1;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t):
                        	t_1 = x / (z * (z - y))
                        	tmp = 0
                        	if z <= -4.1e+164:
                        		tmp = (x / z) / z
                        	elif z <= -4.8e-66:
                        		tmp = t_1
                        	elif z <= 3.4e-55:
                        		tmp = x / (t * y)
                        	else:
                        		tmp = t_1
                        	return tmp
                        
                        function code(x, y, z, t)
                        	t_1 = Float64(x / Float64(z * Float64(z - y)))
                        	tmp = 0.0
                        	if (z <= -4.1e+164)
                        		tmp = Float64(Float64(x / z) / z);
                        	elseif (z <= -4.8e-66)
                        		tmp = t_1;
                        	elseif (z <= 3.4e-55)
                        		tmp = Float64(x / Float64(t * y));
                        	else
                        		tmp = t_1;
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t)
                        	t_1 = x / (z * (z - y));
                        	tmp = 0.0;
                        	if (z <= -4.1e+164)
                        		tmp = (x / z) / z;
                        	elseif (z <= -4.8e-66)
                        		tmp = t_1;
                        	elseif (z <= 3.4e-55)
                        		tmp = x / (t * y);
                        	else
                        		tmp = t_1;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.1e+164], N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -4.8e-66], t$95$1, If[LessEqual[z, 3.4e-55], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                        
                        \begin{array}{l}
                        t_1 := \frac{x}{z \cdot \left(z - y\right)}\\
                        \mathbf{if}\;z \leq -4.1 \cdot 10^{+164}:\\
                        \;\;\;\;\frac{\frac{x}{z}}{z}\\
                        
                        \mathbf{elif}\;z \leq -4.8 \cdot 10^{-66}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;z \leq 3.4 \cdot 10^{-55}:\\
                        \;\;\;\;\frac{x}{t \cdot y}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_1\\
                        
                        
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if z < -4.10000000000000016e164

                          1. Initial program 89.3%

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

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

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

                              \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
                            4. frac-2negN/A

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                            5. lift--.f64N/A

                              \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                            6. sub-negate-revN/A

                              \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
                            7. lower-/.f64N/A

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
                            8. distribute-neg-frac2N/A

                              \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
                            9. lift--.f64N/A

                              \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
                            10. sub-negate-revN/A

                              \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                            11. lower-/.f64N/A

                              \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
                            12. lower--.f64N/A

                              \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                            13. lower--.f6496.8%

                              \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
                          3. Applied rewrites96.8%

                            \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
                          4. Taylor expanded in t around 0

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

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

                              \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z - y\right)}} \]
                            3. lower--.f6452.8%

                              \[\leadsto \frac{x}{z \cdot \left(z - \color{blue}{y}\right)} \]
                          6. Applied rewrites52.8%

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

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

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

                              \[\leadsto \frac{x}{\left(z - y\right) \cdot \color{blue}{z}} \]
                            4. associate-/r*N/A

                              \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z}} \]
                            5. mult-flipN/A

                              \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                            6. lift-/.f64N/A

                              \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                            7. *-commutativeN/A

                              \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                            8. lift-*.f64N/A

                              \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                            9. lower-/.f6459.6%

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

                              \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                            11. *-commutativeN/A

                              \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                            12. lift-/.f64N/A

                              \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                            13. mult-flipN/A

                              \[\leadsto \frac{\frac{x}{z - y}}{z} \]
                            14. lower-/.f6459.6%

                              \[\leadsto \frac{\frac{x}{z - y}}{z} \]
                          8. Applied rewrites59.6%

                            \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z}} \]
                          9. Taylor expanded in y around 0

                            \[\leadsto \frac{\frac{x}{z}}{z} \]
                          10. Step-by-step derivation
                            1. lower-/.f6443.4%

                              \[\leadsto \frac{\frac{x}{z}}{z} \]
                          11. Applied rewrites43.4%

                            \[\leadsto \frac{\frac{x}{z}}{z} \]

                          if -4.10000000000000016e164 < z < -4.80000000000000052e-66 or 3.39999999999999973e-55 < z

                          1. Initial program 89.3%

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

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

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

                              \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
                            4. frac-2negN/A

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                            5. lift--.f64N/A

                              \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                            6. sub-negate-revN/A

                              \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
                            7. lower-/.f64N/A

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
                            8. distribute-neg-frac2N/A

                              \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
                            9. lift--.f64N/A

                              \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
                            10. sub-negate-revN/A

                              \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                            11. lower-/.f64N/A

                              \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
                            12. lower--.f64N/A

                              \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                            13. lower--.f6496.8%

                              \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
                          3. Applied rewrites96.8%

                            \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
                          4. Taylor expanded in t around 0

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

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

                              \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z - y\right)}} \]
                            3. lower--.f6452.8%

                              \[\leadsto \frac{x}{z \cdot \left(z - \color{blue}{y}\right)} \]
                          6. Applied rewrites52.8%

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

                          if -4.80000000000000052e-66 < z < 3.39999999999999973e-55

                          1. Initial program 89.3%

                            \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
                          2. Taylor expanded in z around 0

                            \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
                          3. Step-by-step derivation
                            1. lower-*.f6439.8%

                              \[\leadsto \frac{x}{t \cdot \color{blue}{y}} \]
                          4. Applied rewrites39.8%

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

                        Alternative 12: 65.6% accurate, 0.5× speedup?

                        \[\begin{array}{l} t_1 := \frac{\frac{x}{z}}{z}\\ \mathbf{if}\;z \leq -3.6 \cdot 10^{+80}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-17}:\\ \;\;\;\;\frac{\frac{-x}{z}}{\mathsf{max}\left(y, t\right)}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-22}:\\ \;\;\;\;\frac{x}{\mathsf{max}\left(y, t\right) \cdot \mathsf{min}\left(y, t\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                        (FPCore (x y z t)
                         :precision binary64
                         (let* ((t_1 (/ (/ x z) z)))
                           (if (<= z -3.6e+80)
                             t_1
                             (if (<= z -8e-17)
                               (/ (/ (- x) z) (fmax y t))
                               (if (<= z 5e-22) (/ x (* (fmax y t) (fmin y t))) t_1)))))
                        double code(double x, double y, double z, double t) {
                        	double t_1 = (x / z) / z;
                        	double tmp;
                        	if (z <= -3.6e+80) {
                        		tmp = t_1;
                        	} else if (z <= -8e-17) {
                        		tmp = (-x / z) / fmax(y, t);
                        	} else if (z <= 5e-22) {
                        		tmp = x / (fmax(y, t) * fmin(y, t));
                        	} 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)
                        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) :: t_1
                            real(8) :: tmp
                            t_1 = (x / z) / z
                            if (z <= (-3.6d+80)) then
                                tmp = t_1
                            else if (z <= (-8d-17)) then
                                tmp = (-x / z) / fmax(y, t)
                            else if (z <= 5d-22) then
                                tmp = x / (fmax(y, t) * fmin(y, t))
                            else
                                tmp = t_1
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x, double y, double z, double t) {
                        	double t_1 = (x / z) / z;
                        	double tmp;
                        	if (z <= -3.6e+80) {
                        		tmp = t_1;
                        	} else if (z <= -8e-17) {
                        		tmp = (-x / z) / fmax(y, t);
                        	} else if (z <= 5e-22) {
                        		tmp = x / (fmax(y, t) * fmin(y, t));
                        	} else {
                        		tmp = t_1;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t):
                        	t_1 = (x / z) / z
                        	tmp = 0
                        	if z <= -3.6e+80:
                        		tmp = t_1
                        	elif z <= -8e-17:
                        		tmp = (-x / z) / fmax(y, t)
                        	elif z <= 5e-22:
                        		tmp = x / (fmax(y, t) * fmin(y, t))
                        	else:
                        		tmp = t_1
                        	return tmp
                        
                        function code(x, y, z, t)
                        	t_1 = Float64(Float64(x / z) / z)
                        	tmp = 0.0
                        	if (z <= -3.6e+80)
                        		tmp = t_1;
                        	elseif (z <= -8e-17)
                        		tmp = Float64(Float64(Float64(-x) / z) / fmax(y, t));
                        	elseif (z <= 5e-22)
                        		tmp = Float64(x / Float64(fmax(y, t) * fmin(y, t)));
                        	else
                        		tmp = t_1;
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t)
                        	t_1 = (x / z) / z;
                        	tmp = 0.0;
                        	if (z <= -3.6e+80)
                        		tmp = t_1;
                        	elseif (z <= -8e-17)
                        		tmp = (-x / z) / max(y, t);
                        	elseif (z <= 5e-22)
                        		tmp = x / (max(y, t) * min(y, t));
                        	else
                        		tmp = t_1;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -3.6e+80], t$95$1, If[LessEqual[z, -8e-17], N[(N[((-x) / z), $MachinePrecision] / N[Max[y, t], $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-22], N[(x / N[(N[Max[y, t], $MachinePrecision] * N[Min[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                        
                        \begin{array}{l}
                        t_1 := \frac{\frac{x}{z}}{z}\\
                        \mathbf{if}\;z \leq -3.6 \cdot 10^{+80}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;z \leq -8 \cdot 10^{-17}:\\
                        \;\;\;\;\frac{\frac{-x}{z}}{\mathsf{max}\left(y, t\right)}\\
                        
                        \mathbf{elif}\;z \leq 5 \cdot 10^{-22}:\\
                        \;\;\;\;\frac{x}{\mathsf{max}\left(y, t\right) \cdot \mathsf{min}\left(y, t\right)}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_1\\
                        
                        
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if z < -3.59999999999999995e80 or 4.99999999999999954e-22 < z

                          1. Initial program 89.3%

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

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

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

                              \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
                            4. frac-2negN/A

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                            5. lift--.f64N/A

                              \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                            6. sub-negate-revN/A

                              \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
                            7. lower-/.f64N/A

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
                            8. distribute-neg-frac2N/A

                              \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
                            9. lift--.f64N/A

                              \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
                            10. sub-negate-revN/A

                              \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                            11. lower-/.f64N/A

                              \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
                            12. lower--.f64N/A

                              \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                            13. lower--.f6496.8%

                              \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
                          3. Applied rewrites96.8%

                            \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
                          4. Taylor expanded in t around 0

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

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

                              \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z - y\right)}} \]
                            3. lower--.f6452.8%

                              \[\leadsto \frac{x}{z \cdot \left(z - \color{blue}{y}\right)} \]
                          6. Applied rewrites52.8%

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

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

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

                              \[\leadsto \frac{x}{\left(z - y\right) \cdot \color{blue}{z}} \]
                            4. associate-/r*N/A

                              \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z}} \]
                            5. mult-flipN/A

                              \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                            6. lift-/.f64N/A

                              \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                            7. *-commutativeN/A

                              \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                            8. lift-*.f64N/A

                              \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                            9. lower-/.f6459.6%

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

                              \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                            11. *-commutativeN/A

                              \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                            12. lift-/.f64N/A

                              \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                            13. mult-flipN/A

                              \[\leadsto \frac{\frac{x}{z - y}}{z} \]
                            14. lower-/.f6459.6%

                              \[\leadsto \frac{\frac{x}{z - y}}{z} \]
                          8. Applied rewrites59.6%

                            \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z}} \]
                          9. Taylor expanded in y around 0

                            \[\leadsto \frac{\frac{x}{z}}{z} \]
                          10. Step-by-step derivation
                            1. lower-/.f6443.4%

                              \[\leadsto \frac{\frac{x}{z}}{z} \]
                          11. Applied rewrites43.4%

                            \[\leadsto \frac{\frac{x}{z}}{z} \]

                          if -3.59999999999999995e80 < z < -8.00000000000000057e-17

                          1. Initial program 89.3%

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

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

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

                              \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
                            4. frac-2negN/A

                              \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                            5. lift--.f64N/A

                              \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                            6. sub-negate-revN/A

                              \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
                            7. mult-flipN/A

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

                              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{x}{y - z}\right)\right) \cdot \frac{1}{z - t}} \]
                            9. distribute-neg-frac2N/A

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

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

                              \[\leadsto \frac{x}{\color{blue}{z - y}} \cdot \frac{1}{z - t} \]
                            12. lower-/.f64N/A

                              \[\leadsto \color{blue}{\frac{x}{z - y}} \cdot \frac{1}{z - t} \]
                            13. lower--.f64N/A

                              \[\leadsto \frac{x}{\color{blue}{z - y}} \cdot \frac{1}{z - t} \]
                            14. metadata-evalN/A

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

                              \[\leadsto \frac{x}{z - y} \cdot \frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                            16. lift--.f64N/A

                              \[\leadsto \frac{x}{z - y} \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                            17. frac-2neg-revN/A

                              \[\leadsto \frac{x}{z - y} \cdot \color{blue}{\frac{-1}{t - z}} \]
                            18. lower-/.f6496.8%

                              \[\leadsto \frac{x}{z - y} \cdot \color{blue}{\frac{-1}{t - z}} \]
                          3. Applied rewrites96.8%

                            \[\leadsto \color{blue}{\frac{x}{z - y} \cdot \frac{-1}{t - z}} \]
                          4. Taylor expanded in y around 0

                            \[\leadsto \frac{x}{\color{blue}{z}} \cdot \frac{-1}{t - z} \]
                          5. Step-by-step derivation
                            1. Applied rewrites57.4%

                              \[\leadsto \frac{x}{\color{blue}{z}} \cdot \frac{-1}{t - z} \]
                            2. Taylor expanded in z around 0

                              \[\leadsto \frac{x}{z} \cdot \frac{-1}{\color{blue}{t}} \]
                            3. Step-by-step derivation
                              1. Applied rewrites34.4%

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

                                  \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{-1}{t}} \]
                                2. lift-/.f64N/A

                                  \[\leadsto \frac{x}{z} \cdot \color{blue}{\frac{-1}{t}} \]
                                3. associate-*r/N/A

                                  \[\leadsto \color{blue}{\frac{\frac{x}{z} \cdot -1}{t}} \]
                                4. lower-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{\frac{x}{z} \cdot -1}{t}} \]
                                5. lift-/.f64N/A

                                  \[\leadsto \frac{\color{blue}{\frac{x}{z}} \cdot -1}{t} \]
                                6. associate-*l/N/A

                                  \[\leadsto \frac{\color{blue}{\frac{x \cdot -1}{z}}}{t} \]
                                7. *-commutativeN/A

                                  \[\leadsto \frac{\frac{\color{blue}{-1 \cdot x}}{z}}{t} \]
                                8. mul-1-negN/A

                                  \[\leadsto \frac{\frac{\color{blue}{\mathsf{neg}\left(x\right)}}{z}}{t} \]
                                9. lower-/.f64N/A

                                  \[\leadsto \frac{\color{blue}{\frac{\mathsf{neg}\left(x\right)}{z}}}{t} \]
                                10. *-rgt-identityN/A

                                  \[\leadsto \frac{\frac{\mathsf{neg}\left(\color{blue}{x \cdot 1}\right)}{z}}{t} \]
                                11. metadata-evalN/A

                                  \[\leadsto \frac{\frac{\mathsf{neg}\left(x \cdot \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)}\right)}{z}}{t} \]
                                12. distribute-rgt-neg-outN/A

                                  \[\leadsto \frac{\frac{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x \cdot -1\right)\right)}\right)}{z}}{t} \]
                                13. *-commutativeN/A

                                  \[\leadsto \frac{\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{-1 \cdot x}\right)\right)\right)}{z}}{t} \]
                                14. mul-1-negN/A

                                  \[\leadsto \frac{\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right)\right)\right)}{z}}{t} \]
                                15. lower-neg.f64N/A

                                  \[\leadsto \frac{\frac{\color{blue}{-\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right)}}{z}}{t} \]
                                16. mul-1-negN/A

                                  \[\leadsto \frac{\frac{-\left(\mathsf{neg}\left(\color{blue}{-1 \cdot x}\right)\right)}{z}}{t} \]
                                17. *-commutativeN/A

                                  \[\leadsto \frac{\frac{-\left(\mathsf{neg}\left(\color{blue}{x \cdot -1}\right)\right)}{z}}{t} \]
                                18. distribute-rgt-neg-outN/A

                                  \[\leadsto \frac{\frac{-\color{blue}{x \cdot \left(\mathsf{neg}\left(-1\right)\right)}}{z}}{t} \]
                                19. metadata-evalN/A

                                  \[\leadsto \frac{\frac{-x \cdot \color{blue}{1}}{z}}{t} \]
                                20. *-rgt-identity34.4%

                                  \[\leadsto \frac{\frac{-\color{blue}{x}}{z}}{t} \]
                              3. Applied rewrites34.4%

                                \[\leadsto \color{blue}{\frac{\frac{-x}{z}}{t}} \]

                              if -8.00000000000000057e-17 < z < 4.99999999999999954e-22

                              1. Initial program 89.3%

                                \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
                              2. Taylor expanded in z around 0

                                \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
                              3. Step-by-step derivation
                                1. lower-*.f6439.8%

                                  \[\leadsto \frac{x}{t \cdot \color{blue}{y}} \]
                              4. Applied rewrites39.8%

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

                            Alternative 13: 65.6% accurate, 0.5× speedup?

                            \[\begin{array}{l} t_1 := \frac{\frac{x}{z}}{z}\\ \mathbf{if}\;z \leq -5.3 \cdot 10^{+54}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-17}:\\ \;\;\;\;\frac{\frac{-x}{\mathsf{max}\left(y, t\right)}}{z}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-22}:\\ \;\;\;\;\frac{x}{\mathsf{max}\left(y, t\right) \cdot \mathsf{min}\left(y, t\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                            (FPCore (x y z t)
                             :precision binary64
                             (let* ((t_1 (/ (/ x z) z)))
                               (if (<= z -5.3e+54)
                                 t_1
                                 (if (<= z -8e-17)
                                   (/ (/ (- x) (fmax y t)) z)
                                   (if (<= z 5e-22) (/ x (* (fmax y t) (fmin y t))) t_1)))))
                            double code(double x, double y, double z, double t) {
                            	double t_1 = (x / z) / z;
                            	double tmp;
                            	if (z <= -5.3e+54) {
                            		tmp = t_1;
                            	} else if (z <= -8e-17) {
                            		tmp = (-x / fmax(y, t)) / z;
                            	} else if (z <= 5e-22) {
                            		tmp = x / (fmax(y, t) * fmin(y, t));
                            	} 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)
                            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) :: t_1
                                real(8) :: tmp
                                t_1 = (x / z) / z
                                if (z <= (-5.3d+54)) then
                                    tmp = t_1
                                else if (z <= (-8d-17)) then
                                    tmp = (-x / fmax(y, t)) / z
                                else if (z <= 5d-22) then
                                    tmp = x / (fmax(y, t) * fmin(y, t))
                                else
                                    tmp = t_1
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y, double z, double t) {
                            	double t_1 = (x / z) / z;
                            	double tmp;
                            	if (z <= -5.3e+54) {
                            		tmp = t_1;
                            	} else if (z <= -8e-17) {
                            		tmp = (-x / fmax(y, t)) / z;
                            	} else if (z <= 5e-22) {
                            		tmp = x / (fmax(y, t) * fmin(y, t));
                            	} else {
                            		tmp = t_1;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t):
                            	t_1 = (x / z) / z
                            	tmp = 0
                            	if z <= -5.3e+54:
                            		tmp = t_1
                            	elif z <= -8e-17:
                            		tmp = (-x / fmax(y, t)) / z
                            	elif z <= 5e-22:
                            		tmp = x / (fmax(y, t) * fmin(y, t))
                            	else:
                            		tmp = t_1
                            	return tmp
                            
                            function code(x, y, z, t)
                            	t_1 = Float64(Float64(x / z) / z)
                            	tmp = 0.0
                            	if (z <= -5.3e+54)
                            		tmp = t_1;
                            	elseif (z <= -8e-17)
                            		tmp = Float64(Float64(Float64(-x) / fmax(y, t)) / z);
                            	elseif (z <= 5e-22)
                            		tmp = Float64(x / Float64(fmax(y, t) * fmin(y, t)));
                            	else
                            		tmp = t_1;
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t)
                            	t_1 = (x / z) / z;
                            	tmp = 0.0;
                            	if (z <= -5.3e+54)
                            		tmp = t_1;
                            	elseif (z <= -8e-17)
                            		tmp = (-x / max(y, t)) / z;
                            	elseif (z <= 5e-22)
                            		tmp = x / (max(y, t) * min(y, t));
                            	else
                            		tmp = t_1;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -5.3e+54], t$95$1, If[LessEqual[z, -8e-17], N[(N[((-x) / N[Max[y, t], $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 5e-22], N[(x / N[(N[Max[y, t], $MachinePrecision] * N[Min[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                            
                            \begin{array}{l}
                            t_1 := \frac{\frac{x}{z}}{z}\\
                            \mathbf{if}\;z \leq -5.3 \cdot 10^{+54}:\\
                            \;\;\;\;t\_1\\
                            
                            \mathbf{elif}\;z \leq -8 \cdot 10^{-17}:\\
                            \;\;\;\;\frac{\frac{-x}{\mathsf{max}\left(y, t\right)}}{z}\\
                            
                            \mathbf{elif}\;z \leq 5 \cdot 10^{-22}:\\
                            \;\;\;\;\frac{x}{\mathsf{max}\left(y, t\right) \cdot \mathsf{min}\left(y, t\right)}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_1\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if z < -5.30000000000000018e54 or 4.99999999999999954e-22 < z

                              1. Initial program 89.3%

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

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

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

                                  \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
                                4. frac-2negN/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                                5. lift--.f64N/A

                                  \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                                6. sub-negate-revN/A

                                  \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
                                7. lower-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
                                8. distribute-neg-frac2N/A

                                  \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
                                9. lift--.f64N/A

                                  \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
                                10. sub-negate-revN/A

                                  \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                                11. lower-/.f64N/A

                                  \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
                                12. lower--.f64N/A

                                  \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                                13. lower--.f6496.8%

                                  \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
                              3. Applied rewrites96.8%

                                \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
                              4. Taylor expanded in t around 0

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

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

                                  \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z - y\right)}} \]
                                3. lower--.f6452.8%

                                  \[\leadsto \frac{x}{z \cdot \left(z - \color{blue}{y}\right)} \]
                              6. Applied rewrites52.8%

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

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

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

                                  \[\leadsto \frac{x}{\left(z - y\right) \cdot \color{blue}{z}} \]
                                4. associate-/r*N/A

                                  \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z}} \]
                                5. mult-flipN/A

                                  \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                                6. lift-/.f64N/A

                                  \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                                7. *-commutativeN/A

                                  \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                                8. lift-*.f64N/A

                                  \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                                9. lower-/.f6459.6%

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

                                  \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                                11. *-commutativeN/A

                                  \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                                12. lift-/.f64N/A

                                  \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                                13. mult-flipN/A

                                  \[\leadsto \frac{\frac{x}{z - y}}{z} \]
                                14. lower-/.f6459.6%

                                  \[\leadsto \frac{\frac{x}{z - y}}{z} \]
                              8. Applied rewrites59.6%

                                \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z}} \]
                              9. Taylor expanded in y around 0

                                \[\leadsto \frac{\frac{x}{z}}{z} \]
                              10. Step-by-step derivation
                                1. lower-/.f6443.4%

                                  \[\leadsto \frac{\frac{x}{z}}{z} \]
                              11. Applied rewrites43.4%

                                \[\leadsto \frac{\frac{x}{z}}{z} \]

                              if -5.30000000000000018e54 < z < -8.00000000000000057e-17

                              1. Initial program 89.3%

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

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

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

                                  \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
                                4. frac-2negN/A

                                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                                5. lift--.f64N/A

                                  \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                                6. sub-negate-revN/A

                                  \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
                                7. mult-flipN/A

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

                                  \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{x}{y - z}\right)\right) \cdot \frac{1}{z - t}} \]
                                9. distribute-neg-frac2N/A

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

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

                                  \[\leadsto \frac{x}{\color{blue}{z - y}} \cdot \frac{1}{z - t} \]
                                12. lower-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{x}{z - y}} \cdot \frac{1}{z - t} \]
                                13. lower--.f64N/A

                                  \[\leadsto \frac{x}{\color{blue}{z - y}} \cdot \frac{1}{z - t} \]
                                14. metadata-evalN/A

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

                                  \[\leadsto \frac{x}{z - y} \cdot \frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                                16. lift--.f64N/A

                                  \[\leadsto \frac{x}{z - y} \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                                17. frac-2neg-revN/A

                                  \[\leadsto \frac{x}{z - y} \cdot \color{blue}{\frac{-1}{t - z}} \]
                                18. lower-/.f6496.8%

                                  \[\leadsto \frac{x}{z - y} \cdot \color{blue}{\frac{-1}{t - z}} \]
                              3. Applied rewrites96.8%

                                \[\leadsto \color{blue}{\frac{x}{z - y} \cdot \frac{-1}{t - z}} \]
                              4. Taylor expanded in y around 0

                                \[\leadsto \frac{x}{\color{blue}{z}} \cdot \frac{-1}{t - z} \]
                              5. Step-by-step derivation
                                1. Applied rewrites57.4%

                                  \[\leadsto \frac{x}{\color{blue}{z}} \cdot \frac{-1}{t - z} \]
                                2. Taylor expanded in z around 0

                                  \[\leadsto \frac{x}{z} \cdot \frac{-1}{\color{blue}{t}} \]
                                3. Step-by-step derivation
                                  1. Applied rewrites34.4%

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

                                      \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{-1}{t}} \]
                                    2. lift-/.f64N/A

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

                                      \[\leadsto \color{blue}{\frac{x \cdot \frac{-1}{t}}{z}} \]
                                    4. lift-/.f64N/A

                                      \[\leadsto \frac{x \cdot \color{blue}{\frac{-1}{t}}}{z} \]
                                    5. frac-2negN/A

                                      \[\leadsto \frac{x \cdot \color{blue}{\frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(t\right)}}}{z} \]
                                    6. metadata-evalN/A

                                      \[\leadsto \frac{x \cdot \frac{\color{blue}{1}}{\mathsf{neg}\left(t\right)}}{z} \]
                                    7. mult-flip-revN/A

                                      \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(t\right)}}}{z} \]
                                    8. distribute-neg-frac2N/A

                                      \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\frac{x}{t}\right)}}{z} \]
                                    9. lift-/.f64N/A

                                      \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\frac{x}{t}}\right)}{z} \]
                                    10. lower-/.f64N/A

                                      \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{t}\right)}{z}} \]
                                  3. Applied rewrites33.1%

                                    \[\leadsto \color{blue}{\frac{\frac{-x}{t}}{z}} \]

                                  if -8.00000000000000057e-17 < z < 4.99999999999999954e-22

                                  1. Initial program 89.3%

                                    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
                                  2. Taylor expanded in z around 0

                                    \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
                                  3. Step-by-step derivation
                                    1. lower-*.f6439.8%

                                      \[\leadsto \frac{x}{t \cdot \color{blue}{y}} \]
                                  4. Applied rewrites39.8%

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

                                Alternative 14: 65.3% accurate, 0.5× speedup?

                                \[\begin{array}{l} t_1 := \frac{\frac{x}{z}}{z}\\ \mathbf{if}\;z \leq -5.3 \cdot 10^{+54}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-17}:\\ \;\;\;\;\frac{-x}{z \cdot \mathsf{max}\left(y, t\right)}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-22}:\\ \;\;\;\;\frac{x}{\mathsf{max}\left(y, t\right) \cdot \mathsf{min}\left(y, t\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                (FPCore (x y z t)
                                 :precision binary64
                                 (let* ((t_1 (/ (/ x z) z)))
                                   (if (<= z -5.3e+54)
                                     t_1
                                     (if (<= z -8e-17)
                                       (/ (- x) (* z (fmax y t)))
                                       (if (<= z 5e-22) (/ x (* (fmax y t) (fmin y t))) t_1)))))
                                double code(double x, double y, double z, double t) {
                                	double t_1 = (x / z) / z;
                                	double tmp;
                                	if (z <= -5.3e+54) {
                                		tmp = t_1;
                                	} else if (z <= -8e-17) {
                                		tmp = -x / (z * fmax(y, t));
                                	} else if (z <= 5e-22) {
                                		tmp = x / (fmax(y, t) * fmin(y, t));
                                	} 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)
                                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) :: t_1
                                    real(8) :: tmp
                                    t_1 = (x / z) / z
                                    if (z <= (-5.3d+54)) then
                                        tmp = t_1
                                    else if (z <= (-8d-17)) then
                                        tmp = -x / (z * fmax(y, t))
                                    else if (z <= 5d-22) then
                                        tmp = x / (fmax(y, t) * fmin(y, t))
                                    else
                                        tmp = t_1
                                    end if
                                    code = tmp
                                end function
                                
                                public static double code(double x, double y, double z, double t) {
                                	double t_1 = (x / z) / z;
                                	double tmp;
                                	if (z <= -5.3e+54) {
                                		tmp = t_1;
                                	} else if (z <= -8e-17) {
                                		tmp = -x / (z * fmax(y, t));
                                	} else if (z <= 5e-22) {
                                		tmp = x / (fmax(y, t) * fmin(y, t));
                                	} else {
                                		tmp = t_1;
                                	}
                                	return tmp;
                                }
                                
                                def code(x, y, z, t):
                                	t_1 = (x / z) / z
                                	tmp = 0
                                	if z <= -5.3e+54:
                                		tmp = t_1
                                	elif z <= -8e-17:
                                		tmp = -x / (z * fmax(y, t))
                                	elif z <= 5e-22:
                                		tmp = x / (fmax(y, t) * fmin(y, t))
                                	else:
                                		tmp = t_1
                                	return tmp
                                
                                function code(x, y, z, t)
                                	t_1 = Float64(Float64(x / z) / z)
                                	tmp = 0.0
                                	if (z <= -5.3e+54)
                                		tmp = t_1;
                                	elseif (z <= -8e-17)
                                		tmp = Float64(Float64(-x) / Float64(z * fmax(y, t)));
                                	elseif (z <= 5e-22)
                                		tmp = Float64(x / Float64(fmax(y, t) * fmin(y, t)));
                                	else
                                		tmp = t_1;
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(x, y, z, t)
                                	t_1 = (x / z) / z;
                                	tmp = 0.0;
                                	if (z <= -5.3e+54)
                                		tmp = t_1;
                                	elseif (z <= -8e-17)
                                		tmp = -x / (z * max(y, t));
                                	elseif (z <= 5e-22)
                                		tmp = x / (max(y, t) * min(y, t));
                                	else
                                		tmp = t_1;
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -5.3e+54], t$95$1, If[LessEqual[z, -8e-17], N[((-x) / N[(z * N[Max[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-22], N[(x / N[(N[Max[y, t], $MachinePrecision] * N[Min[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                                
                                \begin{array}{l}
                                t_1 := \frac{\frac{x}{z}}{z}\\
                                \mathbf{if}\;z \leq -5.3 \cdot 10^{+54}:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{elif}\;z \leq -8 \cdot 10^{-17}:\\
                                \;\;\;\;\frac{-x}{z \cdot \mathsf{max}\left(y, t\right)}\\
                                
                                \mathbf{elif}\;z \leq 5 \cdot 10^{-22}:\\
                                \;\;\;\;\frac{x}{\mathsf{max}\left(y, t\right) \cdot \mathsf{min}\left(y, t\right)}\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;t\_1\\
                                
                                
                                \end{array}
                                
                                Derivation
                                1. Split input into 3 regimes
                                2. if z < -5.30000000000000018e54 or 4.99999999999999954e-22 < z

                                  1. Initial program 89.3%

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

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

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

                                      \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
                                    4. frac-2negN/A

                                      \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                                    5. lift--.f64N/A

                                      \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                                    6. sub-negate-revN/A

                                      \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
                                    7. lower-/.f64N/A

                                      \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
                                    8. distribute-neg-frac2N/A

                                      \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
                                    9. lift--.f64N/A

                                      \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
                                    10. sub-negate-revN/A

                                      \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                                    11. lower-/.f64N/A

                                      \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
                                    12. lower--.f64N/A

                                      \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                                    13. lower--.f6496.8%

                                      \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
                                  3. Applied rewrites96.8%

                                    \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
                                  4. Taylor expanded in t around 0

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

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

                                      \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z - y\right)}} \]
                                    3. lower--.f6452.8%

                                      \[\leadsto \frac{x}{z \cdot \left(z - \color{blue}{y}\right)} \]
                                  6. Applied rewrites52.8%

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

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

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

                                      \[\leadsto \frac{x}{\left(z - y\right) \cdot \color{blue}{z}} \]
                                    4. associate-/r*N/A

                                      \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z}} \]
                                    5. mult-flipN/A

                                      \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                                    6. lift-/.f64N/A

                                      \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                                    7. *-commutativeN/A

                                      \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                                    8. lift-*.f64N/A

                                      \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                                    9. lower-/.f6459.6%

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

                                      \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                                    11. *-commutativeN/A

                                      \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                                    12. lift-/.f64N/A

                                      \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                                    13. mult-flipN/A

                                      \[\leadsto \frac{\frac{x}{z - y}}{z} \]
                                    14. lower-/.f6459.6%

                                      \[\leadsto \frac{\frac{x}{z - y}}{z} \]
                                  8. Applied rewrites59.6%

                                    \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z}} \]
                                  9. Taylor expanded in y around 0

                                    \[\leadsto \frac{\frac{x}{z}}{z} \]
                                  10. Step-by-step derivation
                                    1. lower-/.f6443.4%

                                      \[\leadsto \frac{\frac{x}{z}}{z} \]
                                  11. Applied rewrites43.4%

                                    \[\leadsto \frac{\frac{x}{z}}{z} \]

                                  if -5.30000000000000018e54 < z < -8.00000000000000057e-17

                                  1. Initial program 89.3%

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

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

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

                                      \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
                                    4. frac-2negN/A

                                      \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                                    5. lift--.f64N/A

                                      \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                                    6. sub-negate-revN/A

                                      \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
                                    7. mult-flipN/A

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

                                      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{x}{y - z}\right)\right) \cdot \frac{1}{z - t}} \]
                                    9. distribute-neg-frac2N/A

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

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

                                      \[\leadsto \frac{x}{\color{blue}{z - y}} \cdot \frac{1}{z - t} \]
                                    12. lower-/.f64N/A

                                      \[\leadsto \color{blue}{\frac{x}{z - y}} \cdot \frac{1}{z - t} \]
                                    13. lower--.f64N/A

                                      \[\leadsto \frac{x}{\color{blue}{z - y}} \cdot \frac{1}{z - t} \]
                                    14. metadata-evalN/A

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

                                      \[\leadsto \frac{x}{z - y} \cdot \frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                                    16. lift--.f64N/A

                                      \[\leadsto \frac{x}{z - y} \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                                    17. frac-2neg-revN/A

                                      \[\leadsto \frac{x}{z - y} \cdot \color{blue}{\frac{-1}{t - z}} \]
                                    18. lower-/.f6496.8%

                                      \[\leadsto \frac{x}{z - y} \cdot \color{blue}{\frac{-1}{t - z}} \]
                                  3. Applied rewrites96.8%

                                    \[\leadsto \color{blue}{\frac{x}{z - y} \cdot \frac{-1}{t - z}} \]
                                  4. Taylor expanded in y around 0

                                    \[\leadsto \frac{x}{\color{blue}{z}} \cdot \frac{-1}{t - z} \]
                                  5. Step-by-step derivation
                                    1. Applied rewrites57.4%

                                      \[\leadsto \frac{x}{\color{blue}{z}} \cdot \frac{-1}{t - z} \]
                                    2. Taylor expanded in z around 0

                                      \[\leadsto \frac{x}{z} \cdot \frac{-1}{\color{blue}{t}} \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites34.4%

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

                                          \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{-1}{t}} \]
                                        2. *-commutativeN/A

                                          \[\leadsto \color{blue}{\frac{-1}{t} \cdot \frac{x}{z}} \]
                                        3. lift-/.f64N/A

                                          \[\leadsto \color{blue}{\frac{-1}{t}} \cdot \frac{x}{z} \]
                                        4. lift-/.f64N/A

                                          \[\leadsto \frac{-1}{t} \cdot \color{blue}{\frac{x}{z}} \]
                                        5. frac-timesN/A

                                          \[\leadsto \color{blue}{\frac{-1 \cdot x}{t \cdot z}} \]
                                        6. mul-1-negN/A

                                          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(x\right)}}{t \cdot z} \]
                                        7. *-commutativeN/A

                                          \[\leadsto \frac{\mathsf{neg}\left(x\right)}{\color{blue}{z \cdot t}} \]
                                        8. lower-/.f64N/A

                                          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(x\right)}{z \cdot t}} \]
                                        9. *-rgt-identityN/A

                                          \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{x \cdot 1}\right)}{z \cdot t} \]
                                        10. metadata-evalN/A

                                          \[\leadsto \frac{\mathsf{neg}\left(x \cdot \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)}\right)}{z \cdot t} \]
                                        11. distribute-rgt-neg-outN/A

                                          \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x \cdot -1\right)\right)}\right)}{z \cdot t} \]
                                        12. *-commutativeN/A

                                          \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{-1 \cdot x}\right)\right)\right)}{z \cdot t} \]
                                        13. mul-1-negN/A

                                          \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right)\right)\right)}{z \cdot t} \]
                                        14. lower-neg.f64N/A

                                          \[\leadsto \frac{\color{blue}{-\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right)}}{z \cdot t} \]
                                        15. mul-1-negN/A

                                          \[\leadsto \frac{-\left(\mathsf{neg}\left(\color{blue}{-1 \cdot x}\right)\right)}{z \cdot t} \]
                                        16. *-commutativeN/A

                                          \[\leadsto \frac{-\left(\mathsf{neg}\left(\color{blue}{x \cdot -1}\right)\right)}{z \cdot t} \]
                                        17. distribute-rgt-neg-outN/A

                                          \[\leadsto \frac{-\color{blue}{x \cdot \left(\mathsf{neg}\left(-1\right)\right)}}{z \cdot t} \]
                                        18. metadata-evalN/A

                                          \[\leadsto \frac{-x \cdot \color{blue}{1}}{z \cdot t} \]
                                        19. *-rgt-identityN/A

                                          \[\leadsto \frac{-\color{blue}{x}}{z \cdot t} \]
                                        20. lower-*.f6431.9%

                                          \[\leadsto \frac{-x}{\color{blue}{z \cdot t}} \]
                                      3. Applied rewrites31.9%

                                        \[\leadsto \color{blue}{\frac{-x}{z \cdot t}} \]

                                      if -8.00000000000000057e-17 < z < 4.99999999999999954e-22

                                      1. Initial program 89.3%

                                        \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
                                      2. Taylor expanded in z around 0

                                        \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
                                      3. Step-by-step derivation
                                        1. lower-*.f6439.8%

                                          \[\leadsto \frac{x}{t \cdot \color{blue}{y}} \]
                                      4. Applied rewrites39.8%

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

                                    Alternative 15: 65.3% accurate, 0.8× speedup?

                                    \[\begin{array}{l} t_1 := \frac{\frac{x}{z}}{z}\\ \mathbf{if}\;z \leq -1.1 \cdot 10^{-17}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-22}:\\ \;\;\;\;\frac{x}{t \cdot y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                    (FPCore (x y z t)
                                     :precision binary64
                                     (let* ((t_1 (/ (/ x z) z)))
                                       (if (<= z -1.1e-17) t_1 (if (<= z 5e-22) (/ x (* t y)) t_1))))
                                    double code(double x, double y, double z, double t) {
                                    	double t_1 = (x / z) / z;
                                    	double tmp;
                                    	if (z <= -1.1e-17) {
                                    		tmp = t_1;
                                    	} else if (z <= 5e-22) {
                                    		tmp = x / (t * y);
                                    	} else {
                                    		tmp = t_1;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    module fmin_fmax_functions
                                        implicit none
                                        private
                                        public fmax
                                        public fmin
                                    
                                        interface fmax
                                            module procedure fmax88
                                            module procedure fmax44
                                            module procedure fmax84
                                            module procedure fmax48
                                        end interface
                                        interface fmin
                                            module procedure fmin88
                                            module procedure fmin44
                                            module procedure fmin84
                                            module procedure fmin48
                                        end interface
                                    contains
                                        real(8) function fmax88(x, y) result (res)
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                        end function
                                        real(4) function fmax44(x, y) result (res)
                                            real(4), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                        end function
                                        real(8) function fmax84(x, y) result(res)
                                            real(8), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                        end function
                                        real(8) function fmax48(x, y) result(res)
                                            real(4), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                        end function
                                        real(8) function fmin88(x, y) result (res)
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                        end function
                                        real(4) function fmin44(x, y) result (res)
                                            real(4), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                        end function
                                        real(8) function fmin84(x, y) result(res)
                                            real(8), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                        end function
                                        real(8) function fmin48(x, y) result(res)
                                            real(4), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                        end function
                                    end module
                                    
                                    real(8) function code(x, y, z, t)
                                    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) :: t_1
                                        real(8) :: tmp
                                        t_1 = (x / z) / z
                                        if (z <= (-1.1d-17)) then
                                            tmp = t_1
                                        else if (z <= 5d-22) then
                                            tmp = x / (t * y)
                                        else
                                            tmp = t_1
                                        end if
                                        code = tmp
                                    end function
                                    
                                    public static double code(double x, double y, double z, double t) {
                                    	double t_1 = (x / z) / z;
                                    	double tmp;
                                    	if (z <= -1.1e-17) {
                                    		tmp = t_1;
                                    	} else if (z <= 5e-22) {
                                    		tmp = x / (t * y);
                                    	} else {
                                    		tmp = t_1;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(x, y, z, t):
                                    	t_1 = (x / z) / z
                                    	tmp = 0
                                    	if z <= -1.1e-17:
                                    		tmp = t_1
                                    	elif z <= 5e-22:
                                    		tmp = x / (t * y)
                                    	else:
                                    		tmp = t_1
                                    	return tmp
                                    
                                    function code(x, y, z, t)
                                    	t_1 = Float64(Float64(x / z) / z)
                                    	tmp = 0.0
                                    	if (z <= -1.1e-17)
                                    		tmp = t_1;
                                    	elseif (z <= 5e-22)
                                    		tmp = Float64(x / Float64(t * y));
                                    	else
                                    		tmp = t_1;
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(x, y, z, t)
                                    	t_1 = (x / z) / z;
                                    	tmp = 0.0;
                                    	if (z <= -1.1e-17)
                                    		tmp = t_1;
                                    	elseif (z <= 5e-22)
                                    		tmp = x / (t * y);
                                    	else
                                    		tmp = t_1;
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -1.1e-17], t$95$1, If[LessEqual[z, 5e-22], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                    
                                    \begin{array}{l}
                                    t_1 := \frac{\frac{x}{z}}{z}\\
                                    \mathbf{if}\;z \leq -1.1 \cdot 10^{-17}:\\
                                    \;\;\;\;t\_1\\
                                    
                                    \mathbf{elif}\;z \leq 5 \cdot 10^{-22}:\\
                                    \;\;\;\;\frac{x}{t \cdot y}\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;t\_1\\
                                    
                                    
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if z < -1.1e-17 or 4.99999999999999954e-22 < z

                                      1. Initial program 89.3%

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

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

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

                                          \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
                                        4. frac-2negN/A

                                          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
                                        5. lift--.f64N/A

                                          \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)} \]
                                        6. sub-negate-revN/A

                                          \[\leadsto \frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{\color{blue}{z - t}} \]
                                        7. lower-/.f64N/A

                                          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\frac{x}{y - z}\right)}{z - t}} \]
                                        8. distribute-neg-frac2N/A

                                          \[\leadsto \frac{\color{blue}{\frac{x}{\mathsf{neg}\left(\left(y - z\right)\right)}}}{z - t} \]
                                        9. lift--.f64N/A

                                          \[\leadsto \frac{\frac{x}{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}}{z - t} \]
                                        10. sub-negate-revN/A

                                          \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                                        11. lower-/.f64N/A

                                          \[\leadsto \frac{\color{blue}{\frac{x}{z - y}}}{z - t} \]
                                        12. lower--.f64N/A

                                          \[\leadsto \frac{\frac{x}{\color{blue}{z - y}}}{z - t} \]
                                        13. lower--.f6496.8%

                                          \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z - t}} \]
                                      3. Applied rewrites96.8%

                                        \[\leadsto \color{blue}{\frac{\frac{x}{z - y}}{z - t}} \]
                                      4. Taylor expanded in t around 0

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

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

                                          \[\leadsto \frac{x}{z \cdot \color{blue}{\left(z - y\right)}} \]
                                        3. lower--.f6452.8%

                                          \[\leadsto \frac{x}{z \cdot \left(z - \color{blue}{y}\right)} \]
                                      6. Applied rewrites52.8%

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

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

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

                                          \[\leadsto \frac{x}{\left(z - y\right) \cdot \color{blue}{z}} \]
                                        4. associate-/r*N/A

                                          \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z}} \]
                                        5. mult-flipN/A

                                          \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                                        6. lift-/.f64N/A

                                          \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                                        7. *-commutativeN/A

                                          \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                                        8. lift-*.f64N/A

                                          \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                                        9. lower-/.f6459.6%

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

                                          \[\leadsto \frac{\frac{1}{z - y} \cdot x}{z} \]
                                        11. *-commutativeN/A

                                          \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                                        12. lift-/.f64N/A

                                          \[\leadsto \frac{x \cdot \frac{1}{z - y}}{z} \]
                                        13. mult-flipN/A

                                          \[\leadsto \frac{\frac{x}{z - y}}{z} \]
                                        14. lower-/.f6459.6%

                                          \[\leadsto \frac{\frac{x}{z - y}}{z} \]
                                      8. Applied rewrites59.6%

                                        \[\leadsto \frac{\frac{x}{z - y}}{\color{blue}{z}} \]
                                      9. Taylor expanded in y around 0

                                        \[\leadsto \frac{\frac{x}{z}}{z} \]
                                      10. Step-by-step derivation
                                        1. lower-/.f6443.4%

                                          \[\leadsto \frac{\frac{x}{z}}{z} \]
                                      11. Applied rewrites43.4%

                                        \[\leadsto \frac{\frac{x}{z}}{z} \]

                                      if -1.1e-17 < z < 4.99999999999999954e-22

                                      1. Initial program 89.3%

                                        \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
                                      2. Taylor expanded in z around 0

                                        \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
                                      3. Step-by-step derivation
                                        1. lower-*.f6439.8%

                                          \[\leadsto \frac{x}{t \cdot \color{blue}{y}} \]
                                      4. Applied rewrites39.8%

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

                                    Alternative 16: 39.8% accurate, 1.7× speedup?

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

                                      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
                                    2. Taylor expanded in z around 0

                                      \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
                                    3. Step-by-step derivation
                                      1. lower-*.f6439.8%

                                        \[\leadsto \frac{x}{t \cdot \color{blue}{y}} \]
                                    4. Applied rewrites39.8%

                                      \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
                                    5. Add Preprocessing

                                    Reproduce

                                    ?
                                    herbie shell --seed 2025179 
                                    (FPCore (x y z t)
                                      :name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
                                      :precision binary64
                                      (/ x (* (- y z) (- t z))))