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

Percentage Accurate: 88.8% → 96.7%
Time: 6.4s
Alternatives: 13
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \end{array} \]
(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]
\begin{array}{l}

\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 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: 88.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \end{array} \]
(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]
\begin{array}{l}

\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\end{array}

Alternative 1: 96.7% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \frac{\frac{x}{t - z}}{y - z} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t) :precision binary64 (/ (/ x (- t z)) (- y z)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	return (x / (t - z)) / (y - z);
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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 - z)) / (y - z)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	return (x / (t - z)) / (y - z);
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	return (x / (t - z)) / (y - z)
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	return Float64(Float64(x / Float64(t - z)) / Float64(y - z))
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
	tmp = (x / (t - z)) / (y - z);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{\frac{x}{t - z}}{y - z}
\end{array}
Derivation
  1. Initial program 91.4%

    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
  2. Add Preprocessing
  3. Applied rewrites95.5%

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

Alternative 2: 60.1% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{x}{z \cdot z}\\ \mathbf{if}\;z \leq -1.9 \cdot 10^{+108}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-45}:\\ \;\;\;\;\frac{x}{\left(-z\right) \cdot t}\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-103}:\\ \;\;\;\;\frac{x}{t \cdot y}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{+20}:\\ \;\;\;\;\frac{x}{\left(-y\right) \cdot z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (* z z))))
   (if (<= z -1.9e+108)
     t_1
     (if (<= z -2e-45)
       (/ x (* (- z) t))
       (if (<= z 3.7e-103)
         (/ x (* t y))
         (if (<= z 1.55e+20) (/ x (* (- y) z)) t_1))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double t_1 = x / (z * z);
	double tmp;
	if (z <= -1.9e+108) {
		tmp = t_1;
	} else if (z <= -2e-45) {
		tmp = x / (-z * t);
	} else if (z <= 3.7e-103) {
		tmp = x / (t * y);
	} else if (z <= 1.55e+20) {
		tmp = x / (-y * z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
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.9d+108)) then
        tmp = t_1
    else if (z <= (-2d-45)) then
        tmp = x / (-z * t)
    else if (z <= 3.7d-103) then
        tmp = x / (t * y)
    else if (z <= 1.55d+20) then
        tmp = x / (-y * z)
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = x / (z * z);
	double tmp;
	if (z <= -1.9e+108) {
		tmp = t_1;
	} else if (z <= -2e-45) {
		tmp = x / (-z * t);
	} else if (z <= 3.7e-103) {
		tmp = x / (t * y);
	} else if (z <= 1.55e+20) {
		tmp = x / (-y * z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	t_1 = x / (z * z)
	tmp = 0
	if z <= -1.9e+108:
		tmp = t_1
	elif z <= -2e-45:
		tmp = x / (-z * t)
	elif z <= 3.7e-103:
		tmp = x / (t * y)
	elif z <= 1.55e+20:
		tmp = x / (-y * z)
	else:
		tmp = t_1
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	t_1 = Float64(x / Float64(z * z))
	tmp = 0.0
	if (z <= -1.9e+108)
		tmp = t_1;
	elseif (z <= -2e-45)
		tmp = Float64(x / Float64(Float64(-z) * t));
	elseif (z <= 3.7e-103)
		tmp = Float64(x / Float64(t * y));
	elseif (z <= 1.55e+20)
		tmp = Float64(x / Float64(Float64(-y) * z));
	else
		tmp = t_1;
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = x / (z * z);
	tmp = 0.0;
	if (z <= -1.9e+108)
		tmp = t_1;
	elseif (z <= -2e-45)
		tmp = x / (-z * t);
	elseif (z <= 3.7e-103)
		tmp = x / (t * y);
	elseif (z <= 1.55e+20)
		tmp = x / (-y * z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.9e+108], t$95$1, If[LessEqual[z, -2e-45], N[(x / N[((-z) * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e-103], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e+20], N[(x / N[((-y) * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{z \cdot z}\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -2 \cdot 10^{-45}:\\
\;\;\;\;\frac{x}{\left(-z\right) \cdot t}\\

\mathbf{elif}\;z \leq 3.7 \cdot 10^{-103}:\\
\;\;\;\;\frac{x}{t \cdot y}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.90000000000000004e108 or 1.55e20 < z

    1. Initial program 83.9%

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

      \[\leadsto \frac{x}{\color{blue}{{z}^{2}}} \]
    4. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \frac{x}{z \cdot \color{blue}{z}} \]
      2. lower-*.f6472.2

        \[\leadsto \frac{x}{z \cdot \color{blue}{z}} \]
    5. Applied rewrites72.2%

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

    if -1.90000000000000004e108 < z < -1.99999999999999997e-45

    1. Initial program 97.4%

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

      \[\leadsto \frac{x}{\color{blue}{\left(-1 \cdot z\right)} \cdot \left(t - z\right)} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \frac{x}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(t - z\right)} \]
      2. lower-neg.f6460.6

        \[\leadsto \frac{x}{\left(-z\right) \cdot \left(t - z\right)} \]
    5. Applied rewrites60.6%

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

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

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

      if -1.99999999999999997e-45 < z < 3.6999999999999999e-103

      1. Initial program 93.9%

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

        \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
      4. Step-by-step derivation
        1. lower-*.f6472.7

          \[\leadsto \frac{x}{t \cdot \color{blue}{y}} \]
      5. Applied rewrites72.7%

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

      if 3.6999999999999999e-103 < z < 1.55e20

      1. Initial program 99.6%

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

        \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
      4. Step-by-step derivation
        1. lower-*.f6425.7

          \[\leadsto \frac{x}{t \cdot \color{blue}{y}} \]
      5. Applied rewrites25.7%

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

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

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

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

          \[\leadsto \frac{x}{\mathsf{fma}\left(-1 \cdot t + -1 \cdot y, \color{blue}{z}, t \cdot y\right)} \]
        4. mul-1-negN/A

          \[\leadsto \frac{x}{\mathsf{fma}\left(\left(\mathsf{neg}\left(t\right)\right) + -1 \cdot y, z, t \cdot y\right)} \]
        5. +-commutativeN/A

          \[\leadsto \frac{x}{\mathsf{fma}\left(-1 \cdot y + \left(\mathsf{neg}\left(t\right)\right), z, t \cdot y\right)} \]
        6. mul-1-negN/A

          \[\leadsto \frac{x}{\mathsf{fma}\left(-1 \cdot y + -1 \cdot t, z, t \cdot y\right)} \]
        7. fp-cancel-sign-sub-invN/A

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

          \[\leadsto \frac{x}{\mathsf{fma}\left(-1 \cdot y - 1 \cdot t, z, t \cdot y\right)} \]
        9. *-lft-identityN/A

          \[\leadsto \frac{x}{\mathsf{fma}\left(-1 \cdot y - t, z, t \cdot y\right)} \]
        10. lower--.f64N/A

          \[\leadsto \frac{x}{\mathsf{fma}\left(-1 \cdot y - t, z, t \cdot y\right)} \]
        11. mul-1-negN/A

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

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

          \[\leadsto \frac{x}{\mathsf{fma}\left(\left(-y\right) - t, z, y \cdot t\right)} \]
        14. lower-*.f6480.7

          \[\leadsto \frac{x}{\mathsf{fma}\left(\left(-y\right) - t, z, y \cdot t\right)} \]
      8. Applied rewrites80.7%

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(\left(-y\right) - t, z, y \cdot t\right)}} \]
      9. Taylor expanded in t around 0

        \[\leadsto \frac{x}{-1 \cdot \color{blue}{\left(y \cdot z\right)}} \]
      10. Step-by-step derivation
        1. associate-*r*N/A

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

          \[\leadsto \frac{x}{\left(-1 \cdot y\right) \cdot z} \]
        3. mul-1-negN/A

          \[\leadsto \frac{x}{\left(\mathsf{neg}\left(y\right)\right) \cdot z} \]
        4. lower-neg.f6446.0

          \[\leadsto \frac{x}{\left(-y\right) \cdot z} \]
      11. Applied rewrites46.0%

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

    Alternative 3: 61.2% accurate, 0.6× speedup?

    \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{x}{z \cdot z}\\ \mathbf{if}\;z \leq -1.7 \cdot 10^{+34}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-103}:\\ \;\;\;\;\frac{x}{t \cdot y}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{+20}:\\ \;\;\;\;\frac{x}{\left(-y\right) \cdot z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (/ x (* z z))))
       (if (<= z -1.7e+34)
         t_1
         (if (<= z 3.7e-103)
           (/ x (* t y))
           (if (<= z 1.55e+20) (/ x (* (- y) z)) t_1)))))
    assert(x < y && y < z && z < t);
    double code(double x, double y, double z, double t) {
    	double t_1 = x / (z * z);
    	double tmp;
    	if (z <= -1.7e+34) {
    		tmp = t_1;
    	} else if (z <= 3.7e-103) {
    		tmp = x / (t * y);
    	} else if (z <= 1.55e+20) {
    		tmp = x / (-y * z);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
    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.7d+34)) then
            tmp = t_1
        else if (z <= 3.7d-103) then
            tmp = x / (t * y)
        else if (z <= 1.55d+20) then
            tmp = x / (-y * z)
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    assert x < y && y < z && z < t;
    public static double code(double x, double y, double z, double t) {
    	double t_1 = x / (z * z);
    	double tmp;
    	if (z <= -1.7e+34) {
    		tmp = t_1;
    	} else if (z <= 3.7e-103) {
    		tmp = x / (t * y);
    	} else if (z <= 1.55e+20) {
    		tmp = x / (-y * z);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    [x, y, z, t] = sort([x, y, z, t])
    def code(x, y, z, t):
    	t_1 = x / (z * z)
    	tmp = 0
    	if z <= -1.7e+34:
    		tmp = t_1
    	elif z <= 3.7e-103:
    		tmp = x / (t * y)
    	elif z <= 1.55e+20:
    		tmp = x / (-y * z)
    	else:
    		tmp = t_1
    	return tmp
    
    x, y, z, t = sort([x, y, z, t])
    function code(x, y, z, t)
    	t_1 = Float64(x / Float64(z * z))
    	tmp = 0.0
    	if (z <= -1.7e+34)
    		tmp = t_1;
    	elseif (z <= 3.7e-103)
    		tmp = Float64(x / Float64(t * y));
    	elseif (z <= 1.55e+20)
    		tmp = Float64(x / Float64(Float64(-y) * z));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    x, y, z, t = num2cell(sort([x, y, z, t])){:}
    function tmp_2 = code(x, y, z, t)
    	t_1 = x / (z * z);
    	tmp = 0.0;
    	if (z <= -1.7e+34)
    		tmp = t_1;
    	elseif (z <= 3.7e-103)
    		tmp = x / (t * y);
    	elseif (z <= 1.55e+20)
    		tmp = x / (-y * z);
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.7e+34], t$95$1, If[LessEqual[z, 3.7e-103], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e+20], N[(x / N[((-y) * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
    
    \begin{array}{l}
    [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
    \\
    \begin{array}{l}
    t_1 := \frac{x}{z \cdot z}\\
    \mathbf{if}\;z \leq -1.7 \cdot 10^{+34}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 3.7 \cdot 10^{-103}:\\
    \;\;\;\;\frac{x}{t \cdot y}\\
    
    \mathbf{elif}\;z \leq 1.55 \cdot 10^{+20}:\\
    \;\;\;\;\frac{x}{\left(-y\right) \cdot z}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z < -1.7e34 or 1.55e20 < z

      1. Initial program 85.4%

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

        \[\leadsto \frac{x}{\color{blue}{{z}^{2}}} \]
      4. Step-by-step derivation
        1. unpow2N/A

          \[\leadsto \frac{x}{z \cdot \color{blue}{z}} \]
        2. lower-*.f6469.0

          \[\leadsto \frac{x}{z \cdot \color{blue}{z}} \]
      5. Applied rewrites69.0%

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

      if -1.7e34 < z < 3.6999999999999999e-103

      1. Initial program 95.0%

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

        \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
      4. Step-by-step derivation
        1. lower-*.f6465.9

          \[\leadsto \frac{x}{t \cdot \color{blue}{y}} \]
      5. Applied rewrites65.9%

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

      if 3.6999999999999999e-103 < z < 1.55e20

      1. Initial program 99.6%

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

        \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
      4. Step-by-step derivation
        1. lower-*.f6425.7

          \[\leadsto \frac{x}{t \cdot \color{blue}{y}} \]
      5. Applied rewrites25.7%

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

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

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

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

          \[\leadsto \frac{x}{\mathsf{fma}\left(-1 \cdot t + -1 \cdot y, \color{blue}{z}, t \cdot y\right)} \]
        4. mul-1-negN/A

          \[\leadsto \frac{x}{\mathsf{fma}\left(\left(\mathsf{neg}\left(t\right)\right) + -1 \cdot y, z, t \cdot y\right)} \]
        5. +-commutativeN/A

          \[\leadsto \frac{x}{\mathsf{fma}\left(-1 \cdot y + \left(\mathsf{neg}\left(t\right)\right), z, t \cdot y\right)} \]
        6. mul-1-negN/A

          \[\leadsto \frac{x}{\mathsf{fma}\left(-1 \cdot y + -1 \cdot t, z, t \cdot y\right)} \]
        7. fp-cancel-sign-sub-invN/A

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

          \[\leadsto \frac{x}{\mathsf{fma}\left(-1 \cdot y - 1 \cdot t, z, t \cdot y\right)} \]
        9. *-lft-identityN/A

          \[\leadsto \frac{x}{\mathsf{fma}\left(-1 \cdot y - t, z, t \cdot y\right)} \]
        10. lower--.f64N/A

          \[\leadsto \frac{x}{\mathsf{fma}\left(-1 \cdot y - t, z, t \cdot y\right)} \]
        11. mul-1-negN/A

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

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

          \[\leadsto \frac{x}{\mathsf{fma}\left(\left(-y\right) - t, z, y \cdot t\right)} \]
        14. lower-*.f6480.7

          \[\leadsto \frac{x}{\mathsf{fma}\left(\left(-y\right) - t, z, y \cdot t\right)} \]
      8. Applied rewrites80.7%

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(\left(-y\right) - t, z, y \cdot t\right)}} \]
      9. Taylor expanded in t around 0

        \[\leadsto \frac{x}{-1 \cdot \color{blue}{\left(y \cdot z\right)}} \]
      10. Step-by-step derivation
        1. associate-*r*N/A

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

          \[\leadsto \frac{x}{\left(-1 \cdot y\right) \cdot z} \]
        3. mul-1-negN/A

          \[\leadsto \frac{x}{\left(\mathsf{neg}\left(y\right)\right) \cdot z} \]
        4. lower-neg.f6446.0

          \[\leadsto \frac{x}{\left(-y\right) \cdot z} \]
      11. Applied rewrites46.0%

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

    Alternative 4: 78.1% accurate, 0.7× speedup?

    \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.55 \cdot 10^{-199}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;t \leq 10^{-32}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(-z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \end{array} \]
    NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
    (FPCore (x y z t)
     :precision binary64
     (if (<= t -1.55e-199)
       (/ x (* y (- t z)))
       (if (<= t 1e-32) (/ x (* (- y z) (- z))) (/ x (* (- y z) t)))))
    assert(x < y && y < z && z < t);
    double code(double x, double y, double z, double t) {
    	double tmp;
    	if (t <= -1.55e-199) {
    		tmp = x / (y * (t - z));
    	} else if (t <= 1e-32) {
    		tmp = x / ((y - z) * -z);
    	} else {
    		tmp = x / ((y - z) * t);
    	}
    	return tmp;
    }
    
    NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
    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 (t <= (-1.55d-199)) then
            tmp = x / (y * (t - z))
        else if (t <= 1d-32) then
            tmp = x / ((y - z) * -z)
        else
            tmp = x / ((y - z) * t)
        end if
        code = tmp
    end function
    
    assert x < y && y < z && z < t;
    public static double code(double x, double y, double z, double t) {
    	double tmp;
    	if (t <= -1.55e-199) {
    		tmp = x / (y * (t - z));
    	} else if (t <= 1e-32) {
    		tmp = x / ((y - z) * -z);
    	} else {
    		tmp = x / ((y - z) * t);
    	}
    	return tmp;
    }
    
    [x, y, z, t] = sort([x, y, z, t])
    def code(x, y, z, t):
    	tmp = 0
    	if t <= -1.55e-199:
    		tmp = x / (y * (t - z))
    	elif t <= 1e-32:
    		tmp = x / ((y - z) * -z)
    	else:
    		tmp = x / ((y - z) * t)
    	return tmp
    
    x, y, z, t = sort([x, y, z, t])
    function code(x, y, z, t)
    	tmp = 0.0
    	if (t <= -1.55e-199)
    		tmp = Float64(x / Float64(y * Float64(t - z)));
    	elseif (t <= 1e-32)
    		tmp = Float64(x / Float64(Float64(y - z) * Float64(-z)));
    	else
    		tmp = Float64(x / Float64(Float64(y - z) * t));
    	end
    	return tmp
    end
    
    x, y, z, t = num2cell(sort([x, y, z, t])){:}
    function tmp_2 = code(x, y, z, t)
    	tmp = 0.0;
    	if (t <= -1.55e-199)
    		tmp = x / (y * (t - z));
    	elseif (t <= 1e-32)
    		tmp = x / ((y - z) * -z);
    	else
    		tmp = x / ((y - z) * t);
    	end
    	tmp_2 = tmp;
    end
    
    NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
    code[x_, y_, z_, t_] := If[LessEqual[t, -1.55e-199], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e-32], N[(x / N[(N[(y - z), $MachinePrecision] * (-z)), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
    \\
    \begin{array}{l}
    \mathbf{if}\;t \leq -1.55 \cdot 10^{-199}:\\
    \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
    
    \mathbf{elif}\;t \leq 10^{-32}:\\
    \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(-z\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if t < -1.55000000000000006e-199

      1. Initial program 91.6%

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

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

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

        if -1.55000000000000006e-199 < t < 1.00000000000000006e-32

        1. Initial program 92.2%

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

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

            \[\leadsto \frac{x}{\left(y - z\right) \cdot \left(\mathsf{neg}\left(z\right)\right)} \]
          2. lower-neg.f6478.9

            \[\leadsto \frac{x}{\left(y - z\right) \cdot \left(-z\right)} \]
        5. Applied rewrites78.9%

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

        if 1.00000000000000006e-32 < t

        1. Initial program 90.3%

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

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

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

        Alternative 5: 75.9% accurate, 0.7× speedup?

        \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -2.9 \cdot 10^{-90}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 6.9 \cdot 10^{-298}:\\ \;\;\;\;\frac{x}{\left(-z\right) \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \end{array} \]
        NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
        (FPCore (x y z t)
         :precision binary64
         (if (<= y -2.9e-90)
           (/ x (* y (- t z)))
           (if (<= y 6.9e-298) (/ x (* (- z) (- t z))) (/ x (* (- y z) t)))))
        assert(x < y && y < z && z < t);
        double code(double x, double y, double z, double t) {
        	double tmp;
        	if (y <= -2.9e-90) {
        		tmp = x / (y * (t - z));
        	} else if (y <= 6.9e-298) {
        		tmp = x / (-z * (t - z));
        	} else {
        		tmp = x / ((y - z) * t);
        	}
        	return tmp;
        }
        
        NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
        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 (y <= (-2.9d-90)) then
                tmp = x / (y * (t - z))
            else if (y <= 6.9d-298) then
                tmp = x / (-z * (t - z))
            else
                tmp = x / ((y - z) * t)
            end if
            code = tmp
        end function
        
        assert x < y && y < z && z < t;
        public static double code(double x, double y, double z, double t) {
        	double tmp;
        	if (y <= -2.9e-90) {
        		tmp = x / (y * (t - z));
        	} else if (y <= 6.9e-298) {
        		tmp = x / (-z * (t - z));
        	} else {
        		tmp = x / ((y - z) * t);
        	}
        	return tmp;
        }
        
        [x, y, z, t] = sort([x, y, z, t])
        def code(x, y, z, t):
        	tmp = 0
        	if y <= -2.9e-90:
        		tmp = x / (y * (t - z))
        	elif y <= 6.9e-298:
        		tmp = x / (-z * (t - z))
        	else:
        		tmp = x / ((y - z) * t)
        	return tmp
        
        x, y, z, t = sort([x, y, z, t])
        function code(x, y, z, t)
        	tmp = 0.0
        	if (y <= -2.9e-90)
        		tmp = Float64(x / Float64(y * Float64(t - z)));
        	elseif (y <= 6.9e-298)
        		tmp = Float64(x / Float64(Float64(-z) * Float64(t - z)));
        	else
        		tmp = Float64(x / Float64(Float64(y - z) * t));
        	end
        	return tmp
        end
        
        x, y, z, t = num2cell(sort([x, y, z, t])){:}
        function tmp_2 = code(x, y, z, t)
        	tmp = 0.0;
        	if (y <= -2.9e-90)
        		tmp = x / (y * (t - z));
        	elseif (y <= 6.9e-298)
        		tmp = x / (-z * (t - z));
        	else
        		tmp = x / ((y - z) * t);
        	end
        	tmp_2 = tmp;
        end
        
        NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
        code[x_, y_, z_, t_] := If[LessEqual[y, -2.9e-90], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.9e-298], N[(x / N[((-z) * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq -2.9 \cdot 10^{-90}:\\
        \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
        
        \mathbf{elif}\;y \leq 6.9 \cdot 10^{-298}:\\
        \;\;\;\;\frac{x}{\left(-z\right) \cdot \left(t - z\right)}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if y < -2.89999999999999983e-90

          1. Initial program 97.6%

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

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

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

            if -2.89999999999999983e-90 < y < 6.90000000000000022e-298

            1. Initial program 92.3%

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

              \[\leadsto \frac{x}{\color{blue}{\left(-1 \cdot z\right)} \cdot \left(t - z\right)} \]
            4. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \frac{x}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(t - z\right)} \]
              2. lower-neg.f6482.6

                \[\leadsto \frac{x}{\left(-z\right) \cdot \left(t - z\right)} \]
            5. Applied rewrites82.6%

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

            if 6.90000000000000022e-298 < y

            1. Initial program 86.7%

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

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

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

            Alternative 6: 91.2% accurate, 0.7× speedup?

            \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq 1.95 \cdot 10^{+149}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{\left(-t\right) + z}\\ \end{array} \end{array} \]
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            (FPCore (x y z t)
             :precision binary64
             (if (<= z 1.95e+149) (/ x (* (- y z) (- t z))) (/ (/ x z) (+ (- t) z))))
            assert(x < y && y < z && z < t);
            double code(double x, double y, double z, double t) {
            	double tmp;
            	if (z <= 1.95e+149) {
            		tmp = x / ((y - z) * (t - z));
            	} else {
            		tmp = (x / z) / (-t + z);
            	}
            	return tmp;
            }
            
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            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 <= 1.95d+149) then
                    tmp = x / ((y - z) * (t - z))
                else
                    tmp = (x / z) / (-t + z)
                end if
                code = tmp
            end function
            
            assert x < y && y < z && z < t;
            public static double code(double x, double y, double z, double t) {
            	double tmp;
            	if (z <= 1.95e+149) {
            		tmp = x / ((y - z) * (t - z));
            	} else {
            		tmp = (x / z) / (-t + z);
            	}
            	return tmp;
            }
            
            [x, y, z, t] = sort([x, y, z, t])
            def code(x, y, z, t):
            	tmp = 0
            	if z <= 1.95e+149:
            		tmp = x / ((y - z) * (t - z))
            	else:
            		tmp = (x / z) / (-t + z)
            	return tmp
            
            x, y, z, t = sort([x, y, z, t])
            function code(x, y, z, t)
            	tmp = 0.0
            	if (z <= 1.95e+149)
            		tmp = Float64(x / Float64(Float64(y - z) * Float64(t - z)));
            	else
            		tmp = Float64(Float64(x / z) / Float64(Float64(-t) + z));
            	end
            	return tmp
            end
            
            x, y, z, t = num2cell(sort([x, y, z, t])){:}
            function tmp_2 = code(x, y, z, t)
            	tmp = 0.0;
            	if (z <= 1.95e+149)
            		tmp = x / ((y - z) * (t - z));
            	else
            		tmp = (x / z) / (-t + z);
            	end
            	tmp_2 = tmp;
            end
            
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            code[x_, y_, z_, t_] := If[LessEqual[z, 1.95e+149], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] / N[((-t) + z), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq 1.95 \cdot 10^{+149}:\\
            \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{\frac{x}{z}}{\left(-t\right) + z}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < 1.95e149

              1. Initial program 93.5%

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

              if 1.95e149 < z

              1. Initial program 75.2%

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

                \[\leadsto \color{blue}{-1 \cdot \frac{x}{z \cdot \left(t - z\right)}} \]
              4. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto \mathsf{neg}\left(\frac{x}{z \cdot \left(t - z\right)}\right) \]
                2. distribute-neg-fracN/A

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

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

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

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

                  \[\leadsto \frac{\frac{-x}{z}}{t - z} \]
                7. lower--.f6493.4

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

                \[\leadsto \color{blue}{\frac{\frac{-x}{z}}{t - z}} \]
            3. Recombined 2 regimes into one program.
            4. Final simplification93.5%

              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 1.95 \cdot 10^{+149}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{z}}{\left(-t\right) + z}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 7: 64.7% accurate, 0.7× speedup?

            \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{-126} \lor \neg \left(y \leq 6.2 \cdot 10^{-60}\right):\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(-z\right) \cdot t}\\ \end{array} \end{array} \]
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            (FPCore (x y z t)
             :precision binary64
             (if (or (<= y -1.3e-126) (not (<= y 6.2e-60)))
               (/ x (* y (- t z)))
               (/ x (* (- z) t))))
            assert(x < y && y < z && z < t);
            double code(double x, double y, double z, double t) {
            	double tmp;
            	if ((y <= -1.3e-126) || !(y <= 6.2e-60)) {
            		tmp = x / (y * (t - z));
            	} else {
            		tmp = x / (-z * t);
            	}
            	return tmp;
            }
            
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            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 ((y <= (-1.3d-126)) .or. (.not. (y <= 6.2d-60))) then
                    tmp = x / (y * (t - z))
                else
                    tmp = x / (-z * t)
                end if
                code = tmp
            end function
            
            assert x < y && y < z && z < t;
            public static double code(double x, double y, double z, double t) {
            	double tmp;
            	if ((y <= -1.3e-126) || !(y <= 6.2e-60)) {
            		tmp = x / (y * (t - z));
            	} else {
            		tmp = x / (-z * t);
            	}
            	return tmp;
            }
            
            [x, y, z, t] = sort([x, y, z, t])
            def code(x, y, z, t):
            	tmp = 0
            	if (y <= -1.3e-126) or not (y <= 6.2e-60):
            		tmp = x / (y * (t - z))
            	else:
            		tmp = x / (-z * t)
            	return tmp
            
            x, y, z, t = sort([x, y, z, t])
            function code(x, y, z, t)
            	tmp = 0.0
            	if ((y <= -1.3e-126) || !(y <= 6.2e-60))
            		tmp = Float64(x / Float64(y * Float64(t - z)));
            	else
            		tmp = Float64(x / Float64(Float64(-z) * t));
            	end
            	return tmp
            end
            
            x, y, z, t = num2cell(sort([x, y, z, t])){:}
            function tmp_2 = code(x, y, z, t)
            	tmp = 0.0;
            	if ((y <= -1.3e-126) || ~((y <= 6.2e-60)))
            		tmp = x / (y * (t - z));
            	else
            		tmp = x / (-z * t);
            	end
            	tmp_2 = tmp;
            end
            
            NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
            code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.3e-126], N[Not[LessEqual[y, 6.2e-60]], $MachinePrecision]], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[((-z) * t), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
            \\
            \begin{array}{l}
            \mathbf{if}\;y \leq -1.3 \cdot 10^{-126} \lor \neg \left(y \leq 6.2 \cdot 10^{-60}\right):\\
            \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{x}{\left(-z\right) \cdot t}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if y < -1.3e-126 or 6.19999999999999976e-60 < y

              1. Initial program 91.9%

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

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

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

                if -1.3e-126 < y < 6.19999999999999976e-60

                1. Initial program 90.4%

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

                  \[\leadsto \frac{x}{\color{blue}{\left(-1 \cdot z\right)} \cdot \left(t - z\right)} \]
                4. Step-by-step derivation
                  1. mul-1-negN/A

                    \[\leadsto \frac{x}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(t - z\right)} \]
                  2. lower-neg.f6473.0

                    \[\leadsto \frac{x}{\left(-z\right) \cdot \left(t - z\right)} \]
                5. Applied rewrites73.0%

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

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

                    \[\leadsto \frac{x}{\left(-z\right) \cdot \color{blue}{t}} \]
                8. Recombined 2 regimes into one program.
                9. Final simplification71.6%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{-126} \lor \neg \left(y \leq 6.2 \cdot 10^{-60}\right):\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(-z\right) \cdot t}\\ \end{array} \]
                10. Add Preprocessing

                Alternative 8: 65.5% accurate, 0.7× speedup?

                \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{-126}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-187}:\\ \;\;\;\;\frac{x}{\left(-z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(z + y\right) \cdot t}\\ \end{array} \end{array} \]
                NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                (FPCore (x y z t)
                 :precision binary64
                 (if (<= y -1.3e-126)
                   (/ x (* y (- t z)))
                   (if (<= y 7e-187) (/ x (* (- z) t)) (/ x (* (+ z y) t)))))
                assert(x < y && y < z && z < t);
                double code(double x, double y, double z, double t) {
                	double tmp;
                	if (y <= -1.3e-126) {
                		tmp = x / (y * (t - z));
                	} else if (y <= 7e-187) {
                		tmp = x / (-z * t);
                	} else {
                		tmp = x / ((z + y) * t);
                	}
                	return tmp;
                }
                
                NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                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 (y <= (-1.3d-126)) then
                        tmp = x / (y * (t - z))
                    else if (y <= 7d-187) then
                        tmp = x / (-z * t)
                    else
                        tmp = x / ((z + y) * t)
                    end if
                    code = tmp
                end function
                
                assert x < y && y < z && z < t;
                public static double code(double x, double y, double z, double t) {
                	double tmp;
                	if (y <= -1.3e-126) {
                		tmp = x / (y * (t - z));
                	} else if (y <= 7e-187) {
                		tmp = x / (-z * t);
                	} else {
                		tmp = x / ((z + y) * t);
                	}
                	return tmp;
                }
                
                [x, y, z, t] = sort([x, y, z, t])
                def code(x, y, z, t):
                	tmp = 0
                	if y <= -1.3e-126:
                		tmp = x / (y * (t - z))
                	elif y <= 7e-187:
                		tmp = x / (-z * t)
                	else:
                		tmp = x / ((z + y) * t)
                	return tmp
                
                x, y, z, t = sort([x, y, z, t])
                function code(x, y, z, t)
                	tmp = 0.0
                	if (y <= -1.3e-126)
                		tmp = Float64(x / Float64(y * Float64(t - z)));
                	elseif (y <= 7e-187)
                		tmp = Float64(x / Float64(Float64(-z) * t));
                	else
                		tmp = Float64(x / Float64(Float64(z + y) * t));
                	end
                	return tmp
                end
                
                x, y, z, t = num2cell(sort([x, y, z, t])){:}
                function tmp_2 = code(x, y, z, t)
                	tmp = 0.0;
                	if (y <= -1.3e-126)
                		tmp = x / (y * (t - z));
                	elseif (y <= 7e-187)
                		tmp = x / (-z * t);
                	else
                		tmp = x / ((z + y) * t);
                	end
                	tmp_2 = tmp;
                end
                
                NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                code[x_, y_, z_, t_] := If[LessEqual[y, -1.3e-126], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e-187], N[(x / N[((-z) * t), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(z + y), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
                
                \begin{array}{l}
                [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                \\
                \begin{array}{l}
                \mathbf{if}\;y \leq -1.3 \cdot 10^{-126}:\\
                \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
                
                \mathbf{elif}\;y \leq 7 \cdot 10^{-187}:\\
                \;\;\;\;\frac{x}{\left(-z\right) \cdot t}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{x}{\left(z + y\right) \cdot t}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if y < -1.3e-126

                  1. Initial program 97.8%

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

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

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

                    if -1.3e-126 < y < 6.99999999999999958e-187

                    1. Initial program 90.4%

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

                      \[\leadsto \frac{x}{\color{blue}{\left(-1 \cdot z\right)} \cdot \left(t - z\right)} \]
                    4. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto \frac{x}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(t - z\right)} \]
                      2. lower-neg.f6479.5

                        \[\leadsto \frac{x}{\left(-z\right) \cdot \left(t - z\right)} \]
                    5. Applied rewrites79.5%

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

                      \[\leadsto \frac{x}{\left(-z\right) \cdot \color{blue}{t}} \]
                    7. Step-by-step derivation
                      1. Applied rewrites60.4%

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

                      if 6.99999999999999958e-187 < y

                      1. Initial program 86.2%

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

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

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

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

                      Alternative 9: 90.7% accurate, 0.7× speedup?

                      \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq 1.25 \cdot 10^{+172}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t}\\ \end{array} \end{array} \]
                      NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                      (FPCore (x y z t)
                       :precision binary64
                       (if (<= t 1.25e+172) (/ x (* (- y z) (- t z))) (/ (/ x (- y z)) t)))
                      assert(x < y && y < z && z < t);
                      double code(double x, double y, double z, double t) {
                      	double tmp;
                      	if (t <= 1.25e+172) {
                      		tmp = x / ((y - z) * (t - z));
                      	} else {
                      		tmp = (x / (y - z)) / t;
                      	}
                      	return tmp;
                      }
                      
                      NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                      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 (t <= 1.25d+172) then
                              tmp = x / ((y - z) * (t - z))
                          else
                              tmp = (x / (y - z)) / t
                          end if
                          code = tmp
                      end function
                      
                      assert x < y && y < z && z < t;
                      public static double code(double x, double y, double z, double t) {
                      	double tmp;
                      	if (t <= 1.25e+172) {
                      		tmp = x / ((y - z) * (t - z));
                      	} else {
                      		tmp = (x / (y - z)) / t;
                      	}
                      	return tmp;
                      }
                      
                      [x, y, z, t] = sort([x, y, z, t])
                      def code(x, y, z, t):
                      	tmp = 0
                      	if t <= 1.25e+172:
                      		tmp = x / ((y - z) * (t - z))
                      	else:
                      		tmp = (x / (y - z)) / t
                      	return tmp
                      
                      x, y, z, t = sort([x, y, z, t])
                      function code(x, y, z, t)
                      	tmp = 0.0
                      	if (t <= 1.25e+172)
                      		tmp = Float64(x / Float64(Float64(y - z) * Float64(t - z)));
                      	else
                      		tmp = Float64(Float64(x / Float64(y - z)) / t);
                      	end
                      	return tmp
                      end
                      
                      x, y, z, t = num2cell(sort([x, y, z, t])){:}
                      function tmp_2 = code(x, y, z, t)
                      	tmp = 0.0;
                      	if (t <= 1.25e+172)
                      		tmp = x / ((y - z) * (t - z));
                      	else
                      		tmp = (x / (y - z)) / t;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                      code[x_, y_, z_, t_] := If[LessEqual[t, 1.25e+172], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]
                      
                      \begin{array}{l}
                      [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;t \leq 1.25 \cdot 10^{+172}:\\
                      \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{\frac{x}{y - z}}{t}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if t < 1.25e172

                        1. Initial program 92.3%

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

                        if 1.25e172 < t

                        1. Initial program 87.0%

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

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

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

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

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

                            \[\leadsto \frac{\frac{x}{y - z}}{t} \]
                          5. lower--.f6493.3

                            \[\leadsto \frac{\frac{x}{y - z}}{t} \]
                        5. Applied rewrites93.3%

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

                      Alternative 10: 61.2% accurate, 0.8× speedup?

                      \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+34} \lor \neg \left(z \leq 8.2 \cdot 10^{-37}\right):\\ \;\;\;\;\frac{x}{z \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot y}\\ \end{array} \end{array} \]
                      NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                      (FPCore (x y z t)
                       :precision binary64
                       (if (or (<= z -1.7e+34) (not (<= z 8.2e-37))) (/ x (* z z)) (/ x (* t y))))
                      assert(x < y && y < z && z < t);
                      double code(double x, double y, double z, double t) {
                      	double tmp;
                      	if ((z <= -1.7e+34) || !(z <= 8.2e-37)) {
                      		tmp = x / (z * z);
                      	} else {
                      		tmp = x / (t * y);
                      	}
                      	return tmp;
                      }
                      
                      NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                      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 <= (-1.7d+34)) .or. (.not. (z <= 8.2d-37))) then
                              tmp = x / (z * z)
                          else
                              tmp = x / (t * y)
                          end if
                          code = tmp
                      end function
                      
                      assert x < y && y < z && z < t;
                      public static double code(double x, double y, double z, double t) {
                      	double tmp;
                      	if ((z <= -1.7e+34) || !(z <= 8.2e-37)) {
                      		tmp = x / (z * z);
                      	} else {
                      		tmp = x / (t * y);
                      	}
                      	return tmp;
                      }
                      
                      [x, y, z, t] = sort([x, y, z, t])
                      def code(x, y, z, t):
                      	tmp = 0
                      	if (z <= -1.7e+34) or not (z <= 8.2e-37):
                      		tmp = x / (z * z)
                      	else:
                      		tmp = x / (t * y)
                      	return tmp
                      
                      x, y, z, t = sort([x, y, z, t])
                      function code(x, y, z, t)
                      	tmp = 0.0
                      	if ((z <= -1.7e+34) || !(z <= 8.2e-37))
                      		tmp = Float64(x / Float64(z * z));
                      	else
                      		tmp = Float64(x / Float64(t * y));
                      	end
                      	return tmp
                      end
                      
                      x, y, z, t = num2cell(sort([x, y, z, t])){:}
                      function tmp_2 = code(x, y, z, t)
                      	tmp = 0.0;
                      	if ((z <= -1.7e+34) || ~((z <= 8.2e-37)))
                      		tmp = x / (z * z);
                      	else
                      		tmp = x / (t * y);
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                      code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.7e+34], N[Not[LessEqual[z, 8.2e-37]], $MachinePrecision]], N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]]
                      
                      \begin{array}{l}
                      [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;z \leq -1.7 \cdot 10^{+34} \lor \neg \left(z \leq 8.2 \cdot 10^{-37}\right):\\
                      \;\;\;\;\frac{x}{z \cdot z}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{x}{t \cdot y}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if z < -1.7e34 or 8.1999999999999996e-37 < z

                        1. Initial program 86.8%

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

                          \[\leadsto \frac{x}{\color{blue}{{z}^{2}}} \]
                        4. Step-by-step derivation
                          1. unpow2N/A

                            \[\leadsto \frac{x}{z \cdot \color{blue}{z}} \]
                          2. lower-*.f6464.4

                            \[\leadsto \frac{x}{z \cdot \color{blue}{z}} \]
                        5. Applied rewrites64.4%

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

                        if -1.7e34 < z < 8.1999999999999996e-37

                        1. Initial program 95.4%

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

                          \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
                        4. Step-by-step derivation
                          1. lower-*.f6462.9

                            \[\leadsto \frac{x}{t \cdot \color{blue}{y}} \]
                        5. Applied rewrites62.9%

                          \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
                      3. Recombined 2 regimes into one program.
                      4. Final simplification63.6%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+34} \lor \neg \left(z \leq 8.2 \cdot 10^{-37}\right):\\ \;\;\;\;\frac{x}{z \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t \cdot y}\\ \end{array} \]
                      5. Add Preprocessing

                      Alternative 11: 70.7% accurate, 0.9× speedup?

                      \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq 2.6 \cdot 10^{-38}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \end{array} \]
                      NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                      (FPCore (x y z t)
                       :precision binary64
                       (if (<= t 2.6e-38) (/ x (* y (- t z))) (/ x (* (- y z) t))))
                      assert(x < y && y < z && z < t);
                      double code(double x, double y, double z, double t) {
                      	double tmp;
                      	if (t <= 2.6e-38) {
                      		tmp = x / (y * (t - z));
                      	} else {
                      		tmp = x / ((y - z) * t);
                      	}
                      	return tmp;
                      }
                      
                      NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                      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 (t <= 2.6d-38) then
                              tmp = x / (y * (t - z))
                          else
                              tmp = x / ((y - z) * t)
                          end if
                          code = tmp
                      end function
                      
                      assert x < y && y < z && z < t;
                      public static double code(double x, double y, double z, double t) {
                      	double tmp;
                      	if (t <= 2.6e-38) {
                      		tmp = x / (y * (t - z));
                      	} else {
                      		tmp = x / ((y - z) * t);
                      	}
                      	return tmp;
                      }
                      
                      [x, y, z, t] = sort([x, y, z, t])
                      def code(x, y, z, t):
                      	tmp = 0
                      	if t <= 2.6e-38:
                      		tmp = x / (y * (t - z))
                      	else:
                      		tmp = x / ((y - z) * t)
                      	return tmp
                      
                      x, y, z, t = sort([x, y, z, t])
                      function code(x, y, z, t)
                      	tmp = 0.0
                      	if (t <= 2.6e-38)
                      		tmp = Float64(x / Float64(y * Float64(t - z)));
                      	else
                      		tmp = Float64(x / Float64(Float64(y - z) * t));
                      	end
                      	return tmp
                      end
                      
                      x, y, z, t = num2cell(sort([x, y, z, t])){:}
                      function tmp_2 = code(x, y, z, t)
                      	tmp = 0.0;
                      	if (t <= 2.6e-38)
                      		tmp = x / (y * (t - z));
                      	else
                      		tmp = x / ((y - z) * t);
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                      code[x_, y_, z_, t_] := If[LessEqual[t, 2.6e-38], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
                      
                      \begin{array}{l}
                      [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;t \leq 2.6 \cdot 10^{-38}:\\
                      \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if t < 2.60000000000000011e-38

                        1. Initial program 91.7%

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

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

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

                          if 2.60000000000000011e-38 < t

                          1. Initial program 90.6%

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

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

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

                          Alternative 12: 88.8% accurate, 1.0× speedup?

                          \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \end{array} \]
                          NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                          (FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
                          assert(x < y && y < z && z < t);
                          double code(double x, double y, double z, double t) {
                          	return x / ((y - z) * (t - z));
                          }
                          
                          NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                          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
                          
                          assert x < y && y < z && z < t;
                          public static double code(double x, double y, double z, double t) {
                          	return x / ((y - z) * (t - z));
                          }
                          
                          [x, y, z, t] = sort([x, y, z, t])
                          def code(x, y, z, t):
                          	return x / ((y - z) * (t - z))
                          
                          x, y, z, t = sort([x, y, z, t])
                          function code(x, y, z, t)
                          	return Float64(x / Float64(Float64(y - z) * Float64(t - z)))
                          end
                          
                          x, y, z, t = num2cell(sort([x, y, z, t])){:}
                          function tmp = code(x, y, z, t)
                          	tmp = x / ((y - z) * (t - z));
                          end
                          
                          NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                          code[x_, y_, z_, t_] := N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                          
                          \begin{array}{l}
                          [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                          \\
                          \frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
                          \end{array}
                          
                          Derivation
                          1. Initial program 91.4%

                            \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
                          2. Add Preprocessing
                          3. Add Preprocessing

                          Alternative 13: 39.3% accurate, 1.4× speedup?

                          \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \frac{x}{t \cdot y} \end{array} \]
                          NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                          (FPCore (x y z t) :precision binary64 (/ x (* t y)))
                          assert(x < y && y < z && z < t);
                          double code(double x, double y, double z, double t) {
                          	return x / (t * y);
                          }
                          
                          NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                          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
                          
                          assert x < y && y < z && z < t;
                          public static double code(double x, double y, double z, double t) {
                          	return x / (t * y);
                          }
                          
                          [x, y, z, t] = sort([x, y, z, t])
                          def code(x, y, z, t):
                          	return x / (t * y)
                          
                          x, y, z, t = sort([x, y, z, t])
                          function code(x, y, z, t)
                          	return Float64(x / Float64(t * y))
                          end
                          
                          x, y, z, t = num2cell(sort([x, y, z, t])){:}
                          function tmp = code(x, y, z, t)
                          	tmp = x / (t * y);
                          end
                          
                          NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
                          code[x_, y_, z_, t_] := N[(x / N[(t * y), $MachinePrecision]), $MachinePrecision]
                          
                          \begin{array}{l}
                          [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
                          \\
                          \frac{x}{t \cdot y}
                          \end{array}
                          
                          Derivation
                          1. Initial program 91.4%

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

                            \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
                          4. Step-by-step derivation
                            1. lower-*.f6443.0

                              \[\leadsto \frac{x}{t \cdot \color{blue}{y}} \]
                          5. Applied rewrites43.0%

                            \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
                          6. Add Preprocessing

                          Developer Target 1: 87.9% accurate, 0.4× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \left(t - z\right)\\ \mathbf{if}\;\frac{x}{t\_1} < 0:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{1}{t\_1}\\ \end{array} \end{array} \]
                          (FPCore (x y z t)
                           :precision binary64
                           (let* ((t_1 (* (- y z) (- t z))))
                             (if (< (/ x t_1) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 t_1)))))
                          double code(double x, double y, double z, double t) {
                          	double t_1 = (y - z) * (t - z);
                          	double tmp;
                          	if ((x / t_1) < 0.0) {
                          		tmp = (x / (y - z)) / (t - z);
                          	} else {
                          		tmp = x * (1.0 / 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 = (y - z) * (t - z)
                              if ((x / t_1) < 0.0d0) then
                                  tmp = (x / (y - z)) / (t - z)
                              else
                                  tmp = x * (1.0d0 / t_1)
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z, double t) {
                          	double t_1 = (y - z) * (t - z);
                          	double tmp;
                          	if ((x / t_1) < 0.0) {
                          		tmp = (x / (y - z)) / (t - z);
                          	} else {
                          		tmp = x * (1.0 / t_1);
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t):
                          	t_1 = (y - z) * (t - z)
                          	tmp = 0
                          	if (x / t_1) < 0.0:
                          		tmp = (x / (y - z)) / (t - z)
                          	else:
                          		tmp = x * (1.0 / t_1)
                          	return tmp
                          
                          function code(x, y, z, t)
                          	t_1 = Float64(Float64(y - z) * Float64(t - z))
                          	tmp = 0.0
                          	if (Float64(x / t_1) < 0.0)
                          		tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z));
                          	else
                          		tmp = Float64(x * Float64(1.0 / t_1));
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t)
                          	t_1 = (y - z) * (t - z);
                          	tmp = 0.0;
                          	if ((x / t_1) < 0.0)
                          		tmp = (x / (y - z)) / (t - z);
                          	else
                          		tmp = x * (1.0 / t_1);
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Less[N[(x / t$95$1), $MachinePrecision], 0.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
                          \mathbf{if}\;\frac{x}{t\_1} < 0:\\
                          \;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;x \cdot \frac{1}{t\_1}\\
                          
                          
                          \end{array}
                          \end{array}
                          

                          Reproduce

                          ?
                          herbie shell --seed 2025026 
                          (FPCore (x y z t)
                            :name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
                            :precision binary64
                          
                            :alt
                            (! :herbie-platform default (if (< (/ x (* (- y z) (- t z))) 0) (/ (/ x (- y z)) (- t z)) (* x (/ 1 (* (- y z) (- t z))))))
                          
                            (/ x (* (- y z) (- t z))))