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

Percentage Accurate: 61.2% → 90.7%
Time: 8.9s
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: 61.2% 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: 90.7% accurate, 0.8× 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 7.2 \cdot 10^{+56}:\\ \;\;\;\;\frac{x\_m}{\sqrt{z\_m \cdot z\_m - a \cdot t}} \cdot \left(z\_m \cdot y\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{z\_m \cdot x\_m}{\mathsf{fma}\left(-0.5 \cdot a, \frac{t}{z\_m}, z\_m\right)} \cdot y\_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 7.2e+56)
      (* (/ x_m (sqrt (- (* z_m z_m) (* a t)))) (* z_m y_m))
      (* (/ (* z_m x_m) (fma (* -0.5 a) (/ t z_m) z_m)) y_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 <= 7.2e+56) {
		tmp = (x_m / sqrt(((z_m * z_m) - (a * t)))) * (z_m * y_m);
	} else {
		tmp = ((z_m * x_m) / fma((-0.5 * a), (t / z_m), z_m)) * y_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 <= 7.2e+56)
		tmp = Float64(Float64(x_m / sqrt(Float64(Float64(z_m * z_m) - Float64(a * t)))) * Float64(z_m * y_m));
	else
		tmp = Float64(Float64(Float64(z_m * x_m) / fma(Float64(-0.5 * a), Float64(t / z_m), z_m)) * y_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_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[z$95$m, 7.2e+56], N[(N[(x$95$m / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(z$95$m * y$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z$95$m * x$95$m), $MachinePrecision] / N[(N[(-0.5 * a), $MachinePrecision] * N[(t / z$95$m), $MachinePrecision] + z$95$m), $MachinePrecision]), $MachinePrecision] * y$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 7.2 \cdot 10^{+56}:\\
\;\;\;\;\frac{x\_m}{\sqrt{z\_m \cdot z\_m - a \cdot t}} \cdot \left(z\_m \cdot y\_m\right)\\

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


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 7.19999999999999996e56

    1. Initial program 61.2%

      \[\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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.19999999999999996e56 < z

    1. Initial program 61.2%

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

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

      \[\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. *-commutativeN/A

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

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

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

Alternative 2: 89.1% 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^{-68}:\\ \;\;\;\;\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-68)
          (* (* (/ 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-68) {
		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-68) {
		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-68:
		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-68)
		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-68)
		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-68], 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^{-68}:\\
\;\;\;\;\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 61.2%

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

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

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

        \[\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)))) < 4.00000000000000027e-68

      1. Initial program 61.2%

        \[\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. mult-flipN/A

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

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

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

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

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

          \[\leadsto \color{blue}{\left(\left(y \cdot z\right) \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot x} \]
        8. 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} \]
        9. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 61.2%

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

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

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

        \[\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 61.2%

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

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

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

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

          \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{t \cdot \sqrt{-1 \cdot \frac{a}{t}}} \]
        4. lower-/.f6423.3

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \cdot z \]
      8. 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 \]
      9. Applied rewrites63.1%

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

    Alternative 3: 86.6% accurate, 0.7× 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 3.6 \cdot 10^{-177}:\\ \;\;\;\;\frac{x\_m}{\sqrt{\left(-a\right) \cdot t}} \cdot \left(y\_m \cdot z\_m\right)\\ \mathbf{elif}\;z\_m \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\left(\frac{z\_m}{\sqrt{z\_m \cdot z\_m - a \cdot t}} \cdot y\_m\right) \cdot x\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x\_m \cdot y\_m\right) \cdot z\_m}{z\_m \cdot 1}\\ \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 3.6e-177)
          (* (/ x_m (sqrt (* (- a) t))) (* y_m z_m))
          (if (<= z_m 1.35e+154)
            (* (* (/ z_m (sqrt (- (* z_m z_m) (* a t)))) y_m) x_m)
            (/ (* (* x_m y_m) z_m) (* z_m 1.0))))))))
    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 <= 3.6e-177) {
    		tmp = (x_m / sqrt((-a * t))) * (y_m * z_m);
    	} else if (z_m <= 1.35e+154) {
    		tmp = ((z_m / sqrt(((z_m * z_m) - (a * t)))) * y_m) * x_m;
    	} else {
    		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0);
    	}
    	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 <= 3.6d-177) then
            tmp = (x_m / sqrt((-a * t))) * (y_m * z_m)
        else if (z_m <= 1.35d+154) then
            tmp = ((z_m / sqrt(((z_m * z_m) - (a * t)))) * y_m) * x_m
        else
            tmp = ((x_m * y_m) * z_m) / (z_m * 1.0d0)
        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 <= 3.6e-177) {
    		tmp = (x_m / Math.sqrt((-a * t))) * (y_m * z_m);
    	} else if (z_m <= 1.35e+154) {
    		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 * 1.0);
    	}
    	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 <= 3.6e-177:
    		tmp = (x_m / math.sqrt((-a * t))) * (y_m * z_m)
    	elif z_m <= 1.35e+154:
    		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 * 1.0)
    	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 <= 3.6e-177)
    		tmp = Float64(Float64(x_m / sqrt(Float64(Float64(-a) * t))) * Float64(y_m * z_m));
    	elseif (z_m <= 1.35e+154)
    		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) / Float64(z_m * 1.0));
    	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 <= 3.6e-177)
    		tmp = (x_m / sqrt((-a * t))) * (y_m * z_m);
    	elseif (z_m <= 1.35e+154)
    		tmp = ((z_m / sqrt(((z_m * z_m) - (a * t)))) * y_m) * x_m;
    	else
    		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0);
    	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, 3.6e-177], N[(N[(x$95$m / N[Sqrt[N[((-a) * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(y$95$m * z$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z$95$m, 1.35e+154], 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] / N[(z$95$m * 1.0), $MachinePrecision]), $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 3.6 \cdot 10^{-177}:\\
    \;\;\;\;\frac{x\_m}{\sqrt{\left(-a\right) \cdot t}} \cdot \left(y\_m \cdot z\_m\right)\\
    
    \mathbf{elif}\;z\_m \leq 1.35 \cdot 10^{+154}:\\
    \;\;\;\;\left(\frac{z\_m}{\sqrt{z\_m \cdot z\_m - a \cdot t}} \cdot y\_m\right) \cdot x\_m\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\left(x\_m \cdot y\_m\right) \cdot z\_m}{z\_m \cdot 1}\\
    
    
    \end{array}\right)\right)
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z < 3.59999999999999983e-177

      1. Initial program 61.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{x}{\sqrt{\left(\mathsf{neg}\left(a\right)\right) \cdot t}} \cdot \left(y \cdot z\right) \]
        12. lower-neg.f6434.1

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

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

      if 3.59999999999999983e-177 < z < 1.35000000000000003e154

      1. Initial program 61.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(\left(y \cdot z\right) \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot x} \]
        18. 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 rewrites65.5%

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

      if 1.35000000000000003e154 < z

      1. Initial program 61.2%

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

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

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

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

      Alternative 4: 85.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 5 \cdot 10^{-242}:\\ \;\;\;\;\frac{t\_1}{z\_m \cdot 1}\\ \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{-68}:\\ \;\;\;\;\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 5e-242)
              (/ t_1 (* z_m 1.0))
              (if (<= t_2 4e-68)
                (* (* (/ 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 <= 5e-242) {
      		tmp = t_1 / (z_m * 1.0);
      	} else if (t_2 <= 4e-68) {
      		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 <= 5e-242) {
      		tmp = t_1 / (z_m * 1.0);
      	} else if (t_2 <= 4e-68) {
      		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 <= 5e-242:
      		tmp = t_1 / (z_m * 1.0)
      	elif t_2 <= 4e-68:
      		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 <= 5e-242)
      		tmp = Float64(t_1 / Float64(z_m * 1.0));
      	elseif (t_2 <= 4e-68)
      		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 <= 5e-242)
      		tmp = t_1 / (z_m * 1.0);
      	elseif (t_2 <= 4e-68)
      		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, 5e-242], N[(t$95$1 / N[(z$95$m * 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e-68], 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 5 \cdot 10^{-242}:\\
      \;\;\;\;\frac{t\_1}{z\_m \cdot 1}\\
      
      \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{-68}:\\
      \;\;\;\;\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)))) < 4.9999999999999998e-242

        1. Initial program 61.2%

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

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

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

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

          if 4.9999999999999998e-242 < (/.f64 (*.f64 (*.f64 x y) z) (sqrt.f64 (-.f64 (*.f64 z z) (*.f64 t a)))) < 4.00000000000000027e-68

          1. Initial program 61.2%

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

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

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

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

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

          1. Initial program 61.2%

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

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

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

            \[\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 61.2%

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

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

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

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

              \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{t \cdot \sqrt{-1 \cdot \frac{a}{t}}} \]
            4. lower-/.f6423.3

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \cdot z \]
          8. 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 \]
          9. Applied rewrites63.1%

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

        Alternative 5: 81.8% accurate, 0.7× 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 5.3 \cdot 10^{-158}:\\ \;\;\;\;\frac{x\_m}{\sqrt{\left(-a\right) \cdot t}} \cdot \left(y\_m \cdot z\_m\right)\\ \mathbf{elif}\;z\_m \leq 2.05 \cdot 10^{+86}:\\ \;\;\;\;\left(\frac{x\_m}{\sqrt{z\_m \cdot z\_m - a \cdot t}} \cdot z\_m\right) \cdot y\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x\_m \cdot y\_m\right) \cdot z\_m}{z\_m \cdot 1}\\ \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 5.3e-158)
              (* (/ x_m (sqrt (* (- a) t))) (* y_m z_m))
              (if (<= z_m 2.05e+86)
                (* (* (/ x_m (sqrt (- (* z_m z_m) (* a t)))) z_m) y_m)
                (/ (* (* x_m y_m) z_m) (* z_m 1.0))))))))
        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 <= 5.3e-158) {
        		tmp = (x_m / sqrt((-a * t))) * (y_m * z_m);
        	} else if (z_m <= 2.05e+86) {
        		tmp = ((x_m / sqrt(((z_m * z_m) - (a * t)))) * z_m) * y_m;
        	} else {
        		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0);
        	}
        	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 <= 5.3d-158) then
                tmp = (x_m / sqrt((-a * t))) * (y_m * z_m)
            else if (z_m <= 2.05d+86) then
                tmp = ((x_m / sqrt(((z_m * z_m) - (a * t)))) * z_m) * y_m
            else
                tmp = ((x_m * y_m) * z_m) / (z_m * 1.0d0)
            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 <= 5.3e-158) {
        		tmp = (x_m / Math.sqrt((-a * t))) * (y_m * z_m);
        	} else if (z_m <= 2.05e+86) {
        		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 * 1.0);
        	}
        	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 <= 5.3e-158:
        		tmp = (x_m / math.sqrt((-a * t))) * (y_m * z_m)
        	elif z_m <= 2.05e+86:
        		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 * 1.0)
        	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 <= 5.3e-158)
        		tmp = Float64(Float64(x_m / sqrt(Float64(Float64(-a) * t))) * Float64(y_m * z_m));
        	elseif (z_m <= 2.05e+86)
        		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) / Float64(z_m * 1.0));
        	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 <= 5.3e-158)
        		tmp = (x_m / sqrt((-a * t))) * (y_m * z_m);
        	elseif (z_m <= 2.05e+86)
        		tmp = ((x_m / sqrt(((z_m * z_m) - (a * t)))) * z_m) * y_m;
        	else
        		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0);
        	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, 5.3e-158], N[(N[(x$95$m / N[Sqrt[N[((-a) * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(y$95$m * z$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z$95$m, 2.05e+86], 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] / N[(z$95$m * 1.0), $MachinePrecision]), $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 5.3 \cdot 10^{-158}:\\
        \;\;\;\;\frac{x\_m}{\sqrt{\left(-a\right) \cdot t}} \cdot \left(y\_m \cdot z\_m\right)\\
        
        \mathbf{elif}\;z\_m \leq 2.05 \cdot 10^{+86}:\\
        \;\;\;\;\left(\frac{x\_m}{\sqrt{z\_m \cdot z\_m - a \cdot t}} \cdot z\_m\right) \cdot y\_m\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\left(x\_m \cdot y\_m\right) \cdot z\_m}{z\_m \cdot 1}\\
        
        
        \end{array}\right)\right)
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if z < 5.2999999999999999e-158

          1. Initial program 61.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{x}{\sqrt{\left(\mathsf{neg}\left(a\right)\right) \cdot t}} \cdot \left(y \cdot z\right) \]
            12. lower-neg.f6434.1

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

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

          if 5.2999999999999999e-158 < z < 2.05e86

          1. Initial program 61.2%

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

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

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

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

          if 2.05e86 < z

          1. Initial program 61.2%

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

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

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

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

          Alternative 6: 81.2% accurate, 0.7× 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 6.8 \cdot 10^{-160}:\\ \;\;\;\;\frac{x\_m}{\sqrt{\left(-a\right) \cdot t}} \cdot \left(y\_m \cdot z\_m\right)\\ \mathbf{elif}\;z\_m \leq 2.05 \cdot 10^{+86}:\\ \;\;\;\;\left(\frac{x\_m}{\sqrt{z\_m \cdot z\_m - a \cdot t}} \cdot y\_m\right) \cdot z\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x\_m \cdot y\_m\right) \cdot z\_m}{z\_m \cdot 1}\\ \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 6.8e-160)
                (* (/ x_m (sqrt (* (- a) t))) (* y_m z_m))
                (if (<= z_m 2.05e+86)
                  (* (* (/ x_m (sqrt (- (* z_m z_m) (* a t)))) y_m) z_m)
                  (/ (* (* x_m y_m) z_m) (* z_m 1.0))))))))
          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 <= 6.8e-160) {
          		tmp = (x_m / sqrt((-a * t))) * (y_m * z_m);
          	} else if (z_m <= 2.05e+86) {
          		tmp = ((x_m / sqrt(((z_m * z_m) - (a * t)))) * y_m) * z_m;
          	} else {
          		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0);
          	}
          	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 <= 6.8d-160) then
                  tmp = (x_m / sqrt((-a * t))) * (y_m * z_m)
              else if (z_m <= 2.05d+86) then
                  tmp = ((x_m / sqrt(((z_m * z_m) - (a * t)))) * y_m) * z_m
              else
                  tmp = ((x_m * y_m) * z_m) / (z_m * 1.0d0)
              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 <= 6.8e-160) {
          		tmp = (x_m / Math.sqrt((-a * t))) * (y_m * z_m);
          	} else if (z_m <= 2.05e+86) {
          		tmp = ((x_m / Math.sqrt(((z_m * z_m) - (a * t)))) * y_m) * z_m;
          	} else {
          		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0);
          	}
          	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 <= 6.8e-160:
          		tmp = (x_m / math.sqrt((-a * t))) * (y_m * z_m)
          	elif z_m <= 2.05e+86:
          		tmp = ((x_m / math.sqrt(((z_m * z_m) - (a * t)))) * y_m) * z_m
          	else:
          		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0)
          	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 <= 6.8e-160)
          		tmp = Float64(Float64(x_m / sqrt(Float64(Float64(-a) * t))) * Float64(y_m * z_m));
          	elseif (z_m <= 2.05e+86)
          		tmp = Float64(Float64(Float64(x_m / sqrt(Float64(Float64(z_m * z_m) - Float64(a * t)))) * y_m) * z_m);
          	else
          		tmp = Float64(Float64(Float64(x_m * y_m) * z_m) / Float64(z_m * 1.0));
          	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 <= 6.8e-160)
          		tmp = (x_m / sqrt((-a * t))) * (y_m * z_m);
          	elseif (z_m <= 2.05e+86)
          		tmp = ((x_m / sqrt(((z_m * z_m) - (a * t)))) * y_m) * z_m;
          	else
          		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0);
          	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, 6.8e-160], N[(N[(x$95$m / N[Sqrt[N[((-a) * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(y$95$m * z$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z$95$m, 2.05e+86], N[(N[(N[(x$95$m / N[Sqrt[N[(N[(z$95$m * z$95$m), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$95$m), $MachinePrecision] * z$95$m), $MachinePrecision], N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] * z$95$m), $MachinePrecision] / N[(z$95$m * 1.0), $MachinePrecision]), $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 6.8 \cdot 10^{-160}:\\
          \;\;\;\;\frac{x\_m}{\sqrt{\left(-a\right) \cdot t}} \cdot \left(y\_m \cdot z\_m\right)\\
          
          \mathbf{elif}\;z\_m \leq 2.05 \cdot 10^{+86}:\\
          \;\;\;\;\left(\frac{x\_m}{\sqrt{z\_m \cdot z\_m - a \cdot t}} \cdot y\_m\right) \cdot z\_m\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\left(x\_m \cdot y\_m\right) \cdot z\_m}{z\_m \cdot 1}\\
          
          
          \end{array}\right)\right)
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if z < 6.80000000000000043e-160

            1. Initial program 61.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x}{\sqrt{\left(\mathsf{neg}\left(a\right)\right) \cdot t}} \cdot \left(y \cdot z\right) \]
              12. lower-neg.f6434.1

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

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

            if 6.80000000000000043e-160 < z < 2.05e86

            1. Initial program 61.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\color{blue}{x \cdot y}}{\sqrt{z \cdot z - t \cdot a}} \cdot z \]
              17. 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. Applied rewrites59.1%

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

            if 2.05e86 < z

            1. Initial program 61.2%

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

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

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

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

            Alternative 7: 75.6% 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 3.3 \cdot 10^{-105}:\\ \;\;\;\;\frac{x\_m}{\sqrt{\left(-a\right) \cdot t}} \cdot \left(y\_m \cdot z\_m\right)\\ \mathbf{elif}\;z\_m \leq 1.35 \cdot 10^{+196}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x\_m \cdot y\_m\right) \cdot z\_m}{z\_m \cdot 1}\\ \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 3.3e-105)
                  (* (/ x_m (sqrt (* (- a) t))) (* y_m z_m))
                  (if (<= z_m 1.35e+196)
                    (* (/ (* x_m y_m) z_m) z_m)
                    (/ (* (* x_m y_m) z_m) (* z_m 1.0))))))))
            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 <= 3.3e-105) {
            		tmp = (x_m / sqrt((-a * t))) * (y_m * z_m);
            	} else if (z_m <= 1.35e+196) {
            		tmp = ((x_m * y_m) / z_m) * z_m;
            	} else {
            		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0);
            	}
            	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 <= 3.3d-105) then
                    tmp = (x_m / sqrt((-a * t))) * (y_m * z_m)
                else if (z_m <= 1.35d+196) then
                    tmp = ((x_m * y_m) / z_m) * z_m
                else
                    tmp = ((x_m * y_m) * z_m) / (z_m * 1.0d0)
                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 <= 3.3e-105) {
            		tmp = (x_m / Math.sqrt((-a * t))) * (y_m * z_m);
            	} else if (z_m <= 1.35e+196) {
            		tmp = ((x_m * y_m) / z_m) * z_m;
            	} else {
            		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0);
            	}
            	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 <= 3.3e-105:
            		tmp = (x_m / math.sqrt((-a * t))) * (y_m * z_m)
            	elif z_m <= 1.35e+196:
            		tmp = ((x_m * y_m) / z_m) * z_m
            	else:
            		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0)
            	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 <= 3.3e-105)
            		tmp = Float64(Float64(x_m / sqrt(Float64(Float64(-a) * t))) * Float64(y_m * z_m));
            	elseif (z_m <= 1.35e+196)
            		tmp = Float64(Float64(Float64(x_m * y_m) / z_m) * z_m);
            	else
            		tmp = Float64(Float64(Float64(x_m * y_m) * z_m) / Float64(z_m * 1.0));
            	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 <= 3.3e-105)
            		tmp = (x_m / sqrt((-a * t))) * (y_m * z_m);
            	elseif (z_m <= 1.35e+196)
            		tmp = ((x_m * y_m) / z_m) * z_m;
            	else
            		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0);
            	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, 3.3e-105], N[(N[(x$95$m / N[Sqrt[N[((-a) * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(y$95$m * z$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z$95$m, 1.35e+196], N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] / z$95$m), $MachinePrecision] * z$95$m), $MachinePrecision], N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] * z$95$m), $MachinePrecision] / N[(z$95$m * 1.0), $MachinePrecision]), $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 3.3 \cdot 10^{-105}:\\
            \;\;\;\;\frac{x\_m}{\sqrt{\left(-a\right) \cdot t}} \cdot \left(y\_m \cdot z\_m\right)\\
            
            \mathbf{elif}\;z\_m \leq 1.35 \cdot 10^{+196}:\\
            \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{\left(x\_m \cdot y\_m\right) \cdot z\_m}{z\_m \cdot 1}\\
            
            
            \end{array}\right)\right)
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if z < 3.2999999999999999e-105

              1. Initial program 61.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{x}{\sqrt{\left(\mathsf{neg}\left(a\right)\right) \cdot t}} \cdot \left(y \cdot z\right) \]
                12. lower-neg.f6434.1

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

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

              if 3.2999999999999999e-105 < z < 1.34999999999999998e196

              1. Initial program 61.2%

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

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

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

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

                  \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{t \cdot \sqrt{-1 \cdot \frac{a}{t}}} \]
                4. lower-/.f6423.3

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \cdot z \]
              8. 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 \]
              9. Applied rewrites63.1%

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

              if 1.34999999999999998e196 < z

              1. Initial program 61.2%

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

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

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

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

              Alternative 8: 75.1% 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.6 \cdot 10^{-106}:\\ \;\;\;\;\left(\frac{y\_m}{\sqrt{\left(-a\right) \cdot t}} \cdot z\_m\right) \cdot x\_m\\ \mathbf{elif}\;z\_m \leq 1.35 \cdot 10^{+196}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x\_m \cdot y\_m\right) \cdot z\_m}{z\_m \cdot 1}\\ \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.6e-106)
                    (* (* (/ y_m (sqrt (* (- a) t))) z_m) x_m)
                    (if (<= z_m 1.35e+196)
                      (* (/ (* x_m y_m) z_m) z_m)
                      (/ (* (* x_m y_m) z_m) (* z_m 1.0))))))))
              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.6e-106) {
              		tmp = ((y_m / sqrt((-a * t))) * z_m) * x_m;
              	} else if (z_m <= 1.35e+196) {
              		tmp = ((x_m * y_m) / z_m) * z_m;
              	} else {
              		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0);
              	}
              	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.6d-106) then
                      tmp = ((y_m / sqrt((-a * t))) * z_m) * x_m
                  else if (z_m <= 1.35d+196) then
                      tmp = ((x_m * y_m) / z_m) * z_m
                  else
                      tmp = ((x_m * y_m) * z_m) / (z_m * 1.0d0)
                  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.6e-106) {
              		tmp = ((y_m / Math.sqrt((-a * t))) * z_m) * x_m;
              	} else if (z_m <= 1.35e+196) {
              		tmp = ((x_m * y_m) / z_m) * z_m;
              	} else {
              		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0);
              	}
              	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.6e-106:
              		tmp = ((y_m / math.sqrt((-a * t))) * z_m) * x_m
              	elif z_m <= 1.35e+196:
              		tmp = ((x_m * y_m) / z_m) * z_m
              	else:
              		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0)
              	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.6e-106)
              		tmp = Float64(Float64(Float64(y_m / sqrt(Float64(Float64(-a) * t))) * z_m) * x_m);
              	elseif (z_m <= 1.35e+196)
              		tmp = Float64(Float64(Float64(x_m * y_m) / z_m) * z_m);
              	else
              		tmp = Float64(Float64(Float64(x_m * y_m) * z_m) / Float64(z_m * 1.0));
              	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.6e-106)
              		tmp = ((y_m / sqrt((-a * t))) * z_m) * x_m;
              	elseif (z_m <= 1.35e+196)
              		tmp = ((x_m * y_m) / z_m) * z_m;
              	else
              		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0);
              	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.6e-106], N[(N[(N[(y$95$m / N[Sqrt[N[((-a) * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * z$95$m), $MachinePrecision] * x$95$m), $MachinePrecision], If[LessEqual[z$95$m, 1.35e+196], N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] / z$95$m), $MachinePrecision] * z$95$m), $MachinePrecision], N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] * z$95$m), $MachinePrecision] / N[(z$95$m * 1.0), $MachinePrecision]), $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.6 \cdot 10^{-106}:\\
              \;\;\;\;\left(\frac{y\_m}{\sqrt{\left(-a\right) \cdot t}} \cdot z\_m\right) \cdot x\_m\\
              
              \mathbf{elif}\;z\_m \leq 1.35 \cdot 10^{+196}:\\
              \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{\left(x\_m \cdot y\_m\right) \cdot z\_m}{z\_m \cdot 1}\\
              
              
              \end{array}\right)\right)
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if z < 2.6000000000000001e-106

                1. Initial program 61.2%

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

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

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

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

                if 2.6000000000000001e-106 < z < 1.34999999999999998e196

                1. Initial program 61.2%

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

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

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

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

                    \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{t \cdot \sqrt{-1 \cdot \frac{a}{t}}} \]
                  4. lower-/.f6423.3

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \cdot z \]
                8. 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 \]
                9. Applied rewrites63.1%

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

                if 1.34999999999999998e196 < z

                1. Initial program 61.2%

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

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

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

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

                Alternative 9: 74.4% 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 1.85 \cdot 10^{-121}:\\ \;\;\;\;\left(\frac{x\_m}{\sqrt{\left(-a\right) \cdot t}} \cdot y\_m\right) \cdot z\_m\\ \mathbf{elif}\;z\_m \leq 1.35 \cdot 10^{+196}:\\ \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x\_m \cdot y\_m\right) \cdot z\_m}{z\_m \cdot 1}\\ \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 1.85e-121)
                      (* (* (/ x_m (sqrt (* (- a) t))) y_m) z_m)
                      (if (<= z_m 1.35e+196)
                        (* (/ (* x_m y_m) z_m) z_m)
                        (/ (* (* x_m y_m) z_m) (* z_m 1.0))))))))
                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 <= 1.85e-121) {
                		tmp = ((x_m / sqrt((-a * t))) * y_m) * z_m;
                	} else if (z_m <= 1.35e+196) {
                		tmp = ((x_m * y_m) / z_m) * z_m;
                	} else {
                		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0);
                	}
                	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 <= 1.85d-121) then
                        tmp = ((x_m / sqrt((-a * t))) * y_m) * z_m
                    else if (z_m <= 1.35d+196) then
                        tmp = ((x_m * y_m) / z_m) * z_m
                    else
                        tmp = ((x_m * y_m) * z_m) / (z_m * 1.0d0)
                    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 <= 1.85e-121) {
                		tmp = ((x_m / Math.sqrt((-a * t))) * y_m) * z_m;
                	} else if (z_m <= 1.35e+196) {
                		tmp = ((x_m * y_m) / z_m) * z_m;
                	} else {
                		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0);
                	}
                	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 <= 1.85e-121:
                		tmp = ((x_m / math.sqrt((-a * t))) * y_m) * z_m
                	elif z_m <= 1.35e+196:
                		tmp = ((x_m * y_m) / z_m) * z_m
                	else:
                		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0)
                	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 <= 1.85e-121)
                		tmp = Float64(Float64(Float64(x_m / sqrt(Float64(Float64(-a) * t))) * y_m) * z_m);
                	elseif (z_m <= 1.35e+196)
                		tmp = Float64(Float64(Float64(x_m * y_m) / z_m) * z_m);
                	else
                		tmp = Float64(Float64(Float64(x_m * y_m) * z_m) / Float64(z_m * 1.0));
                	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 <= 1.85e-121)
                		tmp = ((x_m / sqrt((-a * t))) * y_m) * z_m;
                	elseif (z_m <= 1.35e+196)
                		tmp = ((x_m * y_m) / z_m) * z_m;
                	else
                		tmp = ((x_m * y_m) * z_m) / (z_m * 1.0);
                	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, 1.85e-121], N[(N[(N[(x$95$m / N[Sqrt[N[((-a) * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$95$m), $MachinePrecision] * z$95$m), $MachinePrecision], If[LessEqual[z$95$m, 1.35e+196], N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] / z$95$m), $MachinePrecision] * z$95$m), $MachinePrecision], N[(N[(N[(x$95$m * y$95$m), $MachinePrecision] * z$95$m), $MachinePrecision] / N[(z$95$m * 1.0), $MachinePrecision]), $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 1.85 \cdot 10^{-121}:\\
                \;\;\;\;\left(\frac{x\_m}{\sqrt{\left(-a\right) \cdot t}} \cdot y\_m\right) \cdot z\_m\\
                
                \mathbf{elif}\;z\_m \leq 1.35 \cdot 10^{+196}:\\
                \;\;\;\;\frac{x\_m \cdot y\_m}{z\_m} \cdot z\_m\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{\left(x\_m \cdot y\_m\right) \cdot z\_m}{z\_m \cdot 1}\\
                
                
                \end{array}\right)\right)
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if z < 1.8500000000000001e-121

                  1. Initial program 61.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{x}{\sqrt{\left(\mathsf{neg}\left(a\right)\right) \cdot t}} \cdot \left(y \cdot z\right) \]
                    12. lower-neg.f6434.1

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

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

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

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

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

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

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

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

                  if 1.8500000000000001e-121 < z < 1.34999999999999998e196

                  1. Initial program 61.2%

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

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

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

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

                      \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{t \cdot \sqrt{-1 \cdot \frac{a}{t}}} \]
                    4. lower-/.f6423.3

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \cdot z \]
                  8. 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 \]
                  9. Applied rewrites63.1%

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

                  if 1.34999999999999998e196 < z

                  1. Initial program 61.2%

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

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

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

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

                  Alternative 10: 73.2% 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}\;x\_m \cdot y\_m \leq 2 \cdot 10^{+58}:\\ \;\;\;\;\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 (<= (* x_m y_m) 2e+58)
                        (/ (* (* 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 ((x_m * y_m) <= 2e+58) {
                  		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 ((x_m * y_m) <= 2d+58) 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 ((x_m * y_m) <= 2e+58) {
                  		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 (x_m * y_m) <= 2e+58:
                  		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 (Float64(x_m * y_m) <= 2e+58)
                  		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 ((x_m * y_m) <= 2e+58)
                  		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[N[(x$95$m * y$95$m), $MachinePrecision], 2e+58], 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}\;x\_m \cdot y\_m \leq 2 \cdot 10^{+58}:\\
                  \;\;\;\;\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 2 regimes
                  2. if (*.f64 x y) < 1.99999999999999989e58

                    1. Initial program 61.2%

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

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

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

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

                      if 1.99999999999999989e58 < (*.f64 x y)

                      1. Initial program 61.2%

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

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

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

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

                          \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{t \cdot \sqrt{-1 \cdot \frac{a}{t}}} \]
                        4. lower-/.f6423.3

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \cdot z \]
                      8. 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 \]
                      9. Applied rewrites63.1%

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

                    Alternative 11: 68.2% accurate, 1.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 \begin{array}{l} \mathbf{if}\;y\_m \leq 1900000000:\\ \;\;\;\;\frac{z\_m \cdot y\_m}{1 \cdot z\_m} \cdot x\_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 (<= y_m 1900000000.0)
                          (* (/ (* z_m y_m) (* 1.0 z_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 tmp;
                    	if (y_m <= 1900000000.0) {
                    		tmp = ((z_m * y_m) / (1.0 * z_m)) * x_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 (y_m <= 1900000000.0d0) then
                            tmp = ((z_m * y_m) / (1.0d0 * z_m)) * x_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 (y_m <= 1900000000.0) {
                    		tmp = ((z_m * y_m) / (1.0 * z_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):
                    	tmp = 0
                    	if y_m <= 1900000000.0:
                    		tmp = ((z_m * y_m) / (1.0 * z_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)
                    	tmp = 0.0
                    	if (y_m <= 1900000000.0)
                    		tmp = Float64(Float64(Float64(z_m * y_m) / Float64(1.0 * z_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)
                    	tmp = 0.0;
                    	if (y_m <= 1900000000.0)
                    		tmp = ((z_m * y_m) / (1.0 * z_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_] := N[(z$95$s * N[(y$95$s * N[(x$95$s * If[LessEqual[y$95$m, 1900000000.0], N[(N[(N[(z$95$m * y$95$m), $MachinePrecision] / N[(1.0 * z$95$m), $MachinePrecision]), $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])\\
                    \\
                    z\_s \cdot \left(y\_s \cdot \left(x\_s \cdot \begin{array}{l}
                    \mathbf{if}\;y\_m \leq 1900000000:\\
                    \;\;\;\;\frac{z\_m \cdot y\_m}{1 \cdot z\_m} \cdot x\_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 y < 1.9e9

                      1. Initial program 61.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 1.9e9 < y

                        1. Initial program 61.2%

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

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

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

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

                            \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{t \cdot \sqrt{-1 \cdot \frac{a}{t}}} \]
                          4. lower-/.f6423.3

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \cdot z \]
                        8. 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 \]
                        9. 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: 65.6% 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 10^{-172}:\\ \;\;\;\;\frac{z\_m \cdot x\_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 1e-172)
                            (* (/ (* z_m x_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 <= 1e-172) {
                      		tmp = ((z_m * x_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 <= 1d-172) then
                              tmp = ((z_m * x_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 <= 1e-172) {
                      		tmp = ((z_m * x_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 <= 1e-172:
                      		tmp = ((z_m * x_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 <= 1e-172)
                      		tmp = Float64(Float64(Float64(z_m * x_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 <= 1e-172)
                      		tmp = ((z_m * x_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, 1e-172], N[(N[(N[(z$95$m * x$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 10^{-172}:\\
                      \;\;\;\;\frac{z\_m \cdot x\_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 < 1e-172

                        1. Initial program 61.2%

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

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

                          \[\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. *-commutativeN/A

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

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

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

                          \[\leadsto \frac{z \cdot x}{\color{blue}{-1 \cdot z}} \cdot y \]
                        8. Step-by-step derivation
                          1. lower-*.f6418.1

                            \[\leadsto \frac{z \cdot x}{-1 \cdot \color{blue}{z}} \cdot y \]
                        9. Applied rewrites18.1%

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

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

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

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

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

                        if 1e-172 < z

                        1. Initial program 61.2%

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

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

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

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

                            \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{t \cdot \sqrt{-1 \cdot \frac{a}{t}}} \]
                          4. lower-/.f6423.3

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \cdot z \]
                        8. 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 \]
                        9. 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 61.2%

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

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

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

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

                          \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{t \cdot \sqrt{-1 \cdot \frac{a}{t}}} \]
                        4. lower-/.f6423.3

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \cdot z \]
                      8. 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 \]
                      9. Applied rewrites63.1%

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

                      Alternative 14: 54.0% 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 61.2%

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

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

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

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

                          \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{t \cdot \sqrt{-1 \cdot \frac{a}{t}}} \]
                        4. lower-/.f6423.3

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \cdot z \]
                      8. 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 \]
                      9. Applied rewrites63.1%

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

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

                          \[\leadsto \frac{x \cdot y}{z} \cdot z \]
                        3. *-commutativeN/A

                          \[\leadsto \frac{y \cdot x}{z} \cdot z \]
                        4. associate-/l*N/A

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

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

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

                          \[\leadsto \left(\frac{x}{z} \cdot y\right) \cdot z \]
                      11. Applied rewrites54.0%

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

                      Alternative 15: 13.4% 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 61.2%

                        \[\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.4

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

                        \[\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.4

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

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

                      Reproduce

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