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

Percentage Accurate: 94.3% → 94.3%
Time: 6.5s
Alternatives: 15
Speedup: 1.0×

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}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 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.3% 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: 94.3% 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}
Derivation
  1. Initial program 96.8%

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

Alternative 2: 92.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -16500 \lor \neg \left(z \leq 3.3 \cdot 10^{-18}\right):\\ \;\;\;\;x \cdot \frac{t + y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - \mathsf{fma}\left(t, z, t\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -16500.0) (not (<= z 3.3e-18)))
   (* x (/ (+ t y) z))
   (* x (- (/ y z) (fma t z t)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -16500.0) || !(z <= 3.3e-18)) {
		tmp = x * ((t + y) / z);
	} else {
		tmp = x * ((y / z) - fma(t, z, t));
	}
	return tmp;
}
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -16500.0) || !(z <= 3.3e-18))
		tmp = Float64(x * Float64(Float64(t + y) / z));
	else
		tmp = Float64(x * Float64(Float64(y / z) - fma(t, z, t)));
	end
	return tmp
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -16500.0], N[Not[LessEqual[z, 3.3e-18]], $MachinePrecision]], N[(x * N[(N[(t + y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] - N[(t * z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -16500 \lor \neg \left(z \leq 3.3 \cdot 10^{-18}\right):\\
\;\;\;\;x \cdot \frac{t + y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -16500 or 3.3000000000000002e-18 < z

    1. Initial program 97.6%

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

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

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

      if -16500 < z < 3.3000000000000002e-18

      1. Initial program 95.8%

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

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

          \[\leadsto x \cdot \left(\frac{y}{z} - \color{blue}{\mathsf{fma}\left(t, z, t\right)}\right) \]
      5. Recombined 2 regimes into one program.
      6. Final simplification96.6%

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -16500 \lor \neg \left(z \leq 3.3 \cdot 10^{-18}\right):\\ \;\;\;\;x \cdot \frac{t + y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - \mathsf{fma}\left(t, z, t\right)\right)\\ \end{array} \]
      7. Add Preprocessing

      Alternative 3: 76.8% accurate, 0.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{t}{z - 1}\\ \mathbf{if}\;t \leq -3.8 \cdot 10^{+67}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-158}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{+116}:\\ \;\;\;\;\left(t + y\right) \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 1.0)))))
         (if (<= t -3.8e+67)
           t_1
           (if (<= t 2.1e-158)
             (* x (/ y z))
             (if (<= t 7.5e+116) (* (+ t y) (/ x z)) t_1)))))
      double code(double x, double y, double z, double t) {
      	double t_1 = x * (t / (z - 1.0));
      	double tmp;
      	if (t <= -3.8e+67) {
      		tmp = t_1;
      	} else if (t <= 2.1e-158) {
      		tmp = x * (y / z);
      	} else if (t <= 7.5e+116) {
      		tmp = (t + 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 - 1.0d0))
          if (t <= (-3.8d+67)) then
              tmp = t_1
          else if (t <= 2.1d-158) then
              tmp = x * (y / z)
          else if (t <= 7.5d+116) then
              tmp = (t + 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 - 1.0));
      	double tmp;
      	if (t <= -3.8e+67) {
      		tmp = t_1;
      	} else if (t <= 2.1e-158) {
      		tmp = x * (y / z);
      	} else if (t <= 7.5e+116) {
      		tmp = (t + y) * (x / z);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t):
      	t_1 = x * (t / (z - 1.0))
      	tmp = 0
      	if t <= -3.8e+67:
      		tmp = t_1
      	elif t <= 2.1e-158:
      		tmp = x * (y / z)
      	elif t <= 7.5e+116:
      		tmp = (t + y) * (x / z)
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t)
      	t_1 = Float64(x * Float64(t / Float64(z - 1.0)))
      	tmp = 0.0
      	if (t <= -3.8e+67)
      		tmp = t_1;
      	elseif (t <= 2.1e-158)
      		tmp = Float64(x * Float64(y / z));
      	elseif (t <= 7.5e+116)
      		tmp = Float64(Float64(t + 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 - 1.0));
      	tmp = 0.0;
      	if (t <= -3.8e+67)
      		tmp = t_1;
      	elseif (t <= 2.1e-158)
      		tmp = x * (y / z);
      	elseif (t <= 7.5e+116)
      		tmp = (t + 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 / N[(z - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.8e+67], t$95$1, If[LessEqual[t, 2.1e-158], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e+116], N[(N[(t + y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x \cdot \frac{t}{z - 1}\\
      \mathbf{if}\;t \leq -3.8 \cdot 10^{+67}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t \leq 2.1 \cdot 10^{-158}:\\
      \;\;\;\;x \cdot \frac{y}{z}\\
      
      \mathbf{elif}\;t \leq 7.5 \cdot 10^{+116}:\\
      \;\;\;\;\left(t + y\right) \cdot \frac{x}{z}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if t < -3.8000000000000002e67 or 7.5e116 < t

        1. Initial program 96.9%

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

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

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

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

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

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

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

              if -3.8000000000000002e67 < t < 2.09999999999999991e-158

              1. Initial program 95.1%

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

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

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

                if 2.09999999999999991e-158 < t < 7.5e116

                1. Initial program 99.7%

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

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

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

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

                      \[\leadsto \left(t + y\right) \cdot \frac{\color{blue}{x}}{z} \]
                  4. Recombined 3 regimes into one program.
                  5. Final simplification84.1%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.8 \cdot 10^{+67}:\\ \;\;\;\;x \cdot \frac{t}{z - 1}\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-158}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{+116}:\\ \;\;\;\;\left(t + y\right) \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z - 1}\\ \end{array} \]
                  6. Add Preprocessing

                  Alternative 4: 92.8% accurate, 0.9× speedup?

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

                    1. Initial program 96.0%

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

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

                        \[\leadsto x \cdot \color{blue}{\frac{t + y}{z}} \]
                      2. Step-by-step derivation
                        1. Applied rewrites95.4%

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

                        if -16500 < z < 3.3000000000000002e-18

                        1. Initial program 95.8%

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

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

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

                          if 3.3000000000000002e-18 < z

                          1. Initial program 99.7%

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

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

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

                          Alternative 5: 92.8% accurate, 1.1× speedup?

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

                            1. Initial program 97.6%

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

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

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

                              if -16500 < z < 3.3000000000000002e-18

                              1. Initial program 95.8%

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

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

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -16500 \lor \neg \left(z \leq 3.3 \cdot 10^{-18}\right):\\ \;\;\;\;x \cdot \frac{t + y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \end{array} \]
                              7. Add Preprocessing

                              Alternative 6: 80.3% accurate, 1.1× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{-123} \lor \neg \left(z \leq 3.3 \cdot 10^{-18}\right):\\ \;\;\;\;x \cdot \frac{t + y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \end{array} \]
                              (FPCore (x y z t)
                               :precision binary64
                               (if (or (<= z -4.8e-123) (not (<= z 3.3e-18)))
                                 (* x (/ (+ t y) z))
                                 (* x (/ y z))))
                              double code(double x, double y, double z, double t) {
                              	double tmp;
                              	if ((z <= -4.8e-123) || !(z <= 3.3e-18)) {
                              		tmp = x * ((t + y) / z);
                              	} else {
                              		tmp = x * (y / 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 <= (-4.8d-123)) .or. (.not. (z <= 3.3d-18))) then
                                      tmp = x * ((t + y) / z)
                                  else
                                      tmp = x * (y / z)
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double x, double y, double z, double t) {
                              	double tmp;
                              	if ((z <= -4.8e-123) || !(z <= 3.3e-18)) {
                              		tmp = x * ((t + y) / z);
                              	} else {
                              		tmp = x * (y / z);
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t):
                              	tmp = 0
                              	if (z <= -4.8e-123) or not (z <= 3.3e-18):
                              		tmp = x * ((t + y) / z)
                              	else:
                              		tmp = x * (y / z)
                              	return tmp
                              
                              function code(x, y, z, t)
                              	tmp = 0.0
                              	if ((z <= -4.8e-123) || !(z <= 3.3e-18))
                              		tmp = Float64(x * Float64(Float64(t + y) / z));
                              	else
                              		tmp = Float64(x * Float64(y / z));
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t)
                              	tmp = 0.0;
                              	if ((z <= -4.8e-123) || ~((z <= 3.3e-18)))
                              		tmp = x * ((t + y) / z);
                              	else
                              		tmp = x * (y / z);
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4.8e-123], N[Not[LessEqual[z, 3.3e-18]], $MachinePrecision]], N[(x * N[(N[(t + y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;z \leq -4.8 \cdot 10^{-123} \lor \neg \left(z \leq 3.3 \cdot 10^{-18}\right):\\
                              \;\;\;\;x \cdot \frac{t + y}{z}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;x \cdot \frac{y}{z}\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if z < -4.8e-123 or 3.3000000000000002e-18 < z

                                1. Initial program 98.0%

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

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

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

                                  if -4.8e-123 < z < 3.3000000000000002e-18

                                  1. Initial program 94.6%

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

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

                                      \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
                                  5. Recombined 2 regimes into one program.
                                  6. Final simplification85.0%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{-123} \lor \neg \left(z \leq 3.3 \cdot 10^{-18}\right):\\ \;\;\;\;x \cdot \frac{t + y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \]
                                  7. Add Preprocessing

                                  Alternative 7: 73.3% accurate, 1.1× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.8 \cdot 10^{+67} \lor \neg \left(t \leq 1.05 \cdot 10^{+115}\right):\\ \;\;\;\;\frac{x}{z - 1} \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \end{array} \]
                                  (FPCore (x y z t)
                                   :precision binary64
                                   (if (or (<= t -3.8e+67) (not (<= t 1.05e+115)))
                                     (* (/ x (- z 1.0)) t)
                                     (* x (/ y z))))
                                  double code(double x, double y, double z, double t) {
                                  	double tmp;
                                  	if ((t <= -3.8e+67) || !(t <= 1.05e+115)) {
                                  		tmp = (x / (z - 1.0)) * t;
                                  	} else {
                                  		tmp = x * (y / 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 <= (-3.8d+67)) .or. (.not. (t <= 1.05d+115))) then
                                          tmp = (x / (z - 1.0d0)) * t
                                      else
                                          tmp = x * (y / z)
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double x, double y, double z, double t) {
                                  	double tmp;
                                  	if ((t <= -3.8e+67) || !(t <= 1.05e+115)) {
                                  		tmp = (x / (z - 1.0)) * t;
                                  	} else {
                                  		tmp = x * (y / z);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x, y, z, t):
                                  	tmp = 0
                                  	if (t <= -3.8e+67) or not (t <= 1.05e+115):
                                  		tmp = (x / (z - 1.0)) * t
                                  	else:
                                  		tmp = x * (y / z)
                                  	return tmp
                                  
                                  function code(x, y, z, t)
                                  	tmp = 0.0
                                  	if ((t <= -3.8e+67) || !(t <= 1.05e+115))
                                  		tmp = Float64(Float64(x / Float64(z - 1.0)) * t);
                                  	else
                                  		tmp = Float64(x * Float64(y / z));
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x, y, z, t)
                                  	tmp = 0.0;
                                  	if ((t <= -3.8e+67) || ~((t <= 1.05e+115)))
                                  		tmp = (x / (z - 1.0)) * t;
                                  	else
                                  		tmp = x * (y / z);
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x_, y_, z_, t_] := If[Or[LessEqual[t, -3.8e+67], N[Not[LessEqual[t, 1.05e+115]], $MachinePrecision]], N[(N[(x / N[(z - 1.0), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;t \leq -3.8 \cdot 10^{+67} \lor \neg \left(t \leq 1.05 \cdot 10^{+115}\right):\\
                                  \;\;\;\;\frac{x}{z - 1} \cdot t\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;x \cdot \frac{y}{z}\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if t < -3.8000000000000002e67 or 1.05000000000000002e115 < t

                                    1. Initial program 96.9%

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

                                      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{1 - z} + \frac{x \cdot y}{z}} \]
                                    4. Step-by-step derivation
                                      1. Applied rewrites75.7%

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

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

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

                                        if -3.8000000000000002e67 < t < 1.05000000000000002e115

                                        1. Initial program 96.7%

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

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

                                            \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
                                        5. Recombined 2 regimes into one program.
                                        6. Final simplification77.5%

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.8 \cdot 10^{+67} \lor \neg \left(t \leq 1.05 \cdot 10^{+115}\right):\\ \;\;\;\;\frac{x}{z - 1} \cdot t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \]
                                        7. Add Preprocessing

                                        Alternative 8: 75.9% accurate, 1.1× speedup?

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

                                          1. Initial program 96.6%

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

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

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

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

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

                                              if -7.80000000000000013e-57 < z < 3.3000000000000002e-18

                                              1. Initial program 95.2%

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

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

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

                                                if 3.3000000000000002e-18 < z

                                                1. Initial program 99.7%

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

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

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

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{-57}:\\ \;\;\;\;\left(t + y\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-18}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(t + y\right) \cdot x}{z}\\ \end{array} \]
                                                7. Add Preprocessing

                                                Alternative 9: 72.3% accurate, 1.1× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.8 \cdot 10^{+67}:\\ \;\;\;\;\frac{x}{z - 1} \cdot t\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-158}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;\left(t + y\right) \cdot \frac{x}{z}\\ \end{array} \end{array} \]
                                                (FPCore (x y z t)
                                                 :precision binary64
                                                 (if (<= t -3.8e+67)
                                                   (* (/ x (- z 1.0)) t)
                                                   (if (<= t 2.1e-158) (* x (/ y z)) (* (+ t y) (/ x z)))))
                                                double code(double x, double y, double z, double t) {
                                                	double tmp;
                                                	if (t <= -3.8e+67) {
                                                		tmp = (x / (z - 1.0)) * t;
                                                	} else if (t <= 2.1e-158) {
                                                		tmp = x * (y / 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 (t <= (-3.8d+67)) then
                                                        tmp = (x / (z - 1.0d0)) * t
                                                    else if (t <= 2.1d-158) then
                                                        tmp = x * (y / 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 (t <= -3.8e+67) {
                                                		tmp = (x / (z - 1.0)) * t;
                                                	} else if (t <= 2.1e-158) {
                                                		tmp = x * (y / z);
                                                	} else {
                                                		tmp = (t + y) * (x / z);
                                                	}
                                                	return tmp;
                                                }
                                                
                                                def code(x, y, z, t):
                                                	tmp = 0
                                                	if t <= -3.8e+67:
                                                		tmp = (x / (z - 1.0)) * t
                                                	elif t <= 2.1e-158:
                                                		tmp = x * (y / z)
                                                	else:
                                                		tmp = (t + y) * (x / z)
                                                	return tmp
                                                
                                                function code(x, y, z, t)
                                                	tmp = 0.0
                                                	if (t <= -3.8e+67)
                                                		tmp = Float64(Float64(x / Float64(z - 1.0)) * t);
                                                	elseif (t <= 2.1e-158)
                                                		tmp = Float64(x * Float64(y / z));
                                                	else
                                                		tmp = Float64(Float64(t + y) * Float64(x / z));
                                                	end
                                                	return tmp
                                                end
                                                
                                                function tmp_2 = code(x, y, z, t)
                                                	tmp = 0.0;
                                                	if (t <= -3.8e+67)
                                                		tmp = (x / (z - 1.0)) * t;
                                                	elseif (t <= 2.1e-158)
                                                		tmp = x * (y / z);
                                                	else
                                                		tmp = (t + y) * (x / z);
                                                	end
                                                	tmp_2 = tmp;
                                                end
                                                
                                                code[x_, y_, z_, t_] := If[LessEqual[t, -3.8e+67], N[(N[(x / N[(z - 1.0), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[t, 2.1e-158], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(N[(t + y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;t \leq -3.8 \cdot 10^{+67}:\\
                                                \;\;\;\;\frac{x}{z - 1} \cdot t\\
                                                
                                                \mathbf{elif}\;t \leq 2.1 \cdot 10^{-158}:\\
                                                \;\;\;\;x \cdot \frac{y}{z}\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\left(t + y\right) \cdot \frac{x}{z}\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 3 regimes
                                                2. if t < -3.8000000000000002e67

                                                  1. Initial program 96.0%

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

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

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

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

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

                                                      if -3.8000000000000002e67 < t < 2.09999999999999991e-158

                                                      1. Initial program 95.1%

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

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

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

                                                        if 2.09999999999999991e-158 < t

                                                        1. Initial program 98.8%

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

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

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

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

                                                              \[\leadsto \left(t + y\right) \cdot \frac{\color{blue}{x}}{z} \]
                                                          4. Recombined 3 regimes into one program.
                                                          5. Final simplification79.5%

                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.8 \cdot 10^{+67}:\\ \;\;\;\;\frac{x}{z - 1} \cdot t\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-158}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;\left(t + y\right) \cdot \frac{x}{z}\\ \end{array} \]
                                                          6. Add Preprocessing

                                                          Alternative 10: 68.2% accurate, 1.2× speedup?

                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{+67} \lor \neg \left(t \leq 3.9 \cdot 10^{+127}\right):\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \end{array} \]
                                                          (FPCore (x y z t)
                                                           :precision binary64
                                                           (if (or (<= t -5.8e+67) (not (<= t 3.9e+127))) (* x (/ t z)) (* x (/ y z))))
                                                          double code(double x, double y, double z, double t) {
                                                          	double tmp;
                                                          	if ((t <= -5.8e+67) || !(t <= 3.9e+127)) {
                                                          		tmp = x * (t / z);
                                                          	} else {
                                                          		tmp = x * (y / 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 <= (-5.8d+67)) .or. (.not. (t <= 3.9d+127))) then
                                                                  tmp = x * (t / z)
                                                              else
                                                                  tmp = x * (y / z)
                                                              end if
                                                              code = tmp
                                                          end function
                                                          
                                                          public static double code(double x, double y, double z, double t) {
                                                          	double tmp;
                                                          	if ((t <= -5.8e+67) || !(t <= 3.9e+127)) {
                                                          		tmp = x * (t / z);
                                                          	} else {
                                                          		tmp = x * (y / z);
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          def code(x, y, z, t):
                                                          	tmp = 0
                                                          	if (t <= -5.8e+67) or not (t <= 3.9e+127):
                                                          		tmp = x * (t / z)
                                                          	else:
                                                          		tmp = x * (y / z)
                                                          	return tmp
                                                          
                                                          function code(x, y, z, t)
                                                          	tmp = 0.0
                                                          	if ((t <= -5.8e+67) || !(t <= 3.9e+127))
                                                          		tmp = Float64(x * Float64(t / z));
                                                          	else
                                                          		tmp = Float64(x * Float64(y / z));
                                                          	end
                                                          	return tmp
                                                          end
                                                          
                                                          function tmp_2 = code(x, y, z, t)
                                                          	tmp = 0.0;
                                                          	if ((t <= -5.8e+67) || ~((t <= 3.9e+127)))
                                                          		tmp = x * (t / z);
                                                          	else
                                                          		tmp = x * (y / z);
                                                          	end
                                                          	tmp_2 = tmp;
                                                          end
                                                          
                                                          code[x_, y_, z_, t_] := If[Or[LessEqual[t, -5.8e+67], N[Not[LessEqual[t, 3.9e+127]], $MachinePrecision]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \begin{array}{l}
                                                          \mathbf{if}\;t \leq -5.8 \cdot 10^{+67} \lor \neg \left(t \leq 3.9 \cdot 10^{+127}\right):\\
                                                          \;\;\;\;x \cdot \frac{t}{z}\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;x \cdot \frac{y}{z}\\
                                                          
                                                          
                                                          \end{array}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 2 regimes
                                                          2. if t < -5.80000000000000047e67 or 3.89999999999999981e127 < t

                                                            1. Initial program 97.8%

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

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

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

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

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

                                                                if -5.80000000000000047e67 < t < 3.89999999999999981e127

                                                                1. Initial program 96.2%

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

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

                                                                    \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
                                                                5. Recombined 2 regimes into one program.
                                                                6. Final simplification72.4%

                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{+67} \lor \neg \left(t \leq 3.9 \cdot 10^{+127}\right):\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \]
                                                                7. Add Preprocessing

                                                                Alternative 11: 66.9% accurate, 1.2× speedup?

                                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{+67} \lor \neg \left(t \leq 8 \cdot 10^{+128}\right):\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \end{array} \end{array} \]
                                                                (FPCore (x y z t)
                                                                 :precision binary64
                                                                 (if (or (<= t -5.8e+67) (not (<= t 8e+128))) (* x (/ t z)) (/ (* x y) z)))
                                                                double code(double x, double y, double z, double t) {
                                                                	double tmp;
                                                                	if ((t <= -5.8e+67) || !(t <= 8e+128)) {
                                                                		tmp = x * (t / z);
                                                                	} else {
                                                                		tmp = (x * y) / 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 <= (-5.8d+67)) .or. (.not. (t <= 8d+128))) then
                                                                        tmp = x * (t / z)
                                                                    else
                                                                        tmp = (x * y) / z
                                                                    end if
                                                                    code = tmp
                                                                end function
                                                                
                                                                public static double code(double x, double y, double z, double t) {
                                                                	double tmp;
                                                                	if ((t <= -5.8e+67) || !(t <= 8e+128)) {
                                                                		tmp = x * (t / z);
                                                                	} else {
                                                                		tmp = (x * y) / z;
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                def code(x, y, z, t):
                                                                	tmp = 0
                                                                	if (t <= -5.8e+67) or not (t <= 8e+128):
                                                                		tmp = x * (t / z)
                                                                	else:
                                                                		tmp = (x * y) / z
                                                                	return tmp
                                                                
                                                                function code(x, y, z, t)
                                                                	tmp = 0.0
                                                                	if ((t <= -5.8e+67) || !(t <= 8e+128))
                                                                		tmp = Float64(x * Float64(t / z));
                                                                	else
                                                                		tmp = Float64(Float64(x * y) / z);
                                                                	end
                                                                	return tmp
                                                                end
                                                                
                                                                function tmp_2 = code(x, y, z, t)
                                                                	tmp = 0.0;
                                                                	if ((t <= -5.8e+67) || ~((t <= 8e+128)))
                                                                		tmp = x * (t / z);
                                                                	else
                                                                		tmp = (x * y) / z;
                                                                	end
                                                                	tmp_2 = tmp;
                                                                end
                                                                
                                                                code[x_, y_, z_, t_] := If[Or[LessEqual[t, -5.8e+67], N[Not[LessEqual[t, 8e+128]], $MachinePrecision]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]]
                                                                
                                                                \begin{array}{l}
                                                                
                                                                \\
                                                                \begin{array}{l}
                                                                \mathbf{if}\;t \leq -5.8 \cdot 10^{+67} \lor \neg \left(t \leq 8 \cdot 10^{+128}\right):\\
                                                                \;\;\;\;x \cdot \frac{t}{z}\\
                                                                
                                                                \mathbf{else}:\\
                                                                \;\;\;\;\frac{x \cdot y}{z}\\
                                                                
                                                                
                                                                \end{array}
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Split input into 2 regimes
                                                                2. if t < -5.80000000000000047e67 or 8.0000000000000006e128 < t

                                                                  1. Initial program 97.8%

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

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

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

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

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

                                                                      if -5.80000000000000047e67 < t < 8.0000000000000006e128

                                                                      1. Initial program 96.2%

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

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

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

                                                                          \[\leadsto \frac{x \cdot y}{z} \]
                                                                        3. Step-by-step derivation
                                                                          1. Applied rewrites76.1%

                                                                            \[\leadsto \frac{x \cdot y}{z} \]
                                                                        4. Recombined 2 regimes into one program.
                                                                        5. Final simplification69.0%

                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{+67} \lor \neg \left(t \leq 8 \cdot 10^{+128}\right):\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \end{array} \]
                                                                        6. Add Preprocessing

                                                                        Alternative 12: 64.5% accurate, 1.2× speedup?

                                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{+68} \lor \neg \left(t \leq 1.3 \cdot 10^{+129}\right):\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \end{array} \end{array} \]
                                                                        (FPCore (x y z t)
                                                                         :precision binary64
                                                                         (if (or (<= t -5.5e+68) (not (<= t 1.3e+129))) (* t (/ x z)) (/ (* x y) z)))
                                                                        double code(double x, double y, double z, double t) {
                                                                        	double tmp;
                                                                        	if ((t <= -5.5e+68) || !(t <= 1.3e+129)) {
                                                                        		tmp = t * (x / z);
                                                                        	} else {
                                                                        		tmp = (x * y) / 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 <= (-5.5d+68)) .or. (.not. (t <= 1.3d+129))) then
                                                                                tmp = t * (x / z)
                                                                            else
                                                                                tmp = (x * y) / z
                                                                            end if
                                                                            code = tmp
                                                                        end function
                                                                        
                                                                        public static double code(double x, double y, double z, double t) {
                                                                        	double tmp;
                                                                        	if ((t <= -5.5e+68) || !(t <= 1.3e+129)) {
                                                                        		tmp = t * (x / z);
                                                                        	} else {
                                                                        		tmp = (x * y) / z;
                                                                        	}
                                                                        	return tmp;
                                                                        }
                                                                        
                                                                        def code(x, y, z, t):
                                                                        	tmp = 0
                                                                        	if (t <= -5.5e+68) or not (t <= 1.3e+129):
                                                                        		tmp = t * (x / z)
                                                                        	else:
                                                                        		tmp = (x * y) / z
                                                                        	return tmp
                                                                        
                                                                        function code(x, y, z, t)
                                                                        	tmp = 0.0
                                                                        	if ((t <= -5.5e+68) || !(t <= 1.3e+129))
                                                                        		tmp = Float64(t * Float64(x / z));
                                                                        	else
                                                                        		tmp = Float64(Float64(x * y) / z);
                                                                        	end
                                                                        	return tmp
                                                                        end
                                                                        
                                                                        function tmp_2 = code(x, y, z, t)
                                                                        	tmp = 0.0;
                                                                        	if ((t <= -5.5e+68) || ~((t <= 1.3e+129)))
                                                                        		tmp = t * (x / z);
                                                                        	else
                                                                        		tmp = (x * y) / z;
                                                                        	end
                                                                        	tmp_2 = tmp;
                                                                        end
                                                                        
                                                                        code[x_, y_, z_, t_] := If[Or[LessEqual[t, -5.5e+68], N[Not[LessEqual[t, 1.3e+129]], $MachinePrecision]], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]]
                                                                        
                                                                        \begin{array}{l}
                                                                        
                                                                        \\
                                                                        \begin{array}{l}
                                                                        \mathbf{if}\;t \leq -5.5 \cdot 10^{+68} \lor \neg \left(t \leq 1.3 \cdot 10^{+129}\right):\\
                                                                        \;\;\;\;t \cdot \frac{x}{z}\\
                                                                        
                                                                        \mathbf{else}:\\
                                                                        \;\;\;\;\frac{x \cdot y}{z}\\
                                                                        
                                                                        
                                                                        \end{array}
                                                                        \end{array}
                                                                        
                                                                        Derivation
                                                                        1. Split input into 2 regimes
                                                                        2. if t < -5.5000000000000004e68 or 1.30000000000000006e129 < t

                                                                          1. Initial program 97.8%

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

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

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

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

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

                                                                              if -5.5000000000000004e68 < t < 1.30000000000000006e129

                                                                              1. Initial program 96.2%

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

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

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

                                                                                  \[\leadsto \frac{x \cdot y}{z} \]
                                                                                3. Step-by-step derivation
                                                                                  1. Applied rewrites76.1%

                                                                                    \[\leadsto \frac{x \cdot y}{z} \]
                                                                                4. Recombined 2 regimes into one program.
                                                                                5. Final simplification66.0%

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

                                                                                Alternative 13: 64.9% accurate, 1.2× speedup?

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

                                                                                  1. Initial program 98.6%

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

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

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

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

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

                                                                                      if -2.2e141 < t < 1.30000000000000006e129

                                                                                      1. Initial program 96.0%

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

                                                                                        \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{1 - z} + \frac{x \cdot y}{z}} \]
                                                                                      4. Step-by-step derivation
                                                                                        1. Applied rewrites84.7%

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

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

                                                                                            \[\leadsto \color{blue}{\frac{x}{z} \cdot y} \]
                                                                                        4. Recombined 2 regimes into one program.
                                                                                        5. Final simplification63.7%

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

                                                                                        Alternative 14: 43.2% accurate, 1.2× speedup?

                                                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.75 \lor \neg \left(z \leq 3.3 \cdot 10^{-18}\right):\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-\mathsf{fma}\left(t, z, t\right)\right)\\ \end{array} \end{array} \]
                                                                                        (FPCore (x y z t)
                                                                                         :precision binary64
                                                                                         (if (or (<= z -0.75) (not (<= z 3.3e-18)))
                                                                                           (* t (/ x z))
                                                                                           (* x (- (fma t z t)))))
                                                                                        double code(double x, double y, double z, double t) {
                                                                                        	double tmp;
                                                                                        	if ((z <= -0.75) || !(z <= 3.3e-18)) {
                                                                                        		tmp = t * (x / z);
                                                                                        	} else {
                                                                                        		tmp = x * -fma(t, z, t);
                                                                                        	}
                                                                                        	return tmp;
                                                                                        }
                                                                                        
                                                                                        function code(x, y, z, t)
                                                                                        	tmp = 0.0
                                                                                        	if ((z <= -0.75) || !(z <= 3.3e-18))
                                                                                        		tmp = Float64(t * Float64(x / z));
                                                                                        	else
                                                                                        		tmp = Float64(x * Float64(-fma(t, z, t)));
                                                                                        	end
                                                                                        	return tmp
                                                                                        end
                                                                                        
                                                                                        code[x_, y_, z_, t_] := If[Or[LessEqual[z, -0.75], N[Not[LessEqual[z, 3.3e-18]], $MachinePrecision]], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * (-N[(t * z + t), $MachinePrecision])), $MachinePrecision]]
                                                                                        
                                                                                        \begin{array}{l}
                                                                                        
                                                                                        \\
                                                                                        \begin{array}{l}
                                                                                        \mathbf{if}\;z \leq -0.75 \lor \neg \left(z \leq 3.3 \cdot 10^{-18}\right):\\
                                                                                        \;\;\;\;t \cdot \frac{x}{z}\\
                                                                                        
                                                                                        \mathbf{else}:\\
                                                                                        \;\;\;\;x \cdot \left(-\mathsf{fma}\left(t, z, t\right)\right)\\
                                                                                        
                                                                                        
                                                                                        \end{array}
                                                                                        \end{array}
                                                                                        
                                                                                        Derivation
                                                                                        1. Split input into 2 regimes
                                                                                        2. if z < -0.75 or 3.3000000000000002e-18 < z

                                                                                          1. Initial program 97.6%

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

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

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

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

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

                                                                                              if -0.75 < z < 3.3000000000000002e-18

                                                                                              1. Initial program 95.8%

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

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

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

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

                                                                                                    \[\leadsto x \cdot \left(-\mathsf{fma}\left(t, z, t\right)\right) \]
                                                                                                4. Recombined 2 regimes into one program.
                                                                                                5. Final simplification41.1%

                                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.75 \lor \neg \left(z \leq 3.3 \cdot 10^{-18}\right):\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-\mathsf{fma}\left(t, z, t\right)\right)\\ \end{array} \]
                                                                                                6. Add Preprocessing

                                                                                                Alternative 15: 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 96.8%

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

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

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

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

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

                                                                                                    Developer Target 1: 94.8% 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 2025026 
                                                                                                    (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)))))