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

Percentage Accurate: 83.9% → 97.8%
Time: 3.2s
Alternatives: 11
Speedup: 1.0×

Specification

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

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

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 11 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.9% 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: 97.8% accurate, 0.3× speedup?

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

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

real(8) function code(x_s, x_m, y, z, t)
use fmin_fmax_functions
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x_m * (y - z)) / (t - z)
    if ((t_1 <= (-1d+269)) .or. (.not. (t_1 <= (-2d-173)))) then
        tmp = x_m * ((y - z) / (t - z))
    else
        tmp = t_1
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
	double t_1 = (x_m * (y - z)) / (t - z);
	double tmp;
	if ((t_1 <= -1e+269) || !(t_1 <= -2e-173)) {
		tmp = x_m * ((y - z) / (t - z));
	} else {
		tmp = t_1;
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z, t):
	t_1 = (x_m * (y - z)) / (t - z)
	tmp = 0
	if (t_1 <= -1e+269) or not (t_1 <= -2e-173):
		tmp = x_m * ((y - z) / (t - z))
	else:
		tmp = t_1
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z, t)
	t_1 = Float64(Float64(x_m * Float64(y - z)) / Float64(t - z))
	tmp = 0.0
	if ((t_1 <= -1e+269) || !(t_1 <= -2e-173))
		tmp = Float64(x_m * Float64(Float64(y - z) / Float64(t - z)));
	else
		tmp = t_1;
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z, t)
	t_1 = (x_m * (y - z)) / (t - z);
	tmp = 0.0;
	if ((t_1 <= -1e+269) || ~((t_1 <= -2e-173)))
		tmp = x_m * ((y - z) / (t - z));
	else
		tmp = t_1;
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[Or[LessEqual[t$95$1, -1e+269], N[Not[LessEqual[t$95$1, -2e-173]], $MachinePrecision]], N[(x$95$m * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
\begin{array}{l}
t_1 := \frac{x\_m \cdot \left(y - z\right)}{t - z}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+269} \lor \neg \left(t\_1 \leq -2 \cdot 10^{-173}\right):\\
\;\;\;\;x\_m \cdot \frac{y - z}{t - z}\\

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


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

    1. Initial program 80.2%

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

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

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

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

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

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

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

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

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

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

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

    if -1e269 < (/.f64 (*.f64 x (-.f64 y z)) (-.f64 t z)) < -2.0000000000000001e-173

    1. Initial program 99.7%

      \[\frac{x \cdot \left(y - z\right)}{t - z} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification98.0%

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

Alternative 2: 73.7% 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 -8.8 \cdot 10^{+45}:\\ \;\;\;\;x\_m \cdot \frac{-z}{t - z}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-230}:\\ \;\;\;\;x\_m \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-106}:\\ \;\;\;\;\frac{x\_m \cdot \left(y - z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \mathsf{fma}\left(\frac{y}{z}, -1, 1\right)\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z t)
 :precision binary64
 (*
  x_s
  (if (<= z -8.8e+45)
    (* x_m (/ (- z) (- t z)))
    (if (<= z 4e-230)
      (* x_m (/ y (- t z)))
      (if (<= z 1.65e-106)
        (/ (* x_m (- y z)) t)
        (* x_m (fma (/ y z) -1.0 1.0)))))))
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 <= -8.8e+45) {
		tmp = x_m * (-z / (t - z));
	} else if (z <= 4e-230) {
		tmp = x_m * (y / (t - z));
	} else if (z <= 1.65e-106) {
		tmp = (x_m * (y - z)) / t;
	} else {
		tmp = x_m * fma((y / z), -1.0, 1.0);
	}
	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 <= -8.8e+45)
		tmp = Float64(x_m * Float64(Float64(-z) / Float64(t - z)));
	elseif (z <= 4e-230)
		tmp = Float64(x_m * Float64(y / Float64(t - z)));
	elseif (z <= 1.65e-106)
		tmp = Float64(Float64(x_m * Float64(y - z)) / t);
	else
		tmp = Float64(x_m * fma(Float64(y / z), -1.0, 1.0));
	end
	return Float64(x_s * tmp)
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[LessEqual[z, -8.8e+45], N[(x$95$m * N[((-z) / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e-230], N[(x$95$m * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e-106], N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], N[(x$95$m * N[(N[(y / z), $MachinePrecision] * -1.0 + 1.0), $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 -8.8 \cdot 10^{+45}:\\
\;\;\;\;x\_m \cdot \frac{-z}{t - z}\\

\mathbf{elif}\;z \leq 4 \cdot 10^{-230}:\\
\;\;\;\;x\_m \cdot \frac{y}{t - z}\\

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

\mathbf{else}:\\
\;\;\;\;x\_m \cdot \mathsf{fma}\left(\frac{y}{z}, -1, 1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.8000000000000001e45

    1. Initial program 77.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.8000000000000001e45 < z < 4.00000000000000019e-230

    1. Initial program 90.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. associate-/l*N/A

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

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

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

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

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

    if 4.00000000000000019e-230 < z < 1.65000000000000008e-106

    1. Initial program 99.7%

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

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

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

      if 1.65000000000000008e-106 < z

      1. Initial program 80.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(\frac{y}{z}, -1, 1\right) \]
      9. Step-by-step derivation
        1. Applied rewrites80.9%

          \[\leadsto x \cdot \mathsf{fma}\left(\frac{y}{z}, -1, 1\right) \]
      10. Recombined 4 regimes into one program.
      11. Add Preprocessing

      Alternative 3: 73.7% 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 -8.8 \cdot 10^{+45}:\\ \;\;\;\;x\_m \cdot \frac{-z}{t - z}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-230}:\\ \;\;\;\;x\_m \cdot \frac{y}{t - z}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-106}:\\ \;\;\;\;\frac{x\_m \cdot \left(y - z\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \frac{y - z}{-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 (<= z -8.8e+45)
          (* x_m (/ (- z) (- t z)))
          (if (<= z 4e-230)
            (* x_m (/ y (- t z)))
            (if (<= z 1.65e-106) (/ (* x_m (- y z)) t) (* x_m (/ (- y z) (- 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 <= -8.8e+45) {
      		tmp = x_m * (-z / (t - z));
      	} else if (z <= 4e-230) {
      		tmp = x_m * (y / (t - z));
      	} else if (z <= 1.65e-106) {
      		tmp = (x_m * (y - z)) / t;
      	} else {
      		tmp = x_m * ((y - z) / -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 <= (-8.8d+45)) then
              tmp = x_m * (-z / (t - z))
          else if (z <= 4d-230) then
              tmp = x_m * (y / (t - z))
          else if (z <= 1.65d-106) then
              tmp = (x_m * (y - z)) / t
          else
              tmp = x_m * ((y - z) / -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 <= -8.8e+45) {
      		tmp = x_m * (-z / (t - z));
      	} else if (z <= 4e-230) {
      		tmp = x_m * (y / (t - z));
      	} else if (z <= 1.65e-106) {
      		tmp = (x_m * (y - z)) / t;
      	} else {
      		tmp = x_m * ((y - z) / -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 <= -8.8e+45:
      		tmp = x_m * (-z / (t - z))
      	elif z <= 4e-230:
      		tmp = x_m * (y / (t - z))
      	elif z <= 1.65e-106:
      		tmp = (x_m * (y - z)) / t
      	else:
      		tmp = x_m * ((y - z) / -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 <= -8.8e+45)
      		tmp = Float64(x_m * Float64(Float64(-z) / Float64(t - z)));
      	elseif (z <= 4e-230)
      		tmp = Float64(x_m * Float64(y / Float64(t - z)));
      	elseif (z <= 1.65e-106)
      		tmp = Float64(Float64(x_m * Float64(y - z)) / t);
      	else
      		tmp = Float64(x_m * Float64(Float64(y - z) / Float64(-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 <= -8.8e+45)
      		tmp = x_m * (-z / (t - z));
      	elseif (z <= 4e-230)
      		tmp = x_m * (y / (t - z));
      	elseif (z <= 1.65e-106)
      		tmp = (x_m * (y - z)) / t;
      	else
      		tmp = x_m * ((y - z) / -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[z, -8.8e+45], N[(x$95$m * N[((-z) / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e-230], N[(x$95$m * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e-106], N[(N[(x$95$m * N[(y - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], N[(x$95$m * N[(N[(y - z), $MachinePrecision] / (-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 -8.8 \cdot 10^{+45}:\\
      \;\;\;\;x\_m \cdot \frac{-z}{t - z}\\
      
      \mathbf{elif}\;z \leq 4 \cdot 10^{-230}:\\
      \;\;\;\;x\_m \cdot \frac{y}{t - z}\\
      
      \mathbf{elif}\;z \leq 1.65 \cdot 10^{-106}:\\
      \;\;\;\;\frac{x\_m \cdot \left(y - z\right)}{t}\\
      
      \mathbf{else}:\\
      \;\;\;\;x\_m \cdot \frac{y - z}{-z}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if z < -8.8000000000000001e45

        1. Initial program 77.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -8.8000000000000001e45 < z < 4.00000000000000019e-230

        1. Initial program 90.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. associate-/l*N/A

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

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

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

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

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

        if 4.00000000000000019e-230 < z < 1.65000000000000008e-106

        1. Initial program 99.7%

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

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

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

          if 1.65000000000000008e-106 < z

          1. Initial program 80.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 4: 60.3% accurate, 0.6× speedup?

        \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+44}:\\ \;\;\;\;x\_m\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-109}:\\ \;\;\;\;x\_m \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+39}:\\ \;\;\;\;\frac{x\_m \cdot y}{-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 -2.1e+44)
            x_m
            (if (<= z 8e-109)
              (* x_m (/ y t))
              (if (<= z 5.2e+39) (/ (* x_m y) (- z)) x_m)))))
        x\_m = fabs(x);
        x\_s = copysign(1.0, x);
        double code(double x_s, double x_m, double y, double z, double t) {
        	double tmp;
        	if (z <= -2.1e+44) {
        		tmp = x_m;
        	} else if (z <= 8e-109) {
        		tmp = x_m * (y / t);
        	} else if (z <= 5.2e+39) {
        		tmp = (x_m * y) / -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 <= (-2.1d+44)) then
                tmp = x_m
            else if (z <= 8d-109) then
                tmp = x_m * (y / t)
            else if (z <= 5.2d+39) then
                tmp = (x_m * y) / -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 <= -2.1e+44) {
        		tmp = x_m;
        	} else if (z <= 8e-109) {
        		tmp = x_m * (y / t);
        	} else if (z <= 5.2e+39) {
        		tmp = (x_m * y) / -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 <= -2.1e+44:
        		tmp = x_m
        	elif z <= 8e-109:
        		tmp = x_m * (y / t)
        	elif z <= 5.2e+39:
        		tmp = (x_m * y) / -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 <= -2.1e+44)
        		tmp = x_m;
        	elseif (z <= 8e-109)
        		tmp = Float64(x_m * Float64(y / t));
        	elseif (z <= 5.2e+39)
        		tmp = Float64(Float64(x_m * y) / Float64(-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 <= -2.1e+44)
        		tmp = x_m;
        	elseif (z <= 8e-109)
        		tmp = x_m * (y / t);
        	elseif (z <= 5.2e+39)
        		tmp = (x_m * y) / -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, -2.1e+44], x$95$m, If[LessEqual[z, 8e-109], N[(x$95$m * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+39], N[(N[(x$95$m * y), $MachinePrecision] / (-z)), $MachinePrecision], x$95$m]]]), $MachinePrecision]
        
        \begin{array}{l}
        x\_m = \left|x\right|
        \\
        x\_s = \mathsf{copysign}\left(1, x\right)
        
        \\
        x\_s \cdot \begin{array}{l}
        \mathbf{if}\;z \leq -2.1 \cdot 10^{+44}:\\
        \;\;\;\;x\_m\\
        
        \mathbf{elif}\;z \leq 8 \cdot 10^{-109}:\\
        \;\;\;\;x\_m \cdot \frac{y}{t}\\
        
        \mathbf{elif}\;z \leq 5.2 \cdot 10^{+39}:\\
        \;\;\;\;\frac{x\_m \cdot y}{-z}\\
        
        \mathbf{else}:\\
        \;\;\;\;x\_m\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if z < -2.09999999999999987e44 or 5.2e39 < z

          1. Initial program 76.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 rewrites68.9%

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

            if -2.09999999999999987e44 < z < 7.9999999999999999e-109

            1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 7.9999999999999999e-109 < z < 5.2e39

            1. Initial program 94.7%

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

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

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

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

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

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

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

            Alternative 5: 60.2% accurate, 0.6× speedup?

            \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+44}:\\ \;\;\;\;x\_m\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-109}:\\ \;\;\;\;x\_m \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+39}:\\ \;\;\;\;x\_m \cdot \frac{-y}{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 -2.1e+44)
                x_m
                (if (<= z 8.2e-109)
                  (* x_m (/ y t))
                  (if (<= z 5.2e+39) (* x_m (/ (- y) z)) x_m)))))
            x\_m = fabs(x);
            x\_s = copysign(1.0, x);
            double code(double x_s, double x_m, double y, double z, double t) {
            	double tmp;
            	if (z <= -2.1e+44) {
            		tmp = x_m;
            	} else if (z <= 8.2e-109) {
            		tmp = x_m * (y / t);
            	} else if (z <= 5.2e+39) {
            		tmp = x_m * (-y / 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 <= (-2.1d+44)) then
                    tmp = x_m
                else if (z <= 8.2d-109) then
                    tmp = x_m * (y / t)
                else if (z <= 5.2d+39) then
                    tmp = x_m * (-y / 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 <= -2.1e+44) {
            		tmp = x_m;
            	} else if (z <= 8.2e-109) {
            		tmp = x_m * (y / t);
            	} else if (z <= 5.2e+39) {
            		tmp = x_m * (-y / 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 <= -2.1e+44:
            		tmp = x_m
            	elif z <= 8.2e-109:
            		tmp = x_m * (y / t)
            	elif z <= 5.2e+39:
            		tmp = x_m * (-y / 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 <= -2.1e+44)
            		tmp = x_m;
            	elseif (z <= 8.2e-109)
            		tmp = Float64(x_m * Float64(y / t));
            	elseif (z <= 5.2e+39)
            		tmp = Float64(x_m * Float64(Float64(-y) / 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 <= -2.1e+44)
            		tmp = x_m;
            	elseif (z <= 8.2e-109)
            		tmp = x_m * (y / t);
            	elseif (z <= 5.2e+39)
            		tmp = x_m * (-y / 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, -2.1e+44], x$95$m, If[LessEqual[z, 8.2e-109], N[(x$95$m * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+39], N[(x$95$m * N[((-y) / 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 -2.1 \cdot 10^{+44}:\\
            \;\;\;\;x\_m\\
            
            \mathbf{elif}\;z \leq 8.2 \cdot 10^{-109}:\\
            \;\;\;\;x\_m \cdot \frac{y}{t}\\
            
            \mathbf{elif}\;z \leq 5.2 \cdot 10^{+39}:\\
            \;\;\;\;x\_m \cdot \frac{-y}{z}\\
            
            \mathbf{else}:\\
            \;\;\;\;x\_m\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if z < -2.09999999999999987e44 or 5.2e39 < z

              1. Initial program 76.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 rewrites68.9%

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

                if -2.09999999999999987e44 < z < 8.2000000000000004e-109

                1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 8.2000000000000004e-109 < z < 5.2e39

                1. Initial program 94.7%

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

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

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

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

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

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

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

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

                    \[\leadsto x \cdot \frac{-1 \cdot y}{z} \]
                  2. lower-/.f64N/A

                    \[\leadsto x \cdot \frac{-1 \cdot y}{z} \]
                  3. mul-1-negN/A

                    \[\leadsto x \cdot \frac{\mathsf{neg}\left(y\right)}{z} \]
                  4. lower-neg.f6449.7

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

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

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

                1. Initial program 88.9%

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

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

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

                  if -1.8e-38 < y < 4.4e8

                  1. Initial program 85.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 4.4e8 < y

                  1. Initial program 85.5%

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

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

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

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

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

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

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

                Alternative 7: 69.1% 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.15 \cdot 10^{+51}:\\ \;\;\;\;x\_m\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+76}:\\ \;\;\;\;x\_m \cdot \frac{y}{t - 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.15e+51) x_m (if (<= z 1.12e+76) (* 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.15e+51) {
                		tmp = x_m;
                	} else if (z <= 1.12e+76) {
                		tmp = x_m * (y / (t - 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.15d+51)) then
                        tmp = x_m
                    else if (z <= 1.12d+76) then
                        tmp = x_m * (y / (t - 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.15e+51) {
                		tmp = x_m;
                	} else if (z <= 1.12e+76) {
                		tmp = x_m * (y / (t - 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.15e+51:
                		tmp = x_m
                	elif z <= 1.12e+76:
                		tmp = x_m * (y / (t - 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.15e+51)
                		tmp = x_m;
                	elseif (z <= 1.12e+76)
                		tmp = Float64(x_m * Float64(y / Float64(t - 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.15e+51)
                		tmp = x_m;
                	elseif (z <= 1.12e+76)
                		tmp = x_m * (y / (t - 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.15e+51], x$95$m, If[LessEqual[z, 1.12e+76], N[(x$95$m * N[(y / N[(t - z), $MachinePrecision]), $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.15 \cdot 10^{+51}:\\
                \;\;\;\;x\_m\\
                
                \mathbf{elif}\;z \leq 1.12 \cdot 10^{+76}:\\
                \;\;\;\;x\_m \cdot \frac{y}{t - z}\\
                
                \mathbf{else}:\\
                \;\;\;\;x\_m\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if z < -1.15000000000000003e51 or 1.12000000000000005e76 < z

                  1. Initial program 75.5%

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

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

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

                    if -1.15000000000000003e51 < z < 1.12000000000000005e76

                    1. Initial program 93.2%

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

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

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

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

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

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

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

                  Alternative 8: 60.7% accurate, 0.8× speedup?

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

                    1. Initial program 78.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 rewrites64.9%

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

                      if -2.09999999999999987e44 < z < 3.10000000000000016e-48

                      1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto x \cdot \color{blue}{\frac{y}{t}} \]
                      6. Step-by-step derivation
                        1. lower-/.f6459.5

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

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

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

                    Alternative 9: 59.8% accurate, 0.8× speedup?

                    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+44}:\\ \;\;\;\;x\_m\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-48}:\\ \;\;\;\;\frac{y \cdot x\_m}{t}\\ \mathbf{else}:\\ \;\;\;\;x\_m\\ \end{array} \end{array} \]
                    x\_m = (fabs.f64 x)
                    x\_s = (copysign.f64 #s(literal 1 binary64) x)
                    (FPCore (x_s x_m y z t)
                     :precision binary64
                     (* x_s (if (<= z -2e+44) x_m (if (<= z 3e-48) (/ (* y x_m) t) x_m))))
                    x\_m = fabs(x);
                    x\_s = copysign(1.0, x);
                    double code(double x_s, double x_m, double y, double z, double t) {
                    	double tmp;
                    	if (z <= -2e+44) {
                    		tmp = x_m;
                    	} else if (z <= 3e-48) {
                    		tmp = (y * x_m) / t;
                    	} 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 <= (-2d+44)) then
                            tmp = x_m
                        else if (z <= 3d-48) then
                            tmp = (y * x_m) / t
                        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 <= -2e+44) {
                    		tmp = x_m;
                    	} else if (z <= 3e-48) {
                    		tmp = (y * x_m) / t;
                    	} 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 <= -2e+44:
                    		tmp = x_m
                    	elif z <= 3e-48:
                    		tmp = (y * x_m) / t
                    	else:
                    		tmp = x_m
                    	return x_s * tmp
                    
                    x\_m = abs(x)
                    x\_s = copysign(1.0, x)
                    function code(x_s, x_m, y, z, t)
                    	tmp = 0.0
                    	if (z <= -2e+44)
                    		tmp = x_m;
                    	elseif (z <= 3e-48)
                    		tmp = Float64(Float64(y * x_m) / t);
                    	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 <= -2e+44)
                    		tmp = x_m;
                    	elseif (z <= 3e-48)
                    		tmp = (y * x_m) / t;
                    	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, -2e+44], x$95$m, If[LessEqual[z, 3e-48], N[(N[(y * x$95$m), $MachinePrecision] / t), $MachinePrecision], x$95$m]]), $MachinePrecision]
                    
                    \begin{array}{l}
                    x\_m = \left|x\right|
                    \\
                    x\_s = \mathsf{copysign}\left(1, x\right)
                    
                    \\
                    x\_s \cdot \begin{array}{l}
                    \mathbf{if}\;z \leq -2 \cdot 10^{+44}:\\
                    \;\;\;\;x\_m\\
                    
                    \mathbf{elif}\;z \leq 3 \cdot 10^{-48}:\\
                    \;\;\;\;\frac{y \cdot x\_m}{t}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;x\_m\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if z < -2.0000000000000002e44 or 2.9999999999999999e-48 < z

                      1. Initial program 78.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 rewrites64.9%

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

                        if -2.0000000000000002e44 < z < 2.9999999999999999e-48

                        1. Initial program 92.4%

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

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

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

                            \[\leadsto \frac{y \cdot x}{t} \]
                          3. lower-*.f6455.9

                            \[\leadsto \frac{y \cdot x}{t} \]
                        5. Applied rewrites55.9%

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

                      Alternative 10: 96.8% accurate, 1.0× speedup?

                      \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \left(x\_m \cdot \frac{y - z}{t - z}\right) \end{array} \]
                      x\_m = (fabs.f64 x)
                      x\_s = (copysign.f64 #s(literal 1 binary64) x)
                      (FPCore (x_s x_m y z t)
                       :precision binary64
                       (* x_s (* x_m (/ (- y z) (- t z)))))
                      x\_m = fabs(x);
                      x\_s = copysign(1.0, x);
                      double code(double x_s, double x_m, double y, double z, double t) {
                      	return x_s * (x_m * ((y - z) / (t - z)));
                      }
                      
                      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 * ((y - z) / (t - z)))
                      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 * ((y - z) / (t - z)));
                      }
                      
                      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 * ((y - z) / (t - z)))
                      
                      x\_m = abs(x)
                      x\_s = copysign(1.0, x)
                      function code(x_s, x_m, y, z, t)
                      	return Float64(x_s * Float64(x_m * Float64(Float64(y - z) / Float64(t - z))))
                      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 * ((y - z) / (t - z)));
                      end
                      
                      x\_m = N[Abs[x], $MachinePrecision]
                      x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                      code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * N[(x$95$m * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                      
                      \begin{array}{l}
                      x\_m = \left|x\right|
                      \\
                      x\_s = \mathsf{copysign}\left(1, x\right)
                      
                      \\
                      x\_s \cdot \left(x\_m \cdot \frac{y - z}{t - z}\right)
                      \end{array}
                      
                      Derivation
                      1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 11: 35.7% 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 86.3%

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

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

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

                        Developer Target 1: 96.7% 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 2025051 
                        (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)))