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

Percentage Accurate: 84.3% → 96.5%
Time: 8.7s
Alternatives: 15
Speedup: 0.8×

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 15 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 84.3% 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.5% accurate, 0.8× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 6 \cdot 10^{+20}:\\ \;\;\;\;\frac{x\_m \cdot \left(y - z\right)}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m}{t - z} \cdot \left(y - z\right)\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= x_m 6e+20) (/ (* x_m (- y z)) (- t z)) (* (/ x_m (- t z)) (- y z)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (x_m <= 6e+20) {
		tmp = (x_m * (y - z)) / (t - z);
	} else {
		tmp = (x_m / (t - z)) * (y - z);
	}
	return x_s * tmp;
}
x\_m =     private
x\_s =     private
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_s, x_m, y, z, t)
use fmin_fmax_functions
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (x_m <= 6d+20) then
        tmp = (x_m * (y - z)) / (t - z)
    else
        tmp = (x_m / (t - z)) * (y - z)
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (x_m <= 6e+20) {
		tmp = (x_m * (y - z)) / (t - z);
	} else {
		tmp = (x_m / (t - z)) * (y - z);
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	tmp = 0
	if x_m <= 6e+20:
		tmp = (x_m * (y - z)) / (t - z)
	else:
		tmp = (x_m / (t - z)) * (y - z)
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	tmp = 0.0
	if (x_m <= 6e+20)
		tmp = Float64(Float64(x_m * Float64(y - z)) / Float64(t - z));
	else
		tmp = Float64(Float64(x_m / Float64(t - z)) * Float64(y - z));
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	tmp = 0.0;
	if (x_m <= 6e+20)
		tmp = (x_m * (y - z)) / (t - z);
	else
		tmp = (x_m / (t - z)) * (y - z);
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[x$95$m, 6e+20], N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \leq 6 \cdot 10^{+20}:\\
\;\;\;\;\frac{x\_m \cdot \left(y - z\right)}{t - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 6e20

    1. Initial program 90.7%

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

    if 6e20 < x

    1. Initial program 58.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \left(y - z\right)} \]
      7. lower-/.f6498.3

        \[\leadsto \color{blue}{\frac{x}{t - z}} \cdot \left(y - z\right) \]
    4. Applied rewrites98.3%

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

Alternative 2: 89.5% accurate, 0.2× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := \frac{x\_m}{t - z} \cdot \left(y - z\right)\\ t_2 := \frac{x\_m \cdot \left(y - z\right)}{t - z}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq -1 \cdot 10^{-59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-301}:\\ \;\;\;\;\frac{\left(y - z\right) \cdot x\_m}{t}\\ \mathbf{elif}\;t\_2 \leq 10^{-106}:\\ \;\;\;\;\frac{z}{t - z} \cdot \left(-x\_m\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (let* ((t_1 (* (/ x_m (- t z)) (- y z))) (t_2 (/ (* x_m (- y z)) (- t z))))
   (*
    x_s
    (if (<= t_2 -1e-59)
      t_1
      (if (<= t_2 -5e-301)
        (/ (* (- y z) x_m) t)
        (if (<= t_2 1e-106) (* (/ z (- t z)) (- x_m)) t_1))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = (x_m / (t - z)) * (y - z);
	double t_2 = (x_m * (y - z)) / (t - z);
	double tmp;
	if (t_2 <= -1e-59) {
		tmp = t_1;
	} else if (t_2 <= -5e-301) {
		tmp = ((y - z) * x_m) / t;
	} else if (t_2 <= 1e-106) {
		tmp = (z / (t - z)) * -x_m;
	} else {
		tmp = t_1;
	}
	return x_s * tmp;
}
x\_m =     private
x\_s =     private
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_s, x_m, y, z, t)
use fmin_fmax_functions
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (x_m / (t - z)) * (y - z)
    t_2 = (x_m * (y - z)) / (t - z)
    if (t_2 <= (-1d-59)) then
        tmp = t_1
    else if (t_2 <= (-5d-301)) then
        tmp = ((y - z) * x_m) / t
    else if (t_2 <= 1d-106) then
        tmp = (z / (t - z)) * -x_m
    else
        tmp = t_1
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = (x_m / (t - z)) * (y - z);
	double t_2 = (x_m * (y - z)) / (t - z);
	double tmp;
	if (t_2 <= -1e-59) {
		tmp = t_1;
	} else if (t_2 <= -5e-301) {
		tmp = ((y - z) * x_m) / t;
	} else if (t_2 <= 1e-106) {
		tmp = (z / (t - z)) * -x_m;
	} else {
		tmp = t_1;
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	t_1 = (x_m / (t - z)) * (y - z)
	t_2 = (x_m * (y - z)) / (t - z)
	tmp = 0
	if t_2 <= -1e-59:
		tmp = t_1
	elif t_2 <= -5e-301:
		tmp = ((y - z) * x_m) / t
	elif t_2 <= 1e-106:
		tmp = (z / (t - z)) * -x_m
	else:
		tmp = t_1
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	t_1 = Float64(Float64(x_m / Float64(t - z)) * Float64(y - z))
	t_2 = Float64(Float64(x_m * Float64(y - z)) / Float64(t - z))
	tmp = 0.0
	if (t_2 <= -1e-59)
		tmp = t_1;
	elseif (t_2 <= -5e-301)
		tmp = Float64(Float64(Float64(y - z) * x_m) / t);
	elseif (t_2 <= 1e-106)
		tmp = Float64(Float64(z / Float64(t - z)) * Float64(-x_m));
	else
		tmp = t_1;
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	t_1 = (x_m / (t - z)) * (y - z);
	t_2 = (x_m * (y - z)) / (t - z);
	tmp = 0.0;
	if (t_2 <= -1e-59)
		tmp = t_1;
	elseif (t_2 <= -5e-301)
		tmp = ((y - z) * x_m) / t;
	elseif (t_2 <= 1e-106)
		tmp = (z / (t - z)) * -x_m;
	else
		tmp = t_1;
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$2, -1e-59], t$95$1, If[LessEqual[t$95$2, -5e-301], N[(N[(N[(y - z), $MachinePrecision] * x$95$m), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t$95$2, 1e-106], N[(N[(z / N[(t - z), $MachinePrecision]), $MachinePrecision] * (-x$95$m)), $MachinePrecision], t$95$1]]]), $MachinePrecision]]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
\begin{array}{l}
t_1 := \frac{x\_m}{t - z} \cdot \left(y - z\right)\\
t_2 := \frac{x\_m \cdot \left(y - z\right)}{t - z}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-59}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-301}:\\
\;\;\;\;\frac{\left(y - z\right) \cdot x\_m}{t}\\

\mathbf{elif}\;t\_2 \leq 10^{-106}:\\
\;\;\;\;\frac{z}{t - z} \cdot \left(-x\_m\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -1e-59 or 9.99999999999999941e-107 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z))

    1. Initial program 71.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{t - z} \cdot \left(y - z\right)} \]
      7. lower-/.f6497.9

        \[\leadsto \color{blue}{\frac{x}{t - z}} \cdot \left(y - z\right) \]
    4. Applied rewrites97.9%

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

    if -1e-59 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -5.00000000000000013e-301

    1. Initial program 99.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - z}{t}} \cdot x \]
      5. lower--.f6432.9

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

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

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

      if -5.00000000000000013e-301 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < 9.99999999999999941e-107

      1. Initial program 98.1%

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

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

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

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

          \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{z}{t - z} \cdot x}\right) \]
        4. distribute-rgt-neg-inN/A

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

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

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

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

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

          \[\leadsto \frac{z}{t - z} \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \]
        10. lower-neg.f6474.6

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

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

    Alternative 3: 70.9% accurate, 0.2× speedup?

    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := \frac{x\_m \cdot \left(y - z\right)}{t - z}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -2000:\\ \;\;\;\;\frac{x\_m}{t - z} \cdot y\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{y - z}{t} \cdot x\_m\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-85}:\\ \;\;\;\;1 \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;\left(z - y\right) \cdot \frac{x\_m}{z}\\ \end{array} \end{array} \end{array} \]
    x\_m = (fabs.f64 x)
    x\_s = (copysign.f64 #s(literal 1 binary64) x)
    (FPCore (x_s x_m y z t)
     :precision binary64
     (let* ((t_1 (/ (* x_m (- y z)) (- t z))))
       (*
        x_s
        (if (<= t_1 -2000.0)
          (* (/ x_m (- t z)) y)
          (if (<= t_1 0.0)
            (* (/ (- y z) t) x_m)
            (if (<= t_1 5e-85) (* 1.0 x_m) (* (- z y) (/ x_m z))))))))
    x\_m = fabs(x);
    x\_s = copysign(1.0, x);
    double code(double x_s, double x_m, double y, double z, double t) {
    	double t_1 = (x_m * (y - z)) / (t - z);
    	double tmp;
    	if (t_1 <= -2000.0) {
    		tmp = (x_m / (t - z)) * y;
    	} else if (t_1 <= 0.0) {
    		tmp = ((y - z) / t) * x_m;
    	} else if (t_1 <= 5e-85) {
    		tmp = 1.0 * x_m;
    	} else {
    		tmp = (z - y) * (x_m / z);
    	}
    	return x_s * tmp;
    }
    
    x\_m =     private
    x\_s =     private
    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_s, x_m, y, z, t)
    use fmin_fmax_functions
        real(8), intent (in) :: x_s
        real(8), intent (in) :: x_m
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8) :: t_1
        real(8) :: tmp
        t_1 = (x_m * (y - z)) / (t - z)
        if (t_1 <= (-2000.0d0)) then
            tmp = (x_m / (t - z)) * y
        else if (t_1 <= 0.0d0) then
            tmp = ((y - z) / t) * x_m
        else if (t_1 <= 5d-85) then
            tmp = 1.0d0 * x_m
        else
            tmp = (z - y) * (x_m / z)
        end if
        code = x_s * tmp
    end function
    
    x\_m = Math.abs(x);
    x\_s = Math.copySign(1.0, x);
    public static double code(double x_s, double x_m, double y, double z, double t) {
    	double t_1 = (x_m * (y - z)) / (t - z);
    	double tmp;
    	if (t_1 <= -2000.0) {
    		tmp = (x_m / (t - z)) * y;
    	} else if (t_1 <= 0.0) {
    		tmp = ((y - z) / t) * x_m;
    	} else if (t_1 <= 5e-85) {
    		tmp = 1.0 * x_m;
    	} else {
    		tmp = (z - y) * (x_m / z);
    	}
    	return x_s * tmp;
    }
    
    x\_m = math.fabs(x)
    x\_s = math.copysign(1.0, x)
    def code(x_s, x_m, y, z, t):
    	t_1 = (x_m * (y - z)) / (t - z)
    	tmp = 0
    	if t_1 <= -2000.0:
    		tmp = (x_m / (t - z)) * y
    	elif t_1 <= 0.0:
    		tmp = ((y - z) / t) * x_m
    	elif t_1 <= 5e-85:
    		tmp = 1.0 * x_m
    	else:
    		tmp = (z - y) * (x_m / z)
    	return x_s * tmp
    
    x\_m = abs(x)
    x\_s = copysign(1.0, x)
    function code(x_s, x_m, y, z, t)
    	t_1 = Float64(Float64(x_m * Float64(y - z)) / Float64(t - z))
    	tmp = 0.0
    	if (t_1 <= -2000.0)
    		tmp = Float64(Float64(x_m / Float64(t - z)) * y);
    	elseif (t_1 <= 0.0)
    		tmp = Float64(Float64(Float64(y - z) / t) * x_m);
    	elseif (t_1 <= 5e-85)
    		tmp = Float64(1.0 * x_m);
    	else
    		tmp = Float64(Float64(z - y) * Float64(x_m / z));
    	end
    	return Float64(x_s * tmp)
    end
    
    x\_m = abs(x);
    x\_s = sign(x) * abs(1.0);
    function tmp_2 = code(x_s, x_m, y, z, t)
    	t_1 = (x_m * (y - z)) / (t - z);
    	tmp = 0.0;
    	if (t_1 <= -2000.0)
    		tmp = (x_m / (t - z)) * y;
    	elseif (t_1 <= 0.0)
    		tmp = ((y - z) / t) * x_m;
    	elseif (t_1 <= 5e-85)
    		tmp = 1.0 * x_m;
    	else
    		tmp = (z - y) * (x_m / z);
    	end
    	tmp_2 = x_s * tmp;
    end
    
    x\_m = N[Abs[x], $MachinePrecision]
    x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, -2000.0], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision] * x$95$m), $MachinePrecision], If[LessEqual[t$95$1, 5e-85], N[(1.0 * x$95$m), $MachinePrecision], N[(N[(z - y), $MachinePrecision] * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
    
    \begin{array}{l}
    x\_m = \left|x\right|
    \\
    x\_s = \mathsf{copysign}\left(1, x\right)
    
    \\
    \begin{array}{l}
    t_1 := \frac{x\_m \cdot \left(y - z\right)}{t - z}\\
    x\_s \cdot \begin{array}{l}
    \mathbf{if}\;t\_1 \leq -2000:\\
    \;\;\;\;\frac{x\_m}{t - z} \cdot y\\
    
    \mathbf{elif}\;t\_1 \leq 0:\\
    \;\;\;\;\frac{y - z}{t} \cdot x\_m\\
    
    \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-85}:\\
    \;\;\;\;1 \cdot x\_m\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(z - y\right) \cdot \frac{x\_m}{z}\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -2e3

      1. Initial program 72.8%

        \[\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 \color{blue}{\frac{x}{t - z} \cdot y} \]
        2. lower-*.f64N/A

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

          \[\leadsto \color{blue}{\frac{x}{t - z}} \cdot y \]
        4. lower--.f6458.8

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

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

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

      1. Initial program 98.5%

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{y - z}{t}} \cdot x \]
        5. lower--.f6453.6

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

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

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

      1. Initial program 99.7%

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

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

          \[\leadsto \frac{x \cdot \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}}{t - z} \]
        2. lower-neg.f6456.5

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

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

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

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

          \[\leadsto \color{blue}{x \cdot \frac{-z}{t - z}} \]
        4. *-commutativeN/A

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

          \[\leadsto \color{blue}{\frac{-z}{t - z} \cdot x} \]
        6. lower-/.f6456.5

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

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

        \[\leadsto \color{blue}{1} \cdot x \]
      9. Step-by-step derivation
        1. Applied rewrites38.0%

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

        if 5.0000000000000002e-85 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z))

        1. Initial program 66.8%

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

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

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

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

            \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{y - z}{z} \cdot x}\right) \]
          4. distribute-lft-neg-inN/A

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

            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right) \cdot x} \]
          6. distribute-neg-fracN/A

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

            \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
          8. *-lft-identityN/A

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

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

            \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\left(y + -1 \cdot z\right)}\right)}{z} \cdot x \]
          11. +-commutativeN/A

            \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\left(-1 \cdot z + y\right)}\right)}{z} \cdot x \]
          12. distribute-neg-inN/A

            \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}}{z} \cdot x \]
          13. mul-1-negN/A

            \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
          14. remove-double-negN/A

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

            \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
          16. metadata-evalN/A

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

            \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
          18. *-lft-identityN/A

            \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
          19. lower--.f6466.7

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

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

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

        Alternative 4: 67.7% accurate, 0.2× speedup?

        \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := \frac{x\_m \cdot \left(y - z\right)}{t - z}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-59}:\\ \;\;\;\;\frac{x\_m}{t - z} \cdot y\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{y \cdot x\_m}{t}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-85}:\\ \;\;\;\;1 \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;\left(z - y\right) \cdot \frac{x\_m}{z}\\ \end{array} \end{array} \end{array} \]
        x\_m = (fabs.f64 x)
        x\_s = (copysign.f64 #s(literal 1 binary64) x)
        (FPCore (x_s x_m y z t)
         :precision binary64
         (let* ((t_1 (/ (* x_m (- y z)) (- t z))))
           (*
            x_s
            (if (<= t_1 -1e-59)
              (* (/ x_m (- t z)) y)
              (if (<= t_1 0.0)
                (/ (* y x_m) t)
                (if (<= t_1 5e-85) (* 1.0 x_m) (* (- z y) (/ x_m z))))))))
        x\_m = fabs(x);
        x\_s = copysign(1.0, x);
        double code(double x_s, double x_m, double y, double z, double t) {
        	double t_1 = (x_m * (y - z)) / (t - z);
        	double tmp;
        	if (t_1 <= -1e-59) {
        		tmp = (x_m / (t - z)) * y;
        	} else if (t_1 <= 0.0) {
        		tmp = (y * x_m) / t;
        	} else if (t_1 <= 5e-85) {
        		tmp = 1.0 * x_m;
        	} else {
        		tmp = (z - y) * (x_m / z);
        	}
        	return x_s * tmp;
        }
        
        x\_m =     private
        x\_s =     private
        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_s, x_m, y, z, t)
        use fmin_fmax_functions
            real(8), intent (in) :: x_s
            real(8), intent (in) :: x_m
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8) :: t_1
            real(8) :: tmp
            t_1 = (x_m * (y - z)) / (t - z)
            if (t_1 <= (-1d-59)) then
                tmp = (x_m / (t - z)) * y
            else if (t_1 <= 0.0d0) then
                tmp = (y * x_m) / t
            else if (t_1 <= 5d-85) then
                tmp = 1.0d0 * x_m
            else
                tmp = (z - y) * (x_m / z)
            end if
            code = x_s * tmp
        end function
        
        x\_m = Math.abs(x);
        x\_s = Math.copySign(1.0, x);
        public static double code(double x_s, double x_m, double y, double z, double t) {
        	double t_1 = (x_m * (y - z)) / (t - z);
        	double tmp;
        	if (t_1 <= -1e-59) {
        		tmp = (x_m / (t - z)) * y;
        	} else if (t_1 <= 0.0) {
        		tmp = (y * x_m) / t;
        	} else if (t_1 <= 5e-85) {
        		tmp = 1.0 * x_m;
        	} else {
        		tmp = (z - y) * (x_m / z);
        	}
        	return x_s * tmp;
        }
        
        x\_m = math.fabs(x)
        x\_s = math.copysign(1.0, x)
        def code(x_s, x_m, y, z, t):
        	t_1 = (x_m * (y - z)) / (t - z)
        	tmp = 0
        	if t_1 <= -1e-59:
        		tmp = (x_m / (t - z)) * y
        	elif t_1 <= 0.0:
        		tmp = (y * x_m) / t
        	elif t_1 <= 5e-85:
        		tmp = 1.0 * x_m
        	else:
        		tmp = (z - y) * (x_m / z)
        	return x_s * tmp
        
        x\_m = abs(x)
        x\_s = copysign(1.0, x)
        function code(x_s, x_m, y, z, t)
        	t_1 = Float64(Float64(x_m * Float64(y - z)) / Float64(t - z))
        	tmp = 0.0
        	if (t_1 <= -1e-59)
        		tmp = Float64(Float64(x_m / Float64(t - z)) * y);
        	elseif (t_1 <= 0.0)
        		tmp = Float64(Float64(y * x_m) / t);
        	elseif (t_1 <= 5e-85)
        		tmp = Float64(1.0 * x_m);
        	else
        		tmp = Float64(Float64(z - y) * Float64(x_m / z));
        	end
        	return Float64(x_s * tmp)
        end
        
        x\_m = abs(x);
        x\_s = sign(x) * abs(1.0);
        function tmp_2 = code(x_s, x_m, y, z, t)
        	t_1 = (x_m * (y - z)) / (t - z);
        	tmp = 0.0;
        	if (t_1 <= -1e-59)
        		tmp = (x_m / (t - z)) * y;
        	elseif (t_1 <= 0.0)
        		tmp = (y * x_m) / t;
        	elseif (t_1 <= 5e-85)
        		tmp = 1.0 * x_m;
        	else
        		tmp = (z - y) * (x_m / z);
        	end
        	tmp_2 = x_s * tmp;
        end
        
        x\_m = N[Abs[x], $MachinePrecision]
        x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
        code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, -1e-59], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(y * x$95$m), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t$95$1, 5e-85], N[(1.0 * x$95$m), $MachinePrecision], N[(N[(z - y), $MachinePrecision] * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
        
        \begin{array}{l}
        x\_m = \left|x\right|
        \\
        x\_s = \mathsf{copysign}\left(1, x\right)
        
        \\
        \begin{array}{l}
        t_1 := \frac{x\_m \cdot \left(y - z\right)}{t - z}\\
        x\_s \cdot \begin{array}{l}
        \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-59}:\\
        \;\;\;\;\frac{x\_m}{t - z} \cdot y\\
        
        \mathbf{elif}\;t\_1 \leq 0:\\
        \;\;\;\;\frac{y \cdot x\_m}{t}\\
        
        \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-85}:\\
        \;\;\;\;1 \cdot x\_m\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(z - y\right) \cdot \frac{x\_m}{z}\\
        
        
        \end{array}
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -1e-59

          1. Initial program 77.0%

            \[\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 \color{blue}{\frac{x}{t - z} \cdot y} \]
            2. lower-*.f64N/A

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

              \[\leadsto \color{blue}{\frac{x}{t - z}} \cdot y \]
            4. lower--.f6457.1

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

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

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

          1. Initial program 98.3%

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

            \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
          4. Step-by-step derivation
            1. lower-/.f64N/A

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

              \[\leadsto \frac{\color{blue}{y \cdot x}}{t} \]
            3. lower-*.f6449.3

              \[\leadsto \frac{\color{blue}{y \cdot x}}{t} \]
          5. Applied rewrites49.3%

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

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

          1. Initial program 99.7%

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

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

              \[\leadsto \frac{x \cdot \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}}{t - z} \]
            2. lower-neg.f6456.5

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

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

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

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

              \[\leadsto \color{blue}{x \cdot \frac{-z}{t - z}} \]
            4. *-commutativeN/A

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

              \[\leadsto \color{blue}{\frac{-z}{t - z} \cdot x} \]
            6. lower-/.f6456.5

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

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

            \[\leadsto \color{blue}{1} \cdot x \]
          9. Step-by-step derivation
            1. Applied rewrites38.0%

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

            if 5.0000000000000002e-85 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z))

            1. Initial program 66.8%

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

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

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

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

                \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{y - z}{z} \cdot x}\right) \]
              4. distribute-lft-neg-inN/A

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

                \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right) \cdot x} \]
              6. distribute-neg-fracN/A

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

                \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
              8. *-lft-identityN/A

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

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

                \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\left(y + -1 \cdot z\right)}\right)}{z} \cdot x \]
              11. +-commutativeN/A

                \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\left(-1 \cdot z + y\right)}\right)}{z} \cdot x \]
              12. distribute-neg-inN/A

                \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}}{z} \cdot x \]
              13. mul-1-negN/A

                \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
              14. remove-double-negN/A

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

                \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
              16. metadata-evalN/A

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

                \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
              18. *-lft-identityN/A

                \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
              19. lower--.f6466.7

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

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

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

            Alternative 5: 60.2% accurate, 0.2× speedup?

            \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := \left(z - y\right) \cdot \frac{x\_m}{z}\\ t_2 := \frac{x\_m \cdot \left(y - z\right)}{t - z}\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq -2000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;\frac{y \cdot x\_m}{t}\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-85}:\\ \;\;\;\;1 \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
            x\_m = (fabs.f64 x)
            x\_s = (copysign.f64 #s(literal 1 binary64) x)
            (FPCore (x_s x_m y z t)
             :precision binary64
             (let* ((t_1 (* (- z y) (/ x_m z))) (t_2 (/ (* x_m (- y z)) (- t z))))
               (*
                x_s
                (if (<= t_2 -2000.0)
                  t_1
                  (if (<= t_2 0.0) (/ (* y x_m) t) (if (<= t_2 5e-85) (* 1.0 x_m) t_1))))))
            x\_m = fabs(x);
            x\_s = copysign(1.0, x);
            double code(double x_s, double x_m, double y, double z, double t) {
            	double t_1 = (z - y) * (x_m / z);
            	double t_2 = (x_m * (y - z)) / (t - z);
            	double tmp;
            	if (t_2 <= -2000.0) {
            		tmp = t_1;
            	} else if (t_2 <= 0.0) {
            		tmp = (y * x_m) / t;
            	} else if (t_2 <= 5e-85) {
            		tmp = 1.0 * x_m;
            	} else {
            		tmp = t_1;
            	}
            	return x_s * tmp;
            }
            
            x\_m =     private
            x\_s =     private
            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_s, x_m, y, z, t)
            use fmin_fmax_functions
                real(8), intent (in) :: x_s
                real(8), intent (in) :: x_m
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8) :: t_1
                real(8) :: t_2
                real(8) :: tmp
                t_1 = (z - y) * (x_m / z)
                t_2 = (x_m * (y - z)) / (t - z)
                if (t_2 <= (-2000.0d0)) then
                    tmp = t_1
                else if (t_2 <= 0.0d0) then
                    tmp = (y * x_m) / t
                else if (t_2 <= 5d-85) then
                    tmp = 1.0d0 * x_m
                else
                    tmp = t_1
                end if
                code = x_s * tmp
            end function
            
            x\_m = Math.abs(x);
            x\_s = Math.copySign(1.0, x);
            public static double code(double x_s, double x_m, double y, double z, double t) {
            	double t_1 = (z - y) * (x_m / z);
            	double t_2 = (x_m * (y - z)) / (t - z);
            	double tmp;
            	if (t_2 <= -2000.0) {
            		tmp = t_1;
            	} else if (t_2 <= 0.0) {
            		tmp = (y * x_m) / t;
            	} else if (t_2 <= 5e-85) {
            		tmp = 1.0 * x_m;
            	} else {
            		tmp = t_1;
            	}
            	return x_s * tmp;
            }
            
            x\_m = math.fabs(x)
            x\_s = math.copysign(1.0, x)
            def code(x_s, x_m, y, z, t):
            	t_1 = (z - y) * (x_m / z)
            	t_2 = (x_m * (y - z)) / (t - z)
            	tmp = 0
            	if t_2 <= -2000.0:
            		tmp = t_1
            	elif t_2 <= 0.0:
            		tmp = (y * x_m) / t
            	elif t_2 <= 5e-85:
            		tmp = 1.0 * x_m
            	else:
            		tmp = t_1
            	return x_s * tmp
            
            x\_m = abs(x)
            x\_s = copysign(1.0, x)
            function code(x_s, x_m, y, z, t)
            	t_1 = Float64(Float64(z - y) * Float64(x_m / z))
            	t_2 = Float64(Float64(x_m * Float64(y - z)) / Float64(t - z))
            	tmp = 0.0
            	if (t_2 <= -2000.0)
            		tmp = t_1;
            	elseif (t_2 <= 0.0)
            		tmp = Float64(Float64(y * x_m) / t);
            	elseif (t_2 <= 5e-85)
            		tmp = Float64(1.0 * x_m);
            	else
            		tmp = t_1;
            	end
            	return Float64(x_s * tmp)
            end
            
            x\_m = abs(x);
            x\_s = sign(x) * abs(1.0);
            function tmp_2 = code(x_s, x_m, y, z, t)
            	t_1 = (z - y) * (x_m / z);
            	t_2 = (x_m * (y - z)) / (t - z);
            	tmp = 0.0;
            	if (t_2 <= -2000.0)
            		tmp = t_1;
            	elseif (t_2 <= 0.0)
            		tmp = (y * x_m) / t;
            	elseif (t_2 <= 5e-85)
            		tmp = 1.0 * x_m;
            	else
            		tmp = t_1;
            	end
            	tmp_2 = x_s * tmp;
            end
            
            x\_m = N[Abs[x], $MachinePrecision]
            x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z - y), $MachinePrecision] * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$2, -2000.0], t$95$1, If[LessEqual[t$95$2, 0.0], N[(N[(y * x$95$m), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t$95$2, 5e-85], N[(1.0 * x$95$m), $MachinePrecision], t$95$1]]]), $MachinePrecision]]]
            
            \begin{array}{l}
            x\_m = \left|x\right|
            \\
            x\_s = \mathsf{copysign}\left(1, x\right)
            
            \\
            \begin{array}{l}
            t_1 := \left(z - y\right) \cdot \frac{x\_m}{z}\\
            t_2 := \frac{x\_m \cdot \left(y - z\right)}{t - z}\\
            x\_s \cdot \begin{array}{l}
            \mathbf{if}\;t\_2 \leq -2000:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;t\_2 \leq 0:\\
            \;\;\;\;\frac{y \cdot x\_m}{t}\\
            
            \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-85}:\\
            \;\;\;\;1 \cdot x\_m\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -2e3 or 5.0000000000000002e-85 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z))

              1. Initial program 69.2%

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

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

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

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

                  \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{y - z}{z} \cdot x}\right) \]
                4. distribute-lft-neg-inN/A

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

                  \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right) \cdot x} \]
                6. distribute-neg-fracN/A

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

                  \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
                8. *-lft-identityN/A

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

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

                  \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\left(y + -1 \cdot z\right)}\right)}{z} \cdot x \]
                11. +-commutativeN/A

                  \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\left(-1 \cdot z + y\right)}\right)}{z} \cdot x \]
                12. distribute-neg-inN/A

                  \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}}{z} \cdot x \]
                13. mul-1-negN/A

                  \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
                14. remove-double-negN/A

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

                  \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
                16. metadata-evalN/A

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

                  \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
                18. *-lft-identityN/A

                  \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
                19. lower--.f6463.2

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

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

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

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

                1. Initial program 98.5%

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

                  \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
                4. Step-by-step derivation
                  1. lower-/.f64N/A

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

                    \[\leadsto \frac{\color{blue}{y \cdot x}}{t} \]
                  3. lower-*.f6446.5

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

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

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

                1. Initial program 99.7%

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

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

                    \[\leadsto \frac{x \cdot \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}}{t - z} \]
                  2. lower-neg.f6456.5

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

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

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

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

                    \[\leadsto \color{blue}{x \cdot \frac{-z}{t - z}} \]
                  4. *-commutativeN/A

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

                    \[\leadsto \color{blue}{\frac{-z}{t - z} \cdot x} \]
                  6. lower-/.f6456.5

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

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

                  \[\leadsto \color{blue}{1} \cdot x \]
                9. Step-by-step derivation
                  1. Applied rewrites38.0%

                    \[\leadsto \color{blue}{1} \cdot x \]
                10. Recombined 3 regimes into one program.
                11. Add Preprocessing

                Alternative 6: 35.2% accurate, 0.5× speedup?

                \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{x\_m \cdot \left(y - z\right)}{t - z} \leq 0:\\ \;\;\;\;\frac{x\_m}{z} \cdot t\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\_m\\ \end{array} \end{array} \]
                x\_m = (fabs.f64 x)
                x\_s = (copysign.f64 #s(literal 1 binary64) x)
                (FPCore (x_s x_m y z t)
                 :precision binary64
                 (* x_s (if (<= (/ (* x_m (- y z)) (- t z)) 0.0) (* (/ x_m z) t) (* 1.0 x_m))))
                x\_m = fabs(x);
                x\_s = copysign(1.0, x);
                double code(double x_s, double x_m, double y, double z, double t) {
                	double tmp;
                	if (((x_m * (y - z)) / (t - z)) <= 0.0) {
                		tmp = (x_m / z) * t;
                	} else {
                		tmp = 1.0 * x_m;
                	}
                	return x_s * tmp;
                }
                
                x\_m =     private
                x\_s =     private
                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_s, x_m, y, z, t)
                use fmin_fmax_functions
                    real(8), intent (in) :: x_s
                    real(8), intent (in) :: x_m
                    real(8), intent (in) :: y
                    real(8), intent (in) :: z
                    real(8), intent (in) :: t
                    real(8) :: tmp
                    if (((x_m * (y - z)) / (t - z)) <= 0.0d0) then
                        tmp = (x_m / z) * t
                    else
                        tmp = 1.0d0 * x_m
                    end if
                    code = x_s * tmp
                end function
                
                x\_m = Math.abs(x);
                x\_s = Math.copySign(1.0, x);
                public static double code(double x_s, double x_m, double y, double z, double t) {
                	double tmp;
                	if (((x_m * (y - z)) / (t - z)) <= 0.0) {
                		tmp = (x_m / z) * t;
                	} else {
                		tmp = 1.0 * x_m;
                	}
                	return x_s * tmp;
                }
                
                x\_m = math.fabs(x)
                x\_s = math.copysign(1.0, x)
                def code(x_s, x_m, y, z, t):
                	tmp = 0
                	if ((x_m * (y - z)) / (t - z)) <= 0.0:
                		tmp = (x_m / z) * t
                	else:
                		tmp = 1.0 * x_m
                	return x_s * tmp
                
                x\_m = abs(x)
                x\_s = copysign(1.0, x)
                function code(x_s, x_m, y, z, t)
                	tmp = 0.0
                	if (Float64(Float64(x_m * Float64(y - z)) / Float64(t - z)) <= 0.0)
                		tmp = Float64(Float64(x_m / z) * t);
                	else
                		tmp = Float64(1.0 * x_m);
                	end
                	return Float64(x_s * tmp)
                end
                
                x\_m = abs(x);
                x\_s = sign(x) * abs(1.0);
                function tmp_2 = code(x_s, x_m, y, z, t)
                	tmp = 0.0;
                	if (((x_m * (y - z)) / (t - z)) <= 0.0)
                		tmp = (x_m / z) * t;
                	else
                		tmp = 1.0 * x_m;
                	end
                	tmp_2 = x_s * tmp;
                end
                
                x\_m = N[Abs[x], $MachinePrecision]
                x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], 0.0], N[(N[(x$95$m / z), $MachinePrecision] * t), $MachinePrecision], N[(1.0 * x$95$m), $MachinePrecision]]), $MachinePrecision]
                
                \begin{array}{l}
                x\_m = \left|x\right|
                \\
                x\_s = \mathsf{copysign}\left(1, x\right)
                
                \\
                x\_s \cdot \begin{array}{l}
                \mathbf{if}\;\frac{x\_m \cdot \left(y - z\right)}{t - z} \leq 0:\\
                \;\;\;\;\frac{x\_m}{z} \cdot t\\
                
                \mathbf{else}:\\
                \;\;\;\;1 \cdot x\_m\\
                
                
                \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 87.2%

                    \[\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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

                      \[\leadsto \color{blue}{x - \left(\frac{x \cdot y}{z} - \frac{t \cdot x}{z}\right)} \]
                    8. div-subN/A

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

                      \[\leadsto \color{blue}{x - \frac{x \cdot y - t \cdot x}{z}} \]
                    10. div-subN/A

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

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

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

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

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

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

                      \[\leadsto x - \color{blue}{\frac{x}{z}} \cdot \left(y - t\right) \]
                    17. lower--.f6449.2

                      \[\leadsto x - \frac{x}{z} \cdot \color{blue}{\left(y - t\right)} \]
                  5. Applied rewrites49.2%

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

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

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

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

                    1. Initial program 76.7%

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

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

                        \[\leadsto \frac{x \cdot \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}}{t - z} \]
                      2. lower-neg.f6432.3

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

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

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

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

                        \[\leadsto \color{blue}{x \cdot \frac{-z}{t - z}} \]
                      4. *-commutativeN/A

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

                        \[\leadsto \color{blue}{\frac{-z}{t - z} \cdot x} \]
                      6. lower-/.f6451.6

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

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

                      \[\leadsto \color{blue}{1} \cdot x \]
                    9. Step-by-step derivation
                      1. Applied rewrites39.2%

                        \[\leadsto \color{blue}{1} \cdot x \]
                    10. Recombined 2 regimes into one program.
                    11. Add Preprocessing

                    Alternative 7: 74.9% accurate, 0.7× speedup?

                    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1760000000 \lor \neg \left(z \leq 1.2 \cdot 10^{-31}\right):\\ \;\;\;\;\frac{z}{t - z} \cdot \left(-x\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x\_m}{t - z}\\ \end{array} \end{array} \]
                    x\_m = (fabs.f64 x)
                    x\_s = (copysign.f64 #s(literal 1 binary64) x)
                    (FPCore (x_s x_m y z t)
                     :precision binary64
                     (*
                      x_s
                      (if (or (<= z -1760000000.0) (not (<= z 1.2e-31)))
                        (* (/ z (- t z)) (- x_m))
                        (/ (* y x_m) (- t z)))))
                    x\_m = fabs(x);
                    x\_s = copysign(1.0, x);
                    double code(double x_s, double x_m, double y, double z, double t) {
                    	double tmp;
                    	if ((z <= -1760000000.0) || !(z <= 1.2e-31)) {
                    		tmp = (z / (t - z)) * -x_m;
                    	} else {
                    		tmp = (y * x_m) / (t - z);
                    	}
                    	return x_s * tmp;
                    }
                    
                    x\_m =     private
                    x\_s =     private
                    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_s, x_m, y, z, t)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x_s
                        real(8), intent (in) :: x_m
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8) :: tmp
                        if ((z <= (-1760000000.0d0)) .or. (.not. (z <= 1.2d-31))) then
                            tmp = (z / (t - z)) * -x_m
                        else
                            tmp = (y * x_m) / (t - z)
                        end if
                        code = x_s * tmp
                    end function
                    
                    x\_m = Math.abs(x);
                    x\_s = Math.copySign(1.0, x);
                    public static double code(double x_s, double x_m, double y, double z, double t) {
                    	double tmp;
                    	if ((z <= -1760000000.0) || !(z <= 1.2e-31)) {
                    		tmp = (z / (t - z)) * -x_m;
                    	} else {
                    		tmp = (y * x_m) / (t - z);
                    	}
                    	return x_s * tmp;
                    }
                    
                    x\_m = math.fabs(x)
                    x\_s = math.copysign(1.0, x)
                    def code(x_s, x_m, y, z, t):
                    	tmp = 0
                    	if (z <= -1760000000.0) or not (z <= 1.2e-31):
                    		tmp = (z / (t - z)) * -x_m
                    	else:
                    		tmp = (y * x_m) / (t - z)
                    	return x_s * tmp
                    
                    x\_m = abs(x)
                    x\_s = copysign(1.0, x)
                    function code(x_s, x_m, y, z, t)
                    	tmp = 0.0
                    	if ((z <= -1760000000.0) || !(z <= 1.2e-31))
                    		tmp = Float64(Float64(z / Float64(t - z)) * Float64(-x_m));
                    	else
                    		tmp = Float64(Float64(y * x_m) / Float64(t - z));
                    	end
                    	return Float64(x_s * tmp)
                    end
                    
                    x\_m = abs(x);
                    x\_s = sign(x) * abs(1.0);
                    function tmp_2 = code(x_s, x_m, y, z, t)
                    	tmp = 0.0;
                    	if ((z <= -1760000000.0) || ~((z <= 1.2e-31)))
                    		tmp = (z / (t - z)) * -x_m;
                    	else
                    		tmp = (y * x_m) / (t - z);
                    	end
                    	tmp_2 = x_s * tmp;
                    end
                    
                    x\_m = N[Abs[x], $MachinePrecision]
                    x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                    code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -1760000000.0], N[Not[LessEqual[z, 1.2e-31]], $MachinePrecision]], N[(N[(z / N[(t - z), $MachinePrecision]), $MachinePrecision] * (-x$95$m)), $MachinePrecision], N[(N[(y * x$95$m), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                    
                    \begin{array}{l}
                    x\_m = \left|x\right|
                    \\
                    x\_s = \mathsf{copysign}\left(1, x\right)
                    
                    \\
                    x\_s \cdot \begin{array}{l}
                    \mathbf{if}\;z \leq -1760000000 \lor \neg \left(z \leq 1.2 \cdot 10^{-31}\right):\\
                    \;\;\;\;\frac{z}{t - z} \cdot \left(-x\_m\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{y \cdot x\_m}{t - z}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if z < -1.76e9 or 1.2e-31 < z

                      1. Initial program 70.4%

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

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

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

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

                          \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{z}{t - z} \cdot x}\right) \]
                        4. distribute-rgt-neg-inN/A

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

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

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

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

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

                          \[\leadsto \frac{z}{t - z} \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \]
                        10. lower-neg.f6480.1

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

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

                      if -1.76e9 < z < 1.2e-31

                      1. Initial program 95.8%

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

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

                          \[\leadsto \frac{\color{blue}{y \cdot x}}{t - z} \]
                        2. lower-*.f6484.4

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

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

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

                    Alternative 8: 74.6% accurate, 0.7× speedup?

                    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -3450000000 \lor \neg \left(z \leq 0.0285\right):\\ \;\;\;\;\frac{z - y}{z} \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x\_m}{t - z}\\ \end{array} \end{array} \]
                    x\_m = (fabs.f64 x)
                    x\_s = (copysign.f64 #s(literal 1 binary64) x)
                    (FPCore (x_s x_m y z t)
                     :precision binary64
                     (*
                      x_s
                      (if (or (<= z -3450000000.0) (not (<= z 0.0285)))
                        (* (/ (- z y) z) x_m)
                        (/ (* y x_m) (- t z)))))
                    x\_m = fabs(x);
                    x\_s = copysign(1.0, x);
                    double code(double x_s, double x_m, double y, double z, double t) {
                    	double tmp;
                    	if ((z <= -3450000000.0) || !(z <= 0.0285)) {
                    		tmp = ((z - y) / z) * x_m;
                    	} else {
                    		tmp = (y * x_m) / (t - z);
                    	}
                    	return x_s * tmp;
                    }
                    
                    x\_m =     private
                    x\_s =     private
                    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_s, x_m, y, z, t)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x_s
                        real(8), intent (in) :: x_m
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8) :: tmp
                        if ((z <= (-3450000000.0d0)) .or. (.not. (z <= 0.0285d0))) then
                            tmp = ((z - y) / z) * x_m
                        else
                            tmp = (y * x_m) / (t - z)
                        end if
                        code = x_s * tmp
                    end function
                    
                    x\_m = Math.abs(x);
                    x\_s = Math.copySign(1.0, x);
                    public static double code(double x_s, double x_m, double y, double z, double t) {
                    	double tmp;
                    	if ((z <= -3450000000.0) || !(z <= 0.0285)) {
                    		tmp = ((z - y) / z) * x_m;
                    	} else {
                    		tmp = (y * x_m) / (t - z);
                    	}
                    	return x_s * tmp;
                    }
                    
                    x\_m = math.fabs(x)
                    x\_s = math.copysign(1.0, x)
                    def code(x_s, x_m, y, z, t):
                    	tmp = 0
                    	if (z <= -3450000000.0) or not (z <= 0.0285):
                    		tmp = ((z - y) / z) * x_m
                    	else:
                    		tmp = (y * x_m) / (t - z)
                    	return x_s * tmp
                    
                    x\_m = abs(x)
                    x\_s = copysign(1.0, x)
                    function code(x_s, x_m, y, z, t)
                    	tmp = 0.0
                    	if ((z <= -3450000000.0) || !(z <= 0.0285))
                    		tmp = Float64(Float64(Float64(z - y) / z) * x_m);
                    	else
                    		tmp = Float64(Float64(y * x_m) / Float64(t - z));
                    	end
                    	return Float64(x_s * tmp)
                    end
                    
                    x\_m = abs(x);
                    x\_s = sign(x) * abs(1.0);
                    function tmp_2 = code(x_s, x_m, y, z, t)
                    	tmp = 0.0;
                    	if ((z <= -3450000000.0) || ~((z <= 0.0285)))
                    		tmp = ((z - y) / z) * x_m;
                    	else
                    		tmp = (y * x_m) / (t - z);
                    	end
                    	tmp_2 = x_s * tmp;
                    end
                    
                    x\_m = N[Abs[x], $MachinePrecision]
                    x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                    code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -3450000000.0], N[Not[LessEqual[z, 0.0285]], $MachinePrecision]], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * x$95$m), $MachinePrecision], N[(N[(y * x$95$m), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                    
                    \begin{array}{l}
                    x\_m = \left|x\right|
                    \\
                    x\_s = \mathsf{copysign}\left(1, x\right)
                    
                    \\
                    x\_s \cdot \begin{array}{l}
                    \mathbf{if}\;z \leq -3450000000 \lor \neg \left(z \leq 0.0285\right):\\
                    \;\;\;\;\frac{z - y}{z} \cdot x\_m\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{y \cdot x\_m}{t - z}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if z < -3.45e9 or 0.028500000000000001 < z

                      1. Initial program 69.5%

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

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

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

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

                          \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{y - z}{z} \cdot x}\right) \]
                        4. distribute-lft-neg-inN/A

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

                          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right) \cdot x} \]
                        6. distribute-neg-fracN/A

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

                          \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
                        8. *-lft-identityN/A

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

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

                          \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\left(y + -1 \cdot z\right)}\right)}{z} \cdot x \]
                        11. +-commutativeN/A

                          \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\left(-1 \cdot z + y\right)}\right)}{z} \cdot x \]
                        12. distribute-neg-inN/A

                          \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}}{z} \cdot x \]
                        13. mul-1-negN/A

                          \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
                        14. remove-double-negN/A

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

                          \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
                        16. metadata-evalN/A

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

                          \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
                        18. *-lft-identityN/A

                          \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
                        19. lower--.f6476.5

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

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

                      if -3.45e9 < z < 0.028500000000000001

                      1. Initial program 95.9%

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

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

                          \[\leadsto \frac{\color{blue}{y \cdot x}}{t - z} \]
                        2. lower-*.f6483.4

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

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

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

                    Alternative 9: 73.6% accurate, 0.7× speedup?

                    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -2.35 \cdot 10^{+30} \lor \neg \left(t \leq 1700000000\right):\\ \;\;\;\;\frac{y - z}{t} \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;x\_m - \frac{x\_m}{z} \cdot y\\ \end{array} \end{array} \]
                    x\_m = (fabs.f64 x)
                    x\_s = (copysign.f64 #s(literal 1 binary64) x)
                    (FPCore (x_s x_m y z t)
                     :precision binary64
                     (*
                      x_s
                      (if (or (<= t -2.35e+30) (not (<= t 1700000000.0)))
                        (* (/ (- y z) t) x_m)
                        (- x_m (* (/ x_m z) y)))))
                    x\_m = fabs(x);
                    x\_s = copysign(1.0, x);
                    double code(double x_s, double x_m, double y, double z, double t) {
                    	double tmp;
                    	if ((t <= -2.35e+30) || !(t <= 1700000000.0)) {
                    		tmp = ((y - z) / t) * x_m;
                    	} else {
                    		tmp = x_m - ((x_m / z) * y);
                    	}
                    	return x_s * tmp;
                    }
                    
                    x\_m =     private
                    x\_s =     private
                    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_s, x_m, y, z, t)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x_s
                        real(8), intent (in) :: x_m
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8) :: tmp
                        if ((t <= (-2.35d+30)) .or. (.not. (t <= 1700000000.0d0))) then
                            tmp = ((y - z) / t) * x_m
                        else
                            tmp = x_m - ((x_m / z) * y)
                        end if
                        code = x_s * tmp
                    end function
                    
                    x\_m = Math.abs(x);
                    x\_s = Math.copySign(1.0, x);
                    public static double code(double x_s, double x_m, double y, double z, double t) {
                    	double tmp;
                    	if ((t <= -2.35e+30) || !(t <= 1700000000.0)) {
                    		tmp = ((y - z) / t) * x_m;
                    	} else {
                    		tmp = x_m - ((x_m / z) * y);
                    	}
                    	return x_s * tmp;
                    }
                    
                    x\_m = math.fabs(x)
                    x\_s = math.copysign(1.0, x)
                    def code(x_s, x_m, y, z, t):
                    	tmp = 0
                    	if (t <= -2.35e+30) or not (t <= 1700000000.0):
                    		tmp = ((y - z) / t) * x_m
                    	else:
                    		tmp = x_m - ((x_m / z) * y)
                    	return x_s * tmp
                    
                    x\_m = abs(x)
                    x\_s = copysign(1.0, x)
                    function code(x_s, x_m, y, z, t)
                    	tmp = 0.0
                    	if ((t <= -2.35e+30) || !(t <= 1700000000.0))
                    		tmp = Float64(Float64(Float64(y - z) / t) * x_m);
                    	else
                    		tmp = Float64(x_m - Float64(Float64(x_m / z) * y));
                    	end
                    	return Float64(x_s * tmp)
                    end
                    
                    x\_m = abs(x);
                    x\_s = sign(x) * abs(1.0);
                    function tmp_2 = code(x_s, x_m, y, z, t)
                    	tmp = 0.0;
                    	if ((t <= -2.35e+30) || ~((t <= 1700000000.0)))
                    		tmp = ((y - z) / t) * x_m;
                    	else
                    		tmp = x_m - ((x_m / z) * y);
                    	end
                    	tmp_2 = x_s * tmp;
                    end
                    
                    x\_m = N[Abs[x], $MachinePrecision]
                    x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                    code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[t, -2.35e+30], N[Not[LessEqual[t, 1700000000.0]], $MachinePrecision]], N[(N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision] * x$95$m), $MachinePrecision], N[(x$95$m - N[(N[(x$95$m / z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                    
                    \begin{array}{l}
                    x\_m = \left|x\right|
                    \\
                    x\_s = \mathsf{copysign}\left(1, x\right)
                    
                    \\
                    x\_s \cdot \begin{array}{l}
                    \mathbf{if}\;t \leq -2.35 \cdot 10^{+30} \lor \neg \left(t \leq 1700000000\right):\\
                    \;\;\;\;\frac{y - z}{t} \cdot x\_m\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;x\_m - \frac{x\_m}{z} \cdot y\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if t < -2.34999999999999995e30 or 1.7e9 < t

                      1. Initial program 79.1%

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

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

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

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

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

                          \[\leadsto \color{blue}{\frac{y - z}{t}} \cdot x \]
                        5. lower--.f6475.7

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

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

                      if -2.34999999999999995e30 < t < 1.7e9

                      1. Initial program 84.9%

                        \[\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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

                          \[\leadsto \color{blue}{x - \left(\frac{x \cdot y}{z} - \frac{t \cdot x}{z}\right)} \]
                        8. div-subN/A

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

                          \[\leadsto \color{blue}{x - \frac{x \cdot y - t \cdot x}{z}} \]
                        10. div-subN/A

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

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

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

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

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

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

                          \[\leadsto x - \color{blue}{\frac{x}{z}} \cdot \left(y - t\right) \]
                        17. lower--.f6482.9

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

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

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

                          \[\leadsto x - \frac{x}{z} \cdot \color{blue}{y} \]
                      8. Recombined 2 regimes into one program.
                      9. Final simplification79.6%

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

                      Alternative 10: 74.7% accurate, 0.7× speedup?

                      \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -2.35 \cdot 10^{+30} \lor \neg \left(t \leq 1700000000\right):\\ \;\;\;\;\frac{y - z}{t} \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{z - y}{z} \cdot x\_m\\ \end{array} \end{array} \]
                      x\_m = (fabs.f64 x)
                      x\_s = (copysign.f64 #s(literal 1 binary64) x)
                      (FPCore (x_s x_m y z t)
                       :precision binary64
                       (*
                        x_s
                        (if (or (<= t -2.35e+30) (not (<= t 1700000000.0)))
                          (* (/ (- y z) t) x_m)
                          (* (/ (- z y) z) x_m))))
                      x\_m = fabs(x);
                      x\_s = copysign(1.0, x);
                      double code(double x_s, double x_m, double y, double z, double t) {
                      	double tmp;
                      	if ((t <= -2.35e+30) || !(t <= 1700000000.0)) {
                      		tmp = ((y - z) / t) * x_m;
                      	} else {
                      		tmp = ((z - y) / z) * x_m;
                      	}
                      	return x_s * tmp;
                      }
                      
                      x\_m =     private
                      x\_s =     private
                      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_s, x_m, y, z, t)
                      use fmin_fmax_functions
                          real(8), intent (in) :: x_s
                          real(8), intent (in) :: x_m
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          real(8), intent (in) :: t
                          real(8) :: tmp
                          if ((t <= (-2.35d+30)) .or. (.not. (t <= 1700000000.0d0))) then
                              tmp = ((y - z) / t) * x_m
                          else
                              tmp = ((z - y) / z) * x_m
                          end if
                          code = x_s * tmp
                      end function
                      
                      x\_m = Math.abs(x);
                      x\_s = Math.copySign(1.0, x);
                      public static double code(double x_s, double x_m, double y, double z, double t) {
                      	double tmp;
                      	if ((t <= -2.35e+30) || !(t <= 1700000000.0)) {
                      		tmp = ((y - z) / t) * x_m;
                      	} else {
                      		tmp = ((z - y) / z) * x_m;
                      	}
                      	return x_s * tmp;
                      }
                      
                      x\_m = math.fabs(x)
                      x\_s = math.copysign(1.0, x)
                      def code(x_s, x_m, y, z, t):
                      	tmp = 0
                      	if (t <= -2.35e+30) or not (t <= 1700000000.0):
                      		tmp = ((y - z) / t) * x_m
                      	else:
                      		tmp = ((z - y) / z) * x_m
                      	return x_s * tmp
                      
                      x\_m = abs(x)
                      x\_s = copysign(1.0, x)
                      function code(x_s, x_m, y, z, t)
                      	tmp = 0.0
                      	if ((t <= -2.35e+30) || !(t <= 1700000000.0))
                      		tmp = Float64(Float64(Float64(y - z) / t) * x_m);
                      	else
                      		tmp = Float64(Float64(Float64(z - y) / z) * x_m);
                      	end
                      	return Float64(x_s * tmp)
                      end
                      
                      x\_m = abs(x);
                      x\_s = sign(x) * abs(1.0);
                      function tmp_2 = code(x_s, x_m, y, z, t)
                      	tmp = 0.0;
                      	if ((t <= -2.35e+30) || ~((t <= 1700000000.0)))
                      		tmp = ((y - z) / t) * x_m;
                      	else
                      		tmp = ((z - y) / z) * x_m;
                      	end
                      	tmp_2 = x_s * tmp;
                      end
                      
                      x\_m = N[Abs[x], $MachinePrecision]
                      x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                      code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[t, -2.35e+30], N[Not[LessEqual[t, 1700000000.0]], $MachinePrecision]], N[(N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision] * x$95$m), $MachinePrecision], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * x$95$m), $MachinePrecision]]), $MachinePrecision]
                      
                      \begin{array}{l}
                      x\_m = \left|x\right|
                      \\
                      x\_s = \mathsf{copysign}\left(1, x\right)
                      
                      \\
                      x\_s \cdot \begin{array}{l}
                      \mathbf{if}\;t \leq -2.35 \cdot 10^{+30} \lor \neg \left(t \leq 1700000000\right):\\
                      \;\;\;\;\frac{y - z}{t} \cdot x\_m\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{z - y}{z} \cdot x\_m\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if t < -2.34999999999999995e30 or 1.7e9 < t

                        1. Initial program 79.1%

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

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

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

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

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

                            \[\leadsto \color{blue}{\frac{y - z}{t}} \cdot x \]
                          5. lower--.f6475.7

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

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

                        if -2.34999999999999995e30 < t < 1.7e9

                        1. Initial program 84.9%

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

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

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

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

                            \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{y - z}{z} \cdot x}\right) \]
                          4. distribute-lft-neg-inN/A

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

                            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y - z}{z}\right)\right) \cdot x} \]
                          6. distribute-neg-fracN/A

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

                            \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{z}} \cdot x \]
                          8. *-lft-identityN/A

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

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

                            \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\left(y + -1 \cdot z\right)}\right)}{z} \cdot x \]
                          11. +-commutativeN/A

                            \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\left(-1 \cdot z + y\right)}\right)}{z} \cdot x \]
                          12. distribute-neg-inN/A

                            \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(-1 \cdot z\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}}{z} \cdot x \]
                          13. mul-1-negN/A

                            \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}{z} \cdot x \]
                          14. remove-double-negN/A

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

                            \[\leadsto \frac{z + \color{blue}{-1 \cdot y}}{z} \cdot x \]
                          16. metadata-evalN/A

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

                            \[\leadsto \frac{\color{blue}{z - 1 \cdot y}}{z} \cdot x \]
                          18. *-lft-identityN/A

                            \[\leadsto \frac{z - \color{blue}{y}}{z} \cdot x \]
                          19. lower--.f6482.3

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

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

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

                      Alternative 11: 59.2% accurate, 0.8× speedup?

                      \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{-12}:\\ \;\;\;\;1 \cdot x\_m\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+63}:\\ \;\;\;\;\frac{y \cdot x\_m}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x\_m}{z}, t, x\_m\right)\\ \end{array} \end{array} \]
                      x\_m = (fabs.f64 x)
                      x\_s = (copysign.f64 #s(literal 1 binary64) x)
                      (FPCore (x_s x_m y z t)
                       :precision binary64
                       (*
                        x_s
                        (if (<= z -1.55e-12)
                          (* 1.0 x_m)
                          (if (<= z 4.4e+63) (/ (* y x_m) t) (fma (/ x_m z) t x_m)))))
                      x\_m = fabs(x);
                      x\_s = copysign(1.0, x);
                      double code(double x_s, double x_m, double y, double z, double t) {
                      	double tmp;
                      	if (z <= -1.55e-12) {
                      		tmp = 1.0 * x_m;
                      	} else if (z <= 4.4e+63) {
                      		tmp = (y * x_m) / t;
                      	} else {
                      		tmp = fma((x_m / z), t, x_m);
                      	}
                      	return x_s * tmp;
                      }
                      
                      x\_m = abs(x)
                      x\_s = copysign(1.0, x)
                      function code(x_s, x_m, y, z, t)
                      	tmp = 0.0
                      	if (z <= -1.55e-12)
                      		tmp = Float64(1.0 * x_m);
                      	elseif (z <= 4.4e+63)
                      		tmp = Float64(Float64(y * x_m) / t);
                      	else
                      		tmp = fma(Float64(x_m / z), t, x_m);
                      	end
                      	return Float64(x_s * tmp)
                      end
                      
                      x\_m = N[Abs[x], $MachinePrecision]
                      x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                      code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[z, -1.55e-12], N[(1.0 * x$95$m), $MachinePrecision], If[LessEqual[z, 4.4e+63], N[(N[(y * x$95$m), $MachinePrecision] / t), $MachinePrecision], N[(N[(x$95$m / z), $MachinePrecision] * t + x$95$m), $MachinePrecision]]]), $MachinePrecision]
                      
                      \begin{array}{l}
                      x\_m = \left|x\right|
                      \\
                      x\_s = \mathsf{copysign}\left(1, x\right)
                      
                      \\
                      x\_s \cdot \begin{array}{l}
                      \mathbf{if}\;z \leq -1.55 \cdot 10^{-12}:\\
                      \;\;\;\;1 \cdot x\_m\\
                      
                      \mathbf{elif}\;z \leq 4.4 \cdot 10^{+63}:\\
                      \;\;\;\;\frac{y \cdot x\_m}{t}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\mathsf{fma}\left(\frac{x\_m}{z}, t, x\_m\right)\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if z < -1.5500000000000001e-12

                        1. Initial program 72.4%

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

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

                            \[\leadsto \frac{x \cdot \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}}{t - z} \]
                          2. lower-neg.f6450.5

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

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

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

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

                            \[\leadsto \color{blue}{x \cdot \frac{-z}{t - z}} \]
                          4. *-commutativeN/A

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

                            \[\leadsto \color{blue}{\frac{-z}{t - z} \cdot x} \]
                          6. lower-/.f6475.5

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

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

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

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

                          if -1.5500000000000001e-12 < z < 4.3999999999999997e63

                          1. Initial program 94.1%

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

                            \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
                          4. Step-by-step derivation
                            1. lower-/.f64N/A

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

                              \[\leadsto \frac{\color{blue}{y \cdot x}}{t} \]
                            3. lower-*.f6459.7

                              \[\leadsto \frac{\color{blue}{y \cdot x}}{t} \]
                          5. Applied rewrites59.7%

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

                          if 4.3999999999999997e63 < z

                          1. Initial program 63.8%

                            \[\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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

                              \[\leadsto \color{blue}{x - \left(\frac{x \cdot y}{z} - \frac{t \cdot x}{z}\right)} \]
                            8. div-subN/A

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

                              \[\leadsto \color{blue}{x - \frac{x \cdot y - t \cdot x}{z}} \]
                            10. div-subN/A

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

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

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

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

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

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

                              \[\leadsto x - \color{blue}{\frac{x}{z}} \cdot \left(y - t\right) \]
                            17. lower--.f6485.4

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

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

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

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

                          Alternative 12: 59.6% accurate, 0.8× speedup?

                          \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{-12} \lor \neg \left(z \leq 0.0305\right):\\ \;\;\;\;1 \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x\_m}{t}\\ \end{array} \end{array} \]
                          x\_m = (fabs.f64 x)
                          x\_s = (copysign.f64 #s(literal 1 binary64) x)
                          (FPCore (x_s x_m y z t)
                           :precision binary64
                           (*
                            x_s
                            (if (or (<= z -1.55e-12) (not (<= z 0.0305))) (* 1.0 x_m) (/ (* y x_m) t))))
                          x\_m = fabs(x);
                          x\_s = copysign(1.0, x);
                          double code(double x_s, double x_m, double y, double z, double t) {
                          	double tmp;
                          	if ((z <= -1.55e-12) || !(z <= 0.0305)) {
                          		tmp = 1.0 * x_m;
                          	} else {
                          		tmp = (y * x_m) / t;
                          	}
                          	return x_s * tmp;
                          }
                          
                          x\_m =     private
                          x\_s =     private
                          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_s, x_m, y, z, t)
                          use fmin_fmax_functions
                              real(8), intent (in) :: x_s
                              real(8), intent (in) :: x_m
                              real(8), intent (in) :: y
                              real(8), intent (in) :: z
                              real(8), intent (in) :: t
                              real(8) :: tmp
                              if ((z <= (-1.55d-12)) .or. (.not. (z <= 0.0305d0))) then
                                  tmp = 1.0d0 * x_m
                              else
                                  tmp = (y * x_m) / t
                              end if
                              code = x_s * tmp
                          end function
                          
                          x\_m = Math.abs(x);
                          x\_s = Math.copySign(1.0, x);
                          public static double code(double x_s, double x_m, double y, double z, double t) {
                          	double tmp;
                          	if ((z <= -1.55e-12) || !(z <= 0.0305)) {
                          		tmp = 1.0 * x_m;
                          	} else {
                          		tmp = (y * x_m) / t;
                          	}
                          	return x_s * tmp;
                          }
                          
                          x\_m = math.fabs(x)
                          x\_s = math.copysign(1.0, x)
                          def code(x_s, x_m, y, z, t):
                          	tmp = 0
                          	if (z <= -1.55e-12) or not (z <= 0.0305):
                          		tmp = 1.0 * x_m
                          	else:
                          		tmp = (y * x_m) / t
                          	return x_s * tmp
                          
                          x\_m = abs(x)
                          x\_s = copysign(1.0, x)
                          function code(x_s, x_m, y, z, t)
                          	tmp = 0.0
                          	if ((z <= -1.55e-12) || !(z <= 0.0305))
                          		tmp = Float64(1.0 * x_m);
                          	else
                          		tmp = Float64(Float64(y * x_m) / t);
                          	end
                          	return Float64(x_s * tmp)
                          end
                          
                          x\_m = abs(x);
                          x\_s = sign(x) * abs(1.0);
                          function tmp_2 = code(x_s, x_m, y, z, t)
                          	tmp = 0.0;
                          	if ((z <= -1.55e-12) || ~((z <= 0.0305)))
                          		tmp = 1.0 * x_m;
                          	else
                          		tmp = (y * x_m) / t;
                          	end
                          	tmp_2 = x_s * tmp;
                          end
                          
                          x\_m = N[Abs[x], $MachinePrecision]
                          x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                          code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -1.55e-12], N[Not[LessEqual[z, 0.0305]], $MachinePrecision]], N[(1.0 * x$95$m), $MachinePrecision], N[(N[(y * x$95$m), $MachinePrecision] / t), $MachinePrecision]]), $MachinePrecision]
                          
                          \begin{array}{l}
                          x\_m = \left|x\right|
                          \\
                          x\_s = \mathsf{copysign}\left(1, x\right)
                          
                          \\
                          x\_s \cdot \begin{array}{l}
                          \mathbf{if}\;z \leq -1.55 \cdot 10^{-12} \lor \neg \left(z \leq 0.0305\right):\\
                          \;\;\;\;1 \cdot x\_m\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\frac{y \cdot x\_m}{t}\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if z < -1.5500000000000001e-12 or 0.030499999999999999 < z

                            1. Initial program 70.4%

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

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

                                \[\leadsto \frac{x \cdot \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}}{t - z} \]
                              2. lower-neg.f6453.2

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

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

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

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

                                \[\leadsto \color{blue}{x \cdot \frac{-z}{t - z}} \]
                              4. *-commutativeN/A

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

                                \[\leadsto \color{blue}{\frac{-z}{t - z} \cdot x} \]
                              6. lower-/.f6478.7

                                \[\leadsto \color{blue}{\frac{-z}{t - z}} \cdot x \]
                            7. Applied rewrites78.7%

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

                              \[\leadsto \color{blue}{1} \cdot x \]
                            9. Step-by-step derivation
                              1. Applied rewrites60.5%

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

                              if -1.5500000000000001e-12 < z < 0.030499999999999999

                              1. Initial program 95.8%

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

                                \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
                              4. Step-by-step derivation
                                1. lower-/.f64N/A

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

                                  \[\leadsto \frac{\color{blue}{y \cdot x}}{t} \]
                                3. lower-*.f6463.5

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

                                \[\leadsto \color{blue}{\frac{y \cdot x}{t}} \]
                            10. Recombined 2 regimes into one program.
                            11. Final simplification61.9%

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

                            Alternative 13: 60.7% accurate, 0.8× speedup?

                            \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{-12} \lor \neg \left(z \leq 0.0305\right):\\ \;\;\;\;1 \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t} \cdot x\_m\\ \end{array} \end{array} \]
                            x\_m = (fabs.f64 x)
                            x\_s = (copysign.f64 #s(literal 1 binary64) x)
                            (FPCore (x_s x_m y z t)
                             :precision binary64
                             (*
                              x_s
                              (if (or (<= z -1.6e-12) (not (<= z 0.0305))) (* 1.0 x_m) (* (/ y t) x_m))))
                            x\_m = fabs(x);
                            x\_s = copysign(1.0, x);
                            double code(double x_s, double x_m, double y, double z, double t) {
                            	double tmp;
                            	if ((z <= -1.6e-12) || !(z <= 0.0305)) {
                            		tmp = 1.0 * x_m;
                            	} else {
                            		tmp = (y / t) * x_m;
                            	}
                            	return x_s * tmp;
                            }
                            
                            x\_m =     private
                            x\_s =     private
                            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_s, x_m, y, z, t)
                            use fmin_fmax_functions
                                real(8), intent (in) :: x_s
                                real(8), intent (in) :: x_m
                                real(8), intent (in) :: y
                                real(8), intent (in) :: z
                                real(8), intent (in) :: t
                                real(8) :: tmp
                                if ((z <= (-1.6d-12)) .or. (.not. (z <= 0.0305d0))) then
                                    tmp = 1.0d0 * x_m
                                else
                                    tmp = (y / t) * x_m
                                end if
                                code = x_s * tmp
                            end function
                            
                            x\_m = Math.abs(x);
                            x\_s = Math.copySign(1.0, x);
                            public static double code(double x_s, double x_m, double y, double z, double t) {
                            	double tmp;
                            	if ((z <= -1.6e-12) || !(z <= 0.0305)) {
                            		tmp = 1.0 * x_m;
                            	} else {
                            		tmp = (y / t) * x_m;
                            	}
                            	return x_s * tmp;
                            }
                            
                            x\_m = math.fabs(x)
                            x\_s = math.copysign(1.0, x)
                            def code(x_s, x_m, y, z, t):
                            	tmp = 0
                            	if (z <= -1.6e-12) or not (z <= 0.0305):
                            		tmp = 1.0 * x_m
                            	else:
                            		tmp = (y / t) * x_m
                            	return x_s * tmp
                            
                            x\_m = abs(x)
                            x\_s = copysign(1.0, x)
                            function code(x_s, x_m, y, z, t)
                            	tmp = 0.0
                            	if ((z <= -1.6e-12) || !(z <= 0.0305))
                            		tmp = Float64(1.0 * x_m);
                            	else
                            		tmp = Float64(Float64(y / t) * x_m);
                            	end
                            	return Float64(x_s * tmp)
                            end
                            
                            x\_m = abs(x);
                            x\_s = sign(x) * abs(1.0);
                            function tmp_2 = code(x_s, x_m, y, z, t)
                            	tmp = 0.0;
                            	if ((z <= -1.6e-12) || ~((z <= 0.0305)))
                            		tmp = 1.0 * x_m;
                            	else
                            		tmp = (y / t) * x_m;
                            	end
                            	tmp_2 = x_s * tmp;
                            end
                            
                            x\_m = N[Abs[x], $MachinePrecision]
                            x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                            code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -1.6e-12], N[Not[LessEqual[z, 0.0305]], $MachinePrecision]], N[(1.0 * x$95$m), $MachinePrecision], N[(N[(y / t), $MachinePrecision] * x$95$m), $MachinePrecision]]), $MachinePrecision]
                            
                            \begin{array}{l}
                            x\_m = \left|x\right|
                            \\
                            x\_s = \mathsf{copysign}\left(1, x\right)
                            
                            \\
                            x\_s \cdot \begin{array}{l}
                            \mathbf{if}\;z \leq -1.6 \cdot 10^{-12} \lor \neg \left(z \leq 0.0305\right):\\
                            \;\;\;\;1 \cdot x\_m\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{y}{t} \cdot x\_m\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if z < -1.6e-12 or 0.030499999999999999 < z

                              1. Initial program 70.4%

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

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

                                  \[\leadsto \frac{x \cdot \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}}{t - z} \]
                                2. lower-neg.f6453.2

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

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

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

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

                                  \[\leadsto \color{blue}{x \cdot \frac{-z}{t - z}} \]
                                4. *-commutativeN/A

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

                                  \[\leadsto \color{blue}{\frac{-z}{t - z} \cdot x} \]
                                6. lower-/.f6478.7

                                  \[\leadsto \color{blue}{\frac{-z}{t - z}} \cdot x \]
                              7. Applied rewrites78.7%

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

                                \[\leadsto \color{blue}{1} \cdot x \]
                              9. Step-by-step derivation
                                1. Applied rewrites60.5%

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

                                if -1.6e-12 < z < 0.030499999999999999

                                1. Initial program 95.8%

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

                                  \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
                                4. Step-by-step derivation
                                  1. lower-/.f64N/A

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

                                    \[\leadsto \frac{\color{blue}{y \cdot x}}{t} \]
                                  3. lower-*.f6463.5

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

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

                                    \[\leadsto \frac{y}{t} \cdot \color{blue}{x} \]
                                7. Recombined 2 regimes into one program.
                                8. Final simplification61.4%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{-12} \lor \neg \left(z \leq 0.0305\right):\\ \;\;\;\;1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t} \cdot x\\ \end{array} \]
                                9. Add Preprocessing

                                Alternative 14: 59.7% accurate, 0.8× speedup?

                                \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{-12} \lor \neg \left(z \leq 0.0305\right):\\ \;\;\;\;1 \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m}{t} \cdot y\\ \end{array} \end{array} \]
                                x\_m = (fabs.f64 x)
                                x\_s = (copysign.f64 #s(literal 1 binary64) x)
                                (FPCore (x_s x_m y z t)
                                 :precision binary64
                                 (*
                                  x_s
                                  (if (or (<= z -1.6e-12) (not (<= z 0.0305))) (* 1.0 x_m) (* (/ x_m t) y))))
                                x\_m = fabs(x);
                                x\_s = copysign(1.0, x);
                                double code(double x_s, double x_m, double y, double z, double t) {
                                	double tmp;
                                	if ((z <= -1.6e-12) || !(z <= 0.0305)) {
                                		tmp = 1.0 * x_m;
                                	} else {
                                		tmp = (x_m / t) * y;
                                	}
                                	return x_s * tmp;
                                }
                                
                                x\_m =     private
                                x\_s =     private
                                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_s, x_m, y, z, t)
                                use fmin_fmax_functions
                                    real(8), intent (in) :: x_s
                                    real(8), intent (in) :: x_m
                                    real(8), intent (in) :: y
                                    real(8), intent (in) :: z
                                    real(8), intent (in) :: t
                                    real(8) :: tmp
                                    if ((z <= (-1.6d-12)) .or. (.not. (z <= 0.0305d0))) then
                                        tmp = 1.0d0 * x_m
                                    else
                                        tmp = (x_m / t) * y
                                    end if
                                    code = x_s * tmp
                                end function
                                
                                x\_m = Math.abs(x);
                                x\_s = Math.copySign(1.0, x);
                                public static double code(double x_s, double x_m, double y, double z, double t) {
                                	double tmp;
                                	if ((z <= -1.6e-12) || !(z <= 0.0305)) {
                                		tmp = 1.0 * x_m;
                                	} else {
                                		tmp = (x_m / t) * y;
                                	}
                                	return x_s * tmp;
                                }
                                
                                x\_m = math.fabs(x)
                                x\_s = math.copysign(1.0, x)
                                def code(x_s, x_m, y, z, t):
                                	tmp = 0
                                	if (z <= -1.6e-12) or not (z <= 0.0305):
                                		tmp = 1.0 * x_m
                                	else:
                                		tmp = (x_m / t) * y
                                	return x_s * tmp
                                
                                x\_m = abs(x)
                                x\_s = copysign(1.0, x)
                                function code(x_s, x_m, y, z, t)
                                	tmp = 0.0
                                	if ((z <= -1.6e-12) || !(z <= 0.0305))
                                		tmp = Float64(1.0 * x_m);
                                	else
                                		tmp = Float64(Float64(x_m / t) * y);
                                	end
                                	return Float64(x_s * tmp)
                                end
                                
                                x\_m = abs(x);
                                x\_s = sign(x) * abs(1.0);
                                function tmp_2 = code(x_s, x_m, y, z, t)
                                	tmp = 0.0;
                                	if ((z <= -1.6e-12) || ~((z <= 0.0305)))
                                		tmp = 1.0 * x_m;
                                	else
                                		tmp = (x_m / t) * y;
                                	end
                                	tmp_2 = x_s * tmp;
                                end
                                
                                x\_m = N[Abs[x], $MachinePrecision]
                                x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -1.6e-12], N[Not[LessEqual[z, 0.0305]], $MachinePrecision]], N[(1.0 * x$95$m), $MachinePrecision], N[(N[(x$95$m / t), $MachinePrecision] * y), $MachinePrecision]]), $MachinePrecision]
                                
                                \begin{array}{l}
                                x\_m = \left|x\right|
                                \\
                                x\_s = \mathsf{copysign}\left(1, x\right)
                                
                                \\
                                x\_s \cdot \begin{array}{l}
                                \mathbf{if}\;z \leq -1.6 \cdot 10^{-12} \lor \neg \left(z \leq 0.0305\right):\\
                                \;\;\;\;1 \cdot x\_m\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\frac{x\_m}{t} \cdot y\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if z < -1.6e-12 or 0.030499999999999999 < z

                                  1. Initial program 70.4%

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

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

                                      \[\leadsto \frac{x \cdot \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}}{t - z} \]
                                    2. lower-neg.f6453.2

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

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

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

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

                                      \[\leadsto \color{blue}{x \cdot \frac{-z}{t - z}} \]
                                    4. *-commutativeN/A

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

                                      \[\leadsto \color{blue}{\frac{-z}{t - z} \cdot x} \]
                                    6. lower-/.f6478.7

                                      \[\leadsto \color{blue}{\frac{-z}{t - z}} \cdot x \]
                                  7. Applied rewrites78.7%

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

                                    \[\leadsto \color{blue}{1} \cdot x \]
                                  9. Step-by-step derivation
                                    1. Applied rewrites60.5%

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

                                    if -1.6e-12 < z < 0.030499999999999999

                                    1. Initial program 95.8%

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

                                      \[\leadsto \color{blue}{\frac{x \cdot y}{t}} \]
                                    4. Step-by-step derivation
                                      1. lower-/.f64N/A

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

                                        \[\leadsto \frac{\color{blue}{y \cdot x}}{t} \]
                                      3. lower-*.f6463.5

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

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

                                        \[\leadsto \frac{x}{t} \cdot \color{blue}{y} \]
                                    7. Recombined 2 regimes into one program.
                                    8. Final simplification59.7%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{-12} \lor \neg \left(z \leq 0.0305\right):\\ \;\;\;\;1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t} \cdot y\\ \end{array} \]
                                    9. Add Preprocessing

                                    Alternative 15: 33.9% accurate, 3.8× speedup?

                                    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \left(1 \cdot x\_m\right) \end{array} \]
                                    x\_m = (fabs.f64 x)
                                    x\_s = (copysign.f64 #s(literal 1 binary64) x)
                                    (FPCore (x_s x_m y z t) :precision binary64 (* x_s (* 1.0 x_m)))
                                    x\_m = fabs(x);
                                    x\_s = copysign(1.0, x);
                                    double code(double x_s, double x_m, double y, double z, double t) {
                                    	return x_s * (1.0 * x_m);
                                    }
                                    
                                    x\_m =     private
                                    x\_s =     private
                                    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_s, x_m, y, z, t)
                                    use fmin_fmax_functions
                                        real(8), intent (in) :: x_s
                                        real(8), intent (in) :: x_m
                                        real(8), intent (in) :: y
                                        real(8), intent (in) :: z
                                        real(8), intent (in) :: t
                                        code = x_s * (1.0d0 * x_m)
                                    end function
                                    
                                    x\_m = Math.abs(x);
                                    x\_s = Math.copySign(1.0, x);
                                    public static double code(double x_s, double x_m, double y, double z, double t) {
                                    	return x_s * (1.0 * x_m);
                                    }
                                    
                                    x\_m = math.fabs(x)
                                    x\_s = math.copysign(1.0, x)
                                    def code(x_s, x_m, y, z, t):
                                    	return x_s * (1.0 * x_m)
                                    
                                    x\_m = abs(x)
                                    x\_s = copysign(1.0, x)
                                    function code(x_s, x_m, y, z, t)
                                    	return Float64(x_s * Float64(1.0 * x_m))
                                    end
                                    
                                    x\_m = abs(x);
                                    x\_s = sign(x) * abs(1.0);
                                    function tmp = code(x_s, x_m, y, z, t)
                                    	tmp = x_s * (1.0 * x_m);
                                    end
                                    
                                    x\_m = N[Abs[x], $MachinePrecision]
                                    x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                    code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * N[(1.0 * x$95$m), $MachinePrecision]), $MachinePrecision]
                                    
                                    \begin{array}{l}
                                    x\_m = \left|x\right|
                                    \\
                                    x\_s = \mathsf{copysign}\left(1, x\right)
                                    
                                    \\
                                    x\_s \cdot \left(1 \cdot x\_m\right)
                                    \end{array}
                                    
                                    Derivation
                                    1. Initial program 82.2%

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

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

                                        \[\leadsto \frac{x \cdot \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}}{t - z} \]
                                      2. lower-neg.f6441.8

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

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

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

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

                                        \[\leadsto \color{blue}{x \cdot \frac{-z}{t - z}} \]
                                      4. *-commutativeN/A

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

                                        \[\leadsto \color{blue}{\frac{-z}{t - z} \cdot x} \]
                                      6. lower-/.f6455.4

                                        \[\leadsto \color{blue}{\frac{-z}{t - z}} \cdot x \]
                                    7. Applied rewrites55.4%

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

                                      \[\leadsto \color{blue}{1} \cdot x \]
                                    9. Step-by-step derivation
                                      1. Applied rewrites35.7%

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

                                      Developer Target 1: 97.1% 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 2024364 
                                      (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)))