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

Percentage Accurate: 89.2% → 96.8%
Time: 3.2s
Alternatives: 13
Speedup: 1.0×

Specification

?
\[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
(FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
double code(double x, double y, double z, double t) {
	return x / ((y - z) * (t - z));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

\[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
(FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
double code(double x, double y, double z, double t) {
	return x / ((y - z) * (t - z));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

Alternative 1: 96.8% accurate, 0.7× speedup?

\[\frac{\frac{x}{z - \mathsf{min}\left(y, t\right)}}{z - \mathsf{max}\left(y, t\right)} \]
(FPCore (x y z t)
 :precision binary64
 (/ (/ x (- z (fmin y t))) (- z (fmax y t))))
double code(double x, double y, double z, double t) {
	return (x / (z - fmin(y, t))) / (z - fmax(y, t));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 96.6% accurate, 1.0× speedup?

\[\frac{\frac{x}{z - t}}{z - y} \]
(FPCore (x y z t) :precision binary64 (/ (/ x (- z t)) (- z y)))
double code(double x, double y, double z, double t) {
	return (x / (z - t)) / (z - y);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (x / (z - t)) / (z - y)
end function
public static double code(double x, double y, double z, double t) {
	return (x / (z - t)) / (z - y);
}
def code(x, y, z, t):
	return (x / (z - t)) / (z - y)
function code(x, y, z, t)
	return Float64(Float64(x / Float64(z - t)) / Float64(z - y))
end
function tmp = code(x, y, z, t)
	tmp = (x / (z - t)) / (z - y);
end
code[x_, y_, z_, t_] := N[(N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]
\frac{\frac{x}{z - t}}{z - y}
Derivation
  1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 93.1% accurate, 0.5× speedup?

\[\begin{array}{l} t_1 := \frac{\frac{x}{z}}{z - \mathsf{max}\left(y, t\right)}\\ \mathbf{if}\;z \leq -7.4 \cdot 10^{+112}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{+99}:\\ \;\;\;\;\frac{x}{\left(\mathsf{min}\left(y, t\right) - z\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ (/ x z) (- z (fmax y t)))))
   (if (<= z -7.4e+112)
     t_1
     (if (<= z 3.9e+99) (/ x (* (- (fmin y t) z) (- (fmax y t) z))) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = (x / z) / (z - fmax(y, t));
	double tmp;
	if (z <= -7.4e+112) {
		tmp = t_1;
	} else if (z <= 3.9e+99) {
		tmp = x / ((fmin(y, t) - z) * (fmax(y, t) - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x / z) / (z - fmax(y, t))
    if (z <= (-7.4d+112)) then
        tmp = t_1
    else if (z <= 3.9d+99) then
        tmp = x / ((fmin(y, t) - z) * (fmax(y, t) - z))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (x / z) / (z - fmax(y, t));
	double tmp;
	if (z <= -7.4e+112) {
		tmp = t_1;
	} else if (z <= 3.9e+99) {
		tmp = x / ((fmin(y, t) - z) * (fmax(y, t) - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x / z) / (z - fmax(y, t))
	tmp = 0
	if z <= -7.4e+112:
		tmp = t_1
	elif z <= 3.9e+99:
		tmp = x / ((fmin(y, t) - z) * (fmax(y, t) - z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x / z) / Float64(z - fmax(y, t)))
	tmp = 0.0
	if (z <= -7.4e+112)
		tmp = t_1;
	elseif (z <= 3.9e+99)
		tmp = Float64(x / Float64(Float64(fmin(y, t) - z) * Float64(fmax(y, t) - z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x / z) / (z - max(y, t));
	tmp = 0.0;
	if (z <= -7.4e+112)
		tmp = t_1;
	elseif (z <= 3.9e+99)
		tmp = x / ((min(y, t) - z) * (max(y, t) - z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / N[(z - N[Max[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.4e+112], t$95$1, If[LessEqual[z, 3.9e+99], N[(x / N[(N[(N[Min[y, t], $MachinePrecision] - z), $MachinePrecision] * N[(N[Max[y, t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{z - \mathsf{max}\left(y, t\right)}\\
\mathbf{if}\;z \leq -7.4 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.9 \cdot 10^{+99}:\\
\;\;\;\;\frac{x}{\left(\mathsf{min}\left(y, t\right) - z\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.40000000000000008e112 or 3.89999999999999995e99 < z

    1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -7.40000000000000008e112 < z < 3.89999999999999995e99

      1. Initial program 89.2%

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

    Alternative 4: 80.7% accurate, 0.3× speedup?

    \[\begin{array}{l} \mathbf{if}\;\mathsf{min}\left(y, t\right) \leq -6.2 \cdot 10^{+52}:\\ \;\;\;\;\frac{x}{\mathsf{min}\left(y, t\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\ \mathbf{elif}\;\mathsf{min}\left(y, t\right) \leq -3.7 \cdot 10^{-14}:\\ \;\;\;\;\frac{\frac{x}{z - \mathsf{min}\left(y, t\right)}}{z}\\ \mathbf{elif}\;\mathsf{min}\left(y, t\right) \leq 9 \cdot 10^{-118}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - \mathsf{max}\left(y, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{\mathsf{min}\left(y, t\right) - z}}{\mathsf{max}\left(y, t\right)}\\ \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (if (<= (fmin y t) -6.2e+52)
       (/ x (* (fmin y t) (- (fmax y t) z)))
       (if (<= (fmin y t) -3.7e-14)
         (/ (/ x (- z (fmin y t))) z)
         (if (<= (fmin y t) 9e-118)
           (/ (/ x z) (- z (fmax y t)))
           (/ (/ x (- (fmin y t) z)) (fmax y t))))))
    double code(double x, double y, double z, double t) {
    	double tmp;
    	if (fmin(y, t) <= -6.2e+52) {
    		tmp = x / (fmin(y, t) * (fmax(y, t) - z));
    	} else if (fmin(y, t) <= -3.7e-14) {
    		tmp = (x / (z - fmin(y, t))) / z;
    	} else if (fmin(y, t) <= 9e-118) {
    		tmp = (x / z) / (z - fmax(y, t));
    	} else {
    		tmp = (x / (fmin(y, t) - z)) / fmax(y, t);
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8) :: tmp
        if (fmin(y, t) <= (-6.2d+52)) then
            tmp = x / (fmin(y, t) * (fmax(y, t) - z))
        else if (fmin(y, t) <= (-3.7d-14)) then
            tmp = (x / (z - fmin(y, t))) / z
        else if (fmin(y, t) <= 9d-118) then
            tmp = (x / z) / (z - fmax(y, t))
        else
            tmp = (x / (fmin(y, t) - z)) / fmax(y, t)
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t) {
    	double tmp;
    	if (fmin(y, t) <= -6.2e+52) {
    		tmp = x / (fmin(y, t) * (fmax(y, t) - z));
    	} else if (fmin(y, t) <= -3.7e-14) {
    		tmp = (x / (z - fmin(y, t))) / z;
    	} else if (fmin(y, t) <= 9e-118) {
    		tmp = (x / z) / (z - fmax(y, t));
    	} else {
    		tmp = (x / (fmin(y, t) - z)) / fmax(y, t);
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	tmp = 0
    	if fmin(y, t) <= -6.2e+52:
    		tmp = x / (fmin(y, t) * (fmax(y, t) - z))
    	elif fmin(y, t) <= -3.7e-14:
    		tmp = (x / (z - fmin(y, t))) / z
    	elif fmin(y, t) <= 9e-118:
    		tmp = (x / z) / (z - fmax(y, t))
    	else:
    		tmp = (x / (fmin(y, t) - z)) / fmax(y, t)
    	return tmp
    
    function code(x, y, z, t)
    	tmp = 0.0
    	if (fmin(y, t) <= -6.2e+52)
    		tmp = Float64(x / Float64(fmin(y, t) * Float64(fmax(y, t) - z)));
    	elseif (fmin(y, t) <= -3.7e-14)
    		tmp = Float64(Float64(x / Float64(z - fmin(y, t))) / z);
    	elseif (fmin(y, t) <= 9e-118)
    		tmp = Float64(Float64(x / z) / Float64(z - fmax(y, t)));
    	else
    		tmp = Float64(Float64(x / Float64(fmin(y, t) - z)) / fmax(y, t));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	tmp = 0.0;
    	if (min(y, t) <= -6.2e+52)
    		tmp = x / (min(y, t) * (max(y, t) - z));
    	elseif (min(y, t) <= -3.7e-14)
    		tmp = (x / (z - min(y, t))) / z;
    	elseif (min(y, t) <= 9e-118)
    		tmp = (x / z) / (z - max(y, t));
    	else
    		tmp = (x / (min(y, t) - z)) / max(y, t);
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_] := If[LessEqual[N[Min[y, t], $MachinePrecision], -6.2e+52], N[(x / N[(N[Min[y, t], $MachinePrecision] * N[(N[Max[y, t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Min[y, t], $MachinePrecision], -3.7e-14], N[(N[(x / N[(z - N[Min[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[N[Min[y, t], $MachinePrecision], 9e-118], N[(N[(x / z), $MachinePrecision] / N[(z - N[Max[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(N[Min[y, t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] / N[Max[y, t], $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    \mathbf{if}\;\mathsf{min}\left(y, t\right) \leq -6.2 \cdot 10^{+52}:\\
    \;\;\;\;\frac{x}{\mathsf{min}\left(y, t\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\
    
    \mathbf{elif}\;\mathsf{min}\left(y, t\right) \leq -3.7 \cdot 10^{-14}:\\
    \;\;\;\;\frac{\frac{x}{z - \mathsf{min}\left(y, t\right)}}{z}\\
    
    \mathbf{elif}\;\mathsf{min}\left(y, t\right) \leq 9 \cdot 10^{-118}:\\
    \;\;\;\;\frac{\frac{x}{z}}{z - \mathsf{max}\left(y, t\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\frac{x}{\mathsf{min}\left(y, t\right) - z}}{\mathsf{max}\left(y, t\right)}\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if y < -6.2e52

      1. Initial program 89.2%

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

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

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

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

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

      if -6.2e52 < y < -3.70000000000000001e-14

      1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\frac{x}{z - y}}{z} \]
        8. lower-/.f6460.2%

          \[\leadsto \frac{\frac{x}{z - y}}{z} \]
      8. Applied rewrites60.2%

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

      if -3.70000000000000001e-14 < y < 9.0000000000000001e-118

      1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 9.0000000000000001e-118 < y

        1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\color{blue}{\frac{x}{y - z}}}{t} \]
            15. lift--.f6463.0%

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

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

        Alternative 5: 80.6% accurate, 0.3× speedup?

        \[\begin{array}{l} \mathbf{if}\;\mathsf{min}\left(y, t\right) \leq -6.2 \cdot 10^{+52}:\\ \;\;\;\;\frac{x}{\mathsf{min}\left(y, t\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\ \mathbf{elif}\;\mathsf{min}\left(y, t\right) \leq -3.7 \cdot 10^{-14}:\\ \;\;\;\;\frac{\frac{x}{z - \mathsf{min}\left(y, t\right)}}{z}\\ \mathbf{elif}\;\mathsf{min}\left(y, t\right) \leq 9 \cdot 10^{-118}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - \mathsf{max}\left(y, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{\mathsf{max}\left(y, t\right)}}{\mathsf{min}\left(y, t\right) - z}\\ \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (if (<= (fmin y t) -6.2e+52)
           (/ x (* (fmin y t) (- (fmax y t) z)))
           (if (<= (fmin y t) -3.7e-14)
             (/ (/ x (- z (fmin y t))) z)
             (if (<= (fmin y t) 9e-118)
               (/ (/ x z) (- z (fmax y t)))
               (/ (/ x (fmax y t)) (- (fmin y t) z))))))
        double code(double x, double y, double z, double t) {
        	double tmp;
        	if (fmin(y, t) <= -6.2e+52) {
        		tmp = x / (fmin(y, t) * (fmax(y, t) - z));
        	} else if (fmin(y, t) <= -3.7e-14) {
        		tmp = (x / (z - fmin(y, t))) / z;
        	} else if (fmin(y, t) <= 9e-118) {
        		tmp = (x / z) / (z - fmax(y, t));
        	} else {
        		tmp = (x / fmax(y, t)) / (fmin(y, t) - z);
        	}
        	return tmp;
        }
        
        module fmin_fmax_functions
            implicit none
            private
            public fmax
            public fmin
        
            interface fmax
                module procedure fmax88
                module procedure fmax44
                module procedure fmax84
                module procedure fmax48
            end interface
            interface fmin
                module procedure fmin88
                module procedure fmin44
                module procedure fmin84
                module procedure fmin48
            end interface
        contains
            real(8) function fmax88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(4) function fmax44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(8) function fmax84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmax48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
            end function
            real(8) function fmin88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(4) function fmin44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(8) function fmin84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmin48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
            end function
        end module
        
        real(8) function code(x, y, z, t)
        use fmin_fmax_functions
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8) :: tmp
            if (fmin(y, t) <= (-6.2d+52)) then
                tmp = x / (fmin(y, t) * (fmax(y, t) - z))
            else if (fmin(y, t) <= (-3.7d-14)) then
                tmp = (x / (z - fmin(y, t))) / z
            else if (fmin(y, t) <= 9d-118) then
                tmp = (x / z) / (z - fmax(y, t))
            else
                tmp = (x / fmax(y, t)) / (fmin(y, t) - z)
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t) {
        	double tmp;
        	if (fmin(y, t) <= -6.2e+52) {
        		tmp = x / (fmin(y, t) * (fmax(y, t) - z));
        	} else if (fmin(y, t) <= -3.7e-14) {
        		tmp = (x / (z - fmin(y, t))) / z;
        	} else if (fmin(y, t) <= 9e-118) {
        		tmp = (x / z) / (z - fmax(y, t));
        	} else {
        		tmp = (x / fmax(y, t)) / (fmin(y, t) - z);
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	tmp = 0
        	if fmin(y, t) <= -6.2e+52:
        		tmp = x / (fmin(y, t) * (fmax(y, t) - z))
        	elif fmin(y, t) <= -3.7e-14:
        		tmp = (x / (z - fmin(y, t))) / z
        	elif fmin(y, t) <= 9e-118:
        		tmp = (x / z) / (z - fmax(y, t))
        	else:
        		tmp = (x / fmax(y, t)) / (fmin(y, t) - z)
        	return tmp
        
        function code(x, y, z, t)
        	tmp = 0.0
        	if (fmin(y, t) <= -6.2e+52)
        		tmp = Float64(x / Float64(fmin(y, t) * Float64(fmax(y, t) - z)));
        	elseif (fmin(y, t) <= -3.7e-14)
        		tmp = Float64(Float64(x / Float64(z - fmin(y, t))) / z);
        	elseif (fmin(y, t) <= 9e-118)
        		tmp = Float64(Float64(x / z) / Float64(z - fmax(y, t)));
        	else
        		tmp = Float64(Float64(x / fmax(y, t)) / Float64(fmin(y, t) - z));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t)
        	tmp = 0.0;
        	if (min(y, t) <= -6.2e+52)
        		tmp = x / (min(y, t) * (max(y, t) - z));
        	elseif (min(y, t) <= -3.7e-14)
        		tmp = (x / (z - min(y, t))) / z;
        	elseif (min(y, t) <= 9e-118)
        		tmp = (x / z) / (z - max(y, t));
        	else
        		tmp = (x / max(y, t)) / (min(y, t) - z);
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_] := If[LessEqual[N[Min[y, t], $MachinePrecision], -6.2e+52], N[(x / N[(N[Min[y, t], $MachinePrecision] * N[(N[Max[y, t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Min[y, t], $MachinePrecision], -3.7e-14], N[(N[(x / N[(z - N[Min[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[N[Min[y, t], $MachinePrecision], 9e-118], N[(N[(x / z), $MachinePrecision] / N[(z - N[Max[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[Max[y, t], $MachinePrecision]), $MachinePrecision] / N[(N[Min[y, t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]]]]
        
        \begin{array}{l}
        \mathbf{if}\;\mathsf{min}\left(y, t\right) \leq -6.2 \cdot 10^{+52}:\\
        \;\;\;\;\frac{x}{\mathsf{min}\left(y, t\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\
        
        \mathbf{elif}\;\mathsf{min}\left(y, t\right) \leq -3.7 \cdot 10^{-14}:\\
        \;\;\;\;\frac{\frac{x}{z - \mathsf{min}\left(y, t\right)}}{z}\\
        
        \mathbf{elif}\;\mathsf{min}\left(y, t\right) \leq 9 \cdot 10^{-118}:\\
        \;\;\;\;\frac{\frac{x}{z}}{z - \mathsf{max}\left(y, t\right)}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\frac{x}{\mathsf{max}\left(y, t\right)}}{\mathsf{min}\left(y, t\right) - z}\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if y < -6.2e52

          1. Initial program 89.2%

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

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

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

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

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

          if -6.2e52 < y < -3.70000000000000001e-14

          1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\frac{x}{z - y}}{z} \]
            8. lower-/.f6460.2%

              \[\leadsto \frac{\frac{x}{z - y}}{z} \]
          8. Applied rewrites60.2%

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

          if -3.70000000000000001e-14 < y < 9.0000000000000001e-118

          1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 9.0000000000000001e-118 < y

            1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\color{blue}{\frac{x}{t}}}{y - z} \]
                8. lift--.f6458.2%

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

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

            Alternative 6: 80.6% accurate, 0.4× speedup?

            \[\begin{array}{l} \mathbf{if}\;\mathsf{max}\left(y, t\right) \leq -2.5 \cdot 10^{-16}:\\ \;\;\;\;\frac{x}{\mathsf{min}\left(y, t\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\ \mathbf{elif}\;\mathsf{max}\left(y, t\right) \leq 5.2 \cdot 10^{-61}:\\ \;\;\;\;\frac{\frac{x}{z - \mathsf{min}\left(y, t\right)}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{\mathsf{max}\left(y, t\right)}}{\mathsf{min}\left(y, t\right) - z}\\ \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (if (<= (fmax y t) -2.5e-16)
               (/ x (* (fmin y t) (- (fmax y t) z)))
               (if (<= (fmax y t) 5.2e-61)
                 (/ (/ x (- z (fmin y t))) z)
                 (/ (/ x (fmax y t)) (- (fmin y t) z)))))
            double code(double x, double y, double z, double t) {
            	double tmp;
            	if (fmax(y, t) <= -2.5e-16) {
            		tmp = x / (fmin(y, t) * (fmax(y, t) - z));
            	} else if (fmax(y, t) <= 5.2e-61) {
            		tmp = (x / (z - fmin(y, t))) / z;
            	} else {
            		tmp = (x / fmax(y, t)) / (fmin(y, t) - z);
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(x, y, z, t)
            use fmin_fmax_functions
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8) :: tmp
                if (fmax(y, t) <= (-2.5d-16)) then
                    tmp = x / (fmin(y, t) * (fmax(y, t) - z))
                else if (fmax(y, t) <= 5.2d-61) then
                    tmp = (x / (z - fmin(y, t))) / z
                else
                    tmp = (x / fmax(y, t)) / (fmin(y, t) - z)
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t) {
            	double tmp;
            	if (fmax(y, t) <= -2.5e-16) {
            		tmp = x / (fmin(y, t) * (fmax(y, t) - z));
            	} else if (fmax(y, t) <= 5.2e-61) {
            		tmp = (x / (z - fmin(y, t))) / z;
            	} else {
            		tmp = (x / fmax(y, t)) / (fmin(y, t) - z);
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	tmp = 0
            	if fmax(y, t) <= -2.5e-16:
            		tmp = x / (fmin(y, t) * (fmax(y, t) - z))
            	elif fmax(y, t) <= 5.2e-61:
            		tmp = (x / (z - fmin(y, t))) / z
            	else:
            		tmp = (x / fmax(y, t)) / (fmin(y, t) - z)
            	return tmp
            
            function code(x, y, z, t)
            	tmp = 0.0
            	if (fmax(y, t) <= -2.5e-16)
            		tmp = Float64(x / Float64(fmin(y, t) * Float64(fmax(y, t) - z)));
            	elseif (fmax(y, t) <= 5.2e-61)
            		tmp = Float64(Float64(x / Float64(z - fmin(y, t))) / z);
            	else
            		tmp = Float64(Float64(x / fmax(y, t)) / Float64(fmin(y, t) - z));
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	tmp = 0.0;
            	if (max(y, t) <= -2.5e-16)
            		tmp = x / (min(y, t) * (max(y, t) - z));
            	elseif (max(y, t) <= 5.2e-61)
            		tmp = (x / (z - min(y, t))) / z;
            	else
            		tmp = (x / max(y, t)) / (min(y, t) - z);
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := If[LessEqual[N[Max[y, t], $MachinePrecision], -2.5e-16], N[(x / N[(N[Min[y, t], $MachinePrecision] * N[(N[Max[y, t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[y, t], $MachinePrecision], 5.2e-61], N[(N[(x / N[(z - N[Min[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(x / N[Max[y, t], $MachinePrecision]), $MachinePrecision] / N[(N[Min[y, t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            \mathbf{if}\;\mathsf{max}\left(y, t\right) \leq -2.5 \cdot 10^{-16}:\\
            \;\;\;\;\frac{x}{\mathsf{min}\left(y, t\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\
            
            \mathbf{elif}\;\mathsf{max}\left(y, t\right) \leq 5.2 \cdot 10^{-61}:\\
            \;\;\;\;\frac{\frac{x}{z - \mathsf{min}\left(y, t\right)}}{z}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{\frac{x}{\mathsf{max}\left(y, t\right)}}{\mathsf{min}\left(y, t\right) - z}\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if t < -2.5000000000000002e-16

              1. Initial program 89.2%

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

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

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

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

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

              if -2.5000000000000002e-16 < t < 5.20000000000000021e-61

              1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\frac{x}{z - y}}{z} \]
                8. lower-/.f6460.2%

                  \[\leadsto \frac{\frac{x}{z - y}}{z} \]
              8. Applied rewrites60.2%

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

              if 5.20000000000000021e-61 < t

              1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{\color{blue}{\frac{x}{t}}}{y - z} \]
                  8. lift--.f6458.2%

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

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

              Alternative 7: 79.5% accurate, 0.4× speedup?

              \[\begin{array}{l} \mathbf{if}\;\mathsf{max}\left(y, t\right) \leq -2.5 \cdot 10^{-16}:\\ \;\;\;\;\frac{x}{\mathsf{min}\left(y, t\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\ \mathbf{elif}\;\mathsf{max}\left(y, t\right) \leq 5.2 \cdot 10^{-61}:\\ \;\;\;\;\frac{\frac{x}{z - \mathsf{min}\left(y, t\right)}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(\mathsf{min}\left(y, t\right) - z\right) \cdot \mathsf{max}\left(y, t\right)}\\ \end{array} \]
              (FPCore (x y z t)
               :precision binary64
               (if (<= (fmax y t) -2.5e-16)
                 (/ x (* (fmin y t) (- (fmax y t) z)))
                 (if (<= (fmax y t) 5.2e-61)
                   (/ (/ x (- z (fmin y t))) z)
                   (/ x (* (- (fmin y t) z) (fmax y t))))))
              double code(double x, double y, double z, double t) {
              	double tmp;
              	if (fmax(y, t) <= -2.5e-16) {
              		tmp = x / (fmin(y, t) * (fmax(y, t) - z));
              	} else if (fmax(y, t) <= 5.2e-61) {
              		tmp = (x / (z - fmin(y, t))) / z;
              	} else {
              		tmp = x / ((fmin(y, t) - z) * fmax(y, t));
              	}
              	return tmp;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(x, y, z, t)
              use fmin_fmax_functions
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8) :: tmp
                  if (fmax(y, t) <= (-2.5d-16)) then
                      tmp = x / (fmin(y, t) * (fmax(y, t) - z))
                  else if (fmax(y, t) <= 5.2d-61) then
                      tmp = (x / (z - fmin(y, t))) / z
                  else
                      tmp = x / ((fmin(y, t) - z) * fmax(y, t))
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t) {
              	double tmp;
              	if (fmax(y, t) <= -2.5e-16) {
              		tmp = x / (fmin(y, t) * (fmax(y, t) - z));
              	} else if (fmax(y, t) <= 5.2e-61) {
              		tmp = (x / (z - fmin(y, t))) / z;
              	} else {
              		tmp = x / ((fmin(y, t) - z) * fmax(y, t));
              	}
              	return tmp;
              }
              
              def code(x, y, z, t):
              	tmp = 0
              	if fmax(y, t) <= -2.5e-16:
              		tmp = x / (fmin(y, t) * (fmax(y, t) - z))
              	elif fmax(y, t) <= 5.2e-61:
              		tmp = (x / (z - fmin(y, t))) / z
              	else:
              		tmp = x / ((fmin(y, t) - z) * fmax(y, t))
              	return tmp
              
              function code(x, y, z, t)
              	tmp = 0.0
              	if (fmax(y, t) <= -2.5e-16)
              		tmp = Float64(x / Float64(fmin(y, t) * Float64(fmax(y, t) - z)));
              	elseif (fmax(y, t) <= 5.2e-61)
              		tmp = Float64(Float64(x / Float64(z - fmin(y, t))) / z);
              	else
              		tmp = Float64(x / Float64(Float64(fmin(y, t) - z) * fmax(y, t)));
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t)
              	tmp = 0.0;
              	if (max(y, t) <= -2.5e-16)
              		tmp = x / (min(y, t) * (max(y, t) - z));
              	elseif (max(y, t) <= 5.2e-61)
              		tmp = (x / (z - min(y, t))) / z;
              	else
              		tmp = x / ((min(y, t) - z) * max(y, t));
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_] := If[LessEqual[N[Max[y, t], $MachinePrecision], -2.5e-16], N[(x / N[(N[Min[y, t], $MachinePrecision] * N[(N[Max[y, t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[y, t], $MachinePrecision], 5.2e-61], N[(N[(x / N[(z - N[Min[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(x / N[(N[(N[Min[y, t], $MachinePrecision] - z), $MachinePrecision] * N[Max[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
              
              \begin{array}{l}
              \mathbf{if}\;\mathsf{max}\left(y, t\right) \leq -2.5 \cdot 10^{-16}:\\
              \;\;\;\;\frac{x}{\mathsf{min}\left(y, t\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\
              
              \mathbf{elif}\;\mathsf{max}\left(y, t\right) \leq 5.2 \cdot 10^{-61}:\\
              \;\;\;\;\frac{\frac{x}{z - \mathsf{min}\left(y, t\right)}}{z}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{x}{\left(\mathsf{min}\left(y, t\right) - z\right) \cdot \mathsf{max}\left(y, t\right)}\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if t < -2.5000000000000002e-16

                1. Initial program 89.2%

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

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

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

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

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

                if -2.5000000000000002e-16 < t < 5.20000000000000021e-61

                1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{\frac{x}{z - y}}{z} \]
                  8. lower-/.f6460.2%

                    \[\leadsto \frac{\frac{x}{z - y}}{z} \]
                8. Applied rewrites60.2%

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

                if 5.20000000000000021e-61 < t

                1. Initial program 89.2%

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

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

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

                Alternative 8: 76.7% accurate, 0.4× speedup?

                \[\begin{array}{l} \mathbf{if}\;\mathsf{min}\left(y, t\right) \leq -3.6 \cdot 10^{+51}:\\ \;\;\;\;\frac{x}{\mathsf{min}\left(y, t\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\ \mathbf{elif}\;\mathsf{min}\left(y, t\right) \leq -3.7 \cdot 10^{-14}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - \mathsf{min}\left(y, t\right)\right)}\\ \mathbf{elif}\;\mathsf{min}\left(y, t\right) \leq 1.5 \cdot 10^{-106}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - \mathsf{max}\left(y, t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{\mathsf{min}\left(y, t\right)}}{\mathsf{max}\left(y, t\right)}\\ \end{array} \]
                (FPCore (x y z t)
                 :precision binary64
                 (if (<= (fmin y t) -3.6e+51)
                   (/ x (* (fmin y t) (- (fmax y t) z)))
                   (if (<= (fmin y t) -3.7e-14)
                     (/ x (* z (- z (fmin y t))))
                     (if (<= (fmin y t) 1.5e-106)
                       (/ x (* z (- z (fmax y t))))
                       (/ (/ x (fmin y t)) (fmax y t))))))
                double code(double x, double y, double z, double t) {
                	double tmp;
                	if (fmin(y, t) <= -3.6e+51) {
                		tmp = x / (fmin(y, t) * (fmax(y, t) - z));
                	} else if (fmin(y, t) <= -3.7e-14) {
                		tmp = x / (z * (z - fmin(y, t)));
                	} else if (fmin(y, t) <= 1.5e-106) {
                		tmp = x / (z * (z - fmax(y, t)));
                	} else {
                		tmp = (x / fmin(y, t)) / fmax(y, t);
                	}
                	return tmp;
                }
                
                module fmin_fmax_functions
                    implicit none
                    private
                    public fmax
                    public fmin
                
                    interface fmax
                        module procedure fmax88
                        module procedure fmax44
                        module procedure fmax84
                        module procedure fmax48
                    end interface
                    interface fmin
                        module procedure fmin88
                        module procedure fmin44
                        module procedure fmin84
                        module procedure fmin48
                    end interface
                contains
                    real(8) function fmax88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmax44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmax84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmax48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                    end function
                    real(8) function fmin88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmin44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmin84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmin48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                    end function
                end module
                
                real(8) function code(x, y, z, t)
                use fmin_fmax_functions
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    real(8), intent (in) :: z
                    real(8), intent (in) :: t
                    real(8) :: tmp
                    if (fmin(y, t) <= (-3.6d+51)) then
                        tmp = x / (fmin(y, t) * (fmax(y, t) - z))
                    else if (fmin(y, t) <= (-3.7d-14)) then
                        tmp = x / (z * (z - fmin(y, t)))
                    else if (fmin(y, t) <= 1.5d-106) then
                        tmp = x / (z * (z - fmax(y, t)))
                    else
                        tmp = (x / fmin(y, t)) / fmax(y, t)
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z, double t) {
                	double tmp;
                	if (fmin(y, t) <= -3.6e+51) {
                		tmp = x / (fmin(y, t) * (fmax(y, t) - z));
                	} else if (fmin(y, t) <= -3.7e-14) {
                		tmp = x / (z * (z - fmin(y, t)));
                	} else if (fmin(y, t) <= 1.5e-106) {
                		tmp = x / (z * (z - fmax(y, t)));
                	} else {
                		tmp = (x / fmin(y, t)) / fmax(y, t);
                	}
                	return tmp;
                }
                
                def code(x, y, z, t):
                	tmp = 0
                	if fmin(y, t) <= -3.6e+51:
                		tmp = x / (fmin(y, t) * (fmax(y, t) - z))
                	elif fmin(y, t) <= -3.7e-14:
                		tmp = x / (z * (z - fmin(y, t)))
                	elif fmin(y, t) <= 1.5e-106:
                		tmp = x / (z * (z - fmax(y, t)))
                	else:
                		tmp = (x / fmin(y, t)) / fmax(y, t)
                	return tmp
                
                function code(x, y, z, t)
                	tmp = 0.0
                	if (fmin(y, t) <= -3.6e+51)
                		tmp = Float64(x / Float64(fmin(y, t) * Float64(fmax(y, t) - z)));
                	elseif (fmin(y, t) <= -3.7e-14)
                		tmp = Float64(x / Float64(z * Float64(z - fmin(y, t))));
                	elseif (fmin(y, t) <= 1.5e-106)
                		tmp = Float64(x / Float64(z * Float64(z - fmax(y, t))));
                	else
                		tmp = Float64(Float64(x / fmin(y, t)) / fmax(y, t));
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t)
                	tmp = 0.0;
                	if (min(y, t) <= -3.6e+51)
                		tmp = x / (min(y, t) * (max(y, t) - z));
                	elseif (min(y, t) <= -3.7e-14)
                		tmp = x / (z * (z - min(y, t)));
                	elseif (min(y, t) <= 1.5e-106)
                		tmp = x / (z * (z - max(y, t)));
                	else
                		tmp = (x / min(y, t)) / max(y, t);
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_] := If[LessEqual[N[Min[y, t], $MachinePrecision], -3.6e+51], N[(x / N[(N[Min[y, t], $MachinePrecision] * N[(N[Max[y, t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Min[y, t], $MachinePrecision], -3.7e-14], N[(x / N[(z * N[(z - N[Min[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Min[y, t], $MachinePrecision], 1.5e-106], N[(x / N[(z * N[(z - N[Max[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[Min[y, t], $MachinePrecision]), $MachinePrecision] / N[Max[y, t], $MachinePrecision]), $MachinePrecision]]]]
                
                \begin{array}{l}
                \mathbf{if}\;\mathsf{min}\left(y, t\right) \leq -3.6 \cdot 10^{+51}:\\
                \;\;\;\;\frac{x}{\mathsf{min}\left(y, t\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\
                
                \mathbf{elif}\;\mathsf{min}\left(y, t\right) \leq -3.7 \cdot 10^{-14}:\\
                \;\;\;\;\frac{x}{z \cdot \left(z - \mathsf{min}\left(y, t\right)\right)}\\
                
                \mathbf{elif}\;\mathsf{min}\left(y, t\right) \leq 1.5 \cdot 10^{-106}:\\
                \;\;\;\;\frac{x}{z \cdot \left(z - \mathsf{max}\left(y, t\right)\right)}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{\frac{x}{\mathsf{min}\left(y, t\right)}}{\mathsf{max}\left(y, t\right)}\\
                
                
                \end{array}
                
                Derivation
                1. Split input into 4 regimes
                2. if y < -3.60000000000000011e51

                  1. Initial program 89.2%

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

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

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

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

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

                  if -3.60000000000000011e51 < y < -3.70000000000000001e-14

                  1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -3.70000000000000001e-14 < y < 1.50000000000000009e-106

                  1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 1.50000000000000009e-106 < y

                  1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{\color{blue}{\frac{x}{y - z}}}{t} \]
                      15. lift--.f6463.0%

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

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

                      \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{t} \]
                    5. Step-by-step derivation
                      1. lower-/.f6442.7%

                        \[\leadsto \frac{\frac{x}{\color{blue}{y}}}{t} \]
                    6. Applied rewrites42.7%

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

                  Alternative 9: 75.8% accurate, 0.4× speedup?

                  \[\begin{array}{l} \mathbf{if}\;\mathsf{max}\left(y, t\right) \leq -2.5 \cdot 10^{-16}:\\ \;\;\;\;\frac{x}{\mathsf{min}\left(y, t\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\ \mathbf{elif}\;\mathsf{max}\left(y, t\right) \leq 5.2 \cdot 10^{-61}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - \mathsf{min}\left(y, t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(\mathsf{min}\left(y, t\right) - z\right) \cdot \mathsf{max}\left(y, t\right)}\\ \end{array} \]
                  (FPCore (x y z t)
                   :precision binary64
                   (if (<= (fmax y t) -2.5e-16)
                     (/ x (* (fmin y t) (- (fmax y t) z)))
                     (if (<= (fmax y t) 5.2e-61)
                       (/ x (* z (- z (fmin y t))))
                       (/ x (* (- (fmin y t) z) (fmax y t))))))
                  double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (fmax(y, t) <= -2.5e-16) {
                  		tmp = x / (fmin(y, t) * (fmax(y, t) - z));
                  	} else if (fmax(y, t) <= 5.2e-61) {
                  		tmp = x / (z * (z - fmin(y, t)));
                  	} else {
                  		tmp = x / ((fmin(y, t) - z) * fmax(y, t));
                  	}
                  	return tmp;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t)
                  use fmin_fmax_functions
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8) :: tmp
                      if (fmax(y, t) <= (-2.5d-16)) then
                          tmp = x / (fmin(y, t) * (fmax(y, t) - z))
                      else if (fmax(y, t) <= 5.2d-61) then
                          tmp = x / (z * (z - fmin(y, t)))
                      else
                          tmp = x / ((fmin(y, t) - z) * fmax(y, t))
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if (fmax(y, t) <= -2.5e-16) {
                  		tmp = x / (fmin(y, t) * (fmax(y, t) - z));
                  	} else if (fmax(y, t) <= 5.2e-61) {
                  		tmp = x / (z * (z - fmin(y, t)));
                  	} else {
                  		tmp = x / ((fmin(y, t) - z) * fmax(y, t));
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t):
                  	tmp = 0
                  	if fmax(y, t) <= -2.5e-16:
                  		tmp = x / (fmin(y, t) * (fmax(y, t) - z))
                  	elif fmax(y, t) <= 5.2e-61:
                  		tmp = x / (z * (z - fmin(y, t)))
                  	else:
                  		tmp = x / ((fmin(y, t) - z) * fmax(y, t))
                  	return tmp
                  
                  function code(x, y, z, t)
                  	tmp = 0.0
                  	if (fmax(y, t) <= -2.5e-16)
                  		tmp = Float64(x / Float64(fmin(y, t) * Float64(fmax(y, t) - z)));
                  	elseif (fmax(y, t) <= 5.2e-61)
                  		tmp = Float64(x / Float64(z * Float64(z - fmin(y, t))));
                  	else
                  		tmp = Float64(x / Float64(Float64(fmin(y, t) - z) * fmax(y, t)));
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t)
                  	tmp = 0.0;
                  	if (max(y, t) <= -2.5e-16)
                  		tmp = x / (min(y, t) * (max(y, t) - z));
                  	elseif (max(y, t) <= 5.2e-61)
                  		tmp = x / (z * (z - min(y, t)));
                  	else
                  		tmp = x / ((min(y, t) - z) * max(y, t));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_] := If[LessEqual[N[Max[y, t], $MachinePrecision], -2.5e-16], N[(x / N[(N[Min[y, t], $MachinePrecision] * N[(N[Max[y, t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[y, t], $MachinePrecision], 5.2e-61], N[(x / N[(z * N[(z - N[Min[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(N[Min[y, t], $MachinePrecision] - z), $MachinePrecision] * N[Max[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  \mathbf{if}\;\mathsf{max}\left(y, t\right) \leq -2.5 \cdot 10^{-16}:\\
                  \;\;\;\;\frac{x}{\mathsf{min}\left(y, t\right) \cdot \left(\mathsf{max}\left(y, t\right) - z\right)}\\
                  
                  \mathbf{elif}\;\mathsf{max}\left(y, t\right) \leq 5.2 \cdot 10^{-61}:\\
                  \;\;\;\;\frac{x}{z \cdot \left(z - \mathsf{min}\left(y, t\right)\right)}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{x}{\left(\mathsf{min}\left(y, t\right) - z\right) \cdot \mathsf{max}\left(y, t\right)}\\
                  
                  
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if t < -2.5000000000000002e-16

                    1. Initial program 89.2%

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

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

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

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

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

                    if -2.5000000000000002e-16 < t < 5.20000000000000021e-61

                    1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 5.20000000000000021e-61 < t

                    1. Initial program 89.2%

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

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

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

                    Alternative 10: 68.3% accurate, 0.5× speedup?

                    \[\begin{array}{l} \mathbf{if}\;\mathsf{max}\left(y, t\right) \leq -2.5 \cdot 10^{-16}:\\ \;\;\;\;\frac{\frac{x}{\mathsf{min}\left(y, t\right)}}{\mathsf{max}\left(y, t\right)}\\ \mathbf{elif}\;\mathsf{max}\left(y, t\right) \leq 8.5 \cdot 10^{-49}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - \mathsf{min}\left(y, t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot \left(z - \mathsf{max}\left(y, t\right)\right)}\\ \end{array} \]
                    (FPCore (x y z t)
                     :precision binary64
                     (if (<= (fmax y t) -2.5e-16)
                       (/ (/ x (fmin y t)) (fmax y t))
                       (if (<= (fmax y t) 8.5e-49)
                         (/ x (* z (- z (fmin y t))))
                         (/ x (* z (- z (fmax y t)))))))
                    double code(double x, double y, double z, double t) {
                    	double tmp;
                    	if (fmax(y, t) <= -2.5e-16) {
                    		tmp = (x / fmin(y, t)) / fmax(y, t);
                    	} else if (fmax(y, t) <= 8.5e-49) {
                    		tmp = x / (z * (z - fmin(y, t)));
                    	} else {
                    		tmp = x / (z * (z - fmax(y, t)));
                    	}
                    	return tmp;
                    }
                    
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(x, y, z, t)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8) :: tmp
                        if (fmax(y, t) <= (-2.5d-16)) then
                            tmp = (x / fmin(y, t)) / fmax(y, t)
                        else if (fmax(y, t) <= 8.5d-49) then
                            tmp = x / (z * (z - fmin(y, t)))
                        else
                            tmp = x / (z * (z - fmax(y, t)))
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t) {
                    	double tmp;
                    	if (fmax(y, t) <= -2.5e-16) {
                    		tmp = (x / fmin(y, t)) / fmax(y, t);
                    	} else if (fmax(y, t) <= 8.5e-49) {
                    		tmp = x / (z * (z - fmin(y, t)));
                    	} else {
                    		tmp = x / (z * (z - fmax(y, t)));
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t):
                    	tmp = 0
                    	if fmax(y, t) <= -2.5e-16:
                    		tmp = (x / fmin(y, t)) / fmax(y, t)
                    	elif fmax(y, t) <= 8.5e-49:
                    		tmp = x / (z * (z - fmin(y, t)))
                    	else:
                    		tmp = x / (z * (z - fmax(y, t)))
                    	return tmp
                    
                    function code(x, y, z, t)
                    	tmp = 0.0
                    	if (fmax(y, t) <= -2.5e-16)
                    		tmp = Float64(Float64(x / fmin(y, t)) / fmax(y, t));
                    	elseif (fmax(y, t) <= 8.5e-49)
                    		tmp = Float64(x / Float64(z * Float64(z - fmin(y, t))));
                    	else
                    		tmp = Float64(x / Float64(z * Float64(z - fmax(y, t))));
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t)
                    	tmp = 0.0;
                    	if (max(y, t) <= -2.5e-16)
                    		tmp = (x / min(y, t)) / max(y, t);
                    	elseif (max(y, t) <= 8.5e-49)
                    		tmp = x / (z * (z - min(y, t)));
                    	else
                    		tmp = x / (z * (z - max(y, t)));
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_] := If[LessEqual[N[Max[y, t], $MachinePrecision], -2.5e-16], N[(N[(x / N[Min[y, t], $MachinePrecision]), $MachinePrecision] / N[Max[y, t], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[y, t], $MachinePrecision], 8.5e-49], N[(x / N[(z * N[(z - N[Min[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(z * N[(z - N[Max[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    \mathbf{if}\;\mathsf{max}\left(y, t\right) \leq -2.5 \cdot 10^{-16}:\\
                    \;\;\;\;\frac{\frac{x}{\mathsf{min}\left(y, t\right)}}{\mathsf{max}\left(y, t\right)}\\
                    
                    \mathbf{elif}\;\mathsf{max}\left(y, t\right) \leq 8.5 \cdot 10^{-49}:\\
                    \;\;\;\;\frac{x}{z \cdot \left(z - \mathsf{min}\left(y, t\right)\right)}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{x}{z \cdot \left(z - \mathsf{max}\left(y, t\right)\right)}\\
                    
                    
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if t < -2.5000000000000002e-16

                      1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{\color{blue}{\frac{x}{y - z}}}{t} \]
                          15. lift--.f6463.0%

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

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

                          \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{t} \]
                        5. Step-by-step derivation
                          1. lower-/.f6442.7%

                            \[\leadsto \frac{\frac{x}{\color{blue}{y}}}{t} \]
                        6. Applied rewrites42.7%

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

                        if -2.5000000000000002e-16 < t < 8.50000000000000069e-49

                        1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 8.50000000000000069e-49 < t

                        1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 11: 65.8% accurate, 0.6× speedup?

                      \[\begin{array}{l} t_1 := \frac{x}{z \cdot \left(z - \mathsf{max}\left(y, t\right)\right)}\\ \mathbf{if}\;z \leq -3.2 \cdot 10^{-92}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-91}:\\ \;\;\;\;\frac{\frac{x}{\mathsf{min}\left(y, t\right)}}{\mathsf{max}\left(y, t\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                      (FPCore (x y z t)
                       :precision binary64
                       (let* ((t_1 (/ x (* z (- z (fmax y t))))))
                         (if (<= z -3.2e-92)
                           t_1
                           (if (<= z 1.02e-91) (/ (/ x (fmin y t)) (fmax y t)) t_1))))
                      double code(double x, double y, double z, double t) {
                      	double t_1 = x / (z * (z - fmax(y, t)));
                      	double tmp;
                      	if (z <= -3.2e-92) {
                      		tmp = t_1;
                      	} else if (z <= 1.02e-91) {
                      		tmp = (x / fmin(y, t)) / fmax(y, t);
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      module fmin_fmax_functions
                          implicit none
                          private
                          public fmax
                          public fmin
                      
                          interface fmax
                              module procedure fmax88
                              module procedure fmax44
                              module procedure fmax84
                              module procedure fmax48
                          end interface
                          interface fmin
                              module procedure fmin88
                              module procedure fmin44
                              module procedure fmin84
                              module procedure fmin48
                          end interface
                      contains
                          real(8) function fmax88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmax44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmax84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmax48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                          end function
                          real(8) function fmin88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmin44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmin84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmin48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                          end function
                      end module
                      
                      real(8) function code(x, y, z, t)
                      use fmin_fmax_functions
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          real(8), intent (in) :: t
                          real(8) :: t_1
                          real(8) :: tmp
                          t_1 = x / (z * (z - fmax(y, t)))
                          if (z <= (-3.2d-92)) then
                              tmp = t_1
                          else if (z <= 1.02d-91) then
                              tmp = (x / fmin(y, t)) / fmax(y, t)
                          else
                              tmp = t_1
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double x, double y, double z, double t) {
                      	double t_1 = x / (z * (z - fmax(y, t)));
                      	double tmp;
                      	if (z <= -3.2e-92) {
                      		tmp = t_1;
                      	} else if (z <= 1.02e-91) {
                      		tmp = (x / fmin(y, t)) / fmax(y, t);
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t):
                      	t_1 = x / (z * (z - fmax(y, t)))
                      	tmp = 0
                      	if z <= -3.2e-92:
                      		tmp = t_1
                      	elif z <= 1.02e-91:
                      		tmp = (x / fmin(y, t)) / fmax(y, t)
                      	else:
                      		tmp = t_1
                      	return tmp
                      
                      function code(x, y, z, t)
                      	t_1 = Float64(x / Float64(z * Float64(z - fmax(y, t))))
                      	tmp = 0.0
                      	if (z <= -3.2e-92)
                      		tmp = t_1;
                      	elseif (z <= 1.02e-91)
                      		tmp = Float64(Float64(x / fmin(y, t)) / fmax(y, t));
                      	else
                      		tmp = t_1;
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z, t)
                      	t_1 = x / (z * (z - max(y, t)));
                      	tmp = 0.0;
                      	if (z <= -3.2e-92)
                      		tmp = t_1;
                      	elseif (z <= 1.02e-91)
                      		tmp = (x / min(y, t)) / max(y, t);
                      	else
                      		tmp = t_1;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z * N[(z - N[Max[y, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e-92], t$95$1, If[LessEqual[z, 1.02e-91], N[(N[(x / N[Min[y, t], $MachinePrecision]), $MachinePrecision] / N[Max[y, t], $MachinePrecision]), $MachinePrecision], t$95$1]]]
                      
                      \begin{array}{l}
                      t_1 := \frac{x}{z \cdot \left(z - \mathsf{max}\left(y, t\right)\right)}\\
                      \mathbf{if}\;z \leq -3.2 \cdot 10^{-92}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;z \leq 1.02 \cdot 10^{-91}:\\
                      \;\;\;\;\frac{\frac{x}{\mathsf{min}\left(y, t\right)}}{\mathsf{max}\left(y, t\right)}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if z < -3.1999999999999997e-92 or 1.01999999999999994e-91 < z

                        1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -3.1999999999999997e-92 < z < 1.01999999999999994e-91

                        1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{\color{blue}{\frac{x}{y - z}}}{t} \]
                            15. lift--.f6463.0%

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

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

                            \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{t} \]
                          5. Step-by-step derivation
                            1. lower-/.f6442.7%

                              \[\leadsto \frac{\frac{x}{\color{blue}{y}}}{t} \]
                          6. Applied rewrites42.7%

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

                        Alternative 12: 42.6% accurate, 0.9× speedup?

                        \[\frac{\frac{x}{\mathsf{min}\left(y, t\right)}}{\mathsf{max}\left(y, t\right)} \]
                        (FPCore (x y z t) :precision binary64 (/ (/ x (fmin y t)) (fmax y t)))
                        double code(double x, double y, double z, double t) {
                        	return (x / fmin(y, t)) / fmax(y, t);
                        }
                        
                        module fmin_fmax_functions
                            implicit none
                            private
                            public fmax
                            public fmin
                        
                            interface fmax
                                module procedure fmax88
                                module procedure fmax44
                                module procedure fmax84
                                module procedure fmax48
                            end interface
                            interface fmin
                                module procedure fmin88
                                module procedure fmin44
                                module procedure fmin84
                                module procedure fmin48
                            end interface
                        contains
                            real(8) function fmax88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmax44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmax84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmax48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                            end function
                            real(8) function fmin88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmin44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmin84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmin48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                            end function
                        end module
                        
                        real(8) function code(x, y, z, t)
                        use fmin_fmax_functions
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            real(8), intent (in) :: z
                            real(8), intent (in) :: t
                            code = (x / fmin(y, t)) / fmax(y, t)
                        end function
                        
                        public static double code(double x, double y, double z, double t) {
                        	return (x / fmin(y, t)) / fmax(y, t);
                        }
                        
                        def code(x, y, z, t):
                        	return (x / fmin(y, t)) / fmax(y, t)
                        
                        function code(x, y, z, t)
                        	return Float64(Float64(x / fmin(y, t)) / fmax(y, t))
                        end
                        
                        function tmp = code(x, y, z, t)
                        	tmp = (x / min(y, t)) / max(y, t);
                        end
                        
                        code[x_, y_, z_, t_] := N[(N[(x / N[Min[y, t], $MachinePrecision]), $MachinePrecision] / N[Max[y, t], $MachinePrecision]), $MachinePrecision]
                        
                        \frac{\frac{x}{\mathsf{min}\left(y, t\right)}}{\mathsf{max}\left(y, t\right)}
                        
                        Derivation
                        1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{\color{blue}{\frac{x}{y - z}}}{t} \]
                            15. lift--.f6463.0%

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

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

                            \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{t} \]
                          5. Step-by-step derivation
                            1. lower-/.f6442.7%

                              \[\leadsto \frac{\frac{x}{\color{blue}{y}}}{t} \]
                          6. Applied rewrites42.7%

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

                          Alternative 13: 39.0% accurate, 1.7× speedup?

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

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

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

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

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

                          Reproduce

                          ?
                          herbie shell --seed 2025183 
                          (FPCore (x y z t)
                            :name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
                            :precision binary64
                            (/ x (* (- y z) (- t z))))