Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3

Percentage Accurate: 84.5% → 96.8%
Time: 3.5s
Alternatives: 10
Speedup: 1.0×

Specification

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

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

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

\\
\frac{x \cdot \left(y - z\right)}{t - z}
\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 10 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: 84.5% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 96.8% accurate, 1.0× speedup?

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

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

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

\\
x \cdot \frac{y - z}{t - z}
\end{array}
Derivation
  1. Initial program 85.4%

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

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

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

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

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

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

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

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

      \[\leadsto x \cdot \frac{\color{blue}{y - z}}{t - z} \]
    9. lift--.f6495.3

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

    \[\leadsto \color{blue}{x \cdot \frac{y - z}{t - z}} \]
  5. Add Preprocessing

Alternative 2: 47.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} \leq 0:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 0.0

    1. Initial program 86.7%

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{t - z}} \]
    4. Step-by-step derivation
      1. associate-/l*N/A

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

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

        \[\leadsto x \cdot \frac{y}{\color{blue}{t - z}} \]
      4. lift--.f6452.4

        \[\leadsto x \cdot \frac{y}{t - \color{blue}{z}} \]
    5. Applied rewrites52.4%

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

    if 0.0 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z))

    1. Initial program 83.6%

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

      \[\leadsto \color{blue}{x} \]
    4. Step-by-step derivation
      1. Applied rewrites41.3%

        \[\leadsto \color{blue}{x} \]
    5. Recombined 2 regimes into one program.
    6. Add Preprocessing

    Alternative 3: 67.1% accurate, 0.6× speedup?

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

      1. Initial program 77.7%

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

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

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

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

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

          \[\leadsto x + \frac{-1 \cdot \left(x \cdot y\right) - -1 \cdot \left(t \cdot x\right)}{\color{blue}{z}} \]
        5. distribute-lft-out--N/A

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

          \[\leadsto x + -1 \cdot \color{blue}{\frac{x \cdot y - t \cdot x}{z}} \]
        7. +-commutativeN/A

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

          \[\leadsto \frac{x \cdot y - t \cdot x}{z} \cdot -1 + x \]
        9. lower-fma.f64N/A

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

          \[\leadsto \mathsf{fma}\left(\frac{x \cdot y - t \cdot x}{z}, -1, x\right) \]
        11. fp-cancel-sub-sign-invN/A

          \[\leadsto \mathsf{fma}\left(\frac{x \cdot y + \left(\mathsf{neg}\left(t\right)\right) \cdot x}{z}, -1, x\right) \]
        12. *-commutativeN/A

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

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

          \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(y, x, \left(\mathsf{neg}\left(t\right)\right) \cdot x\right)}{z}, -1, x\right) \]
        15. lower-neg.f6475.1

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

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

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

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

          \[\leadsto t \cdot \frac{x}{z} + x \]
        3. lower-fma.f64N/A

          \[\leadsto \mathsf{fma}\left(t, \frac{x}{\color{blue}{z}}, x\right) \]
        4. lower-/.f6464.1

          \[\leadsto \mathsf{fma}\left(t, \frac{x}{z}, x\right) \]
      8. Applied rewrites64.1%

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

      if -5.49999999999999967e-28 < z < 1.38e7

      1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{\mathsf{neg}\left(x\right)}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
        9. lower-neg.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
        10. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
        11. lift--.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
        12. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
        13. lift--.f6490.3

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

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

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

          \[\leadsto \frac{x}{t - z} \cdot y \]
        2. lift--.f6480.2

          \[\leadsto \frac{x}{t - z} \cdot y \]
      8. Applied rewrites80.2%

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

      if 1.38e7 < z < 3.5000000000000002e108

      1. Initial program 88.7%

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

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

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

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

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

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

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

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

          \[\leadsto x \cdot \frac{\color{blue}{y - z}}{t - z} \]
        9. lift--.f6499.8

          \[\leadsto x \cdot \frac{y - z}{\color{blue}{t - z}} \]
      4. Applied rewrites99.8%

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

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

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

      Alternative 4: 75.3% accurate, 0.7× speedup?

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

        1. Initial program 80.4%

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

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

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

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

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

            \[\leadsto x + \frac{-1 \cdot \left(x \cdot y\right) - -1 \cdot \left(t \cdot x\right)}{\color{blue}{z}} \]
          5. distribute-lft-out--N/A

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

            \[\leadsto x + -1 \cdot \color{blue}{\frac{x \cdot y - t \cdot x}{z}} \]
          7. +-commutativeN/A

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

            \[\leadsto \frac{x \cdot y - t \cdot x}{z} \cdot -1 + x \]
          9. lower-fma.f64N/A

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

            \[\leadsto \mathsf{fma}\left(\frac{x \cdot y - t \cdot x}{z}, -1, x\right) \]
          11. fp-cancel-sub-sign-invN/A

            \[\leadsto \mathsf{fma}\left(\frac{x \cdot y + \left(\mathsf{neg}\left(t\right)\right) \cdot x}{z}, -1, x\right) \]
          12. *-commutativeN/A

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

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

            \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(y, x, \left(\mathsf{neg}\left(t\right)\right) \cdot x\right)}{z}, -1, x\right) \]
          15. lower-neg.f6470.4

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

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

          \[\leadsto \mathsf{fma}\left(\frac{x \cdot y}{z}, -1, x\right) \]
        7. Step-by-step derivation
          1. associate-*r/N/A

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

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

            \[\leadsto \mathsf{fma}\left(\frac{y}{z} \cdot x, -1, x\right) \]
          4. lift-/.f6476.0

            \[\leadsto \mathsf{fma}\left(\frac{y}{z} \cdot x, -1, x\right) \]
        8. Applied rewrites76.0%

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

        if -2.70000000000000023e-29 < z < 1.7499999999999999e-33

        1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\frac{\mathsf{neg}\left(x\right)}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
          9. lower-neg.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
          10. lower-/.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
          11. lift--.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
          12. lower-/.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
          13. lift--.f6489.9

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

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

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

            \[\leadsto \frac{x}{t - z} \cdot y \]
          2. lift--.f6481.8

            \[\leadsto \frac{x}{t - z} \cdot y \]
        8. Applied rewrites81.8%

          \[\leadsto \frac{x}{t - z} \cdot y \]
      3. Recombined 2 regimes into one program.
      4. Final simplification78.5%

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

      Alternative 5: 75.3% accurate, 0.7× speedup?

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

        1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{x \cdot \frac{y - z}{-z}} \]
          6. lower-/.f64N/A

            \[\leadsto x \cdot \color{blue}{\frac{y - z}{-z}} \]
          7. lift--.f6475.9

            \[\leadsto x \cdot \frac{\color{blue}{y - z}}{-z} \]
        7. Applied rewrites75.9%

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

        if -2.70000000000000023e-29 < z < 1.7499999999999999e-33

        1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\frac{\mathsf{neg}\left(x\right)}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
          9. lower-neg.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
          10. lower-/.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
          11. lift--.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
          12. lower-/.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
          13. lift--.f6489.9

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

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

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

            \[\leadsto \frac{x}{t - z} \cdot y \]
          2. lift--.f6481.8

            \[\leadsto \frac{x}{t - z} \cdot y \]
        8. Applied rewrites81.8%

          \[\leadsto \frac{x}{t - z} \cdot y \]
      3. Recombined 2 regimes into one program.
      4. Final simplification78.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.7 \cdot 10^{-29} \lor \neg \left(z \leq 1.75 \cdot 10^{-33}\right):\\ \;\;\;\;x \cdot \frac{y - z}{-z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t - z} \cdot y\\ \end{array} \]
      5. Add Preprocessing

      Alternative 6: 73.9% accurate, 0.7× speedup?

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

        1. Initial program 83.5%

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

          \[\leadsto \color{blue}{\frac{x \cdot y}{t - z}} \]
        4. Step-by-step derivation
          1. associate-/l*N/A

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

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

            \[\leadsto x \cdot \frac{y}{\color{blue}{t - z}} \]
          4. lift--.f6474.5

            \[\leadsto x \cdot \frac{y}{t - \color{blue}{z}} \]
        5. Applied rewrites74.5%

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

        if -2.7e29 < y < 2.1e15

        1. Initial program 83.4%

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

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

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

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

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

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

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

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

            \[\leadsto x \cdot \frac{\color{blue}{y - z}}{t - z} \]
          9. lift--.f6497.1

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

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

          \[\leadsto x \cdot \frac{\color{blue}{-1 \cdot z}}{t - z} \]
        6. Step-by-step derivation
          1. mul-1-negN/A

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

            \[\leadsto x \cdot \frac{-z}{t - z} \]
        7. Applied rewrites80.6%

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

        if 2.1e15 < y

        1. Initial program 91.9%

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

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

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

        Alternative 7: 66.5% accurate, 0.7× speedup?

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

          1. Initial program 79.4%

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

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

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

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

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

              \[\leadsto x + \frac{-1 \cdot \left(x \cdot y\right) - -1 \cdot \left(t \cdot x\right)}{\color{blue}{z}} \]
            5. distribute-lft-out--N/A

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

              \[\leadsto x + -1 \cdot \color{blue}{\frac{x \cdot y - t \cdot x}{z}} \]
            7. +-commutativeN/A

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

              \[\leadsto \frac{x \cdot y - t \cdot x}{z} \cdot -1 + x \]
            9. lower-fma.f64N/A

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

              \[\leadsto \mathsf{fma}\left(\frac{x \cdot y - t \cdot x}{z}, -1, x\right) \]
            11. fp-cancel-sub-sign-invN/A

              \[\leadsto \mathsf{fma}\left(\frac{x \cdot y + \left(\mathsf{neg}\left(t\right)\right) \cdot x}{z}, -1, x\right) \]
            12. *-commutativeN/A

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

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

              \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(y, x, \left(\mathsf{neg}\left(t\right)\right) \cdot x\right)}{z}, -1, x\right) \]
            15. lower-neg.f6470.3

              \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(y, x, \left(-t\right) \cdot x\right)}{z}, -1, x\right) \]
          5. Applied rewrites70.3%

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

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

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

              \[\leadsto t \cdot \frac{x}{z} + x \]
            3. lower-fma.f64N/A

              \[\leadsto \mathsf{fma}\left(t, \frac{x}{\color{blue}{z}}, x\right) \]
            4. lower-/.f6459.1

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

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

          if -5.49999999999999967e-28 < z < 1.4e12

          1. Initial program 92.5%

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\frac{\mathsf{neg}\left(x\right)}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
            9. lower-neg.f64N/A

              \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
            10. lower-/.f64N/A

              \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
            11. lift--.f64N/A

              \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
            12. lower-/.f64N/A

              \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
            13. lift--.f6489.6

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

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

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

              \[\leadsto \frac{x}{t - z} \cdot y \]
            2. lift--.f6479.0

              \[\leadsto \frac{x}{t - z} \cdot y \]
          8. Applied rewrites79.0%

            \[\leadsto \frac{x}{t - z} \cdot y \]
        3. Recombined 2 regimes into one program.
        4. Final simplification68.2%

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

        Alternative 8: 59.5% accurate, 0.8× speedup?

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

          1. Initial program 81.0%

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

            \[\leadsto \color{blue}{x} \]
          4. Step-by-step derivation
            1. Applied rewrites56.0%

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

            if -3.69999999999999988e-34 < z < 4.8e-51

            1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{\mathsf{neg}\left(x\right)}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
              9. lower-neg.f64N/A

                \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
              10. lower-/.f64N/A

                \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
              11. lift--.f64N/A

                \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
              12. lower-/.f64N/A

                \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
              13. lift--.f6489.4

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

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

              \[\leadsto \frac{x}{t} \cdot y \]
            7. Step-by-step derivation
              1. lower-/.f6469.2

                \[\leadsto \frac{x}{t} \cdot y \]
            8. Applied rewrites69.2%

              \[\leadsto \frac{x}{t} \cdot y \]
          5. Recombined 2 regimes into one program.
          6. Final simplification61.4%

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

          Alternative 9: 59.4% accurate, 0.8× speedup?

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

            1. Initial program 79.3%

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

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

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

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

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

                \[\leadsto x + \frac{-1 \cdot \left(x \cdot y\right) - -1 \cdot \left(t \cdot x\right)}{\color{blue}{z}} \]
              5. distribute-lft-out--N/A

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

                \[\leadsto x + -1 \cdot \color{blue}{\frac{x \cdot y - t \cdot x}{z}} \]
              7. +-commutativeN/A

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

                \[\leadsto \frac{x \cdot y - t \cdot x}{z} \cdot -1 + x \]
              9. lower-fma.f64N/A

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

                \[\leadsto \mathsf{fma}\left(\frac{x \cdot y - t \cdot x}{z}, -1, x\right) \]
              11. fp-cancel-sub-sign-invN/A

                \[\leadsto \mathsf{fma}\left(\frac{x \cdot y + \left(\mathsf{neg}\left(t\right)\right) \cdot x}{z}, -1, x\right) \]
              12. *-commutativeN/A

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

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

                \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(y, x, \left(\mathsf{neg}\left(t\right)\right) \cdot x\right)}{z}, -1, x\right) \]
              15. lower-neg.f6473.6

                \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(y, x, \left(-t\right) \cdot x\right)}{z}, -1, x\right) \]
            5. Applied rewrites73.6%

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

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

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

                \[\leadsto t \cdot \frac{x}{z} + x \]
              3. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(t, \frac{x}{\color{blue}{z}}, x\right) \]
              4. lower-/.f6460.1

                \[\leadsto \mathsf{fma}\left(t, \frac{x}{z}, x\right) \]
            8. Applied rewrites60.1%

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

            if -3.69999999999999988e-34 < z < 4.8e-51

            1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{\mathsf{neg}\left(x\right)}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
              9. lower-neg.f64N/A

                \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
              10. lower-/.f64N/A

                \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
              11. lift--.f64N/A

                \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
              12. lower-/.f64N/A

                \[\leadsto \mathsf{fma}\left(\frac{-x}{y}, \frac{z}{t - z}, \frac{x}{t - z}\right) \cdot y \]
              13. lift--.f6489.4

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

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

              \[\leadsto \frac{x}{t} \cdot y \]
            7. Step-by-step derivation
              1. lower-/.f6469.2

                \[\leadsto \frac{x}{t} \cdot y \]
            8. Applied rewrites69.2%

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

            if 4.8e-51 < z

            1. Initial program 83.2%

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

              \[\leadsto \color{blue}{x} \]
            4. Step-by-step derivation
              1. Applied rewrites52.5%

                \[\leadsto \color{blue}{x} \]
            5. Recombined 3 regimes into one program.
            6. Add Preprocessing

            Alternative 10: 34.8% accurate, 23.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 85.4%

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

              \[\leadsto \color{blue}{x} \]
            4. Step-by-step derivation
              1. Applied rewrites36.7%

                \[\leadsto \color{blue}{x} \]
              2. Add Preprocessing

              Developer Target 1: 96.8% accurate, 0.8× speedup?

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

              Reproduce

              ?
              herbie shell --seed 2025073 
              (FPCore (x y z t)
                :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
                :precision binary64
              
                :alt
                (! :herbie-platform default (/ x (/ (- t z) (- y z))))
              
                (/ (* x (- y z)) (- t z)))