Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C

Percentage Accurate: 94.7% → 95.8%
Time: 3.5s
Alternatives: 13
Speedup: 0.5×

Specification

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

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

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

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

Alternative 1: 95.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z} - \frac{t}{1 - z}\\ \mathbf{if}\;t\_1 \leq 4 \cdot 10^{+171}:\\ \;\;\;\;x \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{\mathsf{fma}\left(-t, z, \left(1 - z\right) \cdot y\right)}{1 - z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (/ y z) (/ t (- 1.0 z)))))
   (if (<= t_1 4e+171)
     (* x t_1)
     (* (/ x z) (/ (fma (- t) z (* (- 1.0 z) y)) (- 1.0 z))))))
double code(double x, double y, double z, double t) {
	double t_1 = (y / z) - (t / (1.0 - z));
	double tmp;
	if (t_1 <= 4e+171) {
		tmp = x * t_1;
	} else {
		tmp = (x / z) * (fma(-t, z, ((1.0 - z) * y)) / (1.0 - z));
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))
	tmp = 0.0
	if (t_1 <= 4e+171)
		tmp = Float64(x * t_1);
	else
		tmp = Float64(Float64(x / z) * Float64(fma(Float64(-t), z, Float64(Float64(1.0 - z) * y)) / Float64(1.0 - z)));
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 4e+171], N[(x * t$95$1), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(N[((-t) * z + N[(N[(1.0 - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y}{z} - \frac{t}{1 - z}\\
\mathbf{if}\;t\_1 \leq 4 \cdot 10^{+171}:\\
\;\;\;\;x \cdot t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < 3.99999999999999982e171

    1. Initial program 96.1%

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

    if 3.99999999999999982e171 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z)))

    1. Initial program 88.1%

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

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

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

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

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

        \[\leadsto x \cdot \left(\frac{y \cdot -1}{\color{blue}{-1 \cdot z}} - \frac{t}{1 - z}\right) \]
      6. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 96.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y}{z} - \frac{t}{1 - z}\\
\mathbf{if}\;t\_1 \leq 10^{+305}:\\
\;\;\;\;x \cdot t\_1\\

\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < 9.9999999999999994e304

    1. Initial program 96.5%

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

    if 9.9999999999999994e304 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z)))

    1. Initial program 69.6%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t \cdot x}{z} \]
    6. Step-by-step derivation
      1. Applied rewrites19.2%

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

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

          \[\leadsto \frac{t \cdot x}{z} \]
        3. associate-/l*N/A

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

          \[\leadsto t \cdot \color{blue}{\frac{x}{z}} \]
        5. lower-/.f6423.7

          \[\leadsto t \cdot \frac{x}{\color{blue}{z}} \]
      3. Applied rewrites23.7%

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

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

          \[\leadsto y \cdot \frac{\color{blue}{x}}{z} \]
      6. Recombined 2 regimes into one program.
      7. Add Preprocessing

      Alternative 3: 89.5% accurate, 0.8× speedup?

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

        1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\left(t + y\right) \cdot x}{z} \]
        6. Step-by-step derivation
          1. lower-+.f6486.0

            \[\leadsto \frac{\left(t + y\right) \cdot x}{z} \]
        7. Applied rewrites86.0%

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

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

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

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

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

            \[\leadsto \left(t + y\right) \cdot \frac{x}{\color{blue}{z}} \]
        9. Applied rewrites87.2%

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

        if -0.69999999999999996 < z < 1

        1. Initial program 92.4%

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

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

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

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

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

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

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

            \[\leadsto x \cdot \left(\frac{y}{z} - \left(1 + z\right) \cdot t\right) \]
          3. lower-+.f6492.1

            \[\leadsto x \cdot \left(\frac{y}{z} - \left(1 + z\right) \cdot t\right) \]
        7. Applied rewrites92.1%

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

        if 1 < z

        1. Initial program 96.8%

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

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

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

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

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

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

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

            \[\leadsto \frac{\left(y - \left(-t\right)\right) \cdot x}{z} \]
        4. Applied rewrites86.8%

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

          \[\leadsto \frac{\left(t + y\right) \cdot x}{z} \]
        6. Step-by-step derivation
          1. lower-+.f6486.8

            \[\leadsto \frac{\left(t + y\right) \cdot x}{z} \]
        7. Applied rewrites86.8%

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

      Alternative 4: 89.5% accurate, 0.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.7:\\ \;\;\;\;\left(t + y\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - \mathsf{fma}\left(t, z, t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(t + y\right) \cdot x}{z}\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (if (<= z -0.7)
         (* (+ t y) (/ x z))
         (if (<= z 1.0) (* x (- (/ y z) (fma t z t))) (/ (* (+ t y) x) z))))
      double code(double x, double y, double z, double t) {
      	double tmp;
      	if (z <= -0.7) {
      		tmp = (t + y) * (x / z);
      	} else if (z <= 1.0) {
      		tmp = x * ((y / z) - fma(t, z, t));
      	} else {
      		tmp = ((t + y) * x) / z;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t)
      	tmp = 0.0
      	if (z <= -0.7)
      		tmp = Float64(Float64(t + y) * Float64(x / z));
      	elseif (z <= 1.0)
      		tmp = Float64(x * Float64(Float64(y / z) - fma(t, z, t)));
      	else
      		tmp = Float64(Float64(Float64(t + y) * x) / z);
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_] := If[LessEqual[z, -0.7], N[(N[(t + y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], N[(x * N[(N[(y / z), $MachinePrecision] - N[(t * z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t + y), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;z \leq -0.7:\\
      \;\;\;\;\left(t + y\right) \cdot \frac{x}{z}\\
      
      \mathbf{elif}\;z \leq 1:\\
      \;\;\;\;x \cdot \left(\frac{y}{z} - \mathsf{fma}\left(t, z, t\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\left(t + y\right) \cdot x}{z}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if z < -0.69999999999999996

        1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\left(t + y\right) \cdot x}{z} \]
        6. Step-by-step derivation
          1. lower-+.f6486.0

            \[\leadsto \frac{\left(t + y\right) \cdot x}{z} \]
        7. Applied rewrites86.0%

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

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

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

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

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

            \[\leadsto \left(t + y\right) \cdot \frac{x}{\color{blue}{z}} \]
        9. Applied rewrites87.2%

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

        if -0.69999999999999996 < z < 1

        1. Initial program 92.4%

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

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

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

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

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

        if 1 < z

        1. Initial program 96.8%

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

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

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

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

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

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

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

            \[\leadsto \frac{\left(y - \left(-t\right)\right) \cdot x}{z} \]
        4. Applied rewrites86.8%

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

          \[\leadsto \frac{\left(t + y\right) \cdot x}{z} \]
        6. Step-by-step derivation
          1. lower-+.f6486.8

            \[\leadsto \frac{\left(t + y\right) \cdot x}{z} \]
        7. Applied rewrites86.8%

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

      Alternative 5: 67.8% accurate, 1.0× speedup?

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

        1. Initial program 96.4%

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

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

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

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

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

            \[\leadsto x \cdot \left(\frac{y \cdot -1}{\color{blue}{-1 \cdot z}} - \frac{t}{1 - z}\right) \]
          6. times-fracN/A

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

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

            \[\leadsto x \cdot \left(\color{blue}{\frac{y}{-1}} \cdot \frac{-1}{z} - \frac{t}{1 - z}\right) \]
          9. lower-/.f6496.4

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

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

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

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

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

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

            \[\leadsto x \cdot \left(-1 \cdot \frac{t}{1 - z}\right) \]
          5. frac-2negN/A

            \[\leadsto x \cdot \left(-1 \cdot \frac{t}{1 - z}\right) \]
          6. frac-subN/A

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

            \[\leadsto x \cdot \left(-1 \cdot \frac{t}{1 - z}\right) \]
          8. *-commutativeN/A

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

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

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

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

            \[\leadsto x \cdot \frac{-t}{\color{blue}{1} - z} \]
          13. lift--.f6478.5

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

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

          \[\leadsto x \cdot \frac{t}{\color{blue}{z}} \]
        8. Step-by-step derivation
          1. lower-/.f6455.6

            \[\leadsto x \cdot \frac{t}{z} \]
        9. Applied rewrites55.6%

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

        if -3.0000000000000002e121 < t < -9.6000000000000002e-281

        1. Initial program 94.1%

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

          \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
        3. Step-by-step derivation
          1. lift-/.f6473.4

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

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

        if -9.6000000000000002e-281 < t < 5.80000000000000048e158

        1. Initial program 94.0%

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

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

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

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

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

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

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

            \[\leadsto \frac{\left(y - \left(-t\right)\right) \cdot x}{z} \]
        4. Applied rewrites76.3%

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

          \[\leadsto \frac{t \cdot x}{z} \]
        6. Step-by-step derivation
          1. Applied rewrites28.5%

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

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

              \[\leadsto \frac{t \cdot x}{z} \]
            3. associate-/l*N/A

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

              \[\leadsto t \cdot \color{blue}{\frac{x}{z}} \]
            5. lower-/.f6430.0

              \[\leadsto t \cdot \frac{x}{\color{blue}{z}} \]
          3. Applied rewrites30.0%

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

            \[\leadsto y \cdot \frac{\color{blue}{x}}{z} \]
          5. Step-by-step derivation
            1. Applied rewrites71.8%

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

          Alternative 6: 65.4% accurate, 1.0× speedup?

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

            1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{t \cdot x}{z} \]
            6. Step-by-step derivation
              1. Applied rewrites46.7%

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

              if -8.99999999999999995e122 < t < -9.6000000000000002e-281

              1. Initial program 94.1%

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

                \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
              3. Step-by-step derivation
                1. lift-/.f6473.3

                  \[\leadsto x \cdot \frac{y}{\color{blue}{z}} \]
              4. Applied rewrites73.3%

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

              if -9.6000000000000002e-281 < t < 8.3999999999999996e158

              1. Initial program 94.0%

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

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

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

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

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

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

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

                  \[\leadsto \frac{\left(y - \left(-t\right)\right) \cdot x}{z} \]
              4. Applied rewrites76.2%

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

                \[\leadsto \frac{t \cdot x}{z} \]
              6. Step-by-step derivation
                1. Applied rewrites28.5%

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

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

                    \[\leadsto \frac{t \cdot x}{z} \]
                  3. associate-/l*N/A

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

                    \[\leadsto t \cdot \color{blue}{\frac{x}{z}} \]
                  5. lower-/.f6430.0

                    \[\leadsto t \cdot \frac{x}{\color{blue}{z}} \]
                3. Applied rewrites30.0%

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

                  \[\leadsto y \cdot \frac{\color{blue}{x}}{z} \]
                5. Step-by-step derivation
                  1. Applied rewrites71.8%

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

                  if 8.3999999999999996e158 < t

                  1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{t \cdot x}{z} \]
                  6. Step-by-step derivation
                    1. Applied rewrites46.1%

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

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

                        \[\leadsto \frac{t \cdot x}{z} \]
                      3. associate-/l*N/A

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

                        \[\leadsto t \cdot \color{blue}{\frac{x}{z}} \]
                      5. lower-/.f6447.6

                        \[\leadsto t \cdot \frac{x}{\color{blue}{z}} \]
                    3. Applied rewrites47.6%

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

                  Alternative 7: 89.4% accurate, 1.1× speedup?

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

                    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{\left(t + y\right) \cdot x}{z} \]
                    6. Step-by-step derivation
                      1. lower-+.f6486.0

                        \[\leadsto \frac{\left(t + y\right) \cdot x}{z} \]
                    7. Applied rewrites86.0%

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

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

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

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

                        \[\leadsto \left(t + y\right) \cdot \color{blue}{\frac{x}{z}} \]
                      5. lift-/.f6487.3

                        \[\leadsto \left(t + y\right) \cdot \frac{x}{\color{blue}{z}} \]
                    9. Applied rewrites87.3%

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

                    if -1.05000000000000004 < z < 1

                    1. Initial program 92.4%

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

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

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

                      if 1 < z

                      1. Initial program 96.8%

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

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

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

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

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

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

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

                          \[\leadsto \frac{\left(y - \left(-t\right)\right) \cdot x}{z} \]
                      4. Applied rewrites86.8%

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

                        \[\leadsto \frac{\left(t + y\right) \cdot x}{z} \]
                      6. Step-by-step derivation
                        1. lower-+.f6486.8

                          \[\leadsto \frac{\left(t + y\right) \cdot x}{z} \]
                      7. Applied rewrites86.8%

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

                    Alternative 8: 78.2% accurate, 1.1× speedup?

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

                      1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{\left(t + y\right) \cdot x}{z} \]
                      6. Step-by-step derivation
                        1. lower-+.f6482.4

                          \[\leadsto \frac{\left(t + y\right) \cdot x}{z} \]
                      7. Applied rewrites82.4%

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

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

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

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

                          \[\leadsto \left(t + y\right) \cdot \color{blue}{\frac{x}{z}} \]
                        5. lift-/.f6483.3

                          \[\leadsto \left(t + y\right) \cdot \frac{x}{\color{blue}{z}} \]
                      9. Applied rewrites83.3%

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

                      if -7.50000000000000023e-55 < z < 1

                      1. Initial program 91.8%

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

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

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

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

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

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

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

                          \[\leadsto \frac{\left(y - \left(-t\right)\right) \cdot x}{z} \]
                      4. Applied rewrites55.2%

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

                        \[\leadsto \frac{t \cdot x}{z} \]
                      6. Step-by-step derivation
                        1. Applied rewrites13.6%

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

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

                            \[\leadsto \frac{t \cdot x}{z} \]
                          3. associate-/l*N/A

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

                            \[\leadsto t \cdot \color{blue}{\frac{x}{z}} \]
                          5. lower-/.f6416.0

                            \[\leadsto t \cdot \frac{x}{\color{blue}{z}} \]
                        3. Applied rewrites16.0%

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

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

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

                          if 1 < z

                          1. Initial program 96.8%

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

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

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

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

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

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

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

                              \[\leadsto \frac{\left(y - \left(-t\right)\right) \cdot x}{z} \]
                          4. Applied rewrites86.8%

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

                            \[\leadsto \frac{\left(t + y\right) \cdot x}{z} \]
                          6. Step-by-step derivation
                            1. lower-+.f6486.8

                              \[\leadsto \frac{\left(t + y\right) \cdot x}{z} \]
                          7. Applied rewrites86.8%

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

                        Alternative 9: 78.1% accurate, 1.1× speedup?

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

                          1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{\left(t + y\right) \cdot x}{z} \]
                          6. Step-by-step derivation
                            1. lower-+.f6484.5

                              \[\leadsto \frac{\left(t + y\right) \cdot x}{z} \]
                          7. Applied rewrites84.5%

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

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

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

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

                              \[\leadsto \left(t + y\right) \cdot \color{blue}{\frac{x}{z}} \]
                            5. lift-/.f6484.7

                              \[\leadsto \left(t + y\right) \cdot \frac{x}{\color{blue}{z}} \]
                          9. Applied rewrites84.7%

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

                          if -7.50000000000000023e-55 < z < 1

                          1. Initial program 91.8%

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

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

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

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

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

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

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

                              \[\leadsto \frac{\left(y - \left(-t\right)\right) \cdot x}{z} \]
                          4. Applied rewrites55.2%

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

                            \[\leadsto \frac{t \cdot x}{z} \]
                          6. Step-by-step derivation
                            1. Applied rewrites13.6%

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

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

                                \[\leadsto \frac{t \cdot x}{z} \]
                              3. associate-/l*N/A

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

                                \[\leadsto t \cdot \color{blue}{\frac{x}{z}} \]
                              5. lower-/.f6416.0

                                \[\leadsto t \cdot \frac{x}{\color{blue}{z}} \]
                            3. Applied rewrites16.0%

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

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

                                \[\leadsto y \cdot \frac{\color{blue}{x}}{z} \]
                            6. Recombined 2 regimes into one program.
                            7. Add Preprocessing

                            Alternative 10: 64.7% accurate, 1.2× speedup?

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

                              1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{t \cdot x}{z} \]
                              6. Step-by-step derivation
                                1. Applied rewrites45.9%

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

                                if -1.64999999999999992e96 < t < 8.3999999999999996e158

                                1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{t \cdot x}{z} \]
                                6. Step-by-step derivation
                                  1. Applied rewrites28.5%

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

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

                                      \[\leadsto \frac{t \cdot x}{z} \]
                                    3. associate-/l*N/A

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

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

                                      \[\leadsto t \cdot \frac{x}{\color{blue}{z}} \]
                                  3. Applied rewrites29.9%

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

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

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

                                    if 8.3999999999999996e158 < t

                                    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \frac{t \cdot x}{z} \]
                                    6. Step-by-step derivation
                                      1. Applied rewrites46.1%

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

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

                                          \[\leadsto \frac{t \cdot x}{z} \]
                                        3. associate-/l*N/A

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

                                          \[\leadsto t \cdot \color{blue}{\frac{x}{z}} \]
                                        5. lower-/.f6447.6

                                          \[\leadsto t \cdot \frac{x}{\color{blue}{z}} \]
                                      3. Applied rewrites47.6%

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

                                    Alternative 11: 64.5% accurate, 1.2× speedup?

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

                                      1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{t \cdot x}{z} \]
                                      6. Step-by-step derivation
                                        1. Applied rewrites46.0%

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

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

                                            \[\leadsto \frac{t \cdot x}{z} \]
                                          3. associate-/l*N/A

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

                                            \[\leadsto t \cdot \color{blue}{\frac{x}{z}} \]
                                          5. lower-/.f6446.2

                                            \[\leadsto t \cdot \frac{x}{\color{blue}{z}} \]
                                        3. Applied rewrites46.2%

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

                                        if -1.60000000000000003e96 < t < 8.3999999999999996e158

                                        1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{t \cdot x}{z} \]
                                        6. Step-by-step derivation
                                          1. Applied rewrites28.5%

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

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

                                              \[\leadsto \frac{t \cdot x}{z} \]
                                            3. associate-/l*N/A

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

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

                                              \[\leadsto t \cdot \frac{x}{\color{blue}{z}} \]
                                          3. Applied rewrites29.9%

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

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

                                              \[\leadsto y \cdot \frac{\color{blue}{x}}{z} \]
                                          6. Recombined 2 regimes into one program.
                                          7. Add Preprocessing

                                          Alternative 12: 43.8% accurate, 1.2× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{x}{z}\\ \mathbf{if}\;z \leq -0.75:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;x \cdot \mathsf{fma}\left(-t, z, -t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                          (FPCore (x y z t)
                                           :precision binary64
                                           (let* ((t_1 (* t (/ x z))))
                                             (if (<= z -0.75) t_1 (if (<= z 1.0) (* x (fma (- t) z (- t))) t_1))))
                                          double code(double x, double y, double z, double t) {
                                          	double t_1 = t * (x / z);
                                          	double tmp;
                                          	if (z <= -0.75) {
                                          		tmp = t_1;
                                          	} else if (z <= 1.0) {
                                          		tmp = x * fma(-t, z, -t);
                                          	} else {
                                          		tmp = t_1;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          function code(x, y, z, t)
                                          	t_1 = Float64(t * Float64(x / z))
                                          	tmp = 0.0
                                          	if (z <= -0.75)
                                          		tmp = t_1;
                                          	elseif (z <= 1.0)
                                          		tmp = Float64(x * fma(Float64(-t), z, Float64(-t)));
                                          	else
                                          		tmp = t_1;
                                          	end
                                          	return tmp
                                          end
                                          
                                          code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.75], t$95$1, If[LessEqual[z, 1.0], N[(x * N[((-t) * z + (-t)), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          t_1 := t \cdot \frac{x}{z}\\
                                          \mathbf{if}\;z \leq -0.75:\\
                                          \;\;\;\;t\_1\\
                                          
                                          \mathbf{elif}\;z \leq 1:\\
                                          \;\;\;\;x \cdot \mathsf{fma}\left(-t, z, -t\right)\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;t\_1\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if z < -0.75 or 1 < z

                                            1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \frac{t \cdot x}{z} \]
                                            6. Step-by-step derivation
                                              1. Applied rewrites52.9%

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

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

                                                  \[\leadsto \frac{t \cdot x}{z} \]
                                                3. associate-/l*N/A

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

                                                  \[\leadsto t \cdot \color{blue}{\frac{x}{z}} \]
                                                5. lower-/.f6452.8

                                                  \[\leadsto t \cdot \frac{x}{\color{blue}{z}} \]
                                              3. Applied rewrites52.8%

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

                                              if -0.75 < z < 1

                                              1. Initial program 92.4%

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

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

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

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

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

                                                  \[\leadsto x \cdot \left(\frac{y \cdot -1}{\color{blue}{-1 \cdot z}} - \frac{t}{1 - z}\right) \]
                                                6. times-fracN/A

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto x \cdot \left(-1 \cdot \frac{t}{1 - z}\right) \]
                                                5. frac-2negN/A

                                                  \[\leadsto x \cdot \left(-1 \cdot \frac{t}{1 - z}\right) \]
                                                6. frac-subN/A

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

                                                  \[\leadsto x \cdot \left(-1 \cdot \frac{t}{1 - z}\right) \]
                                                8. *-commutativeN/A

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

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

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

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

                                                  \[\leadsto x \cdot \frac{-t}{\color{blue}{1} - z} \]
                                                13. lift--.f6435.0

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

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

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

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

                                                  \[\leadsto x \cdot \left(\left(-1 \cdot t\right) \cdot z + -1 \cdot t\right) \]
                                                3. lower-fma.f64N/A

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

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

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

                                                  \[\leadsto x \cdot \mathsf{fma}\left(-t, z, \mathsf{neg}\left(t\right)\right) \]
                                                7. lift-neg.f6434.7

                                                  \[\leadsto x \cdot \mathsf{fma}\left(-t, z, -t\right) \]
                                              9. Applied rewrites34.7%

                                                \[\leadsto x \cdot \mathsf{fma}\left(-t, \color{blue}{z}, -t\right) \]
                                            7. Recombined 2 regimes into one program.
                                            8. Add Preprocessing

                                            Alternative 13: 23.4% accurate, 4.3× speedup?

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

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

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

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

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

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

                                                \[\leadsto x \cdot \left(\frac{y \cdot -1}{\color{blue}{-1 \cdot z}} - \frac{t}{1 - z}\right) \]
                                              6. times-fracN/A

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

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

                                                \[\leadsto x \cdot \left(\color{blue}{\frac{y}{-1}} \cdot \frac{-1}{z} - \frac{t}{1 - z}\right) \]
                                              9. lower-/.f6494.7

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

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

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

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

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

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

                                                \[\leadsto x \cdot \left(-1 \cdot \frac{t}{1 - z}\right) \]
                                              5. frac-2negN/A

                                                \[\leadsto x \cdot \left(-1 \cdot \frac{t}{1 - z}\right) \]
                                              6. frac-subN/A

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

                                                \[\leadsto x \cdot \left(-1 \cdot \frac{t}{1 - z}\right) \]
                                              8. *-commutativeN/A

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

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

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

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

                                                \[\leadsto x \cdot \frac{-t}{\color{blue}{1} - z} \]
                                              13. lift--.f6446.7

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

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

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

                                                \[\leadsto x \cdot \left(\mathsf{neg}\left(t\right)\right) \]
                                              2. lift-neg.f6423.4

                                                \[\leadsto x \cdot \left(-t\right) \]
                                            9. Applied rewrites23.4%

                                              \[\leadsto x \cdot \left(-t\right) \]
                                            10. Add Preprocessing

                                            Developer Target 1: 95.0% accurate, 0.3× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(\frac{y}{z} - t \cdot \frac{1}{1 - z}\right)\\ t_2 := x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\ \mathbf{if}\;t\_2 < -7.623226303312042 \cdot 10^{-196}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 < 1.4133944927702302 \cdot 10^{-211}:\\ \;\;\;\;\frac{y \cdot x}{z} + \left(-\frac{t \cdot x}{1 - z}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                            (FPCore (x y z t)
                                             :precision binary64
                                             (let* ((t_1 (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))))
                                                    (t_2 (* x (- (/ y z) (/ t (- 1.0 z))))))
                                               (if (< t_2 -7.623226303312042e-196)
                                                 t_1
                                                 (if (< t_2 1.4133944927702302e-211)
                                                   (+ (/ (* y x) z) (- (/ (* t x) (- 1.0 z))))
                                                   t_1))))
                                            double code(double x, double y, double z, double t) {
                                            	double t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
                                            	double t_2 = x * ((y / z) - (t / (1.0 - z)));
                                            	double tmp;
                                            	if (t_2 < -7.623226303312042e-196) {
                                            		tmp = t_1;
                                            	} else if (t_2 < 1.4133944927702302e-211) {
                                            		tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
                                            	} else {
                                            		tmp = t_1;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            module fmin_fmax_functions
                                                implicit none
                                                private
                                                public fmax
                                                public fmin
                                            
                                                interface fmax
                                                    module procedure fmax88
                                                    module procedure fmax44
                                                    module procedure fmax84
                                                    module procedure fmax48
                                                end interface
                                                interface fmin
                                                    module procedure fmin88
                                                    module procedure fmin44
                                                    module procedure fmin84
                                                    module procedure fmin48
                                                end interface
                                            contains
                                                real(8) function fmax88(x, y) result (res)
                                                    real(8), intent (in) :: x
                                                    real(8), intent (in) :: y
                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                end function
                                                real(4) function fmax44(x, y) result (res)
                                                    real(4), intent (in) :: x
                                                    real(4), intent (in) :: y
                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                end function
                                                real(8) function fmax84(x, y) result(res)
                                                    real(8), intent (in) :: x
                                                    real(4), intent (in) :: y
                                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                end function
                                                real(8) function fmax48(x, y) result(res)
                                                    real(4), intent (in) :: x
                                                    real(8), intent (in) :: y
                                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                end function
                                                real(8) function fmin88(x, y) result (res)
                                                    real(8), intent (in) :: x
                                                    real(8), intent (in) :: y
                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                end function
                                                real(4) function fmin44(x, y) result (res)
                                                    real(4), intent (in) :: x
                                                    real(4), intent (in) :: y
                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                end function
                                                real(8) function fmin84(x, y) result(res)
                                                    real(8), intent (in) :: x
                                                    real(4), intent (in) :: y
                                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                end function
                                                real(8) function fmin48(x, y) result(res)
                                                    real(4), intent (in) :: x
                                                    real(8), intent (in) :: y
                                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                end function
                                            end module
                                            
                                            real(8) function code(x, y, z, t)
                                            use fmin_fmax_functions
                                                real(8), intent (in) :: x
                                                real(8), intent (in) :: y
                                                real(8), intent (in) :: z
                                                real(8), intent (in) :: t
                                                real(8) :: t_1
                                                real(8) :: t_2
                                                real(8) :: tmp
                                                t_1 = x * ((y / z) - (t * (1.0d0 / (1.0d0 - z))))
                                                t_2 = x * ((y / z) - (t / (1.0d0 - z)))
                                                if (t_2 < (-7.623226303312042d-196)) then
                                                    tmp = t_1
                                                else if (t_2 < 1.4133944927702302d-211) then
                                                    tmp = ((y * x) / z) + -((t * x) / (1.0d0 - z))
                                                else
                                                    tmp = t_1
                                                end if
                                                code = tmp
                                            end function
                                            
                                            public static double code(double x, double y, double z, double t) {
                                            	double t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
                                            	double t_2 = x * ((y / z) - (t / (1.0 - z)));
                                            	double tmp;
                                            	if (t_2 < -7.623226303312042e-196) {
                                            		tmp = t_1;
                                            	} else if (t_2 < 1.4133944927702302e-211) {
                                            		tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
                                            	} else {
                                            		tmp = t_1;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            def code(x, y, z, t):
                                            	t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))))
                                            	t_2 = x * ((y / z) - (t / (1.0 - z)))
                                            	tmp = 0
                                            	if t_2 < -7.623226303312042e-196:
                                            		tmp = t_1
                                            	elif t_2 < 1.4133944927702302e-211:
                                            		tmp = ((y * x) / z) + -((t * x) / (1.0 - z))
                                            	else:
                                            		tmp = t_1
                                            	return tmp
                                            
                                            function code(x, y, z, t)
                                            	t_1 = Float64(x * Float64(Float64(y / z) - Float64(t * Float64(1.0 / Float64(1.0 - z)))))
                                            	t_2 = Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z))))
                                            	tmp = 0.0
                                            	if (t_2 < -7.623226303312042e-196)
                                            		tmp = t_1;
                                            	elseif (t_2 < 1.4133944927702302e-211)
                                            		tmp = Float64(Float64(Float64(y * x) / z) + Float64(-Float64(Float64(t * x) / Float64(1.0 - z))));
                                            	else
                                            		tmp = t_1;
                                            	end
                                            	return tmp
                                            end
                                            
                                            function tmp_2 = code(x, y, z, t)
                                            	t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
                                            	t_2 = x * ((y / z) - (t / (1.0 - z)));
                                            	tmp = 0.0;
                                            	if (t_2 < -7.623226303312042e-196)
                                            		tmp = t_1;
                                            	elseif (t_2 < 1.4133944927702302e-211)
                                            		tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
                                            	else
                                            		tmp = t_1;
                                            	end
                                            	tmp_2 = tmp;
                                            end
                                            
                                            code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -7.623226303312042e-196], t$95$1, If[Less[t$95$2, 1.4133944927702302e-211], N[(N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision] + (-N[(N[(t * x), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], t$95$1]]]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            t_1 := x \cdot \left(\frac{y}{z} - t \cdot \frac{1}{1 - z}\right)\\
                                            t_2 := x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\
                                            \mathbf{if}\;t\_2 < -7.623226303312042 \cdot 10^{-196}:\\
                                            \;\;\;\;t\_1\\
                                            
                                            \mathbf{elif}\;t\_2 < 1.4133944927702302 \cdot 10^{-211}:\\
                                            \;\;\;\;\frac{y \cdot x}{z} + \left(-\frac{t \cdot x}{1 - z}\right)\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;t\_1\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            

                                            Reproduce

                                            ?
                                            herbie shell --seed 2025095 
                                            (FPCore (x y z t)
                                              :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
                                              :precision binary64
                                            
                                              :alt
                                              (! :herbie-platform default (if (< (* x (- (/ y z) (/ t (- 1 z)))) -3811613151656021/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* x (- (/ y z) (* t (/ 1 (- 1 z))))) (if (< (* x (- (/ y z) (/ t (- 1 z)))) 7066972463851151/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (/ (* y x) z) (- (/ (* t x) (- 1 z)))) (* x (- (/ y z) (* t (/ 1 (- 1 z))))))))
                                            
                                              (* x (- (/ y z) (/ t (- 1.0 z)))))