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

Percentage Accurate: 99.1% → 99.1%
Time: 3.4s
Alternatives: 13
Speedup: 1.0×

Specification

?
\[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
(FPCore (x y z t) :precision binary64 (- 1.0 (/ x (* (- y z) (- y t)))))
double code(double x, double y, double z, double t) {
	return 1.0 - (x / ((y - z) * (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 = 1.0d0 - (x / ((y - z) * (y - t)))
end function
public static double code(double x, double y, double z, double t) {
	return 1.0 - (x / ((y - z) * (y - t)));
}
def code(x, y, z, t):
	return 1.0 - (x / ((y - z) * (y - t)))
function code(x, y, z, t)
	return Float64(1.0 - Float64(x / Float64(Float64(y - z) * Float64(y - t))))
end
function tmp = code(x, y, z, t)
	tmp = 1.0 - (x / ((y - z) * (y - t)));
end
code[x_, y_, z_, t_] := N[(1.0 - N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\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: 99.1% accurate, 1.0× speedup?

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

Alternative 1: 92.3% accurate, 0.5× speedup?

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

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

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

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

\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{x}{\mathsf{min}\left(z, t\right) - y}}{\mathsf{max}\left(z, t\right)}\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.99999999999999968e-23

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -7.99999999999999968e-23 < z < 3.8999999999999999e-174

      1. Initial program 99.1%

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

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

          \[\leadsto 1 - \frac{x}{y \cdot \color{blue}{\left(y - t\right)}} \]
        2. lower--.f6472.4%

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

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

      if 3.8999999999999999e-174 < z

      1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 2: 92.3% accurate, 0.5× speedup?

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

        1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -7.99999999999999968e-23 < z < 3.8999999999999999e-174

          1. Initial program 99.1%

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

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

              \[\leadsto 1 - \frac{x}{y \cdot \color{blue}{\left(y - t\right)}} \]
            2. lower--.f6472.4%

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

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

          if 3.8999999999999999e-174 < z

          1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto 1 - \frac{\frac{x}{t}}{\color{blue}{z - y}} \]
            7. lift--.f6479.2%

              \[\leadsto 1 - \frac{\frac{x}{t}}{z - \color{blue}{y}} \]
          8. Applied rewrites79.2%

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

        Alternative 3: 92.3% accurate, 0.5× speedup?

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

          1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -7.99999999999999968e-23 < z < 3.8999999999999999e-174

          1. Initial program 99.1%

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

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

              \[\leadsto 1 - \frac{x}{y \cdot \color{blue}{\left(y - t\right)}} \]
            2. lower--.f6472.4%

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

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

          if 3.8999999999999999e-174 < z

          1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto 1 - \frac{\frac{x}{t}}{\color{blue}{z - y}} \]
            7. lift--.f6479.2%

              \[\leadsto 1 - \frac{\frac{x}{t}}{z - \color{blue}{y}} \]
          8. Applied rewrites79.2%

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

        Alternative 4: 91.8% accurate, 0.5× speedup?

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

          1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -7.99999999999999968e-23 < z < 3.8999999999999999e-174

          1. Initial program 99.1%

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

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

              \[\leadsto 1 - \frac{x}{y \cdot \color{blue}{\left(y - t\right)}} \]
            2. lower--.f6472.4%

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

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

          if 3.8999999999999999e-174 < z

          1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 5: 90.3% accurate, 0.2× speedup?

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

          1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -2.00000000000000007e-10 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))) < 4.00000000000000019e-4

          1. Initial program 99.1%

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

            \[\leadsto \color{blue}{1} \]
          3. Step-by-step derivation
            1. Applied rewrites75.5%

              \[\leadsto \color{blue}{1} \]
          4. Recombined 2 regimes into one program.
          5. Add Preprocessing

          Alternative 6: 90.0% accurate, 0.3× speedup?

          \[\begin{array}{l} t_1 := 1 - \frac{x}{t \cdot \left(z - y\right)}\\ t_2 := 1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}\\ \mathbf{if}\;t\_2 \leq 0.998:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 50000000000:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (let* ((t_1 (- 1.0 (/ x (* t (- z y)))))
                  (t_2 (- 1.0 (/ x (* (- y z) (- y t))))))
             (if (<= t_2 0.998) t_1 (if (<= t_2 50000000000.0) 1.0 t_1))))
          double code(double x, double y, double z, double t) {
          	double t_1 = 1.0 - (x / (t * (z - y)));
          	double t_2 = 1.0 - (x / ((y - z) * (y - t)));
          	double tmp;
          	if (t_2 <= 0.998) {
          		tmp = t_1;
          	} else if (t_2 <= 50000000000.0) {
          		tmp = 1.0;
          	} 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) :: t_2
              real(8) :: tmp
              t_1 = 1.0d0 - (x / (t * (z - y)))
              t_2 = 1.0d0 - (x / ((y - z) * (y - t)))
              if (t_2 <= 0.998d0) then
                  tmp = t_1
              else if (t_2 <= 50000000000.0d0) then
                  tmp = 1.0d0
              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 = 1.0 - (x / (t * (z - y)));
          	double t_2 = 1.0 - (x / ((y - z) * (y - t)));
          	double tmp;
          	if (t_2 <= 0.998) {
          		tmp = t_1;
          	} else if (t_2 <= 50000000000.0) {
          		tmp = 1.0;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t):
          	t_1 = 1.0 - (x / (t * (z - y)))
          	t_2 = 1.0 - (x / ((y - z) * (y - t)))
          	tmp = 0
          	if t_2 <= 0.998:
          		tmp = t_1
          	elif t_2 <= 50000000000.0:
          		tmp = 1.0
          	else:
          		tmp = t_1
          	return tmp
          
          function code(x, y, z, t)
          	t_1 = Float64(1.0 - Float64(x / Float64(t * Float64(z - y))))
          	t_2 = Float64(1.0 - Float64(x / Float64(Float64(y - z) * Float64(y - t))))
          	tmp = 0.0
          	if (t_2 <= 0.998)
          		tmp = t_1;
          	elseif (t_2 <= 50000000000.0)
          		tmp = 1.0;
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t)
          	t_1 = 1.0 - (x / (t * (z - y)));
          	t_2 = 1.0 - (x / ((y - z) * (y - t)));
          	tmp = 0.0;
          	if (t_2 <= 0.998)
          		tmp = t_1;
          	elseif (t_2 <= 50000000000.0)
          		tmp = 1.0;
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 - N[(x / N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 - N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.998], t$95$1, If[LessEqual[t$95$2, 50000000000.0], 1.0, t$95$1]]]]
          
          \begin{array}{l}
          t_1 := 1 - \frac{x}{t \cdot \left(z - y\right)}\\
          t_2 := 1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}\\
          \mathbf{if}\;t\_2 \leq 0.998:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t\_2 \leq 50000000000:\\
          \;\;\;\;1\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (-.f64 #s(literal 1 binary64) (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t)))) < 0.998 or 5e10 < (-.f64 #s(literal 1 binary64) (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))))

            1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 0.998 < (-.f64 #s(literal 1 binary64) (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t)))) < 5e10

            1. Initial program 99.1%

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

              \[\leadsto \color{blue}{1} \]
            3. Step-by-step derivation
              1. Applied rewrites75.5%

                \[\leadsto \color{blue}{1} \]
            4. Recombined 2 regimes into one program.
            5. Add Preprocessing

            Alternative 7: 85.6% accurate, 0.2× speedup?

            \[\begin{array}{l} t_1 := 1 - \frac{x}{\left(y - \mathsf{min}\left(z, t\right)\right) \cdot \left(y - \mathsf{max}\left(z, t\right)\right)}\\ \mathbf{if}\;t\_1 \leq 0.998:\\ \;\;\;\;1 - \frac{\frac{x}{\mathsf{min}\left(z, t\right)}}{\mathsf{max}\left(z, t\right)}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+20}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-1}{\mathsf{max}\left(z, t\right) \cdot \mathsf{min}\left(z, t\right)}, x, 1\right)\\ \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (let* ((t_1 (- 1.0 (/ x (* (- y (fmin z t)) (- y (fmax z t)))))))
               (if (<= t_1 0.998)
                 (- 1.0 (/ (/ x (fmin z t)) (fmax z t)))
                 (if (<= t_1 5e+20) 1.0 (fma (/ -1.0 (* (fmax z t) (fmin z t))) x 1.0)))))
            double code(double x, double y, double z, double t) {
            	double t_1 = 1.0 - (x / ((y - fmin(z, t)) * (y - fmax(z, t))));
            	double tmp;
            	if (t_1 <= 0.998) {
            		tmp = 1.0 - ((x / fmin(z, t)) / fmax(z, t));
            	} else if (t_1 <= 5e+20) {
            		tmp = 1.0;
            	} else {
            		tmp = fma((-1.0 / (fmax(z, t) * fmin(z, t))), x, 1.0);
            	}
            	return tmp;
            }
            
            function code(x, y, z, t)
            	t_1 = Float64(1.0 - Float64(x / Float64(Float64(y - fmin(z, t)) * Float64(y - fmax(z, t)))))
            	tmp = 0.0
            	if (t_1 <= 0.998)
            		tmp = Float64(1.0 - Float64(Float64(x / fmin(z, t)) / fmax(z, t)));
            	elseif (t_1 <= 5e+20)
            		tmp = 1.0;
            	else
            		tmp = fma(Float64(-1.0 / Float64(fmax(z, t) * fmin(z, t))), x, 1.0);
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 - N[(x / N[(N[(y - N[Min[z, t], $MachinePrecision]), $MachinePrecision] * N[(y - N[Max[z, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.998], N[(1.0 - N[(N[(x / N[Min[z, t], $MachinePrecision]), $MachinePrecision] / N[Max[z, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+20], 1.0, N[(N[(-1.0 / N[(N[Max[z, t], $MachinePrecision] * N[Min[z, t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x + 1.0), $MachinePrecision]]]]
            
            \begin{array}{l}
            t_1 := 1 - \frac{x}{\left(y - \mathsf{min}\left(z, t\right)\right) \cdot \left(y - \mathsf{max}\left(z, t\right)\right)}\\
            \mathbf{if}\;t\_1 \leq 0.998:\\
            \;\;\;\;1 - \frac{\frac{x}{\mathsf{min}\left(z, t\right)}}{\mathsf{max}\left(z, t\right)}\\
            
            \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+20}:\\
            \;\;\;\;1\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(\frac{-1}{\mathsf{max}\left(z, t\right) \cdot \mathsf{min}\left(z, t\right)}, x, 1\right)\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if (-.f64 #s(literal 1 binary64) (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t)))) < 0.998

              1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 0.998 < (-.f64 #s(literal 1 binary64) (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t)))) < 5e20

                  1. Initial program 99.1%

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

                    \[\leadsto \color{blue}{1} \]
                  3. Step-by-step derivation
                    1. Applied rewrites75.5%

                      \[\leadsto \color{blue}{1} \]

                    if 5e20 < (-.f64 #s(literal 1 binary64) (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))))

                    1. Initial program 99.1%

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

                      \[\leadsto 1 - \frac{x}{\color{blue}{t \cdot z}} \]
                    3. Step-by-step derivation
                      1. lower-*.f6461.9%

                        \[\leadsto 1 - \frac{x}{t \cdot \color{blue}{z}} \]
                    4. Applied rewrites61.9%

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

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

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

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

                        \[\leadsto 1 - \color{blue}{\frac{1}{t \cdot z} \cdot x} \]
                      5. lower-/.f6461.9%

                        \[\leadsto 1 - \color{blue}{\frac{1}{t \cdot z}} \cdot x \]
                    6. Applied rewrites61.9%

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

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

                        \[\leadsto 1 - \color{blue}{\frac{1}{t \cdot z} \cdot x} \]
                      3. fp-cancel-sub-sign-invN/A

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

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

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

                        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{\frac{1}{t \cdot z}}\right), x, 1\right) \]
                      7. distribute-neg-fracN/A

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

                        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{-1}}{t \cdot z}, x, 1\right) \]
                      9. lower-/.f6461.9%

                        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{-1}{t \cdot z}}, x, 1\right) \]
                    8. Applied rewrites61.9%

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

                  Alternative 8: 85.4% accurate, 0.2× speedup?

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

                    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 0.998 < (-.f64 #s(literal 1 binary64) (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t)))) < 5e20

                        1. Initial program 99.1%

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

                          \[\leadsto \color{blue}{1} \]
                        3. Step-by-step derivation
                          1. Applied rewrites75.5%

                            \[\leadsto \color{blue}{1} \]

                          if 5e20 < (-.f64 #s(literal 1 binary64) (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))))

                          1. Initial program 99.1%

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

                            \[\leadsto 1 - \frac{x}{\color{blue}{t \cdot z}} \]
                          3. Step-by-step derivation
                            1. lower-*.f6461.9%

                              \[\leadsto 1 - \frac{x}{t \cdot \color{blue}{z}} \]
                          4. Applied rewrites61.9%

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

                        Alternative 9: 85.4% accurate, 0.3× speedup?

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

                          1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto 1 - \color{blue}{\frac{\frac{x}{z}}{t}} \]
                                2. mult-flipN/A

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

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

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

                                  \[\leadsto 1 - \color{blue}{\frac{x \cdot \frac{1}{t}}{z}} \]
                                6. mult-flip-revN/A

                                  \[\leadsto 1 - \frac{\color{blue}{\frac{x}{t}}}{z} \]
                                7. lower-/.f6461.4%

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

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

                              if 0.998 < (-.f64 #s(literal 1 binary64) (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t)))) < 5e20

                              1. Initial program 99.1%

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

                                \[\leadsto \color{blue}{1} \]
                              3. Step-by-step derivation
                                1. Applied rewrites75.5%

                                  \[\leadsto \color{blue}{1} \]

                                if 5e20 < (-.f64 #s(literal 1 binary64) (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))))

                                1. Initial program 99.1%

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

                                  \[\leadsto 1 - \frac{x}{\color{blue}{t \cdot z}} \]
                                3. Step-by-step derivation
                                  1. lower-*.f6461.9%

                                    \[\leadsto 1 - \frac{x}{t \cdot \color{blue}{z}} \]
                                4. Applied rewrites61.9%

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

                              Alternative 10: 85.4% accurate, 0.3× speedup?

                              \[\begin{array}{l} t_1 := 1 - \frac{x}{t \cdot z}\\ t_2 := 1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}\\ \mathbf{if}\;t\_2 \leq 0.998:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+20}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                              (FPCore (x y z t)
                               :precision binary64
                               (let* ((t_1 (- 1.0 (/ x (* t z)))) (t_2 (- 1.0 (/ x (* (- y z) (- y t))))))
                                 (if (<= t_2 0.998) t_1 (if (<= t_2 5e+20) 1.0 t_1))))
                              double code(double x, double y, double z, double t) {
                              	double t_1 = 1.0 - (x / (t * z));
                              	double t_2 = 1.0 - (x / ((y - z) * (y - t)));
                              	double tmp;
                              	if (t_2 <= 0.998) {
                              		tmp = t_1;
                              	} else if (t_2 <= 5e+20) {
                              		tmp = 1.0;
                              	} 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) :: t_2
                                  real(8) :: tmp
                                  t_1 = 1.0d0 - (x / (t * z))
                                  t_2 = 1.0d0 - (x / ((y - z) * (y - t)))
                                  if (t_2 <= 0.998d0) then
                                      tmp = t_1
                                  else if (t_2 <= 5d+20) then
                                      tmp = 1.0d0
                                  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 = 1.0 - (x / (t * z));
                              	double t_2 = 1.0 - (x / ((y - z) * (y - t)));
                              	double tmp;
                              	if (t_2 <= 0.998) {
                              		tmp = t_1;
                              	} else if (t_2 <= 5e+20) {
                              		tmp = 1.0;
                              	} else {
                              		tmp = t_1;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t):
                              	t_1 = 1.0 - (x / (t * z))
                              	t_2 = 1.0 - (x / ((y - z) * (y - t)))
                              	tmp = 0
                              	if t_2 <= 0.998:
                              		tmp = t_1
                              	elif t_2 <= 5e+20:
                              		tmp = 1.0
                              	else:
                              		tmp = t_1
                              	return tmp
                              
                              function code(x, y, z, t)
                              	t_1 = Float64(1.0 - Float64(x / Float64(t * z)))
                              	t_2 = Float64(1.0 - Float64(x / Float64(Float64(y - z) * Float64(y - t))))
                              	tmp = 0.0
                              	if (t_2 <= 0.998)
                              		tmp = t_1;
                              	elseif (t_2 <= 5e+20)
                              		tmp = 1.0;
                              	else
                              		tmp = t_1;
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t)
                              	t_1 = 1.0 - (x / (t * z));
                              	t_2 = 1.0 - (x / ((y - z) * (y - t)));
                              	tmp = 0.0;
                              	if (t_2 <= 0.998)
                              		tmp = t_1;
                              	elseif (t_2 <= 5e+20)
                              		tmp = 1.0;
                              	else
                              		tmp = t_1;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 - N[(x / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 - N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.998], t$95$1, If[LessEqual[t$95$2, 5e+20], 1.0, t$95$1]]]]
                              
                              \begin{array}{l}
                              t_1 := 1 - \frac{x}{t \cdot z}\\
                              t_2 := 1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}\\
                              \mathbf{if}\;t\_2 \leq 0.998:\\
                              \;\;\;\;t\_1\\
                              
                              \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+20}:\\
                              \;\;\;\;1\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;t\_1\\
                              
                              
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if (-.f64 #s(literal 1 binary64) (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t)))) < 0.998 or 5e20 < (-.f64 #s(literal 1 binary64) (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))))

                                1. Initial program 99.1%

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

                                  \[\leadsto 1 - \frac{x}{\color{blue}{t \cdot z}} \]
                                3. Step-by-step derivation
                                  1. lower-*.f6461.9%

                                    \[\leadsto 1 - \frac{x}{t \cdot \color{blue}{z}} \]
                                4. Applied rewrites61.9%

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

                                if 0.998 < (-.f64 #s(literal 1 binary64) (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t)))) < 5e20

                                1. Initial program 99.1%

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

                                  \[\leadsto \color{blue}{1} \]
                                3. Step-by-step derivation
                                  1. Applied rewrites75.5%

                                    \[\leadsto \color{blue}{1} \]
                                4. Recombined 2 regimes into one program.
                                5. Add Preprocessing

                                Alternative 11: 81.5% accurate, 0.3× speedup?

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

                                  1. Initial program 99.1%

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

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

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

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

                                      \[\leadsto 1 + \frac{x}{t \cdot \color{blue}{\left(y - z\right)}} \]
                                    4. lower--.f6479.5%

                                      \[\leadsto 1 + \frac{x}{t \cdot \left(y - \color{blue}{z}\right)} \]
                                  4. Applied rewrites79.5%

                                    \[\leadsto \color{blue}{1 + \frac{x}{t \cdot \left(y - z\right)}} \]
                                  5. Taylor expanded in y around inf

                                    \[\leadsto 1 + \frac{x}{t \cdot \color{blue}{y}} \]
                                  6. Step-by-step derivation
                                    1. lower-*.f6457.1%

                                      \[\leadsto 1 + \frac{x}{t \cdot y} \]
                                  7. Applied rewrites57.1%

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

                                      \[\leadsto 1 + \color{blue}{\frac{x}{t \cdot y}} \]
                                    2. +-commutativeN/A

                                      \[\leadsto \frac{x}{t \cdot y} + \color{blue}{1} \]
                                    3. add-flipN/A

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

                                      \[\leadsto \frac{x}{t \cdot y} - -1 \]
                                    5. lower--.f6457.1%

                                      \[\leadsto \frac{x}{t \cdot y} - \color{blue}{-1} \]
                                  9. Applied rewrites57.1%

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

                                  if -4e13 < (/.f64 x (*.f64 (-.f64 y z) (-.f64 y t))) < 1e22

                                  1. Initial program 99.1%

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

                                    \[\leadsto \color{blue}{1} \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites75.5%

                                      \[\leadsto \color{blue}{1} \]
                                  4. Recombined 2 regimes into one program.
                                  5. Add Preprocessing

                                  Alternative 12: 75.5% accurate, 15.2× speedup?

                                  \[1 \]
                                  (FPCore (x y z t) :precision binary64 1.0)
                                  double code(double x, double y, double z, double t) {
                                  	return 1.0;
                                  }
                                  
                                  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 = 1.0d0
                                  end function
                                  
                                  public static double code(double x, double y, double z, double t) {
                                  	return 1.0;
                                  }
                                  
                                  def code(x, y, z, t):
                                  	return 1.0
                                  
                                  function code(x, y, z, t)
                                  	return 1.0
                                  end
                                  
                                  function tmp = code(x, y, z, t)
                                  	tmp = 1.0;
                                  end
                                  
                                  code[x_, y_, z_, t_] := 1.0
                                  
                                  1
                                  
                                  Derivation
                                  1. Initial program 99.1%

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

                                    \[\leadsto \color{blue}{1} \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites75.5%

                                      \[\leadsto \color{blue}{1} \]
                                    2. 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, A"
                                      :precision binary64
                                      (- 1.0 (/ x (* (- y z) (- y t)))))