Data.Metrics.Snapshot:quantile from metrics-0.3.0.2

Percentage Accurate: 100.0% → 100.0%
Time: 3.8s
Alternatives: 11
Speedup: 1.0×

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}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 11 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.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}
Derivation
  1. Initial program 100.0%

    \[x + \left(y - z\right) \cdot \left(t - x\right) \]
  2. Add Preprocessing
  3. Add Preprocessing

Alternative 2: 66.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - x\right) \cdot y\\ \mathbf{if}\;y \leq -4.4 \cdot 10^{+15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-206}:\\ \;\;\;\;\mathsf{fma}\left(z, x, x\right)\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{+74}:\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (- t x) y)))
   (if (<= y -4.4e+15)
     t_1
     (if (<= y 2.1e-206) (fma z x x) (if (<= y 2.6e+74) (* (- y z) t) t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = (t - x) * y;
	double tmp;
	if (y <= -4.4e+15) {
		tmp = t_1;
	} else if (y <= 2.1e-206) {
		tmp = fma(z, x, x);
	} else if (y <= 2.6e+74) {
		tmp = (y - z) * t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = Float64(Float64(t - x) * y)
	tmp = 0.0
	if (y <= -4.4e+15)
		tmp = t_1;
	elseif (y <= 2.1e-206)
		tmp = fma(z, x, x);
	elseif (y <= 2.6e+74)
		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[(t - x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4.4e+15], t$95$1, If[LessEqual[y, 2.1e-206], N[(z * x + x), $MachinePrecision], If[LessEqual[y, 2.6e+74], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(t - x\right) \cdot y\\
\mathbf{if}\;y \leq -4.4 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 2.6 \cdot 10^{+74}:\\
\;\;\;\;\left(y - z\right) \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.4e15 or 2.6000000000000001e74 < y

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{y \cdot \left(t - x\right)} \]
    4. 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--.f6486.4

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

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

    if -4.4e15 < y < 2.1000000000000001e-206

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \left(y - z\right)\right)} \]
    4. 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--.f6469.2

        \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
    5. Applied rewrites69.2%

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

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

        \[\leadsto \left(1 + z\right) \cdot x \]
    8. Applied rewrites67.1%

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

      \[\leadsto z \cdot x \]
    10. Step-by-step derivation
      1. Applied rewrites27.1%

        \[\leadsto z \cdot x \]
      2. Taylor expanded in y around 0

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

          \[\leadsto \left(1 + z\right) \cdot x \]
        2. +-commutativeN/A

          \[\leadsto \left(z + 1\right) \cdot x \]
        3. distribute-lft1-inN/A

          \[\leadsto z \cdot x + x \]
        4. lift-fma.f6467.1

          \[\leadsto \mathsf{fma}\left(z, x, x\right) \]
      4. Applied rewrites67.1%

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

      if 2.1000000000000001e-206 < y < 2.6000000000000001e74

      1. Initial program 100.0%

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

        \[\leadsto \color{blue}{t \cdot \left(y - z\right)} \]
      4. 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--.f6459.9

          \[\leadsto \left(y - z\right) \cdot t \]
      5. Applied rewrites59.9%

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

    Alternative 3: 84.2% accurate, 0.6× speedup?

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

      1. Initial program 100.0%

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

        \[\leadsto \color{blue}{y \cdot \left(t - x\right)} \]
      4. 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--.f6486.0

          \[\leadsto \left(t - x\right) \cdot y \]
      5. Applied rewrites86.0%

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

      if -1.5500000000000001e31 < y < 6.6e5

      1. Initial program 100.0%

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(-z, t - \color{blue}{x}, x\right) \]
      5. Applied rewrites87.5%

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

      if 6.6e5 < y

      1. Initial program 99.9%

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

        \[\leadsto \color{blue}{x + y \cdot \left(t - x\right)} \]
      4. 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--.f6483.4

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

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

    Alternative 4: 84.8% accurate, 0.7× speedup?

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

      1. Initial program 99.9%

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

        \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(t - x\right)\right)} \]
      4. 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--.f6476.1

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

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

      if -4.1000000000000001e24 < z < 0.060999999999999999

      1. Initial program 100.0%

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

        \[\leadsto \color{blue}{x + y \cdot \left(t - x\right)} \]
      4. 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--.f6490.3

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, y, x\right)} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification83.6%

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

    Alternative 5: 68.3% accurate, 0.7× speedup?

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

      1. Initial program 100.0%

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

        \[\leadsto \color{blue}{t \cdot \left(y - z\right)} \]
      4. 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--.f6484.9

          \[\leadsto \left(y - z\right) \cdot t \]
      5. Applied rewrites84.9%

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

      if -1.3e110 < t < 4.2e52

      1. Initial program 99.9%

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

        \[\leadsto \color{blue}{x + y \cdot \left(t - x\right)} \]
      4. 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--.f6466.5

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, y, x\right)} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification74.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{+110} \lor \neg \left(t \leq 4.2 \cdot 10^{+52}\right):\\ \;\;\;\;\left(y - z\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t - x, y, x\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 6: 68.3% accurate, 0.7× speedup?

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

      1. Initial program 100.0%

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

        \[\leadsto \color{blue}{y \cdot \left(t - x\right)} \]
      4. 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--.f6482.2

          \[\leadsto \left(t - x\right) \cdot y \]
      5. Applied rewrites82.2%

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

      if -4.4e15 < y < 1.6999999999999999e-11

      1. Initial program 100.0%

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

        \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \left(y - z\right)\right)} \]
      4. 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--.f6460.5

          \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
      5. Applied rewrites60.5%

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

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

          \[\leadsto \left(1 + z\right) \cdot x \]
      8. Applied rewrites59.1%

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

        \[\leadsto z \cdot x \]
      10. Step-by-step derivation
        1. Applied rewrites28.1%

          \[\leadsto z \cdot x \]
        2. Taylor expanded in y around 0

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

            \[\leadsto \left(1 + z\right) \cdot x \]
          2. +-commutativeN/A

            \[\leadsto \left(z + 1\right) \cdot x \]
          3. distribute-lft1-inN/A

            \[\leadsto z \cdot x + x \]
          4. lift-fma.f6459.1

            \[\leadsto \mathsf{fma}\left(z, x, x\right) \]
        4. Applied rewrites59.1%

          \[\leadsto \mathsf{fma}\left(z, \color{blue}{x}, x\right) \]
      11. Recombined 2 regimes into one program.
      12. Final simplification70.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.4 \cdot 10^{+15} \lor \neg \left(y \leq 1.7 \cdot 10^{-11}\right):\\ \;\;\;\;\left(t - x\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z, x, x\right)\\ \end{array} \]
      13. Add Preprocessing

      Alternative 7: 50.3% accurate, 0.8× speedup?

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

        1. Initial program 100.0%

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

          \[\leadsto \color{blue}{y \cdot \left(t - x\right)} \]
        4. 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--.f6482.7

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

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

          \[\leadsto t \cdot y \]
        7. Step-by-step derivation
          1. Applied rewrites45.8%

            \[\leadsto t \cdot y \]

          if -2.1000000000000001e32 < y < 1.6999999999999999e-11

          1. Initial program 100.0%

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

            \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \left(y - z\right)\right)} \]
          4. 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--.f6460.4

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

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

            \[\leadsto \left(1 + z\right) \cdot x \]
          7. Step-by-step derivation
            1. lower-+.f6458.3

              \[\leadsto \left(1 + z\right) \cdot x \]
          8. Applied rewrites58.3%

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

            \[\leadsto z \cdot x \]
          10. Step-by-step derivation
            1. Applied rewrites27.7%

              \[\leadsto z \cdot x \]
            2. Taylor expanded in y around 0

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

                \[\leadsto \left(1 + z\right) \cdot x \]
              2. +-commutativeN/A

                \[\leadsto \left(z + 1\right) \cdot x \]
              3. distribute-lft1-inN/A

                \[\leadsto z \cdot x + x \]
              4. lift-fma.f6458.4

                \[\leadsto \mathsf{fma}\left(z, x, x\right) \]
            4. Applied rewrites58.4%

              \[\leadsto \mathsf{fma}\left(z, \color{blue}{x}, x\right) \]
          11. Recombined 2 regimes into one program.
          12. Final simplification52.4%

            \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{+32} \lor \neg \left(y \leq 1.7 \cdot 10^{-11}\right):\\ \;\;\;\;t \cdot y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z, x, x\right)\\ \end{array} \]
          13. Add Preprocessing

          Alternative 8: 51.2% accurate, 0.8× speedup?

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

            1. Initial program 100.0%

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

              \[\leadsto \color{blue}{y \cdot \left(t - x\right)} \]
            4. 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--.f6486.7

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

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

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

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

                \[\leadsto \left(-x\right) \cdot y \]
            8. Applied rewrites50.3%

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

            if -2.29999999999999997e50 < y < 1.6999999999999999e-11

            1. Initial program 100.0%

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

              \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \left(y - z\right)\right)} \]
            4. 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--.f6459.5

                \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
            5. Applied rewrites59.5%

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

              \[\leadsto \left(1 + z\right) \cdot x \]
            7. Step-by-step derivation
              1. lower-+.f6457.5

                \[\leadsto \left(1 + z\right) \cdot x \]
            8. Applied rewrites57.5%

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

              \[\leadsto z \cdot x \]
            10. Step-by-step derivation
              1. Applied rewrites27.7%

                \[\leadsto z \cdot x \]
              2. Taylor expanded in y around 0

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

                  \[\leadsto \left(1 + z\right) \cdot x \]
                2. +-commutativeN/A

                  \[\leadsto \left(z + 1\right) \cdot x \]
                3. distribute-lft1-inN/A

                  \[\leadsto z \cdot x + x \]
                4. lift-fma.f6457.5

                  \[\leadsto \mathsf{fma}\left(z, x, x\right) \]
              4. Applied rewrites57.5%

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

              if 1.6999999999999999e-11 < y

              1. Initial program 100.0%

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

                \[\leadsto \color{blue}{y \cdot \left(t - x\right)} \]
              4. 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--.f6479.7

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

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

                \[\leadsto t \cdot y \]
              7. Step-by-step derivation
                1. Applied rewrites47.7%

                  \[\leadsto t \cdot y \]
              8. Recombined 3 regimes into one program.
              9. Add Preprocessing

              Alternative 9: 37.8% accurate, 0.8× speedup?

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

                1. Initial program 99.9%

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

                  \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \left(y - z\right)\right)} \]
                4. 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--.f6452.9

                    \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                5. Applied rewrites52.9%

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

                  \[\leadsto z \cdot x \]
                7. Step-by-step derivation
                  1. Applied rewrites40.9%

                    \[\leadsto z \cdot x \]

                  if -9.0000000000000003e140 < z < 6.59999999999999976e-16

                  1. Initial program 100.0%

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

                    \[\leadsto \color{blue}{y \cdot \left(t - x\right)} \]
                  4. 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--.f6459.2

                      \[\leadsto \left(t - x\right) \cdot y \]
                  5. Applied rewrites59.2%

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

                    \[\leadsto t \cdot y \]
                  7. Step-by-step derivation
                    1. Applied rewrites38.8%

                      \[\leadsto t \cdot y \]
                  8. Recombined 2 regimes into one program.
                  9. Final simplification39.6%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+140} \lor \neg \left(z \leq 6.6 \cdot 10^{-16}\right):\\ \;\;\;\;z \cdot x\\ \mathbf{else}:\\ \;\;\;\;t \cdot y\\ \end{array} \]
                  10. Add Preprocessing

                  Alternative 10: 38.4% accurate, 0.8× speedup?

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

                    1. Initial program 100.0%

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

                      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \left(y - z\right)\right)} \]
                    4. 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--.f6454.2

                        \[\leadsto \left(1 - \left(y - z\right)\right) \cdot x \]
                    5. Applied rewrites54.2%

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

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

                        \[\leadsto z \cdot x \]

                      if -1 < z < 6.59999999999999976e-16

                      1. Initial program 100.0%

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

                        \[\leadsto \color{blue}{x + y \cdot \left(t - x\right)} \]
                      4. 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--.f6491.5

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

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

                        \[\leadsto x \]
                      7. Step-by-step derivation
                        1. Applied rewrites33.0%

                          \[\leadsto x \]
                      8. Recombined 2 regimes into one program.
                      9. Final simplification35.9%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 6.6 \cdot 10^{-16}\right):\\ \;\;\;\;z \cdot x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                      10. Add Preprocessing

                      Alternative 11: 18.4% accurate, 15.0× speedup?

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

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

                        \[\leadsto \color{blue}{x + y \cdot \left(t - x\right)} \]
                      4. 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--.f6461.9

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

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

                        \[\leadsto x \]
                      7. Step-by-step derivation
                        1. Applied rewrites18.2%

                          \[\leadsto x \]
                        2. Add Preprocessing

                        Developer Target 1: 96.5% accurate, 0.6× speedup?

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

                        Reproduce

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