Data.Metrics.Snapshot:quantile from metrics-0.3.0.2

Percentage Accurate: 100.0% → 100.0%
Time: 3.2s
Alternatives: 16
Speedup: 1.1×

Specification

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

Alternative 1: 100.0% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(y - z, t - x, x\right) \end{array} \]
(FPCore (x y z t) :precision binary64 (fma (- y z) (- t x) x))
double code(double x, double y, double z, double t) {
	return fma((y - z), (t - x), x);
}
function code(x, y, z, t)
	return fma(Float64(y - z), Float64(t - x), x)
end
code[x_, y_, z_, t_] := N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(y - z, t - x, x\right)
\end{array}
Derivation
  1. Initial program 100.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, t - x, x\right)} \]
    7. lift--.f64N/A

      \[\leadsto \mathsf{fma}\left(\color{blue}{y - z}, t - x, x\right) \]
    8. lift--.f64100.0

      \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{t - x}, x\right) \]
  3. Applied rewrites100.0%

    \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, t - x, x\right)} \]
  4. Add Preprocessing

Alternative 2: 84.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.35 \cdot 10^{+33}:\\ \;\;\;\;\left(t - x\right) \cdot y\\ \mathbf{elif}\;y \leq 2000000000000:\\ \;\;\;\;x - \left(t - x\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t - x, y, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y -2.35e+33)
   (* (- t x) y)
   (if (<= y 2000000000000.0) (- x (* (- t x) z)) (fma (- t x) y x))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -2.35e+33) {
		tmp = (t - x) * y;
	} else if (y <= 2000000000000.0) {
		tmp = x - ((t - x) * z);
	} else {
		tmp = fma((t - x), y, x);
	}
	return tmp;
}
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -2.35e+33)
		tmp = Float64(Float64(t - x) * y);
	elseif (y <= 2000000000000.0)
		tmp = Float64(x - Float64(Float64(t - x) * z));
	else
		tmp = fma(Float64(t - x), y, x);
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.35e+33], N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 2000000000000.0], N[(x - N[(N[(t - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * y + x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.35 \cdot 10^{+33}:\\
\;\;\;\;\left(t - x\right) \cdot y\\

\mathbf{elif}\;y \leq 2000000000000:\\
\;\;\;\;x - \left(t - x\right) \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.3499999999999999e33

    1. Initial program 100.0%

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

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

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

        \[\leadsto \left(t - x\right) \cdot \color{blue}{y} \]
      3. lift--.f6444.8

        \[\leadsto \left(t - x\right) \cdot y \]
    4. Applied rewrites44.8%

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

    if -2.3499999999999999e33 < y < 2e12

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{x + -1 \cdot \left(z \cdot \left(t - x\right)\right)} \]
    3. Step-by-step derivation
      1. fp-cancel-sign-sub-invN/A

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

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

        \[\leadsto x - 1 \cdot \left(\color{blue}{z} \cdot \left(t - x\right)\right) \]
      4. *-lft-identityN/A

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

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

        \[\leadsto x - \left(t - x\right) \cdot \color{blue}{z} \]
      7. lift--.f6460.2

        \[\leadsto x - \left(t - x\right) \cdot z \]
    4. Applied rewrites60.2%

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

    if 2e12 < y

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{y}, x\right) \]
      4. lift--.f6460.4

        \[\leadsto \mathsf{fma}\left(t - x, y, x\right) \]
    4. Applied rewrites60.4%

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

Alternative 3: 82.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \left(1 - \left(y - z\right)\right) \cdot x\\
\mathbf{if}\;x \leq -3.5 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 5.8 \cdot 10^{-64}:\\
\;\;\;\;\mathsf{fma}\left(y - z, t, x\right)\\

\mathbf{elif}\;x \leq 7.5 \cdot 10^{+35}:\\
\;\;\;\;\mathsf{fma}\left(t - x, y, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.4999999999999999e-9 or 7.4999999999999999e35 < x

    1. Initial program 100.0%

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

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

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

        \[\leadsto \left(1 + -1 \cdot \left(y - z\right)\right) \cdot \color{blue}{x} \]
      3. fp-cancel-sign-sub-invN/A

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

        \[\leadsto \left(1 - 1 \cdot \left(y - z\right)\right) \cdot x \]
      5. *-lft-identityN/A

        \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
      6. lower--.f64N/A

        \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
      7. lift--.f6455.7

        \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
    4. Applied rewrites55.7%

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

    if -3.4999999999999999e-9 < x < 5.7999999999999998e-64

    1. Initial program 100.0%

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, t, x\right)} \]
        6. lift--.f6464.4

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

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

      if 5.7999999999999998e-64 < x < 7.4999999999999999e35

      1. Initial program 100.0%

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

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

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

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

          \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{y}, x\right) \]
        4. lift--.f6460.4

          \[\leadsto \mathsf{fma}\left(t - x, y, x\right) \]
      4. Applied rewrites60.4%

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

    Alternative 4: 81.9% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x - t\right) \cdot z\\ \mathbf{if}\;z \leq -3.5 \cdot 10^{+54}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-19}:\\ \;\;\;\;\mathsf{fma}\left(t - x, y, x\right)\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+151}:\\ \;\;\;\;\mathsf{fma}\left(y - z, t, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (let* ((t_1 (* (- x t) z)))
       (if (<= z -3.5e+54)
         t_1
         (if (<= z 2.7e-19)
           (fma (- t x) y x)
           (if (<= z 1.5e+151) (fma (- y z) t x) t_1)))))
    double code(double x, double y, double z, double t) {
    	double t_1 = (x - t) * z;
    	double tmp;
    	if (z <= -3.5e+54) {
    		tmp = t_1;
    	} else if (z <= 2.7e-19) {
    		tmp = fma((t - x), y, x);
    	} else if (z <= 1.5e+151) {
    		tmp = fma((y - z), t, x);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t)
    	t_1 = Float64(Float64(x - t) * z)
    	tmp = 0.0
    	if (z <= -3.5e+54)
    		tmp = t_1;
    	elseif (z <= 2.7e-19)
    		tmp = fma(Float64(t - x), y, x);
    	elseif (z <= 1.5e+151)
    		tmp = fma(Float64(y - z), t, x);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -3.5e+54], t$95$1, If[LessEqual[z, 2.7e-19], N[(N[(t - x), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[z, 1.5e+151], N[(N[(y - z), $MachinePrecision] * t + x), $MachinePrecision], t$95$1]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(x - t\right) \cdot z\\
    \mathbf{if}\;z \leq -3.5 \cdot 10^{+54}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 2.7 \cdot 10^{-19}:\\
    \;\;\;\;\mathsf{fma}\left(t - x, y, x\right)\\
    
    \mathbf{elif}\;z \leq 1.5 \cdot 10^{+151}:\\
    \;\;\;\;\mathsf{fma}\left(y - z, t, x\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z < -3.5000000000000001e54 or 1.5e151 < z

      1. Initial program 100.0%

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

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

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

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

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

          \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \left(y - z\right)} \]
        6. *-lft-identityN/A

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

          \[\leadsto x + \left(t - x\right) \cdot \left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right) \]
        8. fp-cancel-sign-sub-invN/A

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

          \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\left(-1 \cdot z + y\right)} \]
        10. distribute-rgt-outN/A

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

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

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

          \[\leadsto \color{blue}{\left(x + -1 \cdot \left(z \cdot \left(t - x\right)\right)\right) + y \cdot \left(t - x\right)} \]
        14. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

          \[\leadsto \left(x - \left(t - x\right) \cdot z\right) + \color{blue}{\left(t - x\right) \cdot y} \]
        23. lift--.f6496.5

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

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

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

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

          \[\leadsto \left(x - t\right) \cdot \color{blue}{z} \]
        3. lower--.f6444.6

          \[\leadsto \left(x - t\right) \cdot z \]
      6. Applied rewrites44.6%

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

      if -3.5000000000000001e54 < z < 2.7000000000000001e-19

      1. Initial program 100.0%

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

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

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

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

          \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{y}, x\right) \]
        4. lift--.f6460.4

          \[\leadsto \mathsf{fma}\left(t - x, y, x\right) \]
      4. Applied rewrites60.4%

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

      if 2.7000000000000001e-19 < z < 1.5e151

      1. Initial program 100.0%

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, t, x\right)} \]
          6. lift--.f6464.4

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

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

      Alternative 5: 80.9% accurate, 0.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x - t\right) \cdot z\\ \mathbf{if}\;z \leq -3.5 \cdot 10^{+54}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-5}:\\ \;\;\;\;\mathsf{fma}\left(t - x, y, x\right)\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+150}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (let* ((t_1 (* (- x t) z)))
         (if (<= z -3.5e+54)
           t_1
           (if (<= z 5.5e-5)
             (fma (- t x) y x)
             (if (<= z 2.5e+150) (* (- y z) t) t_1)))))
      double code(double x, double y, double z, double t) {
      	double t_1 = (x - t) * z;
      	double tmp;
      	if (z <= -3.5e+54) {
      		tmp = t_1;
      	} else if (z <= 5.5e-5) {
      		tmp = fma((t - x), y, x);
      	} else if (z <= 2.5e+150) {
      		tmp = (y - z) * t;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t)
      	t_1 = Float64(Float64(x - t) * z)
      	tmp = 0.0
      	if (z <= -3.5e+54)
      		tmp = t_1;
      	elseif (z <= 5.5e-5)
      		tmp = fma(Float64(t - x), y, x);
      	elseif (z <= 2.5e+150)
      		tmp = Float64(Float64(y - z) * t);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -3.5e+54], t$95$1, If[LessEqual[z, 5.5e-5], N[(N[(t - x), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[z, 2.5e+150], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \left(x - t\right) \cdot z\\
      \mathbf{if}\;z \leq -3.5 \cdot 10^{+54}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 5.5 \cdot 10^{-5}:\\
      \;\;\;\;\mathsf{fma}\left(t - x, y, x\right)\\
      
      \mathbf{elif}\;z \leq 2.5 \cdot 10^{+150}:\\
      \;\;\;\;\left(y - z\right) \cdot t\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if z < -3.5000000000000001e54 or 2.50000000000000004e150 < z

        1. Initial program 100.0%

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

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

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

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

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

            \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \left(y - z\right)} \]
          6. *-lft-identityN/A

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

            \[\leadsto x + \left(t - x\right) \cdot \left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right) \]
          8. fp-cancel-sign-sub-invN/A

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

            \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\left(-1 \cdot z + y\right)} \]
          10. distribute-rgt-outN/A

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

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

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

            \[\leadsto \color{blue}{\left(x + -1 \cdot \left(z \cdot \left(t - x\right)\right)\right) + y \cdot \left(t - x\right)} \]
          14. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

            \[\leadsto \left(x - \left(t - x\right) \cdot z\right) + \color{blue}{\left(t - x\right) \cdot y} \]
          23. lift--.f6496.5

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

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

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

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

            \[\leadsto \left(x - t\right) \cdot \color{blue}{z} \]
          3. lower--.f6444.6

            \[\leadsto \left(x - t\right) \cdot z \]
        6. Applied rewrites44.6%

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

        if -3.5000000000000001e54 < z < 5.5000000000000002e-5

        1. Initial program 100.0%

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

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

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

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

            \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{y}, x\right) \]
          4. lift--.f6460.4

            \[\leadsto \mathsf{fma}\left(t - x, y, x\right) \]
        4. Applied rewrites60.4%

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

        if 5.5000000000000002e-5 < z < 2.50000000000000004e150

        1. Initial program 100.0%

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

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

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

            \[\leadsto \left(y - z\right) \cdot \color{blue}{t} \]
          3. lift--.f6449.0

            \[\leadsto \left(y - z\right) \cdot t \]
        4. Applied rewrites49.0%

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

      Alternative 6: 69.0% accurate, 0.7× speedup?

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

        1. Initial program 100.0%

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

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

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

            \[\leadsto \left(t - x\right) \cdot \color{blue}{y} \]
          3. lift--.f6444.8

            \[\leadsto \left(t - x\right) \cdot y \]
        4. Applied rewrites44.8%

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

        if -1.60000000000000009e33 < y < -8.80000000000000006e-214

        1. Initial program 100.0%

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, t, x\right)} \]
            6. lift--.f6464.4

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

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

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

              \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(z\right), t, x\right) \]
            2. lower-neg.f6442.1

              \[\leadsto \mathsf{fma}\left(-z, t, x\right) \]
          6. Applied rewrites42.1%

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

          if -8.80000000000000006e-214 < y < 2e10

          1. Initial program 100.0%

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

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

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

              \[\leadsto \left(1 + -1 \cdot \left(y - z\right)\right) \cdot \color{blue}{x} \]
            3. fp-cancel-sign-sub-invN/A

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

              \[\leadsto \left(1 - 1 \cdot \left(y - z\right)\right) \cdot x \]
            5. *-lft-identityN/A

              \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
            6. lower--.f64N/A

              \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
            7. lift--.f6455.7

              \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
          4. Applied rewrites55.7%

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

            \[\leadsto \left(1 + z\right) \cdot x \]
          6. Step-by-step derivation
            1. lower-+.f6437.2

              \[\leadsto \left(1 + z\right) \cdot x \]
          7. Applied rewrites37.2%

            \[\leadsto \left(1 + z\right) \cdot x \]
        4. Recombined 3 regimes into one program.
        5. Add Preprocessing

        Alternative 7: 68.3% accurate, 0.7× speedup?

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

          1. Initial program 100.0%

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

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

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

              \[\leadsto \left(t - x\right) \cdot \color{blue}{y} \]
            3. lift--.f6444.8

              \[\leadsto \left(t - x\right) \cdot y \]
          4. Applied rewrites44.8%

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

          if -2.8000000000000001e40 < y < -3.6e-60

          1. Initial program 100.0%

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

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

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

              \[\leadsto \left(y - z\right) \cdot \color{blue}{t} \]
            3. lift--.f6449.0

              \[\leadsto \left(y - z\right) \cdot t \]
          4. Applied rewrites49.0%

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

          if -3.6e-60 < y < 2e10

          1. Initial program 100.0%

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

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

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

              \[\leadsto \left(1 + -1 \cdot \left(y - z\right)\right) \cdot \color{blue}{x} \]
            3. fp-cancel-sign-sub-invN/A

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

              \[\leadsto \left(1 - 1 \cdot \left(y - z\right)\right) \cdot x \]
            5. *-lft-identityN/A

              \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
            6. lower--.f64N/A

              \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
            7. lift--.f6455.7

              \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
          4. Applied rewrites55.7%

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

            \[\leadsto \left(1 + z\right) \cdot x \]
          6. Step-by-step derivation
            1. lower-+.f6437.2

              \[\leadsto \left(1 + z\right) \cdot x \]
          7. Applied rewrites37.2%

            \[\leadsto \left(1 + z\right) \cdot x \]
        3. Recombined 3 regimes into one program.
        4. Add Preprocessing

        Alternative 8: 67.9% accurate, 0.8× speedup?

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

          1. Initial program 100.0%

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

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

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

              \[\leadsto \left(t - x\right) \cdot \color{blue}{y} \]
            3. lift--.f6444.8

              \[\leadsto \left(t - x\right) \cdot y \]
          4. Applied rewrites44.8%

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

          if -1.64999999999999988e33 < y < 9e18

          1. Initial program 100.0%

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

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

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

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

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

              \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \left(y - z\right)} \]
            6. *-lft-identityN/A

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

              \[\leadsto x + \left(t - x\right) \cdot \left(y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot z\right) \]
            8. fp-cancel-sign-sub-invN/A

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

              \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\left(-1 \cdot z + y\right)} \]
            10. distribute-rgt-outN/A

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

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

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

              \[\leadsto \color{blue}{\left(x + -1 \cdot \left(z \cdot \left(t - x\right)\right)\right) + y \cdot \left(t - x\right)} \]
            14. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

              \[\leadsto \left(x - \left(t - x\right) \cdot z\right) + \color{blue}{\left(t - x\right) \cdot y} \]
            23. lift--.f6496.5

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

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

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

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

              \[\leadsto \left(x - t\right) \cdot \color{blue}{z} \]
            3. lower--.f6444.6

              \[\leadsto \left(x - t\right) \cdot z \]
          6. Applied rewrites44.6%

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

        Alternative 9: 62.5% accurate, 0.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - y\right) \cdot x\\ \mathbf{if}\;x \leq -1.45 \cdot 10^{+119}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{-64}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{+69}:\\ \;\;\;\;\left(t - x\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (let* ((t_1 (* (- 1.0 y) x)))
           (if (<= x -1.45e+119)
             t_1
             (if (<= x 5.8e-64) (* (- y z) t) (if (<= x 2.1e+69) (* (- t x) y) t_1)))))
        double code(double x, double y, double z, double t) {
        	double t_1 = (1.0 - y) * x;
        	double tmp;
        	if (x <= -1.45e+119) {
        		tmp = t_1;
        	} else if (x <= 5.8e-64) {
        		tmp = (y - z) * t;
        	} else if (x <= 2.1e+69) {
        		tmp = (t - x) * y;
        	} 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 = (1.0d0 - y) * x
            if (x <= (-1.45d+119)) then
                tmp = t_1
            else if (x <= 5.8d-64) then
                tmp = (y - z) * t
            else if (x <= 2.1d+69) then
                tmp = (t - x) * y
            else
                tmp = t_1
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t) {
        	double t_1 = (1.0 - y) * x;
        	double tmp;
        	if (x <= -1.45e+119) {
        		tmp = t_1;
        	} else if (x <= 5.8e-64) {
        		tmp = (y - z) * t;
        	} else if (x <= 2.1e+69) {
        		tmp = (t - x) * y;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	t_1 = (1.0 - y) * x
        	tmp = 0
        	if x <= -1.45e+119:
        		tmp = t_1
        	elif x <= 5.8e-64:
        		tmp = (y - z) * t
        	elif x <= 2.1e+69:
        		tmp = (t - x) * y
        	else:
        		tmp = t_1
        	return tmp
        
        function code(x, y, z, t)
        	t_1 = Float64(Float64(1.0 - y) * x)
        	tmp = 0.0
        	if (x <= -1.45e+119)
        		tmp = t_1;
        	elseif (x <= 5.8e-64)
        		tmp = Float64(Float64(y - z) * t);
        	elseif (x <= 2.1e+69)
        		tmp = Float64(Float64(t - x) * y);
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t)
        	t_1 = (1.0 - y) * x;
        	tmp = 0.0;
        	if (x <= -1.45e+119)
        		tmp = t_1;
        	elseif (x <= 5.8e-64)
        		tmp = (y - z) * t;
        	elseif (x <= 2.1e+69)
        		tmp = (t - x) * y;
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.45e+119], t$95$1, If[LessEqual[x, 5.8e-64], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[x, 2.1e+69], N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \left(1 - y\right) \cdot x\\
        \mathbf{if}\;x \leq -1.45 \cdot 10^{+119}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;x \leq 5.8 \cdot 10^{-64}:\\
        \;\;\;\;\left(y - z\right) \cdot t\\
        
        \mathbf{elif}\;x \leq 2.1 \cdot 10^{+69}:\\
        \;\;\;\;\left(t - x\right) \cdot y\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if x < -1.45000000000000004e119 or 2.10000000000000015e69 < x

          1. Initial program 100.0%

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

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

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

              \[\leadsto \left(1 + -1 \cdot \left(y - z\right)\right) \cdot \color{blue}{x} \]
            3. fp-cancel-sign-sub-invN/A

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

              \[\leadsto \left(1 - 1 \cdot \left(y - z\right)\right) \cdot x \]
            5. *-lft-identityN/A

              \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
            6. lower--.f64N/A

              \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
            7. lift--.f6455.7

              \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
          4. Applied rewrites55.7%

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

            \[\leadsto \left(1 - y\right) \cdot x \]
          6. Step-by-step derivation
            1. Applied rewrites38.1%

              \[\leadsto \left(1 - y\right) \cdot x \]

            if -1.45000000000000004e119 < x < 5.7999999999999998e-64

            1. Initial program 100.0%

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

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

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

                \[\leadsto \left(y - z\right) \cdot \color{blue}{t} \]
              3. lift--.f6449.0

                \[\leadsto \left(y - z\right) \cdot t \]
            4. Applied rewrites49.0%

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

            if 5.7999999999999998e-64 < x < 2.10000000000000015e69

            1. Initial program 100.0%

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

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

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

                \[\leadsto \left(t - x\right) \cdot \color{blue}{y} \]
              3. lift--.f6444.8

                \[\leadsto \left(t - x\right) \cdot y \]
            4. Applied rewrites44.8%

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

          Alternative 10: 53.0% accurate, 0.7× speedup?

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

            1. Initial program 100.0%

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

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

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

                \[\leadsto \left(t - x\right) \cdot \color{blue}{y} \]
              3. lift--.f6444.8

                \[\leadsto \left(t - x\right) \cdot y \]
            4. Applied rewrites44.8%

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

            if -1.60000000000000009e33 < y < -8.5000000000000006e-214

            1. Initial program 100.0%

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

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

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

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

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

                \[\leadsto \left(-z\right) \cdot \left(\color{blue}{t} - x\right) \]
              5. lift--.f6444.6

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

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

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

                \[\leadsto \mathsf{neg}\left(t \cdot z\right) \]
              2. lower-neg.f64N/A

                \[\leadsto -t \cdot z \]
              3. lower-*.f6426.8

                \[\leadsto -t \cdot z \]
            7. Applied rewrites26.8%

              \[\leadsto -t \cdot z \]

            if -8.5000000000000006e-214 < y < 2e10

            1. Initial program 100.0%

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

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

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

                \[\leadsto \left(1 + -1 \cdot \left(y - z\right)\right) \cdot \color{blue}{x} \]
              3. fp-cancel-sign-sub-invN/A

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

                \[\leadsto \left(1 - 1 \cdot \left(y - z\right)\right) \cdot x \]
              5. *-lft-identityN/A

                \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
              6. lower--.f64N/A

                \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
              7. lift--.f6455.7

                \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
            4. Applied rewrites55.7%

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

              \[\leadsto z \cdot x \]
            6. Step-by-step derivation
              1. Applied rewrites21.8%

                \[\leadsto z \cdot x \]
            7. Recombined 3 regimes into one program.
            8. Add Preprocessing

            Alternative 11: 47.6% accurate, 0.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.05 \cdot 10^{+54}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;z \leq 0.00033:\\ \;\;\;\;\left(1 - y\right) \cdot x\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+151}:\\ \;\;\;\;t \cdot y\\ \mathbf{else}:\\ \;\;\;\;z \cdot x\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (if (<= z -3.05e+54)
               (* z x)
               (if (<= z 0.00033) (* (- 1.0 y) x) (if (<= z 1.4e+151) (* t y) (* z x)))))
            double code(double x, double y, double z, double t) {
            	double tmp;
            	if (z <= -3.05e+54) {
            		tmp = z * x;
            	} else if (z <= 0.00033) {
            		tmp = (1.0 - y) * x;
            	} else if (z <= 1.4e+151) {
            		tmp = t * y;
            	} else {
            		tmp = z * x;
            	}
            	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 <= (-3.05d+54)) then
                    tmp = z * x
                else if (z <= 0.00033d0) then
                    tmp = (1.0d0 - y) * x
                else if (z <= 1.4d+151) then
                    tmp = t * y
                else
                    tmp = z * x
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t) {
            	double tmp;
            	if (z <= -3.05e+54) {
            		tmp = z * x;
            	} else if (z <= 0.00033) {
            		tmp = (1.0 - y) * x;
            	} else if (z <= 1.4e+151) {
            		tmp = t * y;
            	} else {
            		tmp = z * x;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	tmp = 0
            	if z <= -3.05e+54:
            		tmp = z * x
            	elif z <= 0.00033:
            		tmp = (1.0 - y) * x
            	elif z <= 1.4e+151:
            		tmp = t * y
            	else:
            		tmp = z * x
            	return tmp
            
            function code(x, y, z, t)
            	tmp = 0.0
            	if (z <= -3.05e+54)
            		tmp = Float64(z * x);
            	elseif (z <= 0.00033)
            		tmp = Float64(Float64(1.0 - y) * x);
            	elseif (z <= 1.4e+151)
            		tmp = Float64(t * y);
            	else
            		tmp = Float64(z * x);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	tmp = 0.0;
            	if (z <= -3.05e+54)
            		tmp = z * x;
            	elseif (z <= 0.00033)
            		tmp = (1.0 - y) * x;
            	elseif (z <= 1.4e+151)
            		tmp = t * y;
            	else
            		tmp = z * x;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := If[LessEqual[z, -3.05e+54], N[(z * x), $MachinePrecision], If[LessEqual[z, 0.00033], N[(N[(1.0 - y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 1.4e+151], N[(t * y), $MachinePrecision], N[(z * x), $MachinePrecision]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -3.05 \cdot 10^{+54}:\\
            \;\;\;\;z \cdot x\\
            
            \mathbf{elif}\;z \leq 0.00033:\\
            \;\;\;\;\left(1 - y\right) \cdot x\\
            
            \mathbf{elif}\;z \leq 1.4 \cdot 10^{+151}:\\
            \;\;\;\;t \cdot y\\
            
            \mathbf{else}:\\
            \;\;\;\;z \cdot x\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if z < -3.0499999999999999e54 or 1.39999999999999994e151 < z

              1. Initial program 100.0%

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

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

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

                  \[\leadsto \left(1 + -1 \cdot \left(y - z\right)\right) \cdot \color{blue}{x} \]
                3. fp-cancel-sign-sub-invN/A

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

                  \[\leadsto \left(1 - 1 \cdot \left(y - z\right)\right) \cdot x \]
                5. *-lft-identityN/A

                  \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                6. lower--.f64N/A

                  \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                7. lift--.f6455.7

                  \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
              4. Applied rewrites55.7%

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

                \[\leadsto z \cdot x \]
              6. Step-by-step derivation
                1. Applied rewrites21.8%

                  \[\leadsto z \cdot x \]

                if -3.0499999999999999e54 < z < 3.3e-4

                1. Initial program 100.0%

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

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

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

                    \[\leadsto \left(1 + -1 \cdot \left(y - z\right)\right) \cdot \color{blue}{x} \]
                  3. fp-cancel-sign-sub-invN/A

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

                    \[\leadsto \left(1 - 1 \cdot \left(y - z\right)\right) \cdot x \]
                  5. *-lft-identityN/A

                    \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                  6. lower--.f64N/A

                    \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                  7. lift--.f6455.7

                    \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                4. Applied rewrites55.7%

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

                  \[\leadsto \left(1 - y\right) \cdot x \]
                6. Step-by-step derivation
                  1. Applied rewrites38.1%

                    \[\leadsto \left(1 - y\right) \cdot x \]

                  if 3.3e-4 < z < 1.39999999999999994e151

                  1. Initial program 100.0%

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

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

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

                      \[\leadsto \left(t - x\right) \cdot \color{blue}{y} \]
                    3. lift--.f6444.8

                      \[\leadsto \left(t - x\right) \cdot y \]
                  4. Applied rewrites44.8%

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

                    \[\leadsto t \cdot \color{blue}{y} \]
                  6. Step-by-step derivation
                    1. lower-*.f6426.4

                      \[\leadsto t \cdot y \]
                  7. Applied rewrites26.4%

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

                Alternative 12: 36.8% accurate, 0.6× speedup?

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

                  1. Initial program 100.0%

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

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

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

                      \[\leadsto \left(t - x\right) \cdot \color{blue}{y} \]
                    3. lift--.f6444.8

                      \[\leadsto \left(t - x\right) \cdot y \]
                  4. Applied rewrites44.8%

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

                    \[\leadsto \left(-1 \cdot x\right) \cdot y \]
                  6. Step-by-step derivation
                    1. mul-1-negN/A

                      \[\leadsto \left(\mathsf{neg}\left(x\right)\right) \cdot y \]
                    2. lower-neg.f6422.7

                      \[\leadsto \left(-x\right) \cdot y \]
                  7. Applied rewrites22.7%

                    \[\leadsto \left(-x\right) \cdot y \]

                  if -9.9999999999999997e34 < y < -8.5000000000000006e-214

                  1. Initial program 100.0%

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

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

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

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

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

                      \[\leadsto \left(-z\right) \cdot \left(\color{blue}{t} - x\right) \]
                    5. lift--.f6444.6

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

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

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

                      \[\leadsto \mathsf{neg}\left(t \cdot z\right) \]
                    2. lower-neg.f64N/A

                      \[\leadsto -t \cdot z \]
                    3. lower-*.f6426.8

                      \[\leadsto -t \cdot z \]
                  7. Applied rewrites26.8%

                    \[\leadsto -t \cdot z \]

                  if -8.5000000000000006e-214 < y < 2.4e12

                  1. Initial program 100.0%

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

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

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

                      \[\leadsto \left(1 + -1 \cdot \left(y - z\right)\right) \cdot \color{blue}{x} \]
                    3. fp-cancel-sign-sub-invN/A

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

                      \[\leadsto \left(1 - 1 \cdot \left(y - z\right)\right) \cdot x \]
                    5. *-lft-identityN/A

                      \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                    6. lower--.f64N/A

                      \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                    7. lift--.f6455.7

                      \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                  4. Applied rewrites55.7%

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

                    \[\leadsto z \cdot x \]
                  6. Step-by-step derivation
                    1. Applied rewrites21.8%

                      \[\leadsto z \cdot x \]

                    if 2.40000000000000008e74 < y

                    1. Initial program 100.0%

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

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

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

                        \[\leadsto \left(t - x\right) \cdot \color{blue}{y} \]
                      3. lift--.f6444.8

                        \[\leadsto \left(t - x\right) \cdot y \]
                    4. Applied rewrites44.8%

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

                      \[\leadsto t \cdot \color{blue}{y} \]
                    6. Step-by-step derivation
                      1. lower-*.f6426.4

                        \[\leadsto t \cdot y \]
                    7. Applied rewrites26.4%

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

                  Alternative 13: 35.4% accurate, 0.8× speedup?

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

                    1. Initial program 100.0%

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

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

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

                        \[\leadsto \left(t - x\right) \cdot \color{blue}{y} \]
                      3. lift--.f6444.8

                        \[\leadsto \left(t - x\right) \cdot y \]
                    4. Applied rewrites44.8%

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

                      \[\leadsto t \cdot \color{blue}{y} \]
                    6. Step-by-step derivation
                      1. lower-*.f6426.4

                        \[\leadsto t \cdot y \]
                    7. Applied rewrites26.4%

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

                    if -9.80000000000000027e33 < y < -8.5000000000000006e-214

                    1. Initial program 100.0%

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

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

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

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

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

                        \[\leadsto \left(-z\right) \cdot \left(\color{blue}{t} - x\right) \]
                      5. lift--.f6444.6

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

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

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

                        \[\leadsto \mathsf{neg}\left(t \cdot z\right) \]
                      2. lower-neg.f64N/A

                        \[\leadsto -t \cdot z \]
                      3. lower-*.f6426.8

                        \[\leadsto -t \cdot z \]
                    7. Applied rewrites26.8%

                      \[\leadsto -t \cdot z \]

                    if -8.5000000000000006e-214 < y < 7.50000000000000007e71

                    1. Initial program 100.0%

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

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

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

                        \[\leadsto \left(1 + -1 \cdot \left(y - z\right)\right) \cdot \color{blue}{x} \]
                      3. fp-cancel-sign-sub-invN/A

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

                        \[\leadsto \left(1 - 1 \cdot \left(y - z\right)\right) \cdot x \]
                      5. *-lft-identityN/A

                        \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                      6. lower--.f64N/A

                        \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                      7. lift--.f6455.7

                        \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                    4. Applied rewrites55.7%

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

                      \[\leadsto z \cdot x \]
                    6. Step-by-step derivation
                      1. Applied rewrites21.8%

                        \[\leadsto z \cdot x \]
                    7. Recombined 3 regimes into one program.
                    8. Add Preprocessing

                    Alternative 14: 35.3% accurate, 0.8× speedup?

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

                      1. Initial program 100.0%

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

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

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

                          \[\leadsto \left(t - x\right) \cdot \color{blue}{y} \]
                        3. lift--.f6444.8

                          \[\leadsto \left(t - x\right) \cdot y \]
                      4. Applied rewrites44.8%

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

                        \[\leadsto t \cdot \color{blue}{y} \]
                      6. Step-by-step derivation
                        1. lower-*.f6426.4

                          \[\leadsto t \cdot y \]
                      7. Applied rewrites26.4%

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

                      if -1.29999999999999999e-59 < y < -1.54999999999999998e-165

                      1. Initial program 100.0%

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

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

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

                          \[\leadsto \left(1 + -1 \cdot \left(y - z\right)\right) \cdot \color{blue}{x} \]
                        3. fp-cancel-sign-sub-invN/A

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

                          \[\leadsto \left(1 - 1 \cdot \left(y - z\right)\right) \cdot x \]
                        5. *-lft-identityN/A

                          \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                        6. lower--.f64N/A

                          \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                        7. lift--.f6455.7

                          \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                      4. Applied rewrites55.7%

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

                        \[\leadsto \left(1 + z\right) \cdot x \]
                      6. Step-by-step derivation
                        1. lower-+.f6437.2

                          \[\leadsto \left(1 + z\right) \cdot x \]
                      7. Applied rewrites37.2%

                        \[\leadsto \left(1 + z\right) \cdot x \]
                      8. Taylor expanded in z around 0

                        \[\leadsto 1 \cdot x \]
                      9. Step-by-step derivation
                        1. Applied rewrites17.8%

                          \[\leadsto 1 \cdot x \]

                        if -1.54999999999999998e-165 < y < 7.50000000000000007e71

                        1. Initial program 100.0%

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

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

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

                            \[\leadsto \left(1 + -1 \cdot \left(y - z\right)\right) \cdot \color{blue}{x} \]
                          3. fp-cancel-sign-sub-invN/A

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

                            \[\leadsto \left(1 - 1 \cdot \left(y - z\right)\right) \cdot x \]
                          5. *-lft-identityN/A

                            \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                          6. lower--.f64N/A

                            \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                          7. lift--.f6455.7

                            \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                        4. Applied rewrites55.7%

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

                          \[\leadsto z \cdot x \]
                        6. Step-by-step derivation
                          1. Applied rewrites21.8%

                            \[\leadsto z \cdot x \]
                        7. Recombined 3 regimes into one program.
                        8. Add Preprocessing

                        Alternative 15: 34.6% accurate, 1.0× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+55}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+151}:\\ \;\;\;\;t \cdot y\\ \mathbf{else}:\\ \;\;\;\;z \cdot x\\ \end{array} \end{array} \]
                        (FPCore (x y z t)
                         :precision binary64
                         (if (<= z -4.2e+55) (* z x) (if (<= z 1.4e+151) (* t y) (* z x))))
                        double code(double x, double y, double z, double t) {
                        	double tmp;
                        	if (z <= -4.2e+55) {
                        		tmp = z * x;
                        	} else if (z <= 1.4e+151) {
                        		tmp = t * y;
                        	} else {
                        		tmp = z * x;
                        	}
                        	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.2d+55)) then
                                tmp = z * x
                            else if (z <= 1.4d+151) then
                                tmp = t * y
                            else
                                tmp = z * x
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x, double y, double z, double t) {
                        	double tmp;
                        	if (z <= -4.2e+55) {
                        		tmp = z * x;
                        	} else if (z <= 1.4e+151) {
                        		tmp = t * y;
                        	} else {
                        		tmp = z * x;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t):
                        	tmp = 0
                        	if z <= -4.2e+55:
                        		tmp = z * x
                        	elif z <= 1.4e+151:
                        		tmp = t * y
                        	else:
                        		tmp = z * x
                        	return tmp
                        
                        function code(x, y, z, t)
                        	tmp = 0.0
                        	if (z <= -4.2e+55)
                        		tmp = Float64(z * x);
                        	elseif (z <= 1.4e+151)
                        		tmp = Float64(t * y);
                        	else
                        		tmp = Float64(z * x);
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t)
                        	tmp = 0.0;
                        	if (z <= -4.2e+55)
                        		tmp = z * x;
                        	elseif (z <= 1.4e+151)
                        		tmp = t * y;
                        	else
                        		tmp = z * x;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_] := If[LessEqual[z, -4.2e+55], N[(z * x), $MachinePrecision], If[LessEqual[z, 1.4e+151], N[(t * y), $MachinePrecision], N[(z * x), $MachinePrecision]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;z \leq -4.2 \cdot 10^{+55}:\\
                        \;\;\;\;z \cdot x\\
                        
                        \mathbf{elif}\;z \leq 1.4 \cdot 10^{+151}:\\
                        \;\;\;\;t \cdot y\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;z \cdot x\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if z < -4.2000000000000001e55 or 1.39999999999999994e151 < z

                          1. Initial program 100.0%

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

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

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

                              \[\leadsto \left(1 + -1 \cdot \left(y - z\right)\right) \cdot \color{blue}{x} \]
                            3. fp-cancel-sign-sub-invN/A

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

                              \[\leadsto \left(1 - 1 \cdot \left(y - z\right)\right) \cdot x \]
                            5. *-lft-identityN/A

                              \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                            6. lower--.f64N/A

                              \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                            7. lift--.f6455.7

                              \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                          4. Applied rewrites55.7%

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

                            \[\leadsto z \cdot x \]
                          6. Step-by-step derivation
                            1. Applied rewrites21.8%

                              \[\leadsto z \cdot x \]

                            if -4.2000000000000001e55 < z < 1.39999999999999994e151

                            1. Initial program 100.0%

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

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

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

                                \[\leadsto \left(t - x\right) \cdot \color{blue}{y} \]
                              3. lift--.f6444.8

                                \[\leadsto \left(t - x\right) \cdot y \]
                            4. Applied rewrites44.8%

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

                              \[\leadsto t \cdot \color{blue}{y} \]
                            6. Step-by-step derivation
                              1. lower-*.f6426.4

                                \[\leadsto t \cdot y \]
                            7. Applied rewrites26.4%

                              \[\leadsto t \cdot \color{blue}{y} \]
                          7. Recombined 2 regimes into one program.
                          8. Add Preprocessing

                          Alternative 16: 26.4% accurate, 3.0× speedup?

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

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

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

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

                              \[\leadsto \left(t - x\right) \cdot \color{blue}{y} \]
                            3. lift--.f6444.8

                              \[\leadsto \left(t - x\right) \cdot y \]
                          4. Applied rewrites44.8%

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

                            \[\leadsto t \cdot \color{blue}{y} \]
                          6. Step-by-step derivation
                            1. lower-*.f6426.4

                              \[\leadsto t \cdot y \]
                          7. Applied rewrites26.4%

                            \[\leadsto t \cdot \color{blue}{y} \]
                          8. Add Preprocessing

                          Reproduce

                          ?
                          herbie shell --seed 2025123 
                          (FPCore (x y z t)
                            :name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"
                            :precision binary64
                            (+ x (* (- y z) (- t x))))