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

Percentage Accurate: 84.3% → 96.9%
Time: 9.8s
Alternatives: 10
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 10 alternatives:

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

Initial Program: 84.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.9% 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 500000:\\ \;\;\;\;\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 500000.0)
    (/ (* 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 <= 500000.0) {
		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 <= 500000.0d0) 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 <= 500000.0) {
		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 <= 500000.0:
		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 <= 500000.0)
		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 <= 500000.0)
		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, 500000.0], 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 500000:\\
\;\;\;\;\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 < 5e5

    1. Initial program 91.1%

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

    if 5e5 < x

    1. Initial program 75.3%

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

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

Alternative 2: 58.7% accurate, 0.5× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ \begin{array}{l} t_1 := \frac{y}{t} \cdot x\_m\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -72000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 45:\\ \;\;\;\;\frac{z \cdot x\_m}{z - t}\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{+151}:\\ \;\;\;\;\frac{y \cdot x\_m}{t}\\ \mathbf{elif}\;y \leq 1.275 \cdot 10^{+185}:\\ \;\;\;\;\frac{x\_m}{z} \cdot \left(z - y\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 (* (/ y t) x_m)))
   (*
    x_s
    (if (<= y -72000000.0)
      t_1
      (if (<= y 45.0)
        (/ (* z x_m) (- z t))
        (if (<= y 1.75e+151)
          (/ (* y x_m) t)
          (if (<= y 1.275e+185) (* (/ x_m z) (- z y)) 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 = (y / t) * x_m;
	double tmp;
	if (y <= -72000000.0) {
		tmp = t_1;
	} else if (y <= 45.0) {
		tmp = (z * x_m) / (z - t);
	} else if (y <= 1.75e+151) {
		tmp = (y * x_m) / t;
	} else if (y <= 1.275e+185) {
		tmp = (x_m / z) * (z - y);
	} 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) :: tmp
    t_1 = (y / t) * x_m
    if (y <= (-72000000.0d0)) then
        tmp = t_1
    else if (y <= 45.0d0) then
        tmp = (z * x_m) / (z - t)
    else if (y <= 1.75d+151) then
        tmp = (y * x_m) / t
    else if (y <= 1.275d+185) then
        tmp = (x_m / z) * (z - y)
    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 = (y / t) * x_m;
	double tmp;
	if (y <= -72000000.0) {
		tmp = t_1;
	} else if (y <= 45.0) {
		tmp = (z * x_m) / (z - t);
	} else if (y <= 1.75e+151) {
		tmp = (y * x_m) / t;
	} else if (y <= 1.275e+185) {
		tmp = (x_m / z) * (z - y);
	} 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 = (y / t) * x_m
	tmp = 0
	if y <= -72000000.0:
		tmp = t_1
	elif y <= 45.0:
		tmp = (z * x_m) / (z - t)
	elif y <= 1.75e+151:
		tmp = (y * x_m) / t
	elif y <= 1.275e+185:
		tmp = (x_m / z) * (z - y)
	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(y / t) * x_m)
	tmp = 0.0
	if (y <= -72000000.0)
		tmp = t_1;
	elseif (y <= 45.0)
		tmp = Float64(Float64(z * x_m) / Float64(z - t));
	elseif (y <= 1.75e+151)
		tmp = Float64(Float64(y * x_m) / t);
	elseif (y <= 1.275e+185)
		tmp = Float64(Float64(x_m / z) * Float64(z - y));
	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 = (y / t) * x_m;
	tmp = 0.0;
	if (y <= -72000000.0)
		tmp = t_1;
	elseif (y <= 45.0)
		tmp = (z * x_m) / (z - t);
	elseif (y <= 1.75e+151)
		tmp = (y * x_m) / t;
	elseif (y <= 1.275e+185)
		tmp = (x_m / z) * (z - y);
	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[(y / t), $MachinePrecision] * x$95$m), $MachinePrecision]}, N[(x$95$s * If[LessEqual[y, -72000000.0], t$95$1, If[LessEqual[y, 45.0], N[(N[(z * x$95$m), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e+151], N[(N[(y * x$95$m), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 1.275e+185], N[(N[(x$95$m / z), $MachinePrecision] * N[(z - y), $MachinePrecision]), $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{y}{t} \cdot x\_m\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -72000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 45:\\
\;\;\;\;\frac{z \cdot x\_m}{z - t}\\

\mathbf{elif}\;y \leq 1.75 \cdot 10^{+151}:\\
\;\;\;\;\frac{y \cdot x\_m}{t}\\

\mathbf{elif}\;y \leq 1.275 \cdot 10^{+185}:\\
\;\;\;\;\frac{x\_m}{z} \cdot \left(z - y\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.2e7 or 1.27499999999999999e185 < y

    1. Initial program 79.8%

      \[\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. Applied rewrites64.3%

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

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

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

        if -7.2e7 < y < 45

        1. Initial program 91.2%

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

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

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

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

          if 45 < y < 1.7500000000000001e151

          1. Initial program 95.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. Applied rewrites57.1%

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

            if 1.7500000000000001e151 < y < 1.27499999999999999e185

            1. Initial program 78.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. Applied rewrites89.5%

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

                  \[\leadsto \frac{x}{z} \cdot \color{blue}{\left(z - y\right)} \]
              3. Recombined 4 regimes into one program.
              4. Final simplification70.8%

                \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -72000000:\\ \;\;\;\;\frac{y}{t} \cdot x\\ \mathbf{elif}\;y \leq 45:\\ \;\;\;\;\frac{z \cdot x}{z - t}\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{+151}:\\ \;\;\;\;\frac{y \cdot x}{t}\\ \mathbf{elif}\;y \leq 1.275 \cdot 10^{+185}:\\ \;\;\;\;\frac{x}{z} \cdot \left(z - y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t} \cdot x\\ \end{array} \]
              5. Add Preprocessing

              Alternative 3: 68.2% accurate, 0.6× 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 -3 \cdot 10^{+94}:\\ \;\;\;\;\mathsf{fma}\left(t, \frac{x\_m}{z}, x\_m\right)\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-28}:\\ \;\;\;\;\frac{y - z}{t} \cdot x\_m\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+174}:\\ \;\;\;\;\frac{z \cdot x\_m}{z - t}\\ \mathbf{else}:\\ \;\;\;\;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 (<= z -3e+94)
                  (fma t (/ x_m z) x_m)
                  (if (<= z 1.75e-28)
                    (* (/ (- y z) t) x_m)
                    (if (<= z 2.4e+174) (/ (* z 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 <= -3e+94) {
              		tmp = fma(t, (x_m / z), x_m);
              	} else if (z <= 1.75e-28) {
              		tmp = ((y - z) / t) * x_m;
              	} else if (z <= 2.4e+174) {
              		tmp = (z * x_m) / (z - t);
              	} else {
              		tmp = 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 <= -3e+94)
              		tmp = fma(t, Float64(x_m / z), x_m);
              	elseif (z <= 1.75e-28)
              		tmp = Float64(Float64(Float64(y - z) / t) * x_m);
              	elseif (z <= 2.4e+174)
              		tmp = Float64(Float64(z * x_m) / Float64(z - t));
              	else
              		tmp = 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, -3e+94], N[(t * N[(x$95$m / z), $MachinePrecision] + x$95$m), $MachinePrecision], If[LessEqual[z, 1.75e-28], N[(N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision] * x$95$m), $MachinePrecision], If[LessEqual[z, 2.4e+174], N[(N[(z * x$95$m), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], x$95$m]]]), $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 -3 \cdot 10^{+94}:\\
              \;\;\;\;\mathsf{fma}\left(t, \frac{x\_m}{z}, x\_m\right)\\
              
              \mathbf{elif}\;z \leq 1.75 \cdot 10^{-28}:\\
              \;\;\;\;\frac{y - z}{t} \cdot x\_m\\
              
              \mathbf{elif}\;z \leq 2.4 \cdot 10^{+174}:\\
              \;\;\;\;\frac{z \cdot x\_m}{z - t}\\
              
              \mathbf{else}:\\
              \;\;\;\;x\_m\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 4 regimes
              2. if z < -3.0000000000000001e94

                1. Initial program 77.8%

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

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

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

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

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

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

                    if -3.0000000000000001e94 < z < 1.75e-28

                    1. Initial program 93.9%

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

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

                      if 1.75e-28 < z < 2.3999999999999998e174

                      1. Initial program 89.3%

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

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

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

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

                        if 2.3999999999999998e174 < z

                        1. Initial program 69.7%

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

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

                            \[\leadsto \color{blue}{x} \]
                        5. Recombined 4 regimes into one program.
                        6. Final simplification75.8%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+94}:\\ \;\;\;\;\mathsf{fma}\left(t, \frac{x}{z}, x\right)\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-28}:\\ \;\;\;\;\frac{y - z}{t} \cdot x\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+174}:\\ \;\;\;\;\frac{z \cdot x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                        7. Add Preprocessing

                        Alternative 4: 62.5% accurate, 0.6× 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 -2.8 \cdot 10^{+94}:\\ \;\;\;\;\mathsf{fma}\left(t, \frac{x\_m}{z}, x\_m\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-90}:\\ \;\;\;\;\frac{y}{t} \cdot x\_m\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+174}:\\ \;\;\;\;\frac{z \cdot x\_m}{z - t}\\ \mathbf{else}:\\ \;\;\;\;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 (<= z -2.8e+94)
                            (fma t (/ x_m z) x_m)
                            (if (<= z 6e-90)
                              (* (/ y t) x_m)
                              (if (<= z 2.4e+174) (/ (* z 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 <= -2.8e+94) {
                        		tmp = fma(t, (x_m / z), x_m);
                        	} else if (z <= 6e-90) {
                        		tmp = (y / t) * x_m;
                        	} else if (z <= 2.4e+174) {
                        		tmp = (z * x_m) / (z - t);
                        	} else {
                        		tmp = 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 <= -2.8e+94)
                        		tmp = fma(t, Float64(x_m / z), x_m);
                        	elseif (z <= 6e-90)
                        		tmp = Float64(Float64(y / t) * x_m);
                        	elseif (z <= 2.4e+174)
                        		tmp = Float64(Float64(z * x_m) / Float64(z - t));
                        	else
                        		tmp = 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, -2.8e+94], N[(t * N[(x$95$m / z), $MachinePrecision] + x$95$m), $MachinePrecision], If[LessEqual[z, 6e-90], N[(N[(y / t), $MachinePrecision] * x$95$m), $MachinePrecision], If[LessEqual[z, 2.4e+174], N[(N[(z * x$95$m), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], x$95$m]]]), $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 -2.8 \cdot 10^{+94}:\\
                        \;\;\;\;\mathsf{fma}\left(t, \frac{x\_m}{z}, x\_m\right)\\
                        
                        \mathbf{elif}\;z \leq 6 \cdot 10^{-90}:\\
                        \;\;\;\;\frac{y}{t} \cdot x\_m\\
                        
                        \mathbf{elif}\;z \leq 2.4 \cdot 10^{+174}:\\
                        \;\;\;\;\frac{z \cdot x\_m}{z - t}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;x\_m\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 4 regimes
                        2. if z < -2.79999999999999998e94

                          1. Initial program 77.8%

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

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

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

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

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

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

                              if -2.79999999999999998e94 < z < 6.00000000000000041e-90

                              1. Initial program 93.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. Applied rewrites77.7%

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

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

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

                                  if 6.00000000000000041e-90 < z < 2.3999999999999998e174

                                  1. Initial program 91.2%

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

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

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

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

                                    if 2.3999999999999998e174 < z

                                    1. Initial program 69.7%

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

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

                                        \[\leadsto \color{blue}{x} \]
                                    5. Recombined 4 regimes into one program.
                                    6. Final simplification69.1%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+94}:\\ \;\;\;\;\mathsf{fma}\left(t, \frac{x}{z}, x\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-90}:\\ \;\;\;\;\frac{y}{t} \cdot x\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+174}:\\ \;\;\;\;\frac{z \cdot x}{z - t}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                                    7. Add Preprocessing

                                    Alternative 5: 89.5% 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 -3.8 \cdot 10^{+206}:\\ \;\;\;\;\frac{z - y}{z} \cdot x\_m\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{+181}:\\ \;\;\;\;\frac{x\_m}{t - z} \cdot \left(y - z\right)\\ \mathbf{else}:\\ \;\;\;\;x\_m - \frac{x\_m}{z} \cdot \left(y - t\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 -3.8e+206)
                                        (* (/ (- z y) z) x_m)
                                        (if (<= z 5.3e+181)
                                          (* (/ x_m (- t z)) (- y z))
                                          (- x_m (* (/ x_m z) (- y 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 <= -3.8e+206) {
                                    		tmp = ((z - y) / z) * x_m;
                                    	} else if (z <= 5.3e+181) {
                                    		tmp = (x_m / (t - z)) * (y - z);
                                    	} else {
                                    		tmp = x_m - ((x_m / z) * (y - 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 <= (-3.8d+206)) then
                                            tmp = ((z - y) / z) * x_m
                                        else if (z <= 5.3d+181) then
                                            tmp = (x_m / (t - z)) * (y - z)
                                        else
                                            tmp = x_m - ((x_m / z) * (y - 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 <= -3.8e+206) {
                                    		tmp = ((z - y) / z) * x_m;
                                    	} else if (z <= 5.3e+181) {
                                    		tmp = (x_m / (t - z)) * (y - z);
                                    	} else {
                                    		tmp = x_m - ((x_m / z) * (y - 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 <= -3.8e+206:
                                    		tmp = ((z - y) / z) * x_m
                                    	elif z <= 5.3e+181:
                                    		tmp = (x_m / (t - z)) * (y - z)
                                    	else:
                                    		tmp = x_m - ((x_m / z) * (y - 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 <= -3.8e+206)
                                    		tmp = Float64(Float64(Float64(z - y) / z) * x_m);
                                    	elseif (z <= 5.3e+181)
                                    		tmp = Float64(Float64(x_m / Float64(t - z)) * Float64(y - z));
                                    	else
                                    		tmp = Float64(x_m - Float64(Float64(x_m / z) * Float64(y - 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 <= -3.8e+206)
                                    		tmp = ((z - y) / z) * x_m;
                                    	elseif (z <= 5.3e+181)
                                    		tmp = (x_m / (t - z)) * (y - z);
                                    	else
                                    		tmp = x_m - ((x_m / z) * (y - 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[LessEqual[z, -3.8e+206], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * x$95$m), $MachinePrecision], If[LessEqual[z, 5.3e+181], N[(N[(x$95$m / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision], N[(x$95$m - N[(N[(x$95$m / z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $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 -3.8 \cdot 10^{+206}:\\
                                    \;\;\;\;\frac{z - y}{z} \cdot x\_m\\
                                    
                                    \mathbf{elif}\;z \leq 5.3 \cdot 10^{+181}:\\
                                    \;\;\;\;\frac{x\_m}{t - z} \cdot \left(y - z\right)\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;x\_m - \frac{x\_m}{z} \cdot \left(y - t\right)\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 3 regimes
                                    2. if z < -3.7999999999999999e206

                                      1. Initial program 79.7%

                                        \[\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. Applied rewrites94.8%

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

                                        if -3.7999999999999999e206 < z < 5.2999999999999996e181

                                        1. Initial program 90.8%

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

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

                                        if 5.2999999999999996e181 < z

                                        1. Initial program 72.0%

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

                                            \[\leadsto \color{blue}{x - \frac{x}{z} \cdot \left(y - t\right)} \]
                                        5. Recombined 3 regimes into one program.
                                        6. Final simplification91.7%

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+206}:\\ \;\;\;\;\frac{z - y}{z} \cdot x\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{+181}:\\ \;\;\;\;\frac{x}{t - z} \cdot \left(y - z\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x}{z} \cdot \left(y - t\right)\\ \end{array} \]
                                        7. Add Preprocessing

                                        Alternative 6: 73.8% 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 -4 \cdot 10^{+53} \lor \neg \left(z \leq 1.15 \cdot 10^{-5}\right):\\ \;\;\;\;\frac{z - y}{z} \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{y - z}{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 -4e+53) (not (<= z 1.15e-5)))
                                            (* (/ (- z y) z) x_m)
                                            (* (/ (- y 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 <= -4e+53) || !(z <= 1.15e-5)) {
                                        		tmp = ((z - y) / z) * x_m;
                                        	} else {
                                        		tmp = ((y - z) / 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 <= (-4d+53)) .or. (.not. (z <= 1.15d-5))) then
                                                tmp = ((z - y) / z) * x_m
                                            else
                                                tmp = ((y - z) / 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 <= -4e+53) || !(z <= 1.15e-5)) {
                                        		tmp = ((z - y) / z) * x_m;
                                        	} else {
                                        		tmp = ((y - z) / 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 <= -4e+53) or not (z <= 1.15e-5):
                                        		tmp = ((z - y) / z) * x_m
                                        	else:
                                        		tmp = ((y - 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 <= -4e+53) || !(z <= 1.15e-5))
                                        		tmp = Float64(Float64(Float64(z - y) / z) * x_m);
                                        	else
                                        		tmp = Float64(Float64(Float64(y - z) / 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 <= -4e+53) || ~((z <= 1.15e-5)))
                                        		tmp = ((z - y) / z) * x_m;
                                        	else
                                        		tmp = ((y - z) / 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, -4e+53], N[Not[LessEqual[z, 1.15e-5]], $MachinePrecision]], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * x$95$m), $MachinePrecision], N[(N[(N[(y - z), $MachinePrecision] / 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 -4 \cdot 10^{+53} \lor \neg \left(z \leq 1.15 \cdot 10^{-5}\right):\\
                                        \;\;\;\;\frac{z - y}{z} \cdot x\_m\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\frac{y - z}{t} \cdot x\_m\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 2 regimes
                                        2. if z < -4e53 or 1.15e-5 < z

                                          1. Initial program 79.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. Applied rewrites81.0%

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

                                            if -4e53 < z < 1.15e-5

                                            1. Initial program 94.4%

                                              \[\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. Applied rewrites77.3%

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

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

                                            Alternative 7: 59.8% 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 -2.8 \cdot 10^{+94}:\\ \;\;\;\;\mathsf{fma}\left(t, \frac{x\_m}{z}, x\_m\right)\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-28}:\\ \;\;\;\;\frac{y}{t} \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;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 (<= z -2.8e+94)
                                                (fma t (/ x_m z) x_m)
                                                (if (<= z 2.4e-28) (* (/ y t) x_m) 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 <= -2.8e+94) {
                                            		tmp = fma(t, (x_m / z), x_m);
                                            	} else if (z <= 2.4e-28) {
                                            		tmp = (y / t) * x_m;
                                            	} else {
                                            		tmp = 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 <= -2.8e+94)
                                            		tmp = fma(t, Float64(x_m / z), x_m);
                                            	elseif (z <= 2.4e-28)
                                            		tmp = Float64(Float64(y / t) * x_m);
                                            	else
                                            		tmp = 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, -2.8e+94], N[(t * N[(x$95$m / z), $MachinePrecision] + x$95$m), $MachinePrecision], If[LessEqual[z, 2.4e-28], N[(N[(y / t), $MachinePrecision] * x$95$m), $MachinePrecision], x$95$m]]), $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 -2.8 \cdot 10^{+94}:\\
                                            \;\;\;\;\mathsf{fma}\left(t, \frac{x\_m}{z}, x\_m\right)\\
                                            
                                            \mathbf{elif}\;z \leq 2.4 \cdot 10^{-28}:\\
                                            \;\;\;\;\frac{y}{t} \cdot x\_m\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;x\_m\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 3 regimes
                                            2. if z < -2.79999999999999998e94

                                              1. Initial program 77.8%

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

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

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

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

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

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

                                                  if -2.79999999999999998e94 < z < 2.4000000000000002e-28

                                                  1. Initial program 93.9%

                                                    \[\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. Applied rewrites75.7%

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

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

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

                                                      if 2.4000000000000002e-28 < z

                                                      1. Initial program 81.5%

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

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

                                                          \[\leadsto \color{blue}{x} \]
                                                      5. Recombined 3 regimes into one program.
                                                      6. Final simplification65.7%

                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+94}:\\ \;\;\;\;\mathsf{fma}\left(t, \frac{x}{z}, x\right)\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-28}:\\ \;\;\;\;\frac{y}{t} \cdot x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                                                      7. Add Preprocessing

                                                      Alternative 8: 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 -2.8 \cdot 10^{+94}:\\ \;\;\;\;x\_m\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-28}:\\ \;\;\;\;\frac{y}{t} \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;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 (<= z -2.8e+94) x_m (if (<= z 2.4e-28) (* (/ y t) x_m) 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 <= -2.8e+94) {
                                                      		tmp = x_m;
                                                      	} else if (z <= 2.4e-28) {
                                                      		tmp = (y / t) * x_m;
                                                      	} else {
                                                      		tmp = 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 <= (-2.8d+94)) then
                                                              tmp = x_m
                                                          else if (z <= 2.4d-28) then
                                                              tmp = (y / t) * x_m
                                                          else
                                                              tmp = 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 <= -2.8e+94) {
                                                      		tmp = x_m;
                                                      	} else if (z <= 2.4e-28) {
                                                      		tmp = (y / t) * x_m;
                                                      	} else {
                                                      		tmp = 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 <= -2.8e+94:
                                                      		tmp = x_m
                                                      	elif z <= 2.4e-28:
                                                      		tmp = (y / t) * x_m
                                                      	else:
                                                      		tmp = 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 <= -2.8e+94)
                                                      		tmp = x_m;
                                                      	elseif (z <= 2.4e-28)
                                                      		tmp = Float64(Float64(y / t) * x_m);
                                                      	else
                                                      		tmp = 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 <= -2.8e+94)
                                                      		tmp = x_m;
                                                      	elseif (z <= 2.4e-28)
                                                      		tmp = (y / t) * x_m;
                                                      	else
                                                      		tmp = 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[z, -2.8e+94], x$95$m, If[LessEqual[z, 2.4e-28], N[(N[(y / t), $MachinePrecision] * x$95$m), $MachinePrecision], x$95$m]]), $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 -2.8 \cdot 10^{+94}:\\
                                                      \;\;\;\;x\_m\\
                                                      
                                                      \mathbf{elif}\;z \leq 2.4 \cdot 10^{-28}:\\
                                                      \;\;\;\;\frac{y}{t} \cdot x\_m\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;x\_m\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if z < -2.79999999999999998e94 or 2.4000000000000002e-28 < z

                                                        1. Initial program 80.2%

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

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

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

                                                          if -2.79999999999999998e94 < z < 2.4000000000000002e-28

                                                          1. Initial program 93.9%

                                                            \[\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. Applied rewrites75.7%

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

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

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

                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+94}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-28}:\\ \;\;\;\;\frac{y}{t} \cdot x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                                                            6. Add Preprocessing

                                                            Alternative 9: 37.2% accurate, 1.0× 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 2.65 \cdot 10^{-176}:\\ \;\;\;\;\frac{z \cdot x\_m}{z}\\ \mathbf{else}:\\ \;\;\;\;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 2.65e-176) (/ (* z x_m) 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 (x_m <= 2.65e-176) {
                                                            		tmp = (z * x_m) / z;
                                                            	} else {
                                                            		tmp = 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 <= 2.65d-176) then
                                                                    tmp = (z * x_m) / z
                                                                else
                                                                    tmp = 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 <= 2.65e-176) {
                                                            		tmp = (z * x_m) / z;
                                                            	} else {
                                                            		tmp = 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 <= 2.65e-176:
                                                            		tmp = (z * x_m) / z
                                                            	else:
                                                            		tmp = 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 (x_m <= 2.65e-176)
                                                            		tmp = Float64(Float64(z * x_m) / z);
                                                            	else
                                                            		tmp = 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 <= 2.65e-176)
                                                            		tmp = (z * x_m) / z;
                                                            	else
                                                            		tmp = 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[x$95$m, 2.65e-176], N[(N[(z * x$95$m), $MachinePrecision] / z), $MachinePrecision], x$95$m]), $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 2.65 \cdot 10^{-176}:\\
                                                            \;\;\;\;\frac{z \cdot x\_m}{z}\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;x\_m\\
                                                            
                                                            
                                                            \end{array}
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 2 regimes
                                                            2. if x < 2.65000000000000006e-176

                                                              1. Initial program 90.0%

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

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

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

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

                                                                  \[\leadsto \frac{z \cdot x}{z} \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites36.5%

                                                                    \[\leadsto \frac{z \cdot x}{z} \]

                                                                  if 2.65000000000000006e-176 < x

                                                                  1. Initial program 84.3%

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

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

                                                                      \[\leadsto \color{blue}{x} \]
                                                                  5. Recombined 2 regimes into one program.
                                                                  6. Final simplification36.6%

                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.65 \cdot 10^{-176}:\\ \;\;\;\;\frac{z \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                                                                  7. Add Preprocessing

                                                                  Alternative 10: 35.1% accurate, 23.0× speedup?

                                                                  \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot x\_m \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 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 * 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 * 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 * 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 * 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 * 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 * 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 * x$95$m), $MachinePrecision]
                                                                  
                                                                  \begin{array}{l}
                                                                  x\_m = \left|x\right|
                                                                  \\
                                                                  x\_s = \mathsf{copysign}\left(1, x\right)
                                                                  
                                                                  \\
                                                                  x\_s \cdot x\_m
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Initial program 88.0%

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

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

                                                                      \[\leadsto \color{blue}{x} \]
                                                                    2. Final simplification36.1%

                                                                      \[\leadsto x \]
                                                                    3. Add Preprocessing

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

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

                                                                    Reproduce

                                                                    ?
                                                                    herbie shell --seed 2025026 
                                                                    (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)))