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

Percentage Accurate: 83.6% → 96.1%
Time: 10.0s
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: 83.6% 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.1% 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 1.4 \cdot 10^{-68}:\\ \;\;\;\;\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 1.4e-68)
    (/ (* 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 <= 1.4e-68) {
		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 <= 1.4d-68) 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 <= 1.4e-68) {
		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 <= 1.4e-68:
		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 <= 1.4e-68)
		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 <= 1.4e-68)
		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, 1.4e-68], 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 1.4 \cdot 10^{-68}:\\
\;\;\;\;\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 < 1.4000000000000001e-68

    1. Initial program 87.5%

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

    if 1.4000000000000001e-68 < x

    1. Initial program 70.9%

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

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

Alternative 2: 39.5% accurate, 0.5× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{x\_m \cdot \left(y - z\right)}{t - z} \leq 2 \cdot 10^{-55}:\\ \;\;\;\;\frac{z \cdot x\_m}{z}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x\_m}{z}\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= (/ (* x_m (- y z)) (- t z)) 2e-55) (/ (* z x_m) z) (* z (/ x_m z)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
	double tmp;
	if (((x_m * (y - z)) / (t - z)) <= 2e-55) {
		tmp = (z * x_m) / z;
	} else {
		tmp = z * (x_m / z);
	}
	return x_s * tmp;
}
x\_m =     private
x\_s =     private
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\mathbf{else}:\\
\;\;\;\;z \cdot \frac{x\_m}{z}\\


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

    1. Initial program 87.1%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \left(y - z\right)}{z}} \]
    5. Step-by-step derivation
      1. Applied rewrites33.0%

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

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

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

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

          if 1.99999999999999999e-55 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z))

          1. Initial program 71.6%

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

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

            \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \left(y - z\right)}{z}} \]
          5. Step-by-step derivation
            1. Applied rewrites49.5%

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

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

                \[\leadsto z \cdot \frac{\color{blue}{x}}{z} \]
            4. Recombined 2 regimes into one program.
            5. Add Preprocessing

            Alternative 3: 62.6% 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 -1.7 \cdot 10^{+116}:\\ \;\;\;\;x\_m\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{-55}:\\ \;\;\;\;\frac{y}{t} \cdot x\_m\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+184}:\\ \;\;\;\;\left(z - y\right) \cdot \frac{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 (<= z -1.7e+116)
                x_m
                (if (<= z 2.35e-55)
                  (* (/ y t) x_m)
                  (if (<= z 8e+184) (* (- z y) (/ 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 (z <= -1.7e+116) {
            		tmp = x_m;
            	} else if (z <= 2.35e-55) {
            		tmp = (y / t) * x_m;
            	} else if (z <= 8e+184) {
            		tmp = (z - y) * (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 (z <= (-1.7d+116)) then
                    tmp = x_m
                else if (z <= 2.35d-55) then
                    tmp = (y / t) * x_m
                else if (z <= 8d+184) then
                    tmp = (z - y) * (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 (z <= -1.7e+116) {
            		tmp = x_m;
            	} else if (z <= 2.35e-55) {
            		tmp = (y / t) * x_m;
            	} else if (z <= 8e+184) {
            		tmp = (z - y) * (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 z <= -1.7e+116:
            		tmp = x_m
            	elif z <= 2.35e-55:
            		tmp = (y / t) * x_m
            	elif z <= 8e+184:
            		tmp = (z - y) * (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 (z <= -1.7e+116)
            		tmp = x_m;
            	elseif (z <= 2.35e-55)
            		tmp = Float64(Float64(y / t) * x_m);
            	elseif (z <= 8e+184)
            		tmp = Float64(Float64(z - y) * Float64(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 (z <= -1.7e+116)
            		tmp = x_m;
            	elseif (z <= 2.35e-55)
            		tmp = (y / t) * x_m;
            	elseif (z <= 8e+184)
            		tmp = (z - y) * (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[z, -1.7e+116], x$95$m, If[LessEqual[z, 2.35e-55], N[(N[(y / t), $MachinePrecision] * x$95$m), $MachinePrecision], If[LessEqual[z, 8e+184], N[(N[(z - y), $MachinePrecision] * N[(x$95$m / z), $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 -1.7 \cdot 10^{+116}:\\
            \;\;\;\;x\_m\\
            
            \mathbf{elif}\;z \leq 2.35 \cdot 10^{-55}:\\
            \;\;\;\;\frac{y}{t} \cdot x\_m\\
            
            \mathbf{elif}\;z \leq 8 \cdot 10^{+184}:\\
            \;\;\;\;\left(z - y\right) \cdot \frac{x\_m}{z}\\
            
            \mathbf{else}:\\
            \;\;\;\;x\_m\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if z < -1.70000000000000011e116 or 8.00000000000000014e184 < z

              1. Initial program 64.8%

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

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

                if -1.70000000000000011e116 < z < 2.35e-55

                1. Initial program 90.2%

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

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

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

                    if 2.35e-55 < z < 8.00000000000000014e184

                    1. Initial program 83.4%

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

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

                      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \left(y - z\right)}{z}} \]
                    5. Step-by-step derivation
                      1. Applied rewrites59.9%

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+116}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{-55}:\\ \;\;\;\;\frac{y}{t} \cdot x\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+184}:\\ \;\;\;\;\left(z - y\right) \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                    8. Add Preprocessing

                    Alternative 4: 89.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 -5 \cdot 10^{+185} \lor \neg \left(z \leq 1.28 \cdot 10^{+92}\right):\\ \;\;\;\;\frac{z - y}{z} \cdot x\_m\\ \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 (or (<= z -5e+185) (not (<= z 1.28e+92)))
                        (* (/ (- z y) z) x_m)
                        (* (/ 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 ((z <= -5e+185) || !(z <= 1.28e+92)) {
                    		tmp = ((z - y) / z) * x_m;
                    	} 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 ((z <= (-5d+185)) .or. (.not. (z <= 1.28d+92))) then
                            tmp = ((z - y) / z) * x_m
                        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 ((z <= -5e+185) || !(z <= 1.28e+92)) {
                    		tmp = ((z - y) / z) * x_m;
                    	} 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 (z <= -5e+185) or not (z <= 1.28e+92):
                    		tmp = ((z - y) / z) * x_m
                    	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 ((z <= -5e+185) || !(z <= 1.28e+92))
                    		tmp = Float64(Float64(Float64(z - y) / z) * x_m);
                    	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 ((z <= -5e+185) || ~((z <= 1.28e+92)))
                    		tmp = ((z - y) / z) * x_m;
                    	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[Or[LessEqual[z, -5e+185], N[Not[LessEqual[z, 1.28e+92]], $MachinePrecision]], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * x$95$m), $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}\;z \leq -5 \cdot 10^{+185} \lor \neg \left(z \leq 1.28 \cdot 10^{+92}\right):\\
                    \;\;\;\;\frac{z - y}{z} \cdot x\_m\\
                    
                    \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 z < -4.9999999999999999e185 or 1.27999999999999996e92 < z

                      1. Initial program 66.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 rewrites95.2%

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

                        if -4.9999999999999999e185 < z < 1.27999999999999996e92

                        1. Initial program 88.4%

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

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

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

                      Alternative 5: 74.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 -1.7 \cdot 10^{+116} \lor \neg \left(z \leq 2.7 \cdot 10^{-17}\right):\\ \;\;\;\;\frac{z - y}{z} \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t - z} \cdot x\_m\\ \end{array} \end{array} \]
                      x\_m = (fabs.f64 x)
                      x\_s = (copysign.f64 #s(literal 1 binary64) x)
                      (FPCore (x_s x_m y z t)
                       :precision binary64
                       (*
                        x_s
                        (if (or (<= z -1.7e+116) (not (<= z 2.7e-17)))
                          (* (/ (- z y) z) x_m)
                          (* (/ y (- t 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 ((z <= -1.7e+116) || !(z <= 2.7e-17)) {
                      		tmp = ((z - y) / z) * x_m;
                      	} else {
                      		tmp = (y / (t - z)) * x_m;
                      	}
                      	return x_s * tmp;
                      }
                      
                      x\_m =     private
                      x\_s =     private
                      module fmin_fmax_functions
                          implicit none
                          private
                          public fmax
                          public fmin
                      
                          interface fmax
                              module procedure fmax88
                              module procedure fmax44
                              module procedure fmax84
                              module procedure fmax48
                          end interface
                          interface fmin
                              module procedure fmin88
                              module procedure fmin44
                              module procedure fmin84
                              module procedure fmin48
                          end interface
                      contains
                          real(8) function fmax88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmax44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmax84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmax48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                          end function
                          real(8) function fmin88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmin44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmin84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmin48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                          end function
                      end module
                      
                      real(8) function code(x_s, x_m, y, z, t)
                      use fmin_fmax_functions
                          real(8), intent (in) :: x_s
                          real(8), intent (in) :: x_m
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          real(8), intent (in) :: t
                          real(8) :: tmp
                          if ((z <= (-1.7d+116)) .or. (.not. (z <= 2.7d-17))) then
                              tmp = ((z - y) / z) * x_m
                          else
                              tmp = (y / (t - z)) * x_m
                          end if
                          code = x_s * tmp
                      end function
                      
                      x\_m = Math.abs(x);
                      x\_s = Math.copySign(1.0, x);
                      public static double code(double x_s, double x_m, double y, double z, double t) {
                      	double tmp;
                      	if ((z <= -1.7e+116) || !(z <= 2.7e-17)) {
                      		tmp = ((z - y) / z) * x_m;
                      	} else {
                      		tmp = (y / (t - z)) * x_m;
                      	}
                      	return x_s * tmp;
                      }
                      
                      x\_m = math.fabs(x)
                      x\_s = math.copysign(1.0, x)
                      def code(x_s, x_m, y, z, t):
                      	tmp = 0
                      	if (z <= -1.7e+116) or not (z <= 2.7e-17):
                      		tmp = ((z - y) / z) * x_m
                      	else:
                      		tmp = (y / (t - z)) * x_m
                      	return x_s * tmp
                      
                      x\_m = abs(x)
                      x\_s = copysign(1.0, x)
                      function code(x_s, x_m, y, z, t)
                      	tmp = 0.0
                      	if ((z <= -1.7e+116) || !(z <= 2.7e-17))
                      		tmp = Float64(Float64(Float64(z - y) / z) * x_m);
                      	else
                      		tmp = Float64(Float64(y / Float64(t - z)) * x_m);
                      	end
                      	return Float64(x_s * tmp)
                      end
                      
                      x\_m = abs(x);
                      x\_s = sign(x) * abs(1.0);
                      function tmp_2 = code(x_s, x_m, y, z, t)
                      	tmp = 0.0;
                      	if ((z <= -1.7e+116) || ~((z <= 2.7e-17)))
                      		tmp = ((z - y) / z) * x_m;
                      	else
                      		tmp = (y / (t - z)) * x_m;
                      	end
                      	tmp_2 = x_s * tmp;
                      end
                      
                      x\_m = N[Abs[x], $MachinePrecision]
                      x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                      code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -1.7e+116], N[Not[LessEqual[z, 2.7e-17]], $MachinePrecision]], N[(N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision] * x$95$m), $MachinePrecision], N[(N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision] * x$95$m), $MachinePrecision]]), $MachinePrecision]
                      
                      \begin{array}{l}
                      x\_m = \left|x\right|
                      \\
                      x\_s = \mathsf{copysign}\left(1, x\right)
                      
                      \\
                      x\_s \cdot \begin{array}{l}
                      \mathbf{if}\;z \leq -1.7 \cdot 10^{+116} \lor \neg \left(z \leq 2.7 \cdot 10^{-17}\right):\\
                      \;\;\;\;\frac{z - y}{z} \cdot x\_m\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{y}{t - z} \cdot x\_m\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if z < -1.70000000000000011e116 or 2.7000000000000001e-17 < z

                        1. Initial program 71.4%

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

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

                          if -1.70000000000000011e116 < z < 2.7000000000000001e-17

                          1. Initial program 90.5%

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

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

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

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

                          Alternative 6: 69.6% accurate, 0.7× speedup?

                          \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{+119}:\\ \;\;\;\;x\_m\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+64}:\\ \;\;\;\;\frac{y}{t - z} \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 -7.6e+119) x_m (if (<= z 1.25e+64) (* (/ y (- t z)) 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 <= -7.6e+119) {
                          		tmp = x_m;
                          	} else if (z <= 1.25e+64) {
                          		tmp = (y / (t - z)) * 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 <= (-7.6d+119)) then
                                  tmp = x_m
                              else if (z <= 1.25d+64) then
                                  tmp = (y / (t - z)) * 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 <= -7.6e+119) {
                          		tmp = x_m;
                          	} else if (z <= 1.25e+64) {
                          		tmp = (y / (t - z)) * 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 <= -7.6e+119:
                          		tmp = x_m
                          	elif z <= 1.25e+64:
                          		tmp = (y / (t - z)) * 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 <= -7.6e+119)
                          		tmp = x_m;
                          	elseif (z <= 1.25e+64)
                          		tmp = Float64(Float64(y / Float64(t - z)) * 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 <= -7.6e+119)
                          		tmp = x_m;
                          	elseif (z <= 1.25e+64)
                          		tmp = (y / (t - z)) * 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, -7.6e+119], x$95$m, If[LessEqual[z, 1.25e+64], N[(N[(y / N[(t - z), $MachinePrecision]), $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 -7.6 \cdot 10^{+119}:\\
                          \;\;\;\;x\_m\\
                          
                          \mathbf{elif}\;z \leq 1.25 \cdot 10^{+64}:\\
                          \;\;\;\;\frac{y}{t - z} \cdot x\_m\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;x\_m\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if z < -7.59999999999999979e119 or 1.25e64 < z

                            1. Initial program 70.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 rewrites72.2%

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

                              if -7.59999999999999979e119 < z < 1.25e64

                              1. Initial program 89.6%

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

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

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{+119}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+64}:\\ \;\;\;\;\frac{y}{t - z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                              7. Add Preprocessing

                              Alternative 7: 59.1% accurate, 0.8× speedup?

                              \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+116} \lor \neg \left(z \leq 7500000000\right):\\ \;\;\;\;x\_m\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x\_m}{t}\\ \end{array} \end{array} \]
                              x\_m = (fabs.f64 x)
                              x\_s = (copysign.f64 #s(literal 1 binary64) x)
                              (FPCore (x_s x_m y z t)
                               :precision binary64
                               (*
                                x_s
                                (if (or (<= z -1.7e+116) (not (<= z 7500000000.0))) x_m (* y (/ x_m t)))))
                              x\_m = fabs(x);
                              x\_s = copysign(1.0, x);
                              double code(double x_s, double x_m, double y, double z, double t) {
                              	double tmp;
                              	if ((z <= -1.7e+116) || !(z <= 7500000000.0)) {
                              		tmp = x_m;
                              	} else {
                              		tmp = y * (x_m / t);
                              	}
                              	return x_s * tmp;
                              }
                              
                              x\_m =     private
                              x\_s =     private
                              module fmin_fmax_functions
                                  implicit none
                                  private
                                  public fmax
                                  public fmin
                              
                                  interface fmax
                                      module procedure fmax88
                                      module procedure fmax44
                                      module procedure fmax84
                                      module procedure fmax48
                                  end interface
                                  interface fmin
                                      module procedure fmin88
                                      module procedure fmin44
                                      module procedure fmin84
                                      module procedure fmin48
                                  end interface
                              contains
                                  real(8) function fmax88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmax44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmax84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmax48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmin44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmin48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                  end function
                              end module
                              
                              real(8) function code(x_s, x_m, y, z, t)
                              use fmin_fmax_functions
                                  real(8), intent (in) :: x_s
                                  real(8), intent (in) :: x_m
                                  real(8), intent (in) :: y
                                  real(8), intent (in) :: z
                                  real(8), intent (in) :: t
                                  real(8) :: tmp
                                  if ((z <= (-1.7d+116)) .or. (.not. (z <= 7500000000.0d0))) then
                                      tmp = x_m
                                  else
                                      tmp = y * (x_m / t)
                                  end if
                                  code = x_s * tmp
                              end function
                              
                              x\_m = Math.abs(x);
                              x\_s = Math.copySign(1.0, x);
                              public static double code(double x_s, double x_m, double y, double z, double t) {
                              	double tmp;
                              	if ((z <= -1.7e+116) || !(z <= 7500000000.0)) {
                              		tmp = x_m;
                              	} else {
                              		tmp = y * (x_m / t);
                              	}
                              	return x_s * tmp;
                              }
                              
                              x\_m = math.fabs(x)
                              x\_s = math.copysign(1.0, x)
                              def code(x_s, x_m, y, z, t):
                              	tmp = 0
                              	if (z <= -1.7e+116) or not (z <= 7500000000.0):
                              		tmp = x_m
                              	else:
                              		tmp = y * (x_m / t)
                              	return x_s * tmp
                              
                              x\_m = abs(x)
                              x\_s = copysign(1.0, x)
                              function code(x_s, x_m, y, z, t)
                              	tmp = 0.0
                              	if ((z <= -1.7e+116) || !(z <= 7500000000.0))
                              		tmp = x_m;
                              	else
                              		tmp = Float64(y * Float64(x_m / t));
                              	end
                              	return Float64(x_s * tmp)
                              end
                              
                              x\_m = abs(x);
                              x\_s = sign(x) * abs(1.0);
                              function tmp_2 = code(x_s, x_m, y, z, t)
                              	tmp = 0.0;
                              	if ((z <= -1.7e+116) || ~((z <= 7500000000.0)))
                              		tmp = x_m;
                              	else
                              		tmp = y * (x_m / t);
                              	end
                              	tmp_2 = x_s * tmp;
                              end
                              
                              x\_m = N[Abs[x], $MachinePrecision]
                              x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                              code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -1.7e+116], N[Not[LessEqual[z, 7500000000.0]], $MachinePrecision]], x$95$m, N[(y * N[(x$95$m / t), $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 -1.7 \cdot 10^{+116} \lor \neg \left(z \leq 7500000000\right):\\
                              \;\;\;\;x\_m\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;y \cdot \frac{x\_m}{t}\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if z < -1.70000000000000011e116 or 7.5e9 < z

                                1. Initial program 70.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 rewrites69.1%

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

                                  if -1.70000000000000011e116 < z < 7.5e9

                                  1. Initial program 90.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 rewrites74.6%

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

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

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

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

                                      Alternative 8: 60.1% accurate, 0.8× speedup?

                                      \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+116}:\\ \;\;\;\;x\_m\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+63}:\\ \;\;\;\;\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 -1.7e+116) x_m (if (<= z 1.9e+63) (* (/ 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 <= -1.7e+116) {
                                      		tmp = x_m;
                                      	} else if (z <= 1.9e+63) {
                                      		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 <= (-1.7d+116)) then
                                              tmp = x_m
                                          else if (z <= 1.9d+63) 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 <= -1.7e+116) {
                                      		tmp = x_m;
                                      	} else if (z <= 1.9e+63) {
                                      		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 <= -1.7e+116:
                                      		tmp = x_m
                                      	elif z <= 1.9e+63:
                                      		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 <= -1.7e+116)
                                      		tmp = x_m;
                                      	elseif (z <= 1.9e+63)
                                      		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 <= -1.7e+116)
                                      		tmp = x_m;
                                      	elseif (z <= 1.9e+63)
                                      		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, -1.7e+116], x$95$m, If[LessEqual[z, 1.9e+63], 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 -1.7 \cdot 10^{+116}:\\
                                      \;\;\;\;x\_m\\
                                      
                                      \mathbf{elif}\;z \leq 1.9 \cdot 10^{+63}:\\
                                      \;\;\;\;\frac{y}{t} \cdot x\_m\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;x\_m\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if z < -1.70000000000000011e116 or 1.9000000000000001e63 < z

                                        1. Initial program 70.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 rewrites72.2%

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

                                          if -1.70000000000000011e116 < z < 1.9000000000000001e63

                                          1. Initial program 89.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 rewrites73.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 rewrites64.5%

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

                                              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+116}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+63}:\\ \;\;\;\;\frac{y}{t} \cdot x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                                            6. Add Preprocessing

                                            Alternative 9: 36.4% 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 6 \cdot 10^{+170}:\\ \;\;\;\;x\_m\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x\_m}{z}\\ \end{array} \end{array} \]
                                            x\_m = (fabs.f64 x)
                                            x\_s = (copysign.f64 #s(literal 1 binary64) x)
                                            (FPCore (x_s x_m y z t)
                                             :precision binary64
                                             (* x_s (if (<= x_m 6e+170) x_m (* z (/ x_m z)))))
                                            x\_m = fabs(x);
                                            x\_s = copysign(1.0, x);
                                            double code(double x_s, double x_m, double y, double z, double t) {
                                            	double tmp;
                                            	if (x_m <= 6e+170) {
                                            		tmp = x_m;
                                            	} else {
                                            		tmp = z * (x_m / z);
                                            	}
                                            	return x_s * tmp;
                                            }
                                            
                                            x\_m =     private
                                            x\_s =     private
                                            module fmin_fmax_functions
                                                implicit none
                                                private
                                                public fmax
                                                public fmin
                                            
                                                interface fmax
                                                    module procedure fmax88
                                                    module procedure fmax44
                                                    module procedure fmax84
                                                    module procedure fmax48
                                                end interface
                                                interface fmin
                                                    module procedure fmin88
                                                    module procedure fmin44
                                                    module procedure fmin84
                                                    module procedure fmin48
                                                end interface
                                            contains
                                                real(8) function fmax88(x, y) result (res)
                                                    real(8), intent (in) :: x
                                                    real(8), intent (in) :: y
                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                end function
                                                real(4) function fmax44(x, y) result (res)
                                                    real(4), intent (in) :: x
                                                    real(4), intent (in) :: y
                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                end function
                                                real(8) function fmax84(x, y) result(res)
                                                    real(8), intent (in) :: x
                                                    real(4), intent (in) :: y
                                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                end function
                                                real(8) function fmax48(x, y) result(res)
                                                    real(4), intent (in) :: x
                                                    real(8), intent (in) :: y
                                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                end function
                                                real(8) function fmin88(x, y) result (res)
                                                    real(8), intent (in) :: x
                                                    real(8), intent (in) :: y
                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                end function
                                                real(4) function fmin44(x, y) result (res)
                                                    real(4), intent (in) :: x
                                                    real(4), intent (in) :: y
                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                end function
                                                real(8) function fmin84(x, y) result(res)
                                                    real(8), intent (in) :: x
                                                    real(4), intent (in) :: y
                                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                end function
                                                real(8) function fmin48(x, y) result(res)
                                                    real(4), intent (in) :: x
                                                    real(8), intent (in) :: y
                                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                end function
                                            end module
                                            
                                            real(8) function code(x_s, x_m, y, z, t)
                                            use fmin_fmax_functions
                                                real(8), intent (in) :: x_s
                                                real(8), intent (in) :: x_m
                                                real(8), intent (in) :: y
                                                real(8), intent (in) :: z
                                                real(8), intent (in) :: t
                                                real(8) :: tmp
                                                if (x_m <= 6d+170) then
                                                    tmp = x_m
                                                else
                                                    tmp = z * (x_m / z)
                                                end if
                                                code = x_s * tmp
                                            end function
                                            
                                            x\_m = Math.abs(x);
                                            x\_s = Math.copySign(1.0, x);
                                            public static double code(double x_s, double x_m, double y, double z, double t) {
                                            	double tmp;
                                            	if (x_m <= 6e+170) {
                                            		tmp = x_m;
                                            	} else {
                                            		tmp = z * (x_m / z);
                                            	}
                                            	return x_s * tmp;
                                            }
                                            
                                            x\_m = math.fabs(x)
                                            x\_s = math.copysign(1.0, x)
                                            def code(x_s, x_m, y, z, t):
                                            	tmp = 0
                                            	if x_m <= 6e+170:
                                            		tmp = x_m
                                            	else:
                                            		tmp = z * (x_m / z)
                                            	return x_s * tmp
                                            
                                            x\_m = abs(x)
                                            x\_s = copysign(1.0, x)
                                            function code(x_s, x_m, y, z, t)
                                            	tmp = 0.0
                                            	if (x_m <= 6e+170)
                                            		tmp = x_m;
                                            	else
                                            		tmp = Float64(z * Float64(x_m / z));
                                            	end
                                            	return Float64(x_s * tmp)
                                            end
                                            
                                            x\_m = abs(x);
                                            x\_s = sign(x) * abs(1.0);
                                            function tmp_2 = code(x_s, x_m, y, z, t)
                                            	tmp = 0.0;
                                            	if (x_m <= 6e+170)
                                            		tmp = x_m;
                                            	else
                                            		tmp = z * (x_m / z);
                                            	end
                                            	tmp_2 = x_s * tmp;
                                            end
                                            
                                            x\_m = N[Abs[x], $MachinePrecision]
                                            x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                            code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[x$95$m, 6e+170], x$95$m, N[(z * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                            
                                            \begin{array}{l}
                                            x\_m = \left|x\right|
                                            \\
                                            x\_s = \mathsf{copysign}\left(1, x\right)
                                            
                                            \\
                                            x\_s \cdot \begin{array}{l}
                                            \mathbf{if}\;x\_m \leq 6 \cdot 10^{+170}:\\
                                            \;\;\;\;x\_m\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;z \cdot \frac{x\_m}{z}\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 2 regimes
                                            2. if x < 5.99999999999999994e170

                                              1. Initial program 86.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 rewrites32.1%

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

                                                if 5.99999999999999994e170 < x

                                                1. Initial program 48.8%

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

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

                                                  \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot \left(y - z\right)}{z}} \]
                                                5. Step-by-step derivation
                                                  1. Applied rewrites64.6%

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

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

                                                      \[\leadsto z \cdot \frac{\color{blue}{x}}{z} \]
                                                  4. Recombined 2 regimes into one program.
                                                  5. Final simplification33.4%

                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 6 \cdot 10^{+170}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x}{z}\\ \end{array} \]
                                                  6. Add Preprocessing

                                                  Alternative 10: 35.6% 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 82.8%

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

                                                      \[\leadsto \color{blue}{x} \]
                                                    2. Final simplification32.7%

                                                      \[\leadsto x \]
                                                    3. Add Preprocessing

                                                    Developer Target 1: 97.0% 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 2025019 
                                                    (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)))