Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2

Percentage Accurate: 60.8% → 91.2%
Time: 6.4s
Alternatives: 15
Speedup: 2.0×

Specification

?
\[\begin{array}{l} \\ \frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))
double code(double x, double y, double z, double t, double a) {
	return ((x * y) * z) / sqrt(((z * z) - (t * a)));
}
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, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = ((x * y) * z) / sqrt(((z * z) - (t * a)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return ((x * y) * z) / Math.sqrt(((z * z) - (t * a)));
}
def code(x, y, z, t, a):
	return ((x * y) * z) / math.sqrt(((z * z) - (t * a)))
function code(x, y, z, t, a)
	return Float64(Float64(Float64(x * y) * z) / sqrt(Float64(Float64(z * z) - Float64(t * a))))
end
function tmp = code(x, y, z, t, a)
	tmp = ((x * y) * z) / sqrt(((z * z) - (t * a)));
end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 60.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))
double code(double x, double y, double z, double t, double a) {
	return ((x * y) * z) / sqrt(((z * z) - (t * a)));
}
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, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = ((x * y) * z) / sqrt(((z * z) - (t * a)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return ((x * y) * z) / Math.sqrt(((z * z) - (t * a)));
}
def code(x, y, z, t, a):
	return ((x * y) * z) / math.sqrt(((z * z) - (t * a)))
function code(x, y, z, t, a)
	return Float64(Float64(Float64(x * y) * z) / sqrt(Float64(Float64(z * z) - Float64(t * a))))
end
function tmp = code(x, y, z, t, a)
	tmp = ((x * y) * z) / sqrt(((z * z) - (t * a)));
end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision] / N[Sqrt[N[(N[(z * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 91.2% accurate, 0.3× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ \begin{array}{l} t_1 := \frac{\left(x\_m \cdot y\_m\right) \cdot z\_m}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq 10^{-314}:\\ \;\;\;\;\frac{x\_m \cdot z\_m}{\mathsf{fma}\left(-0.5 \cdot a, \frac{t}{z\_m}, z\_m\right)} \cdot y\_m\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+296}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\ \end{array}\right)\right) \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s y_s x_s x_m y_m z_m t a)
 :precision binary64
 (let* ((t_1 (/ (* (* x_m y_m) z_m) (sqrt (- (* z_m z_m) (* t a))))))
   (*
    z_s
    (*
     y_s
     (*
      x_s
      (if (<= t_1 1e-314)
        (* (/ (* x_m z_m) (fma (* -0.5 a) (/ t z_m) z_m)) y_m)
        (if (<= t_1 5e+296) t_1 (* (/ (* x_m y_m) z_m) z_m))))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double t_1 = ((x_m * y_m) * z_m) / sqrt(((z_m * z_m) - (t * a)));
	double tmp;
	if (t_1 <= 1e-314) {
		tmp = ((x_m * z_m) / fma((-0.5 * a), (t / z_m), z_m)) * y_m;
	} else if (t_1 <= 5e+296) {
		tmp = t_1;
	} else {
		tmp = ((x_m * y_m) / z_m) * z_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	t_1 = Float64(Float64(Float64(x_m * y_m) * z_m) / sqrt(Float64(Float64(z_m * z_m) - Float64(t * a))))
	tmp = 0.0
	if (t_1 <= 1e-314)
		tmp = Float64(Float64(Float64(x_m * z_m) / fma(Float64(-0.5 * a), Float64(t / z_m), z_m)) * y_m);
	elseif (t_1 <= 5e+296)
		tmp = t_1;
	else
		tmp = Float64(Float64(Float64(x_m * y_m) / z_m) * z_m);
	end
	return Float64(z_s * Float64(y_s * 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]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] * z$95$m), $MachinePrecision] / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[t$95$1, 1e-314], N[(N[(N[(x$95$m * z$95$m), $MachinePrecision] / N[(N[(-0.5 * a), $MachinePrecision] * N[(t / z$95$m), $MachinePrecision] + z$95$m), $MachinePrecision]), $MachinePrecision] * y$95$m), $MachinePrecision], If[LessEqual[t$95$1, 5e+296], t$95$1, N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] / z$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
\begin{array}{l}
t_1 := \frac{\left(x\_m \cdot y\_m\right) \cdot z\_m}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq 10^{-314}:\\
\;\;\;\;\frac{x\_m \cdot z\_m}{\mathsf{fma}\left(-0.5 \cdot a, \frac{t}{z\_m}, z\_m\right)} \cdot y\_m\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+296}:\\
\;\;\;\;t\_1\\

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


\end{array}\right)\right)
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < 9.9999999996e-315

    1. Initial program 60.8%

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

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

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

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

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

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

        \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{\color{blue}{z}}^{2}}\right)} \]
      6. lower-pow.f6465.0

        \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{\color{blue}{2}}}\right)} \]
    4. Applied rewrites65.0%

      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{2}}\right)}} \]
    5. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{\color{blue}{z \cdot x}}{z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)} \]
      11. lower-*.f6472.0

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

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

        \[\leadsto y \cdot \frac{z \cdot x}{\left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right) \cdot \color{blue}{z}} \]
    6. Applied rewrites73.5%

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

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

        \[\leadsto y \cdot \frac{z \cdot x}{\frac{a \cdot t}{z} \cdot \frac{-1}{2} + \color{blue}{z}} \]
      3. lift-*.f64N/A

        \[\leadsto y \cdot \frac{z \cdot x}{\frac{a \cdot t}{z} \cdot \frac{-1}{2} + z} \]
      4. lift-/.f64N/A

        \[\leadsto y \cdot \frac{z \cdot x}{\frac{a \cdot t}{z} \cdot \frac{-1}{2} + z} \]
      5. lift-*.f64N/A

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{z \cdot x}{\mathsf{fma}\left(\frac{t}{z}, \frac{-1}{2} \cdot \color{blue}{a}, z\right)} \]
      12. lower-*.f6476.0

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

      \[\leadsto y \cdot \frac{z \cdot x}{\mathsf{fma}\left(\frac{t}{z}, \color{blue}{-0.5 \cdot a}, z\right)} \]
    9. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto \color{blue}{\frac{z \cdot x}{\mathsf{fma}\left(\frac{t}{z}, \frac{-1}{2} \cdot a, z\right)} \cdot y} \]
      3. lower-*.f6476.0

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

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

        \[\leadsto \frac{\color{blue}{x \cdot z}}{\mathsf{fma}\left(\frac{t}{z}, \frac{-1}{2} \cdot a, z\right)} \cdot y \]
      6. lower-*.f6476.0

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

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

        \[\leadsto \frac{x \cdot z}{\left(\frac{-1}{2} \cdot a\right) \cdot \frac{t}{z} + z} \cdot y \]
      9. lower-fma.f6476.0

        \[\leadsto \frac{x \cdot z}{\mathsf{fma}\left(-0.5 \cdot a, \color{blue}{\frac{t}{z}}, z\right)} \cdot y \]
    10. Applied rewrites76.0%

      \[\leadsto \color{blue}{\frac{x \cdot z}{\mathsf{fma}\left(-0.5 \cdot a, \frac{t}{z}, z\right)} \cdot y} \]

    if 9.9999999996e-315 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < 5.0000000000000001e296

    1. Initial program 60.8%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]

    if 5.0000000000000001e296 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))

    1. Initial program 60.8%

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{z \cdot z - t \cdot a}} \cdot z} \]
      4. mult-flip-revN/A

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(y \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot x\right)} \cdot z \]
      10. mult-flip-revN/A

        \[\leadsto \left(\color{blue}{\frac{y}{\sqrt{z \cdot z - t \cdot a}}} \cdot x\right) \cdot z \]
      11. lower-/.f6460.2

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

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

        \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
      14. lower-*.f6460.2

        \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
    3. Applied rewrites60.2%

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

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

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

        \[\leadsto \frac{x \cdot y}{z} \cdot z \]
    6. Applied rewrites63.1%

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

Alternative 2: 90.5% accurate, 0.3× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ \begin{array}{l} t_1 := \frac{\left(x\_m \cdot y\_m\right) \cdot z\_m}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq 10^{-314}:\\ \;\;\;\;\frac{x\_m \cdot z\_m}{\mathsf{fma}\left(-0.5, \frac{a \cdot t}{z\_m}, z\_m\right)} \cdot y\_m\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+296}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\ \end{array}\right)\right) \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s y_s x_s x_m y_m z_m t a)
 :precision binary64
 (let* ((t_1 (/ (* (* x_m y_m) z_m) (sqrt (- (* z_m z_m) (* t a))))))
   (*
    z_s
    (*
     y_s
     (*
      x_s
      (if (<= t_1 1e-314)
        (* (/ (* x_m z_m) (fma -0.5 (/ (* a t) z_m) z_m)) y_m)
        (if (<= t_1 5e+296) t_1 (* (/ (* x_m y_m) z_m) z_m))))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double t_1 = ((x_m * y_m) * z_m) / sqrt(((z_m * z_m) - (t * a)));
	double tmp;
	if (t_1 <= 1e-314) {
		tmp = ((x_m * z_m) / fma(-0.5, ((a * t) / z_m), z_m)) * y_m;
	} else if (t_1 <= 5e+296) {
		tmp = t_1;
	} else {
		tmp = ((x_m * y_m) / z_m) * z_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	t_1 = Float64(Float64(Float64(x_m * y_m) * z_m) / sqrt(Float64(Float64(z_m * z_m) - Float64(t * a))))
	tmp = 0.0
	if (t_1 <= 1e-314)
		tmp = Float64(Float64(Float64(x_m * z_m) / fma(-0.5, Float64(Float64(a * t) / z_m), z_m)) * y_m);
	elseif (t_1 <= 5e+296)
		tmp = t_1;
	else
		tmp = Float64(Float64(Float64(x_m * y_m) / z_m) * z_m);
	end
	return Float64(z_s * Float64(y_s * 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]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] * z$95$m), $MachinePrecision] / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[t$95$1, 1e-314], N[(N[(N[(x$95$m * z$95$m), $MachinePrecision] / N[(-0.5 * N[(N[(a * t), $MachinePrecision] / z$95$m), $MachinePrecision] + z$95$m), $MachinePrecision]), $MachinePrecision] * y$95$m), $MachinePrecision], If[LessEqual[t$95$1, 5e+296], t$95$1, N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] / z$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
\begin{array}{l}
t_1 := \frac{\left(x\_m \cdot y\_m\right) \cdot z\_m}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq 10^{-314}:\\
\;\;\;\;\frac{x\_m \cdot z\_m}{\mathsf{fma}\left(-0.5, \frac{a \cdot t}{z\_m}, z\_m\right)} \cdot y\_m\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+296}:\\
\;\;\;\;t\_1\\

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


\end{array}\right)\right)
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < 9.9999999996e-315

    1. Initial program 60.8%

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

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

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

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

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

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

        \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{\color{blue}{z}}^{2}}\right)} \]
      6. lower-pow.f6465.0

        \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{\color{blue}{2}}}\right)} \]
    4. Applied rewrites65.0%

      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{2}}\right)}} \]
    5. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{\color{blue}{z \cdot x}}{z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right)} \]
      11. lower-*.f6472.0

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

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

        \[\leadsto y \cdot \frac{z \cdot x}{\left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{z}^{2}}\right) \cdot \color{blue}{z}} \]
    6. Applied rewrites73.5%

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

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

        \[\leadsto \color{blue}{\frac{z \cdot x}{z + \frac{a \cdot t}{z} \cdot \frac{-1}{2}} \cdot y} \]
      3. lower-*.f6473.5

        \[\leadsto \color{blue}{\frac{z \cdot x}{z + \frac{a \cdot t}{z} \cdot -0.5} \cdot y} \]
      4. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{x \cdot z}}{z + \frac{a \cdot t}{z} \cdot \frac{-1}{2}} \cdot y \]
      6. lower-*.f6473.5

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

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

        \[\leadsto \frac{x \cdot z}{\frac{a \cdot t}{z} \cdot \frac{-1}{2} + \color{blue}{z}} \cdot y \]
      9. lift-*.f64N/A

        \[\leadsto \frac{x \cdot z}{\frac{a \cdot t}{z} \cdot \frac{-1}{2} + z} \cdot y \]
      10. *-commutativeN/A

        \[\leadsto \frac{x \cdot z}{\frac{-1}{2} \cdot \frac{a \cdot t}{z} + z} \cdot y \]
      11. lower-fma.f6473.5

        \[\leadsto \frac{x \cdot z}{\mathsf{fma}\left(-0.5, \color{blue}{\frac{a \cdot t}{z}}, z\right)} \cdot y \]
    8. Applied rewrites73.5%

      \[\leadsto \color{blue}{\frac{x \cdot z}{\mathsf{fma}\left(-0.5, \frac{a \cdot t}{z}, z\right)} \cdot y} \]

    if 9.9999999996e-315 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < 5.0000000000000001e296

    1. Initial program 60.8%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]

    if 5.0000000000000001e296 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))

    1. Initial program 60.8%

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{z \cdot z - t \cdot a}} \cdot z} \]
      4. mult-flip-revN/A

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\left(y \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot x\right)} \cdot z \]
      10. mult-flip-revN/A

        \[\leadsto \left(\color{blue}{\frac{y}{\sqrt{z \cdot z - t \cdot a}}} \cdot x\right) \cdot z \]
      11. lower-/.f6460.2

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

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

        \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
      14. lower-*.f6460.2

        \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
    3. Applied rewrites60.2%

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

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

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

        \[\leadsto \frac{x \cdot y}{z} \cdot z \]
    6. Applied rewrites63.1%

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

Alternative 3: 89.7% accurate, 0.2× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ \begin{array}{l} t_1 := \left(x\_m \cdot y\_m\right) \cdot z\_m\\ t_2 := \frac{t\_1}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\ t_3 := \sqrt{z\_m \cdot z\_m - a \cdot t}\\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq 0:\\ \;\;\;\;\frac{t\_1}{z\_m \cdot 1}\\ \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+15}:\\ \;\;\;\;\left(\frac{y\_m}{t\_3} \cdot z\_m\right) \cdot x\_m\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\left(\frac{x\_m}{t\_3} \cdot z\_m\right) \cdot y\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\ \end{array}\right)\right) \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 #s(literal 1 binary64) y)
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
(FPCore (z_s y_s x_s x_m y_m z_m t a)
 :precision binary64
 (let* ((t_1 (* (* x_m y_m) z_m))
        (t_2 (/ t_1 (sqrt (- (* z_m z_m) (* t a)))))
        (t_3 (sqrt (- (* z_m z_m) (* a t)))))
   (*
    z_s
    (*
     y_s
     (*
      x_s
      (if (<= t_2 0.0)
        (/ t_1 (* z_m 1.0))
        (if (<= t_2 4e+15)
          (* (* (/ y_m t_3) z_m) x_m)
          (if (<= t_2 INFINITY)
            (* (* (/ x_m t_3) z_m) y_m)
            (* (/ (* x_m y_m) z_m) z_m)))))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
z\_m = fabs(z);
z\_s = copysign(1.0, z);
assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double t_1 = (x_m * y_m) * z_m;
	double t_2 = t_1 / sqrt(((z_m * z_m) - (t * a)));
	double t_3 = sqrt(((z_m * z_m) - (a * t)));
	double tmp;
	if (t_2 <= 0.0) {
		tmp = t_1 / (z_m * 1.0);
	} else if (t_2 <= 4e+15) {
		tmp = ((y_m / t_3) * z_m) * x_m;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = ((x_m / t_3) * z_m) * y_m;
	} else {
		tmp = ((x_m * y_m) / z_m) * z_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
assert x_m < y_m && y_m < z_m && z_m < t && t < a;
public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
	double t_1 = (x_m * y_m) * z_m;
	double t_2 = t_1 / Math.sqrt(((z_m * z_m) - (t * a)));
	double t_3 = Math.sqrt(((z_m * z_m) - (a * t)));
	double tmp;
	if (t_2 <= 0.0) {
		tmp = t_1 / (z_m * 1.0);
	} else if (t_2 <= 4e+15) {
		tmp = ((y_m / t_3) * z_m) * x_m;
	} else if (t_2 <= Double.POSITIVE_INFINITY) {
		tmp = ((x_m / t_3) * z_m) * y_m;
	} else {
		tmp = ((x_m * y_m) / z_m) * z_m;
	}
	return z_s * (y_s * (x_s * tmp));
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
y\_m = math.fabs(y)
y\_s = math.copysign(1.0, y)
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
[x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
	t_1 = (x_m * y_m) * z_m
	t_2 = t_1 / math.sqrt(((z_m * z_m) - (t * a)))
	t_3 = math.sqrt(((z_m * z_m) - (a * t)))
	tmp = 0
	if t_2 <= 0.0:
		tmp = t_1 / (z_m * 1.0)
	elif t_2 <= 4e+15:
		tmp = ((y_m / t_3) * z_m) * x_m
	elif t_2 <= math.inf:
		tmp = ((x_m / t_3) * z_m) * y_m
	else:
		tmp = ((x_m * y_m) / z_m) * z_m
	return z_s * (y_s * (x_s * tmp))
x\_m = abs(x)
x\_s = copysign(1.0, x)
y\_m = abs(y)
y\_s = copysign(1.0, y)
z\_m = abs(z)
z\_s = copysign(1.0, z)
x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	t_1 = Float64(Float64(x_m * y_m) * z_m)
	t_2 = Float64(t_1 / sqrt(Float64(Float64(z_m * z_m) - Float64(t * a))))
	t_3 = sqrt(Float64(Float64(z_m * z_m) - Float64(a * t)))
	tmp = 0.0
	if (t_2 <= 0.0)
		tmp = Float64(t_1 / Float64(z_m * 1.0));
	elseif (t_2 <= 4e+15)
		tmp = Float64(Float64(Float64(y_m / t_3) * z_m) * x_m);
	elseif (t_2 <= Inf)
		tmp = Float64(Float64(Float64(x_m / t_3) * z_m) * y_m);
	else
		tmp = Float64(Float64(Float64(x_m * y_m) / z_m) * z_m);
	end
	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
	t_1 = (x_m * y_m) * z_m;
	t_2 = t_1 / sqrt(((z_m * z_m) - (t * a)));
	t_3 = sqrt(((z_m * z_m) - (a * t)));
	tmp = 0.0;
	if (t_2 <= 0.0)
		tmp = t_1 / (z_m * 1.0);
	elseif (t_2 <= 4e+15)
		tmp = ((y_m / t_3) * z_m) * x_m;
	elseif (t_2 <= Inf)
		tmp = ((x_m / t_3) * z_m) * y_m;
	else
		tmp = ((x_m * y_m) / z_m) * z_m;
	end
	tmp_2 = z_s * (y_s * (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]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := Block[{t$95$1 = N[(N[(x$95$m * y$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[t$95$2, 0.0], N[(t$95$1 / N[(z$95$m * 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e+15], N[(N[(N[(y$95$m / t$95$3), $MachinePrecision] * z$95$m), $MachinePrecision] * x$95$m), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(N[(x$95$m / t$95$3), $MachinePrecision] * z$95$m), $MachinePrecision] * y$95$m), $MachinePrecision], N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] / z$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]]]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)
\\
[x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
\\
\begin{array}{l}
t_1 := \left(x\_m \cdot y\_m\right) \cdot z\_m\\
t_2 := \frac{t\_1}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\
t_3 := \sqrt{z\_m \cdot z\_m - a \cdot t}\\
z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\frac{t\_1}{z\_m \cdot 1}\\

\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+15}:\\
\;\;\;\;\left(\frac{y\_m}{t\_3} \cdot z\_m\right) \cdot x\_m\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\left(\frac{x\_m}{t\_3} \cdot z\_m\right) \cdot y\_m\\

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


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

    1. Initial program 60.8%

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

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

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

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

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

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

        \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{\color{blue}{z}}^{2}}\right)} \]
      6. lower-pow.f6465.0

        \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{\color{blue}{2}}}\right)} \]
    4. Applied rewrites65.0%

      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{2}}\right)}} \]
    5. Taylor expanded in z around inf

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

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

      if 0.0 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < 4e15

      1. Initial program 60.8%

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

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

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

          \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{z \cdot z - t \cdot a}} \cdot z} \]
        4. mult-flip-revN/A

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

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

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

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

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

          \[\leadsto \color{blue}{\left(\left(y \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot x\right)} \cdot z \]
        10. mult-flip-revN/A

          \[\leadsto \left(\color{blue}{\frac{y}{\sqrt{z \cdot z - t \cdot a}}} \cdot x\right) \cdot z \]
        11. lower-/.f6460.2

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

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

          \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
        14. lower-*.f6460.2

          \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
      3. Applied rewrites60.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{y \cdot z}}{\sqrt{z \cdot z - t \cdot a}} \cdot x \]
        14. mult-flip-revN/A

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

          \[\leadsto \color{blue}{\left(\left(y \cdot z\right) \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot x} \]
      5. Applied rewrites63.7%

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

      if 4e15 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < +inf.0

      1. Initial program 60.8%

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(x \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot y} \]
        9. mult-flipN/A

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

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

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

          \[\leadsto \color{blue}{\left(\left(x \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot z\right)} \cdot y \]
        13. mult-flip-revN/A

          \[\leadsto \left(\color{blue}{\frac{x}{\sqrt{z \cdot z - t \cdot a}}} \cdot z\right) \cdot y \]
        14. lower-/.f6459.4

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

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

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

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

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

      if +inf.0 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))

      1. Initial program 60.8%

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

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

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

          \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{z \cdot z - t \cdot a}} \cdot z} \]
        4. mult-flip-revN/A

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

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

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

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

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

          \[\leadsto \color{blue}{\left(\left(y \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot x\right)} \cdot z \]
        10. mult-flip-revN/A

          \[\leadsto \left(\color{blue}{\frac{y}{\sqrt{z \cdot z - t \cdot a}}} \cdot x\right) \cdot z \]
        11. lower-/.f6460.2

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

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

          \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
        14. lower-*.f6460.2

          \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
      3. Applied rewrites60.2%

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

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

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

          \[\leadsto \frac{x \cdot y}{z} \cdot z \]
      6. Applied rewrites63.1%

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

    Alternative 4: 89.5% accurate, 0.3× speedup?

    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ \begin{array}{l} t_1 := \left(x\_m \cdot y\_m\right) \cdot z\_m\\ t_2 := \frac{t\_1}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq 10^{-314}:\\ \;\;\;\;\frac{t\_1}{z\_m \cdot 1}\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+296}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\ \end{array}\right)\right) \end{array} \end{array} \]
    x\_m = (fabs.f64 x)
    x\_s = (copysign.f64 #s(literal 1 binary64) x)
    y\_m = (fabs.f64 y)
    y\_s = (copysign.f64 #s(literal 1 binary64) y)
    z\_m = (fabs.f64 z)
    z\_s = (copysign.f64 #s(literal 1 binary64) z)
    NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
    (FPCore (z_s y_s x_s x_m y_m z_m t a)
     :precision binary64
     (let* ((t_1 (* (* x_m y_m) z_m)) (t_2 (/ t_1 (sqrt (- (* z_m z_m) (* t a))))))
       (*
        z_s
        (*
         y_s
         (*
          x_s
          (if (<= t_2 1e-314)
            (/ t_1 (* z_m 1.0))
            (if (<= t_2 5e+296) t_2 (* (/ (* x_m y_m) z_m) z_m))))))))
    x\_m = fabs(x);
    x\_s = copysign(1.0, x);
    y\_m = fabs(y);
    y\_s = copysign(1.0, y);
    z\_m = fabs(z);
    z\_s = copysign(1.0, z);
    assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
    double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
    	double t_1 = (x_m * y_m) * z_m;
    	double t_2 = t_1 / sqrt(((z_m * z_m) - (t * a)));
    	double tmp;
    	if (t_2 <= 1e-314) {
    		tmp = t_1 / (z_m * 1.0);
    	} else if (t_2 <= 5e+296) {
    		tmp = t_2;
    	} else {
    		tmp = ((x_m * y_m) / z_m) * z_m;
    	}
    	return z_s * (y_s * (x_s * tmp));
    }
    
    x\_m =     private
    x\_s =     private
    y\_m =     private
    y\_s =     private
    z\_m =     private
    z\_s =     private
    NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
    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(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    use fmin_fmax_functions
        real(8), intent (in) :: z_s
        real(8), intent (in) :: y_s
        real(8), intent (in) :: x_s
        real(8), intent (in) :: x_m
        real(8), intent (in) :: y_m
        real(8), intent (in) :: z_m
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8) :: t_1
        real(8) :: t_2
        real(8) :: tmp
        t_1 = (x_m * y_m) * z_m
        t_2 = t_1 / sqrt(((z_m * z_m) - (t * a)))
        if (t_2 <= 1d-314) then
            tmp = t_1 / (z_m * 1.0d0)
        else if (t_2 <= 5d+296) then
            tmp = t_2
        else
            tmp = ((x_m * y_m) / z_m) * z_m
        end if
        code = z_s * (y_s * (x_s * tmp))
    end function
    
    x\_m = Math.abs(x);
    x\_s = Math.copySign(1.0, x);
    y\_m = Math.abs(y);
    y\_s = Math.copySign(1.0, y);
    z\_m = Math.abs(z);
    z\_s = Math.copySign(1.0, z);
    assert x_m < y_m && y_m < z_m && z_m < t && t < a;
    public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
    	double t_1 = (x_m * y_m) * z_m;
    	double t_2 = t_1 / Math.sqrt(((z_m * z_m) - (t * a)));
    	double tmp;
    	if (t_2 <= 1e-314) {
    		tmp = t_1 / (z_m * 1.0);
    	} else if (t_2 <= 5e+296) {
    		tmp = t_2;
    	} else {
    		tmp = ((x_m * y_m) / z_m) * z_m;
    	}
    	return z_s * (y_s * (x_s * tmp));
    }
    
    x\_m = math.fabs(x)
    x\_s = math.copysign(1.0, x)
    y\_m = math.fabs(y)
    y\_s = math.copysign(1.0, y)
    z\_m = math.fabs(z)
    z\_s = math.copysign(1.0, z)
    [x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
    def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
    	t_1 = (x_m * y_m) * z_m
    	t_2 = t_1 / math.sqrt(((z_m * z_m) - (t * a)))
    	tmp = 0
    	if t_2 <= 1e-314:
    		tmp = t_1 / (z_m * 1.0)
    	elif t_2 <= 5e+296:
    		tmp = t_2
    	else:
    		tmp = ((x_m * y_m) / z_m) * z_m
    	return z_s * (y_s * (x_s * tmp))
    
    x\_m = abs(x)
    x\_s = copysign(1.0, x)
    y\_m = abs(y)
    y\_s = copysign(1.0, y)
    z\_m = abs(z)
    z\_s = copysign(1.0, z)
    x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
    function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    	t_1 = Float64(Float64(x_m * y_m) * z_m)
    	t_2 = Float64(t_1 / sqrt(Float64(Float64(z_m * z_m) - Float64(t * a))))
    	tmp = 0.0
    	if (t_2 <= 1e-314)
    		tmp = Float64(t_1 / Float64(z_m * 1.0));
    	elseif (t_2 <= 5e+296)
    		tmp = t_2;
    	else
    		tmp = Float64(Float64(Float64(x_m * y_m) / z_m) * z_m);
    	end
    	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
    end
    
    x\_m = abs(x);
    x\_s = sign(x) * abs(1.0);
    y\_m = abs(y);
    y\_s = sign(y) * abs(1.0);
    z\_m = abs(z);
    z\_s = sign(z) * abs(1.0);
    x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
    function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
    	t_1 = (x_m * y_m) * z_m;
    	t_2 = t_1 / sqrt(((z_m * z_m) - (t * a)));
    	tmp = 0.0;
    	if (t_2 <= 1e-314)
    		tmp = t_1 / (z_m * 1.0);
    	elseif (t_2 <= 5e+296)
    		tmp = t_2;
    	else
    		tmp = ((x_m * y_m) / z_m) * z_m;
    	end
    	tmp_2 = z_s * (y_s * (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]
    y\_m = N[Abs[y], $MachinePrecision]
    y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    z\_m = N[Abs[z], $MachinePrecision]
    z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
    code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := Block[{t$95$1 = N[(N[(x$95$m * y$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[t$95$2, 1e-314], N[(t$95$1 / N[(z$95$m * 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+296], t$95$2, N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] / z$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    x\_m = \left|x\right|
    \\
    x\_s = \mathsf{copysign}\left(1, x\right)
    \\
    y\_m = \left|y\right|
    \\
    y\_s = \mathsf{copysign}\left(1, y\right)
    \\
    z\_m = \left|z\right|
    \\
    z\_s = \mathsf{copysign}\left(1, z\right)
    \\
    [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
    \\
    \begin{array}{l}
    t_1 := \left(x\_m \cdot y\_m\right) \cdot z\_m\\
    t_2 := \frac{t\_1}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\
    z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
    \mathbf{if}\;t\_2 \leq 10^{-314}:\\
    \;\;\;\;\frac{t\_1}{z\_m \cdot 1}\\
    
    \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+296}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\
    
    
    \end{array}\right)\right)
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < 9.9999999996e-315

      1. Initial program 60.8%

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

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

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

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

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

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

          \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{\color{blue}{z}}^{2}}\right)} \]
        6. lower-pow.f6465.0

          \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{\color{blue}{2}}}\right)} \]
      4. Applied rewrites65.0%

        \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{2}}\right)}} \]
      5. Taylor expanded in z around inf

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

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

        if 9.9999999996e-315 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < 5.0000000000000001e296

        1. Initial program 60.8%

          \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]

        if 5.0000000000000001e296 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))

        1. Initial program 60.8%

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

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

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

            \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{z \cdot z - t \cdot a}} \cdot z} \]
          4. mult-flip-revN/A

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

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

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

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

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

            \[\leadsto \color{blue}{\left(\left(y \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot x\right)} \cdot z \]
          10. mult-flip-revN/A

            \[\leadsto \left(\color{blue}{\frac{y}{\sqrt{z \cdot z - t \cdot a}}} \cdot x\right) \cdot z \]
          11. lower-/.f6460.2

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

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

            \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
          14. lower-*.f6460.2

            \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
        3. Applied rewrites60.2%

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

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

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

            \[\leadsto \frac{x \cdot y}{z} \cdot z \]
        6. Applied rewrites63.1%

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

      Alternative 5: 88.4% accurate, 0.3× speedup?

      \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ \begin{array}{l} t_1 := \left(x\_m \cdot y\_m\right) \cdot z\_m\\ t_2 := \frac{t\_1}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq 0:\\ \;\;\;\;\frac{t\_1}{z\_m \cdot 1}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\left(\frac{z\_m}{\sqrt{z\_m \cdot z\_m - a \cdot t}} \cdot y\_m\right) \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\ \end{array}\right)\right) \end{array} \end{array} \]
      x\_m = (fabs.f64 x)
      x\_s = (copysign.f64 #s(literal 1 binary64) x)
      y\_m = (fabs.f64 y)
      y\_s = (copysign.f64 #s(literal 1 binary64) y)
      z\_m = (fabs.f64 z)
      z\_s = (copysign.f64 #s(literal 1 binary64) z)
      NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
      (FPCore (z_s y_s x_s x_m y_m z_m t a)
       :precision binary64
       (let* ((t_1 (* (* x_m y_m) z_m)) (t_2 (/ t_1 (sqrt (- (* z_m z_m) (* t a))))))
         (*
          z_s
          (*
           y_s
           (*
            x_s
            (if (<= t_2 0.0)
              (/ t_1 (* z_m 1.0))
              (if (<= t_2 INFINITY)
                (* (* (/ z_m (sqrt (- (* z_m z_m) (* a t)))) y_m) x_m)
                (* (/ (* x_m y_m) z_m) z_m))))))))
      x\_m = fabs(x);
      x\_s = copysign(1.0, x);
      y\_m = fabs(y);
      y\_s = copysign(1.0, y);
      z\_m = fabs(z);
      z\_s = copysign(1.0, z);
      assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
      double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
      	double t_1 = (x_m * y_m) * z_m;
      	double t_2 = t_1 / sqrt(((z_m * z_m) - (t * a)));
      	double tmp;
      	if (t_2 <= 0.0) {
      		tmp = t_1 / (z_m * 1.0);
      	} else if (t_2 <= ((double) INFINITY)) {
      		tmp = ((z_m / sqrt(((z_m * z_m) - (a * t)))) * y_m) * x_m;
      	} else {
      		tmp = ((x_m * y_m) / z_m) * z_m;
      	}
      	return z_s * (y_s * (x_s * tmp));
      }
      
      x\_m = Math.abs(x);
      x\_s = Math.copySign(1.0, x);
      y\_m = Math.abs(y);
      y\_s = Math.copySign(1.0, y);
      z\_m = Math.abs(z);
      z\_s = Math.copySign(1.0, z);
      assert x_m < y_m && y_m < z_m && z_m < t && t < a;
      public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
      	double t_1 = (x_m * y_m) * z_m;
      	double t_2 = t_1 / Math.sqrt(((z_m * z_m) - (t * a)));
      	double tmp;
      	if (t_2 <= 0.0) {
      		tmp = t_1 / (z_m * 1.0);
      	} else if (t_2 <= Double.POSITIVE_INFINITY) {
      		tmp = ((z_m / Math.sqrt(((z_m * z_m) - (a * t)))) * y_m) * x_m;
      	} else {
      		tmp = ((x_m * y_m) / z_m) * z_m;
      	}
      	return z_s * (y_s * (x_s * tmp));
      }
      
      x\_m = math.fabs(x)
      x\_s = math.copysign(1.0, x)
      y\_m = math.fabs(y)
      y\_s = math.copysign(1.0, y)
      z\_m = math.fabs(z)
      z\_s = math.copysign(1.0, z)
      [x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
      def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
      	t_1 = (x_m * y_m) * z_m
      	t_2 = t_1 / math.sqrt(((z_m * z_m) - (t * a)))
      	tmp = 0
      	if t_2 <= 0.0:
      		tmp = t_1 / (z_m * 1.0)
      	elif t_2 <= math.inf:
      		tmp = ((z_m / math.sqrt(((z_m * z_m) - (a * t)))) * y_m) * x_m
      	else:
      		tmp = ((x_m * y_m) / z_m) * z_m
      	return z_s * (y_s * (x_s * tmp))
      
      x\_m = abs(x)
      x\_s = copysign(1.0, x)
      y\_m = abs(y)
      y\_s = copysign(1.0, y)
      z\_m = abs(z)
      z\_s = copysign(1.0, z)
      x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
      function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
      	t_1 = Float64(Float64(x_m * y_m) * z_m)
      	t_2 = Float64(t_1 / sqrt(Float64(Float64(z_m * z_m) - Float64(t * a))))
      	tmp = 0.0
      	if (t_2 <= 0.0)
      		tmp = Float64(t_1 / Float64(z_m * 1.0));
      	elseif (t_2 <= Inf)
      		tmp = Float64(Float64(Float64(z_m / sqrt(Float64(Float64(z_m * z_m) - Float64(a * t)))) * y_m) * x_m);
      	else
      		tmp = Float64(Float64(Float64(x_m * y_m) / z_m) * z_m);
      	end
      	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
      end
      
      x\_m = abs(x);
      x\_s = sign(x) * abs(1.0);
      y\_m = abs(y);
      y\_s = sign(y) * abs(1.0);
      z\_m = abs(z);
      z\_s = sign(z) * abs(1.0);
      x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
      function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
      	t_1 = (x_m * y_m) * z_m;
      	t_2 = t_1 / sqrt(((z_m * z_m) - (t * a)));
      	tmp = 0.0;
      	if (t_2 <= 0.0)
      		tmp = t_1 / (z_m * 1.0);
      	elseif (t_2 <= Inf)
      		tmp = ((z_m / sqrt(((z_m * z_m) - (a * t)))) * y_m) * x_m;
      	else
      		tmp = ((x_m * y_m) / z_m) * z_m;
      	end
      	tmp_2 = z_s * (y_s * (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]
      y\_m = N[Abs[y], $MachinePrecision]
      y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      z\_m = N[Abs[z], $MachinePrecision]
      z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
      code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := Block[{t$95$1 = N[(N[(x$95$m * y$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[t$95$2, 0.0], N[(t$95$1 / N[(z$95$m * 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(N[(z$95$m / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$95$m), $MachinePrecision] * x$95$m), $MachinePrecision], N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] / z$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      x\_m = \left|x\right|
      \\
      x\_s = \mathsf{copysign}\left(1, x\right)
      \\
      y\_m = \left|y\right|
      \\
      y\_s = \mathsf{copysign}\left(1, y\right)
      \\
      z\_m = \left|z\right|
      \\
      z\_s = \mathsf{copysign}\left(1, z\right)
      \\
      [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
      \\
      \begin{array}{l}
      t_1 := \left(x\_m \cdot y\_m\right) \cdot z\_m\\
      t_2 := \frac{t\_1}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\
      z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
      \mathbf{if}\;t\_2 \leq 0:\\
      \;\;\;\;\frac{t\_1}{z\_m \cdot 1}\\
      
      \mathbf{elif}\;t\_2 \leq \infty:\\
      \;\;\;\;\left(\frac{z\_m}{\sqrt{z\_m \cdot z\_m - a \cdot t}} \cdot y\_m\right) \cdot x\_m\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\
      
      
      \end{array}\right)\right)
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < 0.0

        1. Initial program 60.8%

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

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

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

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

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

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

            \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{\color{blue}{z}}^{2}}\right)} \]
          6. lower-pow.f6465.0

            \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{\color{blue}{2}}}\right)} \]
        4. Applied rewrites65.0%

          \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{2}}\right)}} \]
        5. Taylor expanded in z around inf

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

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

          if 0.0 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < +inf.0

          1. Initial program 60.8%

            \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
          2. Applied rewrites65.0%

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

          if +inf.0 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))

          1. Initial program 60.8%

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

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

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

              \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{z \cdot z - t \cdot a}} \cdot z} \]
            4. mult-flip-revN/A

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

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

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

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

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

              \[\leadsto \color{blue}{\left(\left(y \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot x\right)} \cdot z \]
            10. mult-flip-revN/A

              \[\leadsto \left(\color{blue}{\frac{y}{\sqrt{z \cdot z - t \cdot a}}} \cdot x\right) \cdot z \]
            11. lower-/.f6460.2

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

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

              \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
            14. lower-*.f6460.2

              \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
          3. Applied rewrites60.2%

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

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

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

              \[\leadsto \frac{x \cdot y}{z} \cdot z \]
          6. Applied rewrites63.1%

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

        Alternative 6: 87.8% accurate, 0.2× speedup?

        \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ \begin{array}{l} t_1 := \left(x\_m \cdot y\_m\right) \cdot z\_m\\ t_2 := \frac{t\_1}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\ t_3 := \sqrt{z\_m \cdot z\_m - a \cdot t}\\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq 2 \cdot 10^{-302}:\\ \;\;\;\;\frac{t\_1}{z\_m \cdot 1}\\ \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+15}:\\ \;\;\;\;\left(\frac{y\_m}{t\_3} \cdot x\_m\right) \cdot z\_m\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\left(\frac{x\_m}{t\_3} \cdot z\_m\right) \cdot y\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\ \end{array}\right)\right) \end{array} \end{array} \]
        x\_m = (fabs.f64 x)
        x\_s = (copysign.f64 #s(literal 1 binary64) x)
        y\_m = (fabs.f64 y)
        y\_s = (copysign.f64 #s(literal 1 binary64) y)
        z\_m = (fabs.f64 z)
        z\_s = (copysign.f64 #s(literal 1 binary64) z)
        NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
        (FPCore (z_s y_s x_s x_m y_m z_m t a)
         :precision binary64
         (let* ((t_1 (* (* x_m y_m) z_m))
                (t_2 (/ t_1 (sqrt (- (* z_m z_m) (* t a)))))
                (t_3 (sqrt (- (* z_m z_m) (* a t)))))
           (*
            z_s
            (*
             y_s
             (*
              x_s
              (if (<= t_2 2e-302)
                (/ t_1 (* z_m 1.0))
                (if (<= t_2 4e+15)
                  (* (* (/ y_m t_3) x_m) z_m)
                  (if (<= t_2 INFINITY)
                    (* (* (/ x_m t_3) z_m) y_m)
                    (* (/ (* x_m y_m) z_m) z_m)))))))))
        x\_m = fabs(x);
        x\_s = copysign(1.0, x);
        y\_m = fabs(y);
        y\_s = copysign(1.0, y);
        z\_m = fabs(z);
        z\_s = copysign(1.0, z);
        assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
        double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
        	double t_1 = (x_m * y_m) * z_m;
        	double t_2 = t_1 / sqrt(((z_m * z_m) - (t * a)));
        	double t_3 = sqrt(((z_m * z_m) - (a * t)));
        	double tmp;
        	if (t_2 <= 2e-302) {
        		tmp = t_1 / (z_m * 1.0);
        	} else if (t_2 <= 4e+15) {
        		tmp = ((y_m / t_3) * x_m) * z_m;
        	} else if (t_2 <= ((double) INFINITY)) {
        		tmp = ((x_m / t_3) * z_m) * y_m;
        	} else {
        		tmp = ((x_m * y_m) / z_m) * z_m;
        	}
        	return z_s * (y_s * (x_s * tmp));
        }
        
        x\_m = Math.abs(x);
        x\_s = Math.copySign(1.0, x);
        y\_m = Math.abs(y);
        y\_s = Math.copySign(1.0, y);
        z\_m = Math.abs(z);
        z\_s = Math.copySign(1.0, z);
        assert x_m < y_m && y_m < z_m && z_m < t && t < a;
        public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
        	double t_1 = (x_m * y_m) * z_m;
        	double t_2 = t_1 / Math.sqrt(((z_m * z_m) - (t * a)));
        	double t_3 = Math.sqrt(((z_m * z_m) - (a * t)));
        	double tmp;
        	if (t_2 <= 2e-302) {
        		tmp = t_1 / (z_m * 1.0);
        	} else if (t_2 <= 4e+15) {
        		tmp = ((y_m / t_3) * x_m) * z_m;
        	} else if (t_2 <= Double.POSITIVE_INFINITY) {
        		tmp = ((x_m / t_3) * z_m) * y_m;
        	} else {
        		tmp = ((x_m * y_m) / z_m) * z_m;
        	}
        	return z_s * (y_s * (x_s * tmp));
        }
        
        x\_m = math.fabs(x)
        x\_s = math.copysign(1.0, x)
        y\_m = math.fabs(y)
        y\_s = math.copysign(1.0, y)
        z\_m = math.fabs(z)
        z\_s = math.copysign(1.0, z)
        [x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
        def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
        	t_1 = (x_m * y_m) * z_m
        	t_2 = t_1 / math.sqrt(((z_m * z_m) - (t * a)))
        	t_3 = math.sqrt(((z_m * z_m) - (a * t)))
        	tmp = 0
        	if t_2 <= 2e-302:
        		tmp = t_1 / (z_m * 1.0)
        	elif t_2 <= 4e+15:
        		tmp = ((y_m / t_3) * x_m) * z_m
        	elif t_2 <= math.inf:
        		tmp = ((x_m / t_3) * z_m) * y_m
        	else:
        		tmp = ((x_m * y_m) / z_m) * z_m
        	return z_s * (y_s * (x_s * tmp))
        
        x\_m = abs(x)
        x\_s = copysign(1.0, x)
        y\_m = abs(y)
        y\_s = copysign(1.0, y)
        z\_m = abs(z)
        z\_s = copysign(1.0, z)
        x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
        function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
        	t_1 = Float64(Float64(x_m * y_m) * z_m)
        	t_2 = Float64(t_1 / sqrt(Float64(Float64(z_m * z_m) - Float64(t * a))))
        	t_3 = sqrt(Float64(Float64(z_m * z_m) - Float64(a * t)))
        	tmp = 0.0
        	if (t_2 <= 2e-302)
        		tmp = Float64(t_1 / Float64(z_m * 1.0));
        	elseif (t_2 <= 4e+15)
        		tmp = Float64(Float64(Float64(y_m / t_3) * x_m) * z_m);
        	elseif (t_2 <= Inf)
        		tmp = Float64(Float64(Float64(x_m / t_3) * z_m) * y_m);
        	else
        		tmp = Float64(Float64(Float64(x_m * y_m) / z_m) * z_m);
        	end
        	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
        end
        
        x\_m = abs(x);
        x\_s = sign(x) * abs(1.0);
        y\_m = abs(y);
        y\_s = sign(y) * abs(1.0);
        z\_m = abs(z);
        z\_s = sign(z) * abs(1.0);
        x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
        function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
        	t_1 = (x_m * y_m) * z_m;
        	t_2 = t_1 / sqrt(((z_m * z_m) - (t * a)));
        	t_3 = sqrt(((z_m * z_m) - (a * t)));
        	tmp = 0.0;
        	if (t_2 <= 2e-302)
        		tmp = t_1 / (z_m * 1.0);
        	elseif (t_2 <= 4e+15)
        		tmp = ((y_m / t_3) * x_m) * z_m;
        	elseif (t_2 <= Inf)
        		tmp = ((x_m / t_3) * z_m) * y_m;
        	else
        		tmp = ((x_m * y_m) / z_m) * z_m;
        	end
        	tmp_2 = z_s * (y_s * (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]
        y\_m = N[Abs[y], $MachinePrecision]
        y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
        z\_m = N[Abs[z], $MachinePrecision]
        z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
        NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
        code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := Block[{t$95$1 = N[(N[(x$95$m * y$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[t$95$2, 2e-302], N[(t$95$1 / N[(z$95$m * 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e+15], N[(N[(N[(y$95$m / t$95$3), $MachinePrecision] * x$95$m), $MachinePrecision] * z$95$m), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(N[(x$95$m / t$95$3), $MachinePrecision] * z$95$m), $MachinePrecision] * y$95$m), $MachinePrecision], N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] / z$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]]]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
        
        \begin{array}{l}
        x\_m = \left|x\right|
        \\
        x\_s = \mathsf{copysign}\left(1, x\right)
        \\
        y\_m = \left|y\right|
        \\
        y\_s = \mathsf{copysign}\left(1, y\right)
        \\
        z\_m = \left|z\right|
        \\
        z\_s = \mathsf{copysign}\left(1, z\right)
        \\
        [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
        \\
        \begin{array}{l}
        t_1 := \left(x\_m \cdot y\_m\right) \cdot z\_m\\
        t_2 := \frac{t\_1}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\
        t_3 := \sqrt{z\_m \cdot z\_m - a \cdot t}\\
        z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
        \mathbf{if}\;t\_2 \leq 2 \cdot 10^{-302}:\\
        \;\;\;\;\frac{t\_1}{z\_m \cdot 1}\\
        
        \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+15}:\\
        \;\;\;\;\left(\frac{y\_m}{t\_3} \cdot x\_m\right) \cdot z\_m\\
        
        \mathbf{elif}\;t\_2 \leq \infty:\\
        \;\;\;\;\left(\frac{x\_m}{t\_3} \cdot z\_m\right) \cdot y\_m\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\
        
        
        \end{array}\right)\right)
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < 1.9999999999999999e-302

          1. Initial program 60.8%

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

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

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

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

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

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

              \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{\color{blue}{z}}^{2}}\right)} \]
            6. lower-pow.f6465.0

              \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{\color{blue}{2}}}\right)} \]
          4. Applied rewrites65.0%

            \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{2}}\right)}} \]
          5. Taylor expanded in z around inf

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

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

            if 1.9999999999999999e-302 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < 4e15

            1. Initial program 60.8%

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

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

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

                \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{z \cdot z - t \cdot a}} \cdot z} \]
              4. mult-flip-revN/A

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

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

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

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

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

                \[\leadsto \color{blue}{\left(\left(y \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot x\right)} \cdot z \]
              10. mult-flip-revN/A

                \[\leadsto \left(\color{blue}{\frac{y}{\sqrt{z \cdot z - t \cdot a}}} \cdot x\right) \cdot z \]
              11. lower-/.f6460.2

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

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

                \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
              14. lower-*.f6460.2

                \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
            3. Applied rewrites60.2%

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

            if 4e15 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < +inf.0

            1. Initial program 60.8%

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\left(x \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot y} \]
              9. mult-flipN/A

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

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

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

                \[\leadsto \color{blue}{\left(\left(x \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot z\right)} \cdot y \]
              13. mult-flip-revN/A

                \[\leadsto \left(\color{blue}{\frac{x}{\sqrt{z \cdot z - t \cdot a}}} \cdot z\right) \cdot y \]
              14. lower-/.f6459.4

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

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

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

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

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

            if +inf.0 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))

            1. Initial program 60.8%

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

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

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

                \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{z \cdot z - t \cdot a}} \cdot z} \]
              4. mult-flip-revN/A

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

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

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

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

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

                \[\leadsto \color{blue}{\left(\left(y \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot x\right)} \cdot z \]
              10. mult-flip-revN/A

                \[\leadsto \left(\color{blue}{\frac{y}{\sqrt{z \cdot z - t \cdot a}}} \cdot x\right) \cdot z \]
              11. lower-/.f6460.2

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

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

                \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
              14. lower-*.f6460.2

                \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
            3. Applied rewrites60.2%

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

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

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

                \[\leadsto \frac{x \cdot y}{z} \cdot z \]
            6. Applied rewrites63.1%

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

          Alternative 7: 83.9% accurate, 0.3× speedup?

          \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ \begin{array}{l} t_1 := \left(x\_m \cdot y\_m\right) \cdot z\_m\\ t_2 := \frac{t\_1}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq 2 \cdot 10^{-302}:\\ \;\;\;\;\frac{t\_1}{z\_m \cdot 1}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\left(\frac{x\_m}{\sqrt{z\_m \cdot z\_m - a \cdot t}} \cdot z\_m\right) \cdot y\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\ \end{array}\right)\right) \end{array} \end{array} \]
          x\_m = (fabs.f64 x)
          x\_s = (copysign.f64 #s(literal 1 binary64) x)
          y\_m = (fabs.f64 y)
          y\_s = (copysign.f64 #s(literal 1 binary64) y)
          z\_m = (fabs.f64 z)
          z\_s = (copysign.f64 #s(literal 1 binary64) z)
          NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
          (FPCore (z_s y_s x_s x_m y_m z_m t a)
           :precision binary64
           (let* ((t_1 (* (* x_m y_m) z_m)) (t_2 (/ t_1 (sqrt (- (* z_m z_m) (* t a))))))
             (*
              z_s
              (*
               y_s
               (*
                x_s
                (if (<= t_2 2e-302)
                  (/ t_1 (* z_m 1.0))
                  (if (<= t_2 INFINITY)
                    (* (* (/ x_m (sqrt (- (* z_m z_m) (* a t)))) z_m) y_m)
                    (* (/ (* x_m y_m) z_m) z_m))))))))
          x\_m = fabs(x);
          x\_s = copysign(1.0, x);
          y\_m = fabs(y);
          y\_s = copysign(1.0, y);
          z\_m = fabs(z);
          z\_s = copysign(1.0, z);
          assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
          double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
          	double t_1 = (x_m * y_m) * z_m;
          	double t_2 = t_1 / sqrt(((z_m * z_m) - (t * a)));
          	double tmp;
          	if (t_2 <= 2e-302) {
          		tmp = t_1 / (z_m * 1.0);
          	} else if (t_2 <= ((double) INFINITY)) {
          		tmp = ((x_m / sqrt(((z_m * z_m) - (a * t)))) * z_m) * y_m;
          	} else {
          		tmp = ((x_m * y_m) / z_m) * z_m;
          	}
          	return z_s * (y_s * (x_s * tmp));
          }
          
          x\_m = Math.abs(x);
          x\_s = Math.copySign(1.0, x);
          y\_m = Math.abs(y);
          y\_s = Math.copySign(1.0, y);
          z\_m = Math.abs(z);
          z\_s = Math.copySign(1.0, z);
          assert x_m < y_m && y_m < z_m && z_m < t && t < a;
          public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
          	double t_1 = (x_m * y_m) * z_m;
          	double t_2 = t_1 / Math.sqrt(((z_m * z_m) - (t * a)));
          	double tmp;
          	if (t_2 <= 2e-302) {
          		tmp = t_1 / (z_m * 1.0);
          	} else if (t_2 <= Double.POSITIVE_INFINITY) {
          		tmp = ((x_m / Math.sqrt(((z_m * z_m) - (a * t)))) * z_m) * y_m;
          	} else {
          		tmp = ((x_m * y_m) / z_m) * z_m;
          	}
          	return z_s * (y_s * (x_s * tmp));
          }
          
          x\_m = math.fabs(x)
          x\_s = math.copysign(1.0, x)
          y\_m = math.fabs(y)
          y\_s = math.copysign(1.0, y)
          z\_m = math.fabs(z)
          z\_s = math.copysign(1.0, z)
          [x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
          def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
          	t_1 = (x_m * y_m) * z_m
          	t_2 = t_1 / math.sqrt(((z_m * z_m) - (t * a)))
          	tmp = 0
          	if t_2 <= 2e-302:
          		tmp = t_1 / (z_m * 1.0)
          	elif t_2 <= math.inf:
          		tmp = ((x_m / math.sqrt(((z_m * z_m) - (a * t)))) * z_m) * y_m
          	else:
          		tmp = ((x_m * y_m) / z_m) * z_m
          	return z_s * (y_s * (x_s * tmp))
          
          x\_m = abs(x)
          x\_s = copysign(1.0, x)
          y\_m = abs(y)
          y\_s = copysign(1.0, y)
          z\_m = abs(z)
          z\_s = copysign(1.0, z)
          x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
          function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
          	t_1 = Float64(Float64(x_m * y_m) * z_m)
          	t_2 = Float64(t_1 / sqrt(Float64(Float64(z_m * z_m) - Float64(t * a))))
          	tmp = 0.0
          	if (t_2 <= 2e-302)
          		tmp = Float64(t_1 / Float64(z_m * 1.0));
          	elseif (t_2 <= Inf)
          		tmp = Float64(Float64(Float64(x_m / sqrt(Float64(Float64(z_m * z_m) - Float64(a * t)))) * z_m) * y_m);
          	else
          		tmp = Float64(Float64(Float64(x_m * y_m) / z_m) * z_m);
          	end
          	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
          end
          
          x\_m = abs(x);
          x\_s = sign(x) * abs(1.0);
          y\_m = abs(y);
          y\_s = sign(y) * abs(1.0);
          z\_m = abs(z);
          z\_s = sign(z) * abs(1.0);
          x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
          function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
          	t_1 = (x_m * y_m) * z_m;
          	t_2 = t_1 / sqrt(((z_m * z_m) - (t * a)));
          	tmp = 0.0;
          	if (t_2 <= 2e-302)
          		tmp = t_1 / (z_m * 1.0);
          	elseif (t_2 <= Inf)
          		tmp = ((x_m / sqrt(((z_m * z_m) - (a * t)))) * z_m) * y_m;
          	else
          		tmp = ((x_m * y_m) / z_m) * z_m;
          	end
          	tmp_2 = z_s * (y_s * (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]
          y\_m = N[Abs[y], $MachinePrecision]
          y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          z\_m = N[Abs[z], $MachinePrecision]
          z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
          code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := Block[{t$95$1 = N[(N[(x$95$m * y$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[t$95$2, 2e-302], N[(t$95$1 / N[(z$95$m * 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(N[(x$95$m / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * z$95$m), $MachinePrecision] * y$95$m), $MachinePrecision], N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] / z$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
          
          \begin{array}{l}
          x\_m = \left|x\right|
          \\
          x\_s = \mathsf{copysign}\left(1, x\right)
          \\
          y\_m = \left|y\right|
          \\
          y\_s = \mathsf{copysign}\left(1, y\right)
          \\
          z\_m = \left|z\right|
          \\
          z\_s = \mathsf{copysign}\left(1, z\right)
          \\
          [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
          \\
          \begin{array}{l}
          t_1 := \left(x\_m \cdot y\_m\right) \cdot z\_m\\
          t_2 := \frac{t\_1}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\
          z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
          \mathbf{if}\;t\_2 \leq 2 \cdot 10^{-302}:\\
          \;\;\;\;\frac{t\_1}{z\_m \cdot 1}\\
          
          \mathbf{elif}\;t\_2 \leq \infty:\\
          \;\;\;\;\left(\frac{x\_m}{\sqrt{z\_m \cdot z\_m - a \cdot t}} \cdot z\_m\right) \cdot y\_m\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\
          
          
          \end{array}\right)\right)
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < 1.9999999999999999e-302

            1. Initial program 60.8%

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

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

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

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

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

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

                \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{\color{blue}{z}}^{2}}\right)} \]
              6. lower-pow.f6465.0

                \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{\color{blue}{2}}}\right)} \]
            4. Applied rewrites65.0%

              \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{2}}\right)}} \]
            5. Taylor expanded in z around inf

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

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

              if 1.9999999999999999e-302 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < +inf.0

              1. Initial program 60.8%

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\left(x \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot y} \]
                9. mult-flipN/A

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

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

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

                  \[\leadsto \color{blue}{\left(\left(x \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot z\right)} \cdot y \]
                13. mult-flip-revN/A

                  \[\leadsto \left(\color{blue}{\frac{x}{\sqrt{z \cdot z - t \cdot a}}} \cdot z\right) \cdot y \]
                14. lower-/.f6459.4

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

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

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

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

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

              if +inf.0 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))

              1. Initial program 60.8%

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

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

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

                  \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{z \cdot z - t \cdot a}} \cdot z} \]
                4. mult-flip-revN/A

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

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

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

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

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

                  \[\leadsto \color{blue}{\left(\left(y \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot x\right)} \cdot z \]
                10. mult-flip-revN/A

                  \[\leadsto \left(\color{blue}{\frac{y}{\sqrt{z \cdot z - t \cdot a}}} \cdot x\right) \cdot z \]
                11. lower-/.f6460.2

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

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

                  \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
                14. lower-*.f6460.2

                  \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
              3. Applied rewrites60.2%

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

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

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

                  \[\leadsto \frac{x \cdot y}{z} \cdot z \]
              6. Applied rewrites63.1%

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

            Alternative 8: 75.5% accurate, 1.0× speedup?

            \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ \begin{array}{l} t_1 := \left(x\_m \cdot y\_m\right) \cdot z\_m\\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 2.3 \cdot 10^{-41}:\\ \;\;\;\;\frac{t\_1}{\sqrt{-t} \cdot \sqrt{a}}\\ \mathbf{elif}\;z\_m \leq 5.2 \cdot 10^{+265}:\\ \;\;\;\;\frac{t\_1}{z\_m \cdot 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\ \end{array}\right)\right) \end{array} \end{array} \]
            x\_m = (fabs.f64 x)
            x\_s = (copysign.f64 #s(literal 1 binary64) x)
            y\_m = (fabs.f64 y)
            y\_s = (copysign.f64 #s(literal 1 binary64) y)
            z\_m = (fabs.f64 z)
            z\_s = (copysign.f64 #s(literal 1 binary64) z)
            NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
            (FPCore (z_s y_s x_s x_m y_m z_m t a)
             :precision binary64
             (let* ((t_1 (* (* x_m y_m) z_m)))
               (*
                z_s
                (*
                 y_s
                 (*
                  x_s
                  (if (<= z_m 2.3e-41)
                    (/ t_1 (* (sqrt (- t)) (sqrt a)))
                    (if (<= z_m 5.2e+265)
                      (/ t_1 (* z_m 1.0))
                      (* (/ (* x_m y_m) z_m) z_m))))))))
            x\_m = fabs(x);
            x\_s = copysign(1.0, x);
            y\_m = fabs(y);
            y\_s = copysign(1.0, y);
            z\_m = fabs(z);
            z\_s = copysign(1.0, z);
            assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
            double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
            	double t_1 = (x_m * y_m) * z_m;
            	double tmp;
            	if (z_m <= 2.3e-41) {
            		tmp = t_1 / (sqrt(-t) * sqrt(a));
            	} else if (z_m <= 5.2e+265) {
            		tmp = t_1 / (z_m * 1.0);
            	} else {
            		tmp = ((x_m * y_m) / z_m) * z_m;
            	}
            	return z_s * (y_s * (x_s * tmp));
            }
            
            x\_m =     private
            x\_s =     private
            y\_m =     private
            y\_s =     private
            z\_m =     private
            z\_s =     private
            NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
            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(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
            use fmin_fmax_functions
                real(8), intent (in) :: z_s
                real(8), intent (in) :: y_s
                real(8), intent (in) :: x_s
                real(8), intent (in) :: x_m
                real(8), intent (in) :: y_m
                real(8), intent (in) :: z_m
                real(8), intent (in) :: t
                real(8), intent (in) :: a
                real(8) :: t_1
                real(8) :: tmp
                t_1 = (x_m * y_m) * z_m
                if (z_m <= 2.3d-41) then
                    tmp = t_1 / (sqrt(-t) * sqrt(a))
                else if (z_m <= 5.2d+265) then
                    tmp = t_1 / (z_m * 1.0d0)
                else
                    tmp = ((x_m * y_m) / z_m) * z_m
                end if
                code = z_s * (y_s * (x_s * tmp))
            end function
            
            x\_m = Math.abs(x);
            x\_s = Math.copySign(1.0, x);
            y\_m = Math.abs(y);
            y\_s = Math.copySign(1.0, y);
            z\_m = Math.abs(z);
            z\_s = Math.copySign(1.0, z);
            assert x_m < y_m && y_m < z_m && z_m < t && t < a;
            public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
            	double t_1 = (x_m * y_m) * z_m;
            	double tmp;
            	if (z_m <= 2.3e-41) {
            		tmp = t_1 / (Math.sqrt(-t) * Math.sqrt(a));
            	} else if (z_m <= 5.2e+265) {
            		tmp = t_1 / (z_m * 1.0);
            	} else {
            		tmp = ((x_m * y_m) / z_m) * z_m;
            	}
            	return z_s * (y_s * (x_s * tmp));
            }
            
            x\_m = math.fabs(x)
            x\_s = math.copysign(1.0, x)
            y\_m = math.fabs(y)
            y\_s = math.copysign(1.0, y)
            z\_m = math.fabs(z)
            z\_s = math.copysign(1.0, z)
            [x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
            def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
            	t_1 = (x_m * y_m) * z_m
            	tmp = 0
            	if z_m <= 2.3e-41:
            		tmp = t_1 / (math.sqrt(-t) * math.sqrt(a))
            	elif z_m <= 5.2e+265:
            		tmp = t_1 / (z_m * 1.0)
            	else:
            		tmp = ((x_m * y_m) / z_m) * z_m
            	return z_s * (y_s * (x_s * tmp))
            
            x\_m = abs(x)
            x\_s = copysign(1.0, x)
            y\_m = abs(y)
            y\_s = copysign(1.0, y)
            z\_m = abs(z)
            z\_s = copysign(1.0, z)
            x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
            function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
            	t_1 = Float64(Float64(x_m * y_m) * z_m)
            	tmp = 0.0
            	if (z_m <= 2.3e-41)
            		tmp = Float64(t_1 / Float64(sqrt(Float64(-t)) * sqrt(a)));
            	elseif (z_m <= 5.2e+265)
            		tmp = Float64(t_1 / Float64(z_m * 1.0));
            	else
            		tmp = Float64(Float64(Float64(x_m * y_m) / z_m) * z_m);
            	end
            	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
            end
            
            x\_m = abs(x);
            x\_s = sign(x) * abs(1.0);
            y\_m = abs(y);
            y\_s = sign(y) * abs(1.0);
            z\_m = abs(z);
            z\_s = sign(z) * abs(1.0);
            x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
            function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
            	t_1 = (x_m * y_m) * z_m;
            	tmp = 0.0;
            	if (z_m <= 2.3e-41)
            		tmp = t_1 / (sqrt(-t) * sqrt(a));
            	elseif (z_m <= 5.2e+265)
            		tmp = t_1 / (z_m * 1.0);
            	else
            		tmp = ((x_m * y_m) / z_m) * z_m;
            	end
            	tmp_2 = z_s * (y_s * (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]
            y\_m = N[Abs[y], $MachinePrecision]
            y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            z\_m = N[Abs[z], $MachinePrecision]
            z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
            code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := Block[{t$95$1 = N[(N[(x$95$m * y$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]}, N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 2.3e-41], N[(t$95$1 / N[(N[Sqrt[(-t)], $MachinePrecision] * N[Sqrt[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z$95$m, 5.2e+265], N[(t$95$1 / N[(z$95$m * 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] / z$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            x\_m = \left|x\right|
            \\
            x\_s = \mathsf{copysign}\left(1, x\right)
            \\
            y\_m = \left|y\right|
            \\
            y\_s = \mathsf{copysign}\left(1, y\right)
            \\
            z\_m = \left|z\right|
            \\
            z\_s = \mathsf{copysign}\left(1, z\right)
            \\
            [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
            \\
            \begin{array}{l}
            t_1 := \left(x\_m \cdot y\_m\right) \cdot z\_m\\
            z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
            \mathbf{if}\;z\_m \leq 2.3 \cdot 10^{-41}:\\
            \;\;\;\;\frac{t\_1}{\sqrt{-t} \cdot \sqrt{a}}\\
            
            \mathbf{elif}\;z\_m \leq 5.2 \cdot 10^{+265}:\\
            \;\;\;\;\frac{t\_1}{z\_m \cdot 1}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\
            
            
            \end{array}\right)\right)
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if z < 2.3000000000000001e-41

              1. Initial program 60.8%

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

                \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{\sqrt{\mathsf{neg}\left(a \cdot t\right)}}} \]
              3. Step-by-step derivation
                1. lower-sqrt.f64N/A

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

                  \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\sqrt{-a \cdot t}} \]
                3. lower-*.f6433.2

                  \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\sqrt{-a \cdot t}} \]
              4. Applied rewrites33.2%

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

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

                  \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\sqrt{\mathsf{neg}\left(a \cdot t\right)}} \]
                3. lift-*.f64N/A

                  \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\sqrt{\mathsf{neg}\left(a \cdot t\right)}} \]
                4. *-commutativeN/A

                  \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\sqrt{\mathsf{neg}\left(t \cdot a\right)}} \]
                5. distribute-lft-neg-outN/A

                  \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\sqrt{\left(\mathsf{neg}\left(t\right)\right) \cdot a}} \]
                6. lift-neg.f64N/A

                  \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\sqrt{\left(-t\right) \cdot a}} \]
                7. sqrt-prodN/A

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

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

                  \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\sqrt{-t} \cdot \sqrt{\color{blue}{a}}} \]
                10. lower-unsound-sqrt.f6419.2

                  \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\sqrt{-t} \cdot \sqrt{a}} \]
              6. Applied rewrites19.2%

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

              if 2.3000000000000001e-41 < z < 5.2000000000000003e265

              1. Initial program 60.8%

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

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

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

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

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

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

                  \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{\color{blue}{z}}^{2}}\right)} \]
                6. lower-pow.f6465.0

                  \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{\color{blue}{2}}}\right)} \]
              4. Applied rewrites65.0%

                \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{2}}\right)}} \]
              5. Taylor expanded in z around inf

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

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

                if 5.2000000000000003e265 < z

                1. Initial program 60.8%

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

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

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

                    \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{z \cdot z - t \cdot a}} \cdot z} \]
                  4. mult-flip-revN/A

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

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

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

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

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

                    \[\leadsto \color{blue}{\left(\left(y \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot x\right)} \cdot z \]
                  10. mult-flip-revN/A

                    \[\leadsto \left(\color{blue}{\frac{y}{\sqrt{z \cdot z - t \cdot a}}} \cdot x\right) \cdot z \]
                  11. lower-/.f6460.2

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

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

                    \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
                  14. lower-*.f6460.2

                    \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
                3. Applied rewrites60.2%

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

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

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

                    \[\leadsto \frac{x \cdot y}{z} \cdot z \]
                6. Applied rewrites63.1%

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

              Alternative 9: 73.3% accurate, 1.0× speedup?

              \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 2.25 \cdot 10^{-41}:\\ \;\;\;\;\left(\frac{y\_m}{\sqrt{-t} \cdot \sqrt{a}} \cdot x\_m\right) \cdot z\_m\\ \mathbf{elif}\;z\_m \leq 5.2 \cdot 10^{+265}:\\ \;\;\;\;\frac{\left(x\_m \cdot y\_m\right) \cdot z\_m}{z\_m \cdot 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\ \end{array}\right)\right) \end{array} \]
              x\_m = (fabs.f64 x)
              x\_s = (copysign.f64 #s(literal 1 binary64) x)
              y\_m = (fabs.f64 y)
              y\_s = (copysign.f64 #s(literal 1 binary64) y)
              z\_m = (fabs.f64 z)
              z\_s = (copysign.f64 #s(literal 1 binary64) z)
              NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
              (FPCore (z_s y_s x_s x_m y_m z_m t a)
               :precision binary64
               (*
                z_s
                (*
                 y_s
                 (*
                  x_s
                  (if (<= z_m 2.25e-41)
                    (* (* (/ y_m (* (sqrt (- t)) (sqrt a))) x_m) z_m)
                    (if (<= z_m 5.2e+265)
                      (/ (* (* x_m y_m) z_m) (* z_m 1.0))
                      (* (/ (* x_m y_m) z_m) z_m)))))))
              x\_m = fabs(x);
              x\_s = copysign(1.0, x);
              y\_m = fabs(y);
              y\_s = copysign(1.0, y);
              z\_m = fabs(z);
              z\_s = copysign(1.0, z);
              assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
              double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
              	double tmp;
              	if (z_m <= 2.25e-41) {
              		tmp = ((y_m / (sqrt(-t) * sqrt(a))) * x_m) * z_m;
              	} else if (z_m <= 5.2e+265) {
              		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0);
              	} else {
              		tmp = ((x_m * y_m) / z_m) * z_m;
              	}
              	return z_s * (y_s * (x_s * tmp));
              }
              
              x\_m =     private
              x\_s =     private
              y\_m =     private
              y\_s =     private
              z\_m =     private
              z\_s =     private
              NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
              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(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
              use fmin_fmax_functions
                  real(8), intent (in) :: z_s
                  real(8), intent (in) :: y_s
                  real(8), intent (in) :: x_s
                  real(8), intent (in) :: x_m
                  real(8), intent (in) :: y_m
                  real(8), intent (in) :: z_m
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8) :: tmp
                  if (z_m <= 2.25d-41) then
                      tmp = ((y_m / (sqrt(-t) * sqrt(a))) * x_m) * z_m
                  else if (z_m <= 5.2d+265) then
                      tmp = ((x_m * y_m) * z_m) / (z_m * 1.0d0)
                  else
                      tmp = ((x_m * y_m) / z_m) * z_m
                  end if
                  code = z_s * (y_s * (x_s * tmp))
              end function
              
              x\_m = Math.abs(x);
              x\_s = Math.copySign(1.0, x);
              y\_m = Math.abs(y);
              y\_s = Math.copySign(1.0, y);
              z\_m = Math.abs(z);
              z\_s = Math.copySign(1.0, z);
              assert x_m < y_m && y_m < z_m && z_m < t && t < a;
              public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
              	double tmp;
              	if (z_m <= 2.25e-41) {
              		tmp = ((y_m / (Math.sqrt(-t) * Math.sqrt(a))) * x_m) * z_m;
              	} else if (z_m <= 5.2e+265) {
              		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0);
              	} else {
              		tmp = ((x_m * y_m) / z_m) * z_m;
              	}
              	return z_s * (y_s * (x_s * tmp));
              }
              
              x\_m = math.fabs(x)
              x\_s = math.copysign(1.0, x)
              y\_m = math.fabs(y)
              y\_s = math.copysign(1.0, y)
              z\_m = math.fabs(z)
              z\_s = math.copysign(1.0, z)
              [x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
              def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
              	tmp = 0
              	if z_m <= 2.25e-41:
              		tmp = ((y_m / (math.sqrt(-t) * math.sqrt(a))) * x_m) * z_m
              	elif z_m <= 5.2e+265:
              		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0)
              	else:
              		tmp = ((x_m * y_m) / z_m) * z_m
              	return z_s * (y_s * (x_s * tmp))
              
              x\_m = abs(x)
              x\_s = copysign(1.0, x)
              y\_m = abs(y)
              y\_s = copysign(1.0, y)
              z\_m = abs(z)
              z\_s = copysign(1.0, z)
              x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
              function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
              	tmp = 0.0
              	if (z_m <= 2.25e-41)
              		tmp = Float64(Float64(Float64(y_m / Float64(sqrt(Float64(-t)) * sqrt(a))) * x_m) * z_m);
              	elseif (z_m <= 5.2e+265)
              		tmp = Float64(Float64(Float64(x_m * y_m) * z_m) / Float64(z_m * 1.0));
              	else
              		tmp = Float64(Float64(Float64(x_m * y_m) / z_m) * z_m);
              	end
              	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
              end
              
              x\_m = abs(x);
              x\_s = sign(x) * abs(1.0);
              y\_m = abs(y);
              y\_s = sign(y) * abs(1.0);
              z\_m = abs(z);
              z\_s = sign(z) * abs(1.0);
              x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
              function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
              	tmp = 0.0;
              	if (z_m <= 2.25e-41)
              		tmp = ((y_m / (sqrt(-t) * sqrt(a))) * x_m) * z_m;
              	elseif (z_m <= 5.2e+265)
              		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0);
              	else
              		tmp = ((x_m * y_m) / z_m) * z_m;
              	end
              	tmp_2 = z_s * (y_s * (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]
              y\_m = N[Abs[y], $MachinePrecision]
              y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
              z\_m = N[Abs[z], $MachinePrecision]
              z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
              NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
              code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 2.25e-41], N[(N[(N[(y$95$m / N[(N[Sqrt[(-t)], $MachinePrecision] * N[Sqrt[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x$95$m), $MachinePrecision] * z$95$m), $MachinePrecision], If[LessEqual[z$95$m, 5.2e+265], N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] * z$95$m), $MachinePrecision] / N[(z$95$m * 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] / z$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
              
              \begin{array}{l}
              x\_m = \left|x\right|
              \\
              x\_s = \mathsf{copysign}\left(1, x\right)
              \\
              y\_m = \left|y\right|
              \\
              y\_s = \mathsf{copysign}\left(1, y\right)
              \\
              z\_m = \left|z\right|
              \\
              z\_s = \mathsf{copysign}\left(1, z\right)
              \\
              [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
              \\
              z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
              \mathbf{if}\;z\_m \leq 2.25 \cdot 10^{-41}:\\
              \;\;\;\;\left(\frac{y\_m}{\sqrt{-t} \cdot \sqrt{a}} \cdot x\_m\right) \cdot z\_m\\
              
              \mathbf{elif}\;z\_m \leq 5.2 \cdot 10^{+265}:\\
              \;\;\;\;\frac{\left(x\_m \cdot y\_m\right) \cdot z\_m}{z\_m \cdot 1}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\
              
              
              \end{array}\right)\right)
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if z < 2.25e-41

                1. Initial program 60.8%

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

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

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

                    \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{z \cdot z - t \cdot a}} \cdot z} \]
                  4. mult-flip-revN/A

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

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

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

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

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

                    \[\leadsto \color{blue}{\left(\left(y \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot x\right)} \cdot z \]
                  10. mult-flip-revN/A

                    \[\leadsto \left(\color{blue}{\frac{y}{\sqrt{z \cdot z - t \cdot a}}} \cdot x\right) \cdot z \]
                  11. lower-/.f6460.2

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

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

                    \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
                  14. lower-*.f6460.2

                    \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
                3. Applied rewrites60.2%

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

                  \[\leadsto \left(\color{blue}{\frac{y}{\sqrt{\mathsf{neg}\left(a \cdot t\right)}}} \cdot x\right) \cdot z \]
                5. Step-by-step derivation
                  1. lower-/.f64N/A

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

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

                    \[\leadsto \left(\frac{y}{\sqrt{-a \cdot t}} \cdot x\right) \cdot z \]
                  4. lower-*.f6432.7

                    \[\leadsto \left(\frac{y}{\sqrt{-a \cdot t}} \cdot x\right) \cdot z \]
                6. Applied rewrites32.7%

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

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

                    \[\leadsto \left(\frac{y}{\sqrt{\mathsf{neg}\left(a \cdot t\right)}} \cdot x\right) \cdot z \]
                  3. lift-*.f64N/A

                    \[\leadsto \left(\frac{y}{\sqrt{\mathsf{neg}\left(a \cdot t\right)}} \cdot x\right) \cdot z \]
                  4. *-commutativeN/A

                    \[\leadsto \left(\frac{y}{\sqrt{\mathsf{neg}\left(t \cdot a\right)}} \cdot x\right) \cdot z \]
                  5. distribute-lft-neg-outN/A

                    \[\leadsto \left(\frac{y}{\sqrt{\left(\mathsf{neg}\left(t\right)\right) \cdot a}} \cdot x\right) \cdot z \]
                  6. lift-neg.f64N/A

                    \[\leadsto \left(\frac{y}{\sqrt{\left(-t\right) \cdot a}} \cdot x\right) \cdot z \]
                  7. sqrt-prodN/A

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

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

                    \[\leadsto \left(\frac{y}{\sqrt{-t} \cdot \sqrt{\color{blue}{a}}} \cdot x\right) \cdot z \]
                  10. lower-unsound-sqrt.f6418.7

                    \[\leadsto \left(\frac{y}{\sqrt{-t} \cdot \sqrt{a}} \cdot x\right) \cdot z \]
                8. Applied rewrites18.7%

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

                if 2.25e-41 < z < 5.2000000000000003e265

                1. Initial program 60.8%

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

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

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

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

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

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

                    \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{\color{blue}{z}}^{2}}\right)} \]
                  6. lower-pow.f6465.0

                    \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{\color{blue}{2}}}\right)} \]
                4. Applied rewrites65.0%

                  \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{2}}\right)}} \]
                5. Taylor expanded in z around inf

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

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

                  if 5.2000000000000003e265 < z

                  1. Initial program 60.8%

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

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

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

                      \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{z \cdot z - t \cdot a}} \cdot z} \]
                    4. mult-flip-revN/A

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

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

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

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

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

                      \[\leadsto \color{blue}{\left(\left(y \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot x\right)} \cdot z \]
                    10. mult-flip-revN/A

                      \[\leadsto \left(\color{blue}{\frac{y}{\sqrt{z \cdot z - t \cdot a}}} \cdot x\right) \cdot z \]
                    11. lower-/.f6460.2

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

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

                      \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
                    14. lower-*.f6460.2

                      \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
                  3. Applied rewrites60.2%

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

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

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

                      \[\leadsto \frac{x \cdot y}{z} \cdot z \]
                  6. Applied rewrites63.1%

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

                Alternative 10: 65.7% accurate, 0.3× speedup?

                \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ \begin{array}{l} t_1 := \left(x\_m \cdot y\_m\right) \cdot z\_m\\ t_2 := \frac{t\_1}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq 5 \cdot 10^{-271}:\\ \;\;\;\;\frac{t\_1}{z\_m \cdot 1}\\ \mathbf{elif}\;t\_2 \leq 10^{-63}:\\ \;\;\;\;\frac{x\_m \cdot \left(y\_m \cdot z\_m\right)}{\sqrt{-a \cdot t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\ \end{array}\right)\right) \end{array} \end{array} \]
                x\_m = (fabs.f64 x)
                x\_s = (copysign.f64 #s(literal 1 binary64) x)
                y\_m = (fabs.f64 y)
                y\_s = (copysign.f64 #s(literal 1 binary64) y)
                z\_m = (fabs.f64 z)
                z\_s = (copysign.f64 #s(literal 1 binary64) z)
                NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
                (FPCore (z_s y_s x_s x_m y_m z_m t a)
                 :precision binary64
                 (let* ((t_1 (* (* x_m y_m) z_m)) (t_2 (/ t_1 (sqrt (- (* z_m z_m) (* t a))))))
                   (*
                    z_s
                    (*
                     y_s
                     (*
                      x_s
                      (if (<= t_2 5e-271)
                        (/ t_1 (* z_m 1.0))
                        (if (<= t_2 1e-63)
                          (/ (* x_m (* y_m z_m)) (sqrt (- (* a t))))
                          (* (/ (* x_m y_m) z_m) z_m))))))))
                x\_m = fabs(x);
                x\_s = copysign(1.0, x);
                y\_m = fabs(y);
                y\_s = copysign(1.0, y);
                z\_m = fabs(z);
                z\_s = copysign(1.0, z);
                assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
                double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
                	double t_1 = (x_m * y_m) * z_m;
                	double t_2 = t_1 / sqrt(((z_m * z_m) - (t * a)));
                	double tmp;
                	if (t_2 <= 5e-271) {
                		tmp = t_1 / (z_m * 1.0);
                	} else if (t_2 <= 1e-63) {
                		tmp = (x_m * (y_m * z_m)) / sqrt(-(a * t));
                	} else {
                		tmp = ((x_m * y_m) / z_m) * z_m;
                	}
                	return z_s * (y_s * (x_s * tmp));
                }
                
                x\_m =     private
                x\_s =     private
                y\_m =     private
                y\_s =     private
                z\_m =     private
                z\_s =     private
                NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
                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(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
                use fmin_fmax_functions
                    real(8), intent (in) :: z_s
                    real(8), intent (in) :: y_s
                    real(8), intent (in) :: x_s
                    real(8), intent (in) :: x_m
                    real(8), intent (in) :: y_m
                    real(8), intent (in) :: z_m
                    real(8), intent (in) :: t
                    real(8), intent (in) :: a
                    real(8) :: t_1
                    real(8) :: t_2
                    real(8) :: tmp
                    t_1 = (x_m * y_m) * z_m
                    t_2 = t_1 / sqrt(((z_m * z_m) - (t * a)))
                    if (t_2 <= 5d-271) then
                        tmp = t_1 / (z_m * 1.0d0)
                    else if (t_2 <= 1d-63) then
                        tmp = (x_m * (y_m * z_m)) / sqrt(-(a * t))
                    else
                        tmp = ((x_m * y_m) / z_m) * z_m
                    end if
                    code = z_s * (y_s * (x_s * tmp))
                end function
                
                x\_m = Math.abs(x);
                x\_s = Math.copySign(1.0, x);
                y\_m = Math.abs(y);
                y\_s = Math.copySign(1.0, y);
                z\_m = Math.abs(z);
                z\_s = Math.copySign(1.0, z);
                assert x_m < y_m && y_m < z_m && z_m < t && t < a;
                public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
                	double t_1 = (x_m * y_m) * z_m;
                	double t_2 = t_1 / Math.sqrt(((z_m * z_m) - (t * a)));
                	double tmp;
                	if (t_2 <= 5e-271) {
                		tmp = t_1 / (z_m * 1.0);
                	} else if (t_2 <= 1e-63) {
                		tmp = (x_m * (y_m * z_m)) / Math.sqrt(-(a * t));
                	} else {
                		tmp = ((x_m * y_m) / z_m) * z_m;
                	}
                	return z_s * (y_s * (x_s * tmp));
                }
                
                x\_m = math.fabs(x)
                x\_s = math.copysign(1.0, x)
                y\_m = math.fabs(y)
                y\_s = math.copysign(1.0, y)
                z\_m = math.fabs(z)
                z\_s = math.copysign(1.0, z)
                [x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
                def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
                	t_1 = (x_m * y_m) * z_m
                	t_2 = t_1 / math.sqrt(((z_m * z_m) - (t * a)))
                	tmp = 0
                	if t_2 <= 5e-271:
                		tmp = t_1 / (z_m * 1.0)
                	elif t_2 <= 1e-63:
                		tmp = (x_m * (y_m * z_m)) / math.sqrt(-(a * t))
                	else:
                		tmp = ((x_m * y_m) / z_m) * z_m
                	return z_s * (y_s * (x_s * tmp))
                
                x\_m = abs(x)
                x\_s = copysign(1.0, x)
                y\_m = abs(y)
                y\_s = copysign(1.0, y)
                z\_m = abs(z)
                z\_s = copysign(1.0, z)
                x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
                function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
                	t_1 = Float64(Float64(x_m * y_m) * z_m)
                	t_2 = Float64(t_1 / sqrt(Float64(Float64(z_m * z_m) - Float64(t * a))))
                	tmp = 0.0
                	if (t_2 <= 5e-271)
                		tmp = Float64(t_1 / Float64(z_m * 1.0));
                	elseif (t_2 <= 1e-63)
                		tmp = Float64(Float64(x_m * Float64(y_m * z_m)) / sqrt(Float64(-Float64(a * t))));
                	else
                		tmp = Float64(Float64(Float64(x_m * y_m) / z_m) * z_m);
                	end
                	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
                end
                
                x\_m = abs(x);
                x\_s = sign(x) * abs(1.0);
                y\_m = abs(y);
                y\_s = sign(y) * abs(1.0);
                z\_m = abs(z);
                z\_s = sign(z) * abs(1.0);
                x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
                function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
                	t_1 = (x_m * y_m) * z_m;
                	t_2 = t_1 / sqrt(((z_m * z_m) - (t * a)));
                	tmp = 0.0;
                	if (t_2 <= 5e-271)
                		tmp = t_1 / (z_m * 1.0);
                	elseif (t_2 <= 1e-63)
                		tmp = (x_m * (y_m * z_m)) / sqrt(-(a * t));
                	else
                		tmp = ((x_m * y_m) / z_m) * z_m;
                	end
                	tmp_2 = z_s * (y_s * (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]
                y\_m = N[Abs[y], $MachinePrecision]
                y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                z\_m = N[Abs[z], $MachinePrecision]
                z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
                code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := Block[{t$95$1 = N[(N[(x$95$m * y$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[t$95$2, 5e-271], N[(t$95$1 / N[(z$95$m * 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e-63], N[(N[(x$95$m * N[(y$95$m * z$95$m), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-N[(a * t), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] / z$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                
                \begin{array}{l}
                x\_m = \left|x\right|
                \\
                x\_s = \mathsf{copysign}\left(1, x\right)
                \\
                y\_m = \left|y\right|
                \\
                y\_s = \mathsf{copysign}\left(1, y\right)
                \\
                z\_m = \left|z\right|
                \\
                z\_s = \mathsf{copysign}\left(1, z\right)
                \\
                [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
                \\
                \begin{array}{l}
                t_1 := \left(x\_m \cdot y\_m\right) \cdot z\_m\\
                t_2 := \frac{t\_1}{\sqrt{z\_m \cdot z\_m - t \cdot a}}\\
                z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
                \mathbf{if}\;t\_2 \leq 5 \cdot 10^{-271}:\\
                \;\;\;\;\frac{t\_1}{z\_m \cdot 1}\\
                
                \mathbf{elif}\;t\_2 \leq 10^{-63}:\\
                \;\;\;\;\frac{x\_m \cdot \left(y\_m \cdot z\_m\right)}{\sqrt{-a \cdot t}}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\
                
                
                \end{array}\right)\right)
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < 5.0000000000000002e-271

                  1. Initial program 60.8%

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

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

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

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

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

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

                      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{\color{blue}{z}}^{2}}\right)} \]
                    6. lower-pow.f6465.0

                      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{\color{blue}{2}}}\right)} \]
                  4. Applied rewrites65.0%

                    \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{2}}\right)}} \]
                  5. Taylor expanded in z around inf

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

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

                    if 5.0000000000000002e-271 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < 1.00000000000000007e-63

                    1. Initial program 60.8%

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

                      \[\leadsto \color{blue}{\frac{x \cdot \left(y \cdot z\right)}{\sqrt{\mathsf{neg}\left(a \cdot t\right)}}} \]
                    3. Step-by-step derivation
                      1. lower-/.f64N/A

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

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

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

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

                        \[\leadsto \frac{x \cdot \left(y \cdot z\right)}{\sqrt{-a \cdot t}} \]
                      6. lower-*.f6433.3

                        \[\leadsto \frac{x \cdot \left(y \cdot z\right)}{\sqrt{-a \cdot t}} \]
                    4. Applied rewrites33.3%

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

                    if 1.00000000000000007e-63 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))

                    1. Initial program 60.8%

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

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

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

                        \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{z \cdot z - t \cdot a}} \cdot z} \]
                      4. mult-flip-revN/A

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

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

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

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

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

                        \[\leadsto \color{blue}{\left(\left(y \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot x\right)} \cdot z \]
                      10. mult-flip-revN/A

                        \[\leadsto \left(\color{blue}{\frac{y}{\sqrt{z \cdot z - t \cdot a}}} \cdot x\right) \cdot z \]
                      11. lower-/.f6460.2

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

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

                        \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
                      14. lower-*.f6460.2

                        \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
                    3. Applied rewrites60.2%

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

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

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

                        \[\leadsto \frac{x \cdot y}{z} \cdot z \]
                    6. Applied rewrites63.1%

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

                  Alternative 11: 63.3% accurate, 0.6× speedup?

                  \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ \begin{array}{l} t_1 := \left(x\_m \cdot y\_m\right) \cdot z\_m\\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{t\_1}{\sqrt{z\_m \cdot z\_m - t \cdot a}} \leq 5 \cdot 10^{+296}:\\ \;\;\;\;\frac{t\_1}{z\_m \cdot 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\ \end{array}\right)\right) \end{array} \end{array} \]
                  x\_m = (fabs.f64 x)
                  x\_s = (copysign.f64 #s(literal 1 binary64) x)
                  y\_m = (fabs.f64 y)
                  y\_s = (copysign.f64 #s(literal 1 binary64) y)
                  z\_m = (fabs.f64 z)
                  z\_s = (copysign.f64 #s(literal 1 binary64) z)
                  NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
                  (FPCore (z_s y_s x_s x_m y_m z_m t a)
                   :precision binary64
                   (let* ((t_1 (* (* x_m y_m) z_m)))
                     (*
                      z_s
                      (*
                       y_s
                       (*
                        x_s
                        (if (<= (/ t_1 (sqrt (- (* z_m z_m) (* t a)))) 5e+296)
                          (/ t_1 (* z_m 1.0))
                          (* (/ (* x_m y_m) z_m) z_m)))))))
                  x\_m = fabs(x);
                  x\_s = copysign(1.0, x);
                  y\_m = fabs(y);
                  y\_s = copysign(1.0, y);
                  z\_m = fabs(z);
                  z\_s = copysign(1.0, z);
                  assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
                  double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
                  	double t_1 = (x_m * y_m) * z_m;
                  	double tmp;
                  	if ((t_1 / sqrt(((z_m * z_m) - (t * a)))) <= 5e+296) {
                  		tmp = t_1 / (z_m * 1.0);
                  	} else {
                  		tmp = ((x_m * y_m) / z_m) * z_m;
                  	}
                  	return z_s * (y_s * (x_s * tmp));
                  }
                  
                  x\_m =     private
                  x\_s =     private
                  y\_m =     private
                  y\_s =     private
                  z\_m =     private
                  z\_s =     private
                  NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
                  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(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
                  use fmin_fmax_functions
                      real(8), intent (in) :: z_s
                      real(8), intent (in) :: y_s
                      real(8), intent (in) :: x_s
                      real(8), intent (in) :: x_m
                      real(8), intent (in) :: y_m
                      real(8), intent (in) :: z_m
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      real(8) :: t_1
                      real(8) :: tmp
                      t_1 = (x_m * y_m) * z_m
                      if ((t_1 / sqrt(((z_m * z_m) - (t * a)))) <= 5d+296) then
                          tmp = t_1 / (z_m * 1.0d0)
                      else
                          tmp = ((x_m * y_m) / z_m) * z_m
                      end if
                      code = z_s * (y_s * (x_s * tmp))
                  end function
                  
                  x\_m = Math.abs(x);
                  x\_s = Math.copySign(1.0, x);
                  y\_m = Math.abs(y);
                  y\_s = Math.copySign(1.0, y);
                  z\_m = Math.abs(z);
                  z\_s = Math.copySign(1.0, z);
                  assert x_m < y_m && y_m < z_m && z_m < t && t < a;
                  public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
                  	double t_1 = (x_m * y_m) * z_m;
                  	double tmp;
                  	if ((t_1 / Math.sqrt(((z_m * z_m) - (t * a)))) <= 5e+296) {
                  		tmp = t_1 / (z_m * 1.0);
                  	} else {
                  		tmp = ((x_m * y_m) / z_m) * z_m;
                  	}
                  	return z_s * (y_s * (x_s * tmp));
                  }
                  
                  x\_m = math.fabs(x)
                  x\_s = math.copysign(1.0, x)
                  y\_m = math.fabs(y)
                  y\_s = math.copysign(1.0, y)
                  z\_m = math.fabs(z)
                  z\_s = math.copysign(1.0, z)
                  [x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
                  def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
                  	t_1 = (x_m * y_m) * z_m
                  	tmp = 0
                  	if (t_1 / math.sqrt(((z_m * z_m) - (t * a)))) <= 5e+296:
                  		tmp = t_1 / (z_m * 1.0)
                  	else:
                  		tmp = ((x_m * y_m) / z_m) * z_m
                  	return z_s * (y_s * (x_s * tmp))
                  
                  x\_m = abs(x)
                  x\_s = copysign(1.0, x)
                  y\_m = abs(y)
                  y\_s = copysign(1.0, y)
                  z\_m = abs(z)
                  z\_s = copysign(1.0, z)
                  x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
                  function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
                  	t_1 = Float64(Float64(x_m * y_m) * z_m)
                  	tmp = 0.0
                  	if (Float64(t_1 / sqrt(Float64(Float64(z_m * z_m) - Float64(t * a)))) <= 5e+296)
                  		tmp = Float64(t_1 / Float64(z_m * 1.0));
                  	else
                  		tmp = Float64(Float64(Float64(x_m * y_m) / z_m) * z_m);
                  	end
                  	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
                  end
                  
                  x\_m = abs(x);
                  x\_s = sign(x) * abs(1.0);
                  y\_m = abs(y);
                  y\_s = sign(y) * abs(1.0);
                  z\_m = abs(z);
                  z\_s = sign(z) * abs(1.0);
                  x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
                  function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
                  	t_1 = (x_m * y_m) * z_m;
                  	tmp = 0.0;
                  	if ((t_1 / sqrt(((z_m * z_m) - (t * a)))) <= 5e+296)
                  		tmp = t_1 / (z_m * 1.0);
                  	else
                  		tmp = ((x_m * y_m) / z_m) * z_m;
                  	end
                  	tmp_2 = z_s * (y_s * (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]
                  y\_m = N[Abs[y], $MachinePrecision]
                  y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                  z\_m = N[Abs[z], $MachinePrecision]
                  z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                  NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
                  code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := Block[{t$95$1 = N[(N[(x$95$m * y$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]}, N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[N[(t$95$1 / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 5e+296], N[(t$95$1 / N[(z$95$m * 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] / z$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  x\_m = \left|x\right|
                  \\
                  x\_s = \mathsf{copysign}\left(1, x\right)
                  \\
                  y\_m = \left|y\right|
                  \\
                  y\_s = \mathsf{copysign}\left(1, y\right)
                  \\
                  z\_m = \left|z\right|
                  \\
                  z\_s = \mathsf{copysign}\left(1, z\right)
                  \\
                  [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
                  \\
                  \begin{array}{l}
                  t_1 := \left(x\_m \cdot y\_m\right) \cdot z\_m\\
                  z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
                  \mathbf{if}\;\frac{t\_1}{\sqrt{z\_m \cdot z\_m - t \cdot a}} \leq 5 \cdot 10^{+296}:\\
                  \;\;\;\;\frac{t\_1}{z\_m \cdot 1}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\
                  
                  
                  \end{array}\right)\right)
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < 5.0000000000000001e296

                    1. Initial program 60.8%

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

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

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

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

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

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

                        \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + \frac{-1}{2} \cdot \frac{a \cdot t}{{\color{blue}{z}}^{2}}\right)} \]
                      6. lower-pow.f6465.0

                        \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{\color{blue}{2}}}\right)} \]
                    4. Applied rewrites65.0%

                      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{z \cdot \left(1 + -0.5 \cdot \frac{a \cdot t}{{z}^{2}}\right)}} \]
                    5. Taylor expanded in z around inf

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

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

                      if 5.0000000000000001e296 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a))))

                      1. Initial program 60.8%

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

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

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

                          \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{z \cdot z - t \cdot a}} \cdot z} \]
                        4. mult-flip-revN/A

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

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

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

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

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

                          \[\leadsto \color{blue}{\left(\left(y \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot x\right)} \cdot z \]
                        10. mult-flip-revN/A

                          \[\leadsto \left(\color{blue}{\frac{y}{\sqrt{z \cdot z - t \cdot a}}} \cdot x\right) \cdot z \]
                        11. lower-/.f6460.2

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

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

                          \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
                        14. lower-*.f6460.2

                          \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
                      3. Applied rewrites60.2%

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

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

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

                          \[\leadsto \frac{x \cdot y}{z} \cdot z \]
                      6. Applied rewrites63.1%

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

                    Alternative 12: 63.1% accurate, 1.4× speedup?

                    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 9.5 \cdot 10^{-193}:\\ \;\;\;\;\frac{x\_m \cdot z\_m}{-z\_m} \cdot y\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\ \end{array}\right)\right) \end{array} \]
                    x\_m = (fabs.f64 x)
                    x\_s = (copysign.f64 #s(literal 1 binary64) x)
                    y\_m = (fabs.f64 y)
                    y\_s = (copysign.f64 #s(literal 1 binary64) y)
                    z\_m = (fabs.f64 z)
                    z\_s = (copysign.f64 #s(literal 1 binary64) z)
                    NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
                    (FPCore (z_s y_s x_s x_m y_m z_m t a)
                     :precision binary64
                     (*
                      z_s
                      (*
                       y_s
                       (*
                        x_s
                        (if (<= z_m 9.5e-193)
                          (* (/ (* x_m z_m) (- z_m)) y_m)
                          (* (/ (* x_m y_m) z_m) z_m))))))
                    x\_m = fabs(x);
                    x\_s = copysign(1.0, x);
                    y\_m = fabs(y);
                    y\_s = copysign(1.0, y);
                    z\_m = fabs(z);
                    z\_s = copysign(1.0, z);
                    assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
                    double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
                    	double tmp;
                    	if (z_m <= 9.5e-193) {
                    		tmp = ((x_m * z_m) / -z_m) * y_m;
                    	} else {
                    		tmp = ((x_m * y_m) / z_m) * z_m;
                    	}
                    	return z_s * (y_s * (x_s * tmp));
                    }
                    
                    x\_m =     private
                    x\_s =     private
                    y\_m =     private
                    y\_s =     private
                    z\_m =     private
                    z\_s =     private
                    NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
                    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(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
                    use fmin_fmax_functions
                        real(8), intent (in) :: z_s
                        real(8), intent (in) :: y_s
                        real(8), intent (in) :: x_s
                        real(8), intent (in) :: x_m
                        real(8), intent (in) :: y_m
                        real(8), intent (in) :: z_m
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        real(8) :: tmp
                        if (z_m <= 9.5d-193) then
                            tmp = ((x_m * z_m) / -z_m) * y_m
                        else
                            tmp = ((x_m * y_m) / z_m) * z_m
                        end if
                        code = z_s * (y_s * (x_s * tmp))
                    end function
                    
                    x\_m = Math.abs(x);
                    x\_s = Math.copySign(1.0, x);
                    y\_m = Math.abs(y);
                    y\_s = Math.copySign(1.0, y);
                    z\_m = Math.abs(z);
                    z\_s = Math.copySign(1.0, z);
                    assert x_m < y_m && y_m < z_m && z_m < t && t < a;
                    public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
                    	double tmp;
                    	if (z_m <= 9.5e-193) {
                    		tmp = ((x_m * z_m) / -z_m) * y_m;
                    	} else {
                    		tmp = ((x_m * y_m) / z_m) * z_m;
                    	}
                    	return z_s * (y_s * (x_s * tmp));
                    }
                    
                    x\_m = math.fabs(x)
                    x\_s = math.copysign(1.0, x)
                    y\_m = math.fabs(y)
                    y\_s = math.copysign(1.0, y)
                    z\_m = math.fabs(z)
                    z\_s = math.copysign(1.0, z)
                    [x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
                    def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
                    	tmp = 0
                    	if z_m <= 9.5e-193:
                    		tmp = ((x_m * z_m) / -z_m) * y_m
                    	else:
                    		tmp = ((x_m * y_m) / z_m) * z_m
                    	return z_s * (y_s * (x_s * tmp))
                    
                    x\_m = abs(x)
                    x\_s = copysign(1.0, x)
                    y\_m = abs(y)
                    y\_s = copysign(1.0, y)
                    z\_m = abs(z)
                    z\_s = copysign(1.0, z)
                    x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
                    function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
                    	tmp = 0.0
                    	if (z_m <= 9.5e-193)
                    		tmp = Float64(Float64(Float64(x_m * z_m) / Float64(-z_m)) * y_m);
                    	else
                    		tmp = Float64(Float64(Float64(x_m * y_m) / z_m) * z_m);
                    	end
                    	return Float64(z_s * Float64(y_s * Float64(x_s * tmp)))
                    end
                    
                    x\_m = abs(x);
                    x\_s = sign(x) * abs(1.0);
                    y\_m = abs(y);
                    y\_s = sign(y) * abs(1.0);
                    z\_m = abs(z);
                    z\_s = sign(z) * abs(1.0);
                    x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
                    function tmp_2 = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
                    	tmp = 0.0;
                    	if (z_m <= 9.5e-193)
                    		tmp = ((x_m * z_m) / -z_m) * y_m;
                    	else
                    		tmp = ((x_m * y_m) / z_m) * z_m;
                    	end
                    	tmp_2 = z_s * (y_s * (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]
                    y\_m = N[Abs[y], $MachinePrecision]
                    y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                    z\_m = N[Abs[z], $MachinePrecision]
                    z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                    NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
                    code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 9.5e-193], N[(N[(N[(x$95$m * z$95$m), $MachinePrecision] / (-z$95$m)), $MachinePrecision] * y$95$m), $MachinePrecision], N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] / z$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                    
                    \begin{array}{l}
                    x\_m = \left|x\right|
                    \\
                    x\_s = \mathsf{copysign}\left(1, x\right)
                    \\
                    y\_m = \left|y\right|
                    \\
                    y\_s = \mathsf{copysign}\left(1, y\right)
                    \\
                    z\_m = \left|z\right|
                    \\
                    z\_s = \mathsf{copysign}\left(1, z\right)
                    \\
                    [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
                    \\
                    z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
                    \mathbf{if}\;z\_m \leq 9.5 \cdot 10^{-193}:\\
                    \;\;\;\;\frac{x\_m \cdot z\_m}{-z\_m} \cdot y\_m\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\
                    
                    
                    \end{array}\right)\right)
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if z < 9.5000000000000003e-193

                      1. Initial program 60.8%

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

                        \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{-1 \cdot z}} \]
                      3. Step-by-step derivation
                        1. lower-*.f6417.0

                          \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{-1 \cdot \color{blue}{z}} \]
                      4. Applied rewrites17.0%

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{\color{blue}{z \cdot x}}{-1 \cdot z} \cdot y \]
                        11. lift-*.f64N/A

                          \[\leadsto \frac{\color{blue}{z \cdot x}}{-1 \cdot z} \cdot y \]
                        12. lower-/.f6418.0

                          \[\leadsto \color{blue}{\frac{z \cdot x}{-1 \cdot z}} \cdot y \]
                        13. lift-*.f64N/A

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

                          \[\leadsto \frac{\color{blue}{x \cdot z}}{-1 \cdot z} \cdot y \]
                        15. lower-*.f6418.0

                          \[\leadsto \frac{\color{blue}{x \cdot z}}{-1 \cdot z} \cdot y \]
                        16. lift-*.f64N/A

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

                          \[\leadsto \frac{x \cdot z}{\mathsf{neg}\left(z\right)} \cdot y \]
                        18. lower-neg.f6418.0

                          \[\leadsto \frac{x \cdot z}{-z} \cdot y \]
                      6. Applied rewrites18.0%

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

                      if 9.5000000000000003e-193 < z

                      1. Initial program 60.8%

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

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

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

                          \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{z \cdot z - t \cdot a}} \cdot z} \]
                        4. mult-flip-revN/A

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

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

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

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

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

                          \[\leadsto \color{blue}{\left(\left(y \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot x\right)} \cdot z \]
                        10. mult-flip-revN/A

                          \[\leadsto \left(\color{blue}{\frac{y}{\sqrt{z \cdot z - t \cdot a}}} \cdot x\right) \cdot z \]
                        11. lower-/.f6460.2

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

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

                          \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
                        14. lower-*.f6460.2

                          \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
                      3. Applied rewrites60.2%

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

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

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

                          \[\leadsto \frac{x \cdot y}{z} \cdot z \]
                      6. Applied rewrites63.1%

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

                    Alternative 13: 63.1% accurate, 2.0× speedup?

                    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \left(\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\right)\right)\right) \end{array} \]
                    x\_m = (fabs.f64 x)
                    x\_s = (copysign.f64 #s(literal 1 binary64) x)
                    y\_m = (fabs.f64 y)
                    y\_s = (copysign.f64 #s(literal 1 binary64) y)
                    z\_m = (fabs.f64 z)
                    z\_s = (copysign.f64 #s(literal 1 binary64) z)
                    NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
                    (FPCore (z_s y_s x_s x_m y_m z_m t a)
                     :precision binary64
                     (* z_s (* y_s (* x_s (* (/ (* x_m y_m) z_m) z_m)))))
                    x\_m = fabs(x);
                    x\_s = copysign(1.0, x);
                    y\_m = fabs(y);
                    y\_s = copysign(1.0, y);
                    z\_m = fabs(z);
                    z\_s = copysign(1.0, z);
                    assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
                    double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
                    	return z_s * (y_s * (x_s * (((x_m * y_m) / z_m) * z_m)));
                    }
                    
                    x\_m =     private
                    x\_s =     private
                    y\_m =     private
                    y\_s =     private
                    z\_m =     private
                    z\_s =     private
                    NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
                    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(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
                    use fmin_fmax_functions
                        real(8), intent (in) :: z_s
                        real(8), intent (in) :: y_s
                        real(8), intent (in) :: x_s
                        real(8), intent (in) :: x_m
                        real(8), intent (in) :: y_m
                        real(8), intent (in) :: z_m
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        code = z_s * (y_s * (x_s * (((x_m * y_m) / z_m) * z_m)))
                    end function
                    
                    x\_m = Math.abs(x);
                    x\_s = Math.copySign(1.0, x);
                    y\_m = Math.abs(y);
                    y\_s = Math.copySign(1.0, y);
                    z\_m = Math.abs(z);
                    z\_s = Math.copySign(1.0, z);
                    assert x_m < y_m && y_m < z_m && z_m < t && t < a;
                    public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
                    	return z_s * (y_s * (x_s * (((x_m * y_m) / z_m) * z_m)));
                    }
                    
                    x\_m = math.fabs(x)
                    x\_s = math.copysign(1.0, x)
                    y\_m = math.fabs(y)
                    y\_s = math.copysign(1.0, y)
                    z\_m = math.fabs(z)
                    z\_s = math.copysign(1.0, z)
                    [x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
                    def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
                    	return z_s * (y_s * (x_s * (((x_m * y_m) / z_m) * z_m)))
                    
                    x\_m = abs(x)
                    x\_s = copysign(1.0, x)
                    y\_m = abs(y)
                    y\_s = copysign(1.0, y)
                    z\_m = abs(z)
                    z\_s = copysign(1.0, z)
                    x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
                    function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
                    	return Float64(z_s * Float64(y_s * Float64(x_s * Float64(Float64(Float64(x_m * y_m) / z_m) * z_m))))
                    end
                    
                    x\_m = abs(x);
                    x\_s = sign(x) * abs(1.0);
                    y\_m = abs(y);
                    y\_s = sign(y) * abs(1.0);
                    z\_m = abs(z);
                    z\_s = sign(z) * abs(1.0);
                    x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
                    function tmp = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
                    	tmp = z_s * (y_s * (x_s * (((x_m * y_m) / z_m) * z_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]
                    y\_m = N[Abs[y], $MachinePrecision]
                    y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                    z\_m = N[Abs[z], $MachinePrecision]
                    z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                    NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
                    code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] / z$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                    
                    \begin{array}{l}
                    x\_m = \left|x\right|
                    \\
                    x\_s = \mathsf{copysign}\left(1, x\right)
                    \\
                    y\_m = \left|y\right|
                    \\
                    y\_s = \mathsf{copysign}\left(1, y\right)
                    \\
                    z\_m = \left|z\right|
                    \\
                    z\_s = \mathsf{copysign}\left(1, z\right)
                    \\
                    [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
                    \\
                    z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \left(\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\right)\right)\right)
                    \end{array}
                    
                    Derivation
                    1. Initial program 60.8%

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

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

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

                        \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{z \cdot z - t \cdot a}} \cdot z} \]
                      4. mult-flip-revN/A

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

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

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

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

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

                        \[\leadsto \color{blue}{\left(\left(y \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot x\right)} \cdot z \]
                      10. mult-flip-revN/A

                        \[\leadsto \left(\color{blue}{\frac{y}{\sqrt{z \cdot z - t \cdot a}}} \cdot x\right) \cdot z \]
                      11. lower-/.f6460.2

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

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

                        \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
                      14. lower-*.f6460.2

                        \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
                    3. Applied rewrites60.2%

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

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

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

                        \[\leadsto \frac{x \cdot y}{z} \cdot z \]
                    6. Applied rewrites63.1%

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

                    Alternative 14: 53.3% accurate, 2.0× speedup?

                    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \left(\left(\frac{x\_m}{z\_m} \cdot y\_m\right) \cdot z\_m\right)\right)\right) \end{array} \]
                    x\_m = (fabs.f64 x)
                    x\_s = (copysign.f64 #s(literal 1 binary64) x)
                    y\_m = (fabs.f64 y)
                    y\_s = (copysign.f64 #s(literal 1 binary64) y)
                    z\_m = (fabs.f64 z)
                    z\_s = (copysign.f64 #s(literal 1 binary64) z)
                    NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
                    (FPCore (z_s y_s x_s x_m y_m z_m t a)
                     :precision binary64
                     (* z_s (* y_s (* x_s (* (* (/ x_m z_m) y_m) z_m)))))
                    x\_m = fabs(x);
                    x\_s = copysign(1.0, x);
                    y\_m = fabs(y);
                    y\_s = copysign(1.0, y);
                    z\_m = fabs(z);
                    z\_s = copysign(1.0, z);
                    assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
                    double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
                    	return z_s * (y_s * (x_s * (((x_m / z_m) * y_m) * z_m)));
                    }
                    
                    x\_m =     private
                    x\_s =     private
                    y\_m =     private
                    y\_s =     private
                    z\_m =     private
                    z\_s =     private
                    NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
                    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(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
                    use fmin_fmax_functions
                        real(8), intent (in) :: z_s
                        real(8), intent (in) :: y_s
                        real(8), intent (in) :: x_s
                        real(8), intent (in) :: x_m
                        real(8), intent (in) :: y_m
                        real(8), intent (in) :: z_m
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        code = z_s * (y_s * (x_s * (((x_m / z_m) * y_m) * z_m)))
                    end function
                    
                    x\_m = Math.abs(x);
                    x\_s = Math.copySign(1.0, x);
                    y\_m = Math.abs(y);
                    y\_s = Math.copySign(1.0, y);
                    z\_m = Math.abs(z);
                    z\_s = Math.copySign(1.0, z);
                    assert x_m < y_m && y_m < z_m && z_m < t && t < a;
                    public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
                    	return z_s * (y_s * (x_s * (((x_m / z_m) * y_m) * z_m)));
                    }
                    
                    x\_m = math.fabs(x)
                    x\_s = math.copysign(1.0, x)
                    y\_m = math.fabs(y)
                    y\_s = math.copysign(1.0, y)
                    z\_m = math.fabs(z)
                    z\_s = math.copysign(1.0, z)
                    [x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
                    def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
                    	return z_s * (y_s * (x_s * (((x_m / z_m) * y_m) * z_m)))
                    
                    x\_m = abs(x)
                    x\_s = copysign(1.0, x)
                    y\_m = abs(y)
                    y\_s = copysign(1.0, y)
                    z\_m = abs(z)
                    z\_s = copysign(1.0, z)
                    x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
                    function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
                    	return Float64(z_s * Float64(y_s * Float64(x_s * Float64(Float64(Float64(x_m / z_m) * y_m) * z_m))))
                    end
                    
                    x\_m = abs(x);
                    x\_s = sign(x) * abs(1.0);
                    y\_m = abs(y);
                    y\_s = sign(y) * abs(1.0);
                    z\_m = abs(z);
                    z\_s = sign(z) * abs(1.0);
                    x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
                    function tmp = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
                    	tmp = z_s * (y_s * (x_s * (((x_m / z_m) * y_m) * z_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]
                    y\_m = N[Abs[y], $MachinePrecision]
                    y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                    z\_m = N[Abs[z], $MachinePrecision]
                    z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                    NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
                    code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * N[(N[(N[(x$95$m / z$95$m), $MachinePrecision] * y$95$m), $MachinePrecision] * z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                    
                    \begin{array}{l}
                    x\_m = \left|x\right|
                    \\
                    x\_s = \mathsf{copysign}\left(1, x\right)
                    \\
                    y\_m = \left|y\right|
                    \\
                    y\_s = \mathsf{copysign}\left(1, y\right)
                    \\
                    z\_m = \left|z\right|
                    \\
                    z\_s = \mathsf{copysign}\left(1, z\right)
                    \\
                    [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
                    \\
                    z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \left(\left(\frac{x\_m}{z\_m} \cdot y\_m\right) \cdot z\_m\right)\right)\right)
                    \end{array}
                    
                    Derivation
                    1. Initial program 60.8%

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

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

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

                        \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{z \cdot z - t \cdot a}} \cdot z} \]
                      4. mult-flip-revN/A

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

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

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

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

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

                        \[\leadsto \color{blue}{\left(\left(y \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot x\right)} \cdot z \]
                      10. mult-flip-revN/A

                        \[\leadsto \left(\color{blue}{\frac{y}{\sqrt{z \cdot z - t \cdot a}}} \cdot x\right) \cdot z \]
                      11. lower-/.f6460.2

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

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

                        \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
                      14. lower-*.f6460.2

                        \[\leadsto \left(\frac{y}{\sqrt{z \cdot z - \color{blue}{a \cdot t}}} \cdot x\right) \cdot z \]
                    3. Applied rewrites60.2%

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

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

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

                        \[\leadsto \frac{x \cdot y}{z} \cdot z \]
                    6. Applied rewrites63.1%

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

                        \[\leadsto \frac{x \cdot y}{\color{blue}{z}} \cdot z \]
                      2. mult-flipN/A

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

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

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

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

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

                        \[\leadsto \left(\left(x \cdot \frac{1}{z}\right) \cdot \color{blue}{y}\right) \cdot z \]
                      8. mult-flip-revN/A

                        \[\leadsto \left(\frac{x}{z} \cdot y\right) \cdot z \]
                      9. lower-/.f6453.3

                        \[\leadsto \left(\frac{x}{z} \cdot y\right) \cdot z \]
                    8. Applied rewrites53.3%

                      \[\leadsto \left(\frac{x}{z} \cdot \color{blue}{y}\right) \cdot z \]
                    9. Add Preprocessing

                    Alternative 15: 13.5% accurate, 4.2× speedup?

                    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ y\_m = \left|y\right| \\ y\_s = \mathsf{copysign}\left(1, y\right) \\ z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\ \\ z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \left(\left(-y\_m\right) \cdot x\_m\right)\right)\right) \end{array} \]
                    x\_m = (fabs.f64 x)
                    x\_s = (copysign.f64 #s(literal 1 binary64) x)
                    y\_m = (fabs.f64 y)
                    y\_s = (copysign.f64 #s(literal 1 binary64) y)
                    z\_m = (fabs.f64 z)
                    z\_s = (copysign.f64 #s(literal 1 binary64) z)
                    NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
                    (FPCore (z_s y_s x_s x_m y_m z_m t a)
                     :precision binary64
                     (* z_s (* y_s (* x_s (* (- y_m) x_m)))))
                    x\_m = fabs(x);
                    x\_s = copysign(1.0, x);
                    y\_m = fabs(y);
                    y\_s = copysign(1.0, y);
                    z\_m = fabs(z);
                    z\_s = copysign(1.0, z);
                    assert(x_m < y_m && y_m < z_m && z_m < t && t < a);
                    double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
                    	return z_s * (y_s * (x_s * (-y_m * x_m)));
                    }
                    
                    x\_m =     private
                    x\_s =     private
                    y\_m =     private
                    y\_s =     private
                    z\_m =     private
                    z\_s =     private
                    NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
                    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(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
                    use fmin_fmax_functions
                        real(8), intent (in) :: z_s
                        real(8), intent (in) :: y_s
                        real(8), intent (in) :: x_s
                        real(8), intent (in) :: x_m
                        real(8), intent (in) :: y_m
                        real(8), intent (in) :: z_m
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        code = z_s * (y_s * (x_s * (-y_m * x_m)))
                    end function
                    
                    x\_m = Math.abs(x);
                    x\_s = Math.copySign(1.0, x);
                    y\_m = Math.abs(y);
                    y\_s = Math.copySign(1.0, y);
                    z\_m = Math.abs(z);
                    z\_s = Math.copySign(1.0, z);
                    assert x_m < y_m && y_m < z_m && z_m < t && t < a;
                    public static double code(double z_s, double y_s, double x_s, double x_m, double y_m, double z_m, double t, double a) {
                    	return z_s * (y_s * (x_s * (-y_m * x_m)));
                    }
                    
                    x\_m = math.fabs(x)
                    x\_s = math.copysign(1.0, x)
                    y\_m = math.fabs(y)
                    y\_s = math.copysign(1.0, y)
                    z\_m = math.fabs(z)
                    z\_s = math.copysign(1.0, z)
                    [x_m, y_m, z_m, t, a] = sort([x_m, y_m, z_m, t, a])
                    def code(z_s, y_s, x_s, x_m, y_m, z_m, t, a):
                    	return z_s * (y_s * (x_s * (-y_m * x_m)))
                    
                    x\_m = abs(x)
                    x\_s = copysign(1.0, x)
                    y\_m = abs(y)
                    y\_s = copysign(1.0, y)
                    z\_m = abs(z)
                    z\_s = copysign(1.0, z)
                    x_m, y_m, z_m, t, a = sort([x_m, y_m, z_m, t, a])
                    function code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
                    	return Float64(z_s * Float64(y_s * Float64(x_s * Float64(Float64(-y_m) * x_m))))
                    end
                    
                    x\_m = abs(x);
                    x\_s = sign(x) * abs(1.0);
                    y\_m = abs(y);
                    y\_s = sign(y) * abs(1.0);
                    z\_m = abs(z);
                    z\_s = sign(z) * abs(1.0);
                    x_m, y_m, z_m, t, a = num2cell(sort([x_m, y_m, z_m, t, a])){:}
                    function tmp = code(z_s, y_s, x_s, x_m, y_m, z_m, t, a)
                    	tmp = z_s * (y_s * (x_s * (-y_m * 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]
                    y\_m = N[Abs[y], $MachinePrecision]
                    y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                    z\_m = N[Abs[z], $MachinePrecision]
                    z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                    NOTE: x_m, y_m, z_m, t, and a should be sorted in increasing order before calling this function.
                    code[z$95$s_, y$95$s_, x$95$s_, x$95$m_, y$95$m_, z$95$m_, t_, a_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * N[((-y$95$m) * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                    
                    \begin{array}{l}
                    x\_m = \left|x\right|
                    \\
                    x\_s = \mathsf{copysign}\left(1, x\right)
                    \\
                    y\_m = \left|y\right|
                    \\
                    y\_s = \mathsf{copysign}\left(1, y\right)
                    \\
                    z\_m = \left|z\right|
                    \\
                    z\_s = \mathsf{copysign}\left(1, z\right)
                    \\
                    [x_m, y_m, z_m, t, a] = \mathsf{sort}([x_m, y_m, z_m, t, a])\\
                    \\
                    z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \left(\left(-y\_m\right) \cdot x\_m\right)\right)\right)
                    \end{array}
                    
                    Derivation
                    1. Initial program 60.8%

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

                      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot y\right)} \]
                    3. Step-by-step derivation
                      1. lower-*.f64N/A

                        \[\leadsto -1 \cdot \color{blue}{\left(x \cdot y\right)} \]
                      2. lower-*.f6413.5

                        \[\leadsto -1 \cdot \left(x \cdot \color{blue}{y}\right) \]
                    4. Applied rewrites13.5%

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

                        \[\leadsto -1 \cdot \color{blue}{\left(x \cdot y\right)} \]
                      2. mul-1-negN/A

                        \[\leadsto \mathsf{neg}\left(x \cdot y\right) \]
                      3. lift-*.f64N/A

                        \[\leadsto \mathsf{neg}\left(x \cdot y\right) \]
                      4. *-commutativeN/A

                        \[\leadsto \mathsf{neg}\left(y \cdot x\right) \]
                      5. distribute-lft-neg-inN/A

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

                        \[\leadsto \left(\mathsf{neg}\left(y\right)\right) \cdot \color{blue}{x} \]
                      7. lower-neg.f6413.5

                        \[\leadsto \left(-y\right) \cdot x \]
                    6. Applied rewrites13.5%

                      \[\leadsto \left(-y\right) \cdot \color{blue}{x} \]
                    7. Add Preprocessing

                    Reproduce

                    ?
                    herbie shell --seed 2025159 
                    (FPCore (x y z t a)
                      :name "Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2"
                      :precision binary64
                      (/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))