Data.Metrics.Snapshot:quantile from metrics-0.3.0.2

Percentage Accurate: 100.0% → 100.0%
Time: 3.4s
Alternatives: 12
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 12 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: 84.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -19000000 \lor \neg \left(z \leq 1.46 \cdot 10^{-6}\right):\\ \;\;\;\;\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 (or (<= z -19000000.0) (not (<= z 1.46e-6)))
   (fma (- z) (- t x) x)
   (fma (- t x) y x)))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -19000000.0) || !(z <= 1.46e-6)) {
		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 ((z <= -19000000.0) || !(z <= 1.46e-6))
		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[Or[LessEqual[z, -19000000.0], N[Not[LessEqual[z, 1.46e-6]], $MachinePrecision]], N[((-z) * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * y + x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -19000000 \lor \neg \left(z \leq 1.46 \cdot 10^{-6}\right):\\
\;\;\;\;\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 2 regimes
  2. if z < -1.9e7 or 1.46e-6 < z

    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--.f6483.0

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

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

    if -1.9e7 < z < 1.46e-6

    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--.f6492.2

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

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

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

Alternative 3: 36.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y - z \leq -5000000000:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;y - z \leq 0.4:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= (- y z) -5000000000.0) (* z x) (if (<= (- y z) 0.4) x (* y t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((y - z) <= -5000000000.0) {
		tmp = z * x;
	} else if ((y - z) <= 0.4) {
		tmp = x;
	} else {
		tmp = y * t;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((y - z) <= (-5000000000.0d0)) then
        tmp = z * x
    else if ((y - z) <= 0.4d0) then
        tmp = x
    else
        tmp = y * t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((y - z) <= -5000000000.0) {
		tmp = z * x;
	} else if ((y - z) <= 0.4) {
		tmp = x;
	} else {
		tmp = y * t;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (y - z) <= -5000000000.0:
		tmp = z * x
	elif (y - z) <= 0.4:
		tmp = x
	else:
		tmp = y * t
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (Float64(y - z) <= -5000000000.0)
		tmp = Float64(z * x);
	elseif (Float64(y - z) <= 0.4)
		tmp = x;
	else
		tmp = Float64(y * t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((y - z) <= -5000000000.0)
		tmp = z * x;
	elseif ((y - z) <= 0.4)
		tmp = x;
	else
		tmp = y * t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[N[(y - z), $MachinePrecision], -5000000000.0], N[(z * x), $MachinePrecision], If[LessEqual[N[(y - z), $MachinePrecision], 0.4], x, N[(y * t), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y - z \leq -5000000000:\\
\;\;\;\;z \cdot x\\

\mathbf{elif}\;y - z \leq 0.4:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 y z) < -5e9

    1. Initial program 100.0%

      \[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--.f6463.4

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

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

      \[\leadsto x \cdot \color{blue}{z} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto z \cdot x \]
      2. lower-*.f6430.3

        \[\leadsto z \cdot x \]
    8. Applied rewrites30.3%

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

    if -5e9 < (-.f64 y z) < 0.40000000000000002

    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--.f6485.4

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

      \[\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 rewrites65.5%

        \[\leadsto x \]

      if 0.40000000000000002 < (-.f64 y 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 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--.f6461.5

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

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

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

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

      Alternative 4: 83.9% accurate, 0.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -112000000 \lor \neg \left(z \leq 3.8\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 -112000000.0) (not (<= z 3.8)))
         (* (- z) (- t x))
         (fma (- t x) y x)))
      double code(double x, double y, double z, double t) {
      	double tmp;
      	if ((z <= -112000000.0) || !(z <= 3.8)) {
      		tmp = -z * (t - x);
      	} else {
      		tmp = fma((t - x), y, x);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t)
      	tmp = 0.0
      	if ((z <= -112000000.0) || !(z <= 3.8))
      		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, -112000000.0], N[Not[LessEqual[z, 3.8]], $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 -112000000 \lor \neg \left(z \leq 3.8\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 < -1.12e8 or 3.7999999999999998 < z

        1. Initial program 100.0%

          \[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--.f6482.3

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

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

        if -1.12e8 < z < 3.7999999999999998

        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.7

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -112000000 \lor \neg \left(z \leq 3.8\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: 71.9% accurate, 0.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -70000 \lor \neg \left(z \leq 2.35\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 (<= z -70000.0) (not (<= z 2.35))) (* (- y z) t) (fma (- t x) y x)))
      double code(double x, double y, double z, double t) {
      	double tmp;
      	if ((z <= -70000.0) || !(z <= 2.35)) {
      		tmp = (y - z) * t;
      	} else {
      		tmp = fma((t - x), y, x);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t)
      	tmp = 0.0
      	if ((z <= -70000.0) || !(z <= 2.35))
      		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[z, -70000.0], N[Not[LessEqual[z, 2.35]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * y + x), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;z \leq -70000 \lor \neg \left(z \leq 2.35\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 z < -7e4 or 2.35000000000000009 < 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 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--.f6461.6

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

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

        if -7e4 < z < 2.35000000000000009

        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.7

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

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

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

      Alternative 6: 62.9% accurate, 0.7× speedup?

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

        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--.f6426.2

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

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

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

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

            \[\leadsto \left(-1 \cdot x\right) \cdot \left(y - z\right) + x \]
          3. mul-1-negN/A

            \[\leadsto \left(\mathsf{neg}\left(x\right)\right) \cdot \left(y - z\right) + x \]
          4. lower-fma.f64N/A

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

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

            \[\leadsto \mathsf{fma}\left(-x, y - \color{blue}{z}, x\right) \]
        8. Applied rewrites90.6%

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

          \[\leadsto x + \color{blue}{x \cdot z} \]
        10. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot z + x \]
          2. *-commutativeN/A

            \[\leadsto z \cdot x + x \]
          3. lower-fma.f6471.7

            \[\leadsto \mathsf{fma}\left(z, x, x\right) \]
        11. Applied rewrites71.7%

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

        if -5.5e12 < x < 4.49999999999999982e49

        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--.f6474.9

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

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

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

      Alternative 7: 68.1% accurate, 0.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -46000000 \lor \neg \left(y \leq 245000000\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 -46000000.0) (not (<= y 245000000.0)))
         (* (- t x) y)
         (fma z x x)))
      double code(double x, double y, double z, double t) {
      	double tmp;
      	if ((y <= -46000000.0) || !(y <= 245000000.0)) {
      		tmp = (t - x) * y;
      	} else {
      		tmp = fma(z, x, x);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t)
      	tmp = 0.0
      	if ((y <= -46000000.0) || !(y <= 245000000.0))
      		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, -46000000.0], N[Not[LessEqual[y, 245000000.0]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision], N[(z * x + x), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq -46000000 \lor \neg \left(y \leq 245000000\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.6e7 or 2.45e8 < 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--.f6475.8

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

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

        if -4.6e7 < y < 2.45e8

        1. Initial program 99.9%

          \[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--.f6410.7

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

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

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

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

            \[\leadsto \left(-1 \cdot x\right) \cdot \left(y - z\right) + x \]
          3. mul-1-negN/A

            \[\leadsto \left(\mathsf{neg}\left(x\right)\right) \cdot \left(y - z\right) + x \]
          4. lower-fma.f64N/A

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

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

            \[\leadsto \mathsf{fma}\left(-x, y - \color{blue}{z}, x\right) \]
        8. Applied rewrites59.2%

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

          \[\leadsto x + \color{blue}{x \cdot z} \]
        10. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot z + x \]
          2. *-commutativeN/A

            \[\leadsto z \cdot x + x \]
          3. lower-fma.f6456.7

            \[\leadsto \mathsf{fma}\left(z, x, x\right) \]
        11. Applied rewrites56.7%

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

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

      Alternative 8: 53.9% accurate, 0.7× speedup?

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

        1. Initial program 100.0%

          \[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--.f6482.3

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

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

          \[\leadsto \left(-z\right) \cdot t \]
        7. Step-by-step derivation
          1. Applied rewrites49.8%

            \[\leadsto \left(-z\right) \cdot t \]

          if -1.5e7 < z < 3.7999999999999998

          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.7

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

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

            \[\leadsto \mathsf{fma}\left(t, y, x\right) \]
          7. Step-by-step derivation
            1. Applied rewrites73.4%

              \[\leadsto \mathsf{fma}\left(t, y, x\right) \]
          8. Recombined 2 regimes into one program.
          9. Final simplification62.0%

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

          Alternative 9: 50.0% accurate, 0.8× speedup?

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

            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--.f6463.8

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

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

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

                \[\leadsto y \cdot t \]

              if -1.69999999999999996e57 < y < 6e8

              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--.f6413.6

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

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

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

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

                  \[\leadsto \left(-1 \cdot x\right) \cdot \left(y - z\right) + x \]
                3. mul-1-negN/A

                  \[\leadsto \left(\mathsf{neg}\left(x\right)\right) \cdot \left(y - z\right) + x \]
                4. lower-fma.f64N/A

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

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

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

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

                \[\leadsto x + \color{blue}{x \cdot z} \]
              10. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto x \cdot z + x \]
                2. *-commutativeN/A

                  \[\leadsto z \cdot x + x \]
                3. lower-fma.f6455.3

                  \[\leadsto \mathsf{fma}\left(z, x, x\right) \]
              11. Applied rewrites55.3%

                \[\leadsto \mathsf{fma}\left(z, \color{blue}{x}, x\right) \]
            8. Recombined 2 regimes into one program.
            9. Final simplification54.5%

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

            Alternative 10: 53.6% accurate, 0.8× speedup?

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

              1. Initial program 100.0%

                \[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--.f6483.9

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

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

                \[\leadsto x \cdot \color{blue}{z} \]
              7. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto z \cdot x \]
                2. lower-*.f6444.3

                  \[\leadsto z \cdot x \]
              8. Applied rewrites44.3%

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

              if -1.05e55 < z < 0.00350000000000000007

              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--.f6486.4

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

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

                \[\leadsto \mathsf{fma}\left(t, y, x\right) \]
              7. Step-by-step derivation
                1. Applied rewrites69.7%

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

                if 0.00350000000000000007 < z

                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--.f6415.7

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

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

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

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

                    \[\leadsto \left(-1 \cdot x\right) \cdot \left(y - z\right) + x \]
                  3. mul-1-negN/A

                    \[\leadsto \left(\mathsf{neg}\left(x\right)\right) \cdot \left(y - z\right) + x \]
                  4. lower-fma.f64N/A

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

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

                    \[\leadsto \mathsf{fma}\left(-x, y - \color{blue}{z}, x\right) \]
                8. Applied rewrites46.1%

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

                  \[\leadsto x + \color{blue}{x \cdot z} \]
                10. Step-by-step derivation
                  1. +-commutativeN/A

                    \[\leadsto x \cdot z + x \]
                  2. *-commutativeN/A

                    \[\leadsto z \cdot x + x \]
                  3. lower-fma.f6440.8

                    \[\leadsto \mathsf{fma}\left(z, x, x\right) \]
                11. Applied rewrites40.8%

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{x}, x\right) \]
              8. Recombined 3 regimes into one program.
              9. Add Preprocessing

              Alternative 11: 37.4% accurate, 0.8× speedup?

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

                1. Initial program 100.0%

                  \[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--.f6480.0

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

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

                  \[\leadsto x \cdot \color{blue}{z} \]
                7. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto z \cdot x \]
                  2. lower-*.f6437.2

                    \[\leadsto z \cdot x \]
                8. Applied rewrites37.2%

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

                if -4.6000000000000001e-4 < z < 1

                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--.f6492.2

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

                  \[\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 rewrites42.4%

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

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

                Alternative 12: 18.2% 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--.f6457.6

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

                  \[\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 rewrites22.6%

                    \[\leadsto x \]
                  2. Add Preprocessing

                  Developer Target 1: 96.0% 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 2025037 
                  (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))))