Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J

Percentage Accurate: 79.2% → 85.9%
Time: 8.8s
Alternatives: 16
Speedup: 0.5×

Specification

?
\[\begin{array}{l} \\ \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
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, b, c)
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
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c):
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c)
	return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c))
end
function tmp = code(x, y, z, t, a, b, c)
	tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\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 16 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: 79.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
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, b, c)
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
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c):
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c)
	return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c))
end
function tmp = code(x, y, z, t, a, b, c)
	tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}

Alternative 1: 85.9% accurate, 0.2× speedup?

\[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ t_2 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+239}:\\ \;\;\;\;\mathsf{fma}\left(\frac{a}{c\_m}, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{\left(t \cdot z\right) \cdot c\_m}\right) \cdot t\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;\frac{\frac{\left(y \cdot x\right) \cdot 9 - \left(\left(\left(4 \cdot z\right) \cdot t\right) \cdot a - b\right)}{z}}{c\_m}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c\_m}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{t}{c\_m} \cdot -4\right) \cdot a\\ \end{array} \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (let* ((t_1 (* (* x 9.0) y))
        (t_2 (/ (+ (- t_1 (* (* (* z 4.0) t) a)) b) (* z c_m))))
   (*
    c_s
    (if (<= t_2 -1e+239)
      (* (fma (/ a c_m) -4.0 (/ (fma (* y x) 9.0 b) (* (* t z) c_m))) t)
      (if (<= t_2 0.0)
        (/ (/ (- (* (* y x) 9.0) (- (* (* (* 4.0 z) t) a) b)) z) c_m)
        (if (<= t_2 INFINITY)
          (/ (+ (- t_1 (* (* 4.0 z) (* a t))) b) (* z c_m))
          (* (* (/ t c_m) -4.0) a)))))))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = (x * 9.0) * y;
	double t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	double tmp;
	if (t_2 <= -1e+239) {
		tmp = fma((a / c_m), -4.0, (fma((y * x), 9.0, b) / ((t * z) * c_m))) * t;
	} else if (t_2 <= 0.0) {
		tmp = ((((y * x) * 9.0) - ((((4.0 * z) * t) * a) - b)) / z) / c_m;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m);
	} else {
		tmp = ((t / c_m) * -4.0) * a;
	}
	return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	t_1 = Float64(Float64(x * 9.0) * y)
	t_2 = Float64(Float64(Float64(t_1 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m))
	tmp = 0.0
	if (t_2 <= -1e+239)
		tmp = Float64(fma(Float64(a / c_m), -4.0, Float64(fma(Float64(y * x), 9.0, b) / Float64(Float64(t * z) * c_m))) * t);
	elseif (t_2 <= 0.0)
		tmp = Float64(Float64(Float64(Float64(Float64(y * x) * 9.0) - Float64(Float64(Float64(Float64(4.0 * z) * t) * a) - b)) / z) / c_m);
	elseif (t_2 <= Inf)
		tmp = Float64(Float64(Float64(t_1 - Float64(Float64(4.0 * z) * Float64(a * t))) + b) / Float64(z * c_m));
	else
		tmp = Float64(Float64(Float64(t / c_m) * -4.0) * a);
	end
	return Float64(c_s * tmp)
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$2, -1e+239], N[(N[(N[(a / c$95$m), $MachinePrecision] * -4.0 + N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0), $MachinePrecision] - N[(N[(N[(N[(4.0 * z), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(N[(t$95$1 - N[(N[(4.0 * z), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t / c$95$m), $MachinePrecision] * -4.0), $MachinePrecision] * a), $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
t_2 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+239}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a}{c\_m}, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{\left(t \cdot z\right) \cdot c\_m}\right) \cdot t\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{\frac{\left(y \cdot x\right) \cdot 9 - \left(\left(\left(4 \cdot z\right) \cdot t\right) \cdot a - b\right)}{z}}{c\_m}\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c\_m}\\

\mathbf{else}:\\
\;\;\;\;\left(\frac{t}{c\_m} \cdot -4\right) \cdot a\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -9.99999999999999991e238

    1. Initial program 82.5%

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

      \[\leadsto \color{blue}{t \cdot \left(-4 \cdot \frac{a}{c} + \left(9 \cdot \frac{x \cdot y}{c \cdot \left(t \cdot z\right)} + \frac{b}{c \cdot \left(t \cdot z\right)}\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-4 \cdot \frac{a}{c} + \left(9 \cdot \frac{x \cdot y}{c \cdot \left(t \cdot z\right)} + \frac{b}{c \cdot \left(t \cdot z\right)}\right)\right) \cdot \color{blue}{t} \]
    4. Applied rewrites80.4%

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

    if -9.99999999999999991e238 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -0.0

    1. Initial program 82.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z}}{c}} \]
    3. Applied rewrites90.4%

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

    if -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(4 \cdot z\right)} \cdot \left(a \cdot t\right)\right) + b}{z \cdot c} \]
      9. lower-*.f6489.4

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(4 \cdot z\right) \cdot \color{blue}{\left(a \cdot t\right)}\right) + b}{z \cdot c} \]
    3. Applied rewrites89.4%

      \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(4 \cdot z\right) \cdot \left(a \cdot t\right)}\right) + b}{z \cdot c} \]

    if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c))

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{a \cdot \left(-4 \cdot \frac{t}{c} + \left(9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)} + \frac{b}{a \cdot \left(c \cdot z\right)}\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-4 \cdot \frac{t}{c} + \left(9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)} + \frac{b}{a \cdot \left(c \cdot z\right)}\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites63.1%

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

      \[\leadsto \left(-4 \cdot \frac{t}{c}\right) \cdot a \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
      3. lift-/.f6470.9

        \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
    7. Applied rewrites70.9%

      \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 2: 87.1% accurate, 0.2× speedup?

\[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ t_2 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\ t_3 := \frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c\_m}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq -1 \cdot 10^{-236}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(-4, \left(t \cdot z\right) \cdot a, \left(y \cdot x\right) \cdot 9\right)}{c\_m}}{z}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{t}{c\_m} \cdot -4\right) \cdot a\\ \end{array} \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (let* ((t_1 (* (* x 9.0) y))
        (t_2 (/ (+ (- t_1 (* (* (* z 4.0) t) a)) b) (* z c_m)))
        (t_3 (/ (+ (- t_1 (* (* 4.0 z) (* a t))) b) (* z c_m))))
   (*
    c_s
    (if (<= t_2 -1e-236)
      t_3
      (if (<= t_2 0.0)
        (/ (/ (fma -4.0 (* (* t z) a) (* (* y x) 9.0)) c_m) z)
        (if (<= t_2 INFINITY) t_3 (* (* (/ t c_m) -4.0) a)))))))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = (x * 9.0) * y;
	double t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	double t_3 = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m);
	double tmp;
	if (t_2 <= -1e-236) {
		tmp = t_3;
	} else if (t_2 <= 0.0) {
		tmp = (fma(-4.0, ((t * z) * a), ((y * x) * 9.0)) / c_m) / z;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = t_3;
	} else {
		tmp = ((t / c_m) * -4.0) * a;
	}
	return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	t_1 = Float64(Float64(x * 9.0) * y)
	t_2 = Float64(Float64(Float64(t_1 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m))
	t_3 = Float64(Float64(Float64(t_1 - Float64(Float64(4.0 * z) * Float64(a * t))) + b) / Float64(z * c_m))
	tmp = 0.0
	if (t_2 <= -1e-236)
		tmp = t_3;
	elseif (t_2 <= 0.0)
		tmp = Float64(Float64(fma(-4.0, Float64(Float64(t * z) * a), Float64(Float64(y * x) * 9.0)) / c_m) / z);
	elseif (t_2 <= Inf)
		tmp = t_3;
	else
		tmp = Float64(Float64(Float64(t / c_m) * -4.0) * a);
	end
	return Float64(c_s * tmp)
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 - N[(N[(4.0 * z), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$2, -1e-236], t$95$3, If[LessEqual[t$95$2, 0.0], N[(N[(N[(-4.0 * N[(N[(t * z), $MachinePrecision] * a), $MachinePrecision] + N[(N[(y * x), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision] / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$3, N[(N[(N[(t / c$95$m), $MachinePrecision] * -4.0), $MachinePrecision] * a), $MachinePrecision]]]]), $MachinePrecision]]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
t_2 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\
t_3 := \frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-236}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(-4, \left(t \cdot z\right) \cdot a, \left(y \cdot x\right) \cdot 9\right)}{c\_m}}{z}\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;\left(\frac{t}{c\_m} \cdot -4\right) \cdot a\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -1e-236 or -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(4 \cdot z\right)} \cdot \left(a \cdot t\right)\right) + b}{z \cdot c} \]
      9. lower-*.f6489.5

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(4 \cdot z\right) \cdot \color{blue}{\left(a \cdot t\right)}\right) + b}{z \cdot c} \]
    3. Applied rewrites89.5%

      \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(4 \cdot z\right) \cdot \left(a \cdot t\right)}\right) + b}{z \cdot c} \]

    if -1e-236 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -0.0

    1. Initial program 43.6%

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

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

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

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

        \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c}}{z} \]
      4. fp-cancel-sub-sign-invN/A

        \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c}}{z} \]
      5. metadata-evalN/A

        \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right) + -4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c}}{z} \]
      6. +-commutativeN/A

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

        \[\leadsto \frac{\frac{\mathsf{fma}\left(-4, a \cdot \left(t \cdot z\right), 9 \cdot \left(x \cdot y\right)\right)}{c}}{z} \]
      8. *-commutativeN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(-4, \left(t \cdot z\right) \cdot a, 9 \cdot \left(x \cdot y\right)\right)}{c}}{z} \]
      9. lower-*.f64N/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(-4, \left(t \cdot z\right) \cdot a, 9 \cdot \left(x \cdot y\right)\right)}{c}}{z} \]
      10. lower-*.f64N/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(-4, \left(t \cdot z\right) \cdot a, 9 \cdot \left(x \cdot y\right)\right)}{c}}{z} \]
      11. *-commutativeN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(-4, \left(t \cdot z\right) \cdot a, \left(x \cdot y\right) \cdot 9\right)}{c}}{z} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(-4, \left(t \cdot z\right) \cdot a, \left(x \cdot y\right) \cdot 9\right)}{c}}{z} \]
      13. *-commutativeN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(-4, \left(t \cdot z\right) \cdot a, \left(y \cdot x\right) \cdot 9\right)}{c}}{z} \]
      14. lower-*.f6475.0

        \[\leadsto \frac{\frac{\mathsf{fma}\left(-4, \left(t \cdot z\right) \cdot a, \left(y \cdot x\right) \cdot 9\right)}{c}}{z} \]
    4. Applied rewrites75.0%

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

    if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c))

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{a \cdot \left(-4 \cdot \frac{t}{c} + \left(9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)} + \frac{b}{a \cdot \left(c \cdot z\right)}\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-4 \cdot \frac{t}{c} + \left(9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)} + \frac{b}{a \cdot \left(c \cdot z\right)}\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites63.1%

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

      \[\leadsto \left(-4 \cdot \frac{t}{c}\right) \cdot a \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
      3. lift-/.f6470.9

        \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
    7. Applied rewrites70.9%

      \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 3: 86.0% accurate, 0.3× speedup?

\[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ c\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{+123}:\\ \;\;\;\;-\left(\left(-\frac{\mathsf{fma}\left(\frac{9 \cdot x}{c\_m}, \frac{y}{z}, -4 \cdot \frac{a \cdot t}{c\_m}\right)}{b}\right) - {\left(c\_m \cdot z\right)}^{-1}\right) \cdot b\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{+160}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{a}{c\_m}, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{\left(t \cdot z\right) \cdot c\_m}\right) \cdot t\\ \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (*
  c_s
  (if (<= z -3.4e+123)
    (-
     (*
      (-
       (- (/ (fma (/ (* 9.0 x) c_m) (/ y z) (* -4.0 (/ (* a t) c_m))) b))
       (pow (* c_m z) -1.0))
      b))
    (if (<= z 9.6e+160)
      (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c_m))
      (* (fma (/ a c_m) -4.0 (/ (fma (* y x) 9.0 b) (* (* t z) c_m))) t)))))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double tmp;
	if (z <= -3.4e+123) {
		tmp = -((-(fma(((9.0 * x) / c_m), (y / z), (-4.0 * ((a * t) / c_m))) / b) - pow((c_m * z), -1.0)) * b);
	} else if (z <= 9.6e+160) {
		tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	} else {
		tmp = fma((a / c_m), -4.0, (fma((y * x), 9.0, b) / ((t * z) * c_m))) * t;
	}
	return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0
	if (z <= -3.4e+123)
		tmp = Float64(-Float64(Float64(Float64(-Float64(fma(Float64(Float64(9.0 * x) / c_m), Float64(y / z), Float64(-4.0 * Float64(Float64(a * t) / c_m))) / b)) - (Float64(c_m * z) ^ -1.0)) * b));
	elseif (z <= 9.6e+160)
		tmp = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m));
	else
		tmp = Float64(fma(Float64(a / c_m), -4.0, Float64(fma(Float64(y * x), 9.0, b) / Float64(Float64(t * z) * c_m))) * t);
	end
	return Float64(c_s * tmp)
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[z, -3.4e+123], (-N[(N[((-N[(N[(N[(N[(9.0 * x), $MachinePrecision] / c$95$m), $MachinePrecision] * N[(y / z), $MachinePrecision] + N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]) - N[Power[N[(c$95$m * z), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), If[LessEqual[z, 9.6e+160], N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a / c$95$m), $MachinePrecision] * -4.0 + N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+123}:\\
\;\;\;\;-\left(\left(-\frac{\mathsf{fma}\left(\frac{9 \cdot x}{c\_m}, \frac{y}{z}, -4 \cdot \frac{a \cdot t}{c\_m}\right)}{b}\right) - {\left(c\_m \cdot z\right)}^{-1}\right) \cdot b\\

\mathbf{elif}\;z \leq 9.6 \cdot 10^{+160}:\\
\;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.40000000000000001e123

    1. Initial program 51.0%

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

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

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

        \[\leadsto -b \cdot \left(-1 \cdot \frac{9 \cdot \frac{x \cdot y}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{b} - \frac{1}{c \cdot z}\right) \]
      3. *-commutativeN/A

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

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

      \[\leadsto \color{blue}{-\left(\left(-\frac{\mathsf{fma}\left(\frac{9 \cdot x}{c}, \frac{y}{z}, -4 \cdot \frac{a \cdot t}{c}\right)}{b}\right) - {\left(c \cdot z\right)}^{-1}\right) \cdot b} \]

    if -3.40000000000000001e123 < z < 9.6000000000000006e160

    1. Initial program 89.7%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

    if 9.6000000000000006e160 < z

    1. Initial program 50.0%

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

      \[\leadsto \color{blue}{t \cdot \left(-4 \cdot \frac{a}{c} + \left(9 \cdot \frac{x \cdot y}{c \cdot \left(t \cdot z\right)} + \frac{b}{c \cdot \left(t \cdot z\right)}\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-4 \cdot \frac{a}{c} + \left(9 \cdot \frac{x \cdot y}{c \cdot \left(t \cdot z\right)} + \frac{b}{c \cdot \left(t \cdot z\right)}\right)\right) \cdot \color{blue}{t} \]
    4. Applied rewrites76.7%

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

Alternative 4: 85.9% accurate, 0.3× speedup?

\[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ t_2 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq 0:\\ \;\;\;\;\frac{\frac{\left(y \cdot x\right) \cdot 9 - \left(\left(\left(4 \cdot z\right) \cdot t\right) \cdot a - b\right)}{z}}{c\_m}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c\_m}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{t}{c\_m} \cdot -4\right) \cdot a\\ \end{array} \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (let* ((t_1 (* (* x 9.0) y))
        (t_2 (/ (+ (- t_1 (* (* (* z 4.0) t) a)) b) (* z c_m))))
   (*
    c_s
    (if (<= t_2 0.0)
      (/ (/ (- (* (* y x) 9.0) (- (* (* (* 4.0 z) t) a) b)) z) c_m)
      (if (<= t_2 INFINITY)
        (/ (+ (- t_1 (* (* 4.0 z) (* a t))) b) (* z c_m))
        (* (* (/ t c_m) -4.0) a))))))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = (x * 9.0) * y;
	double t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	double tmp;
	if (t_2 <= 0.0) {
		tmp = ((((y * x) * 9.0) - ((((4.0 * z) * t) * a) - b)) / z) / c_m;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m);
	} else {
		tmp = ((t / c_m) * -4.0) * a;
	}
	return c_s * tmp;
}
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = (x * 9.0) * y;
	double t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	double tmp;
	if (t_2 <= 0.0) {
		tmp = ((((y * x) * 9.0) - ((((4.0 * z) * t) * a) - b)) / z) / c_m;
	} else if (t_2 <= Double.POSITIVE_INFINITY) {
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m);
	} else {
		tmp = ((t / c_m) * -4.0) * a;
	}
	return c_s * tmp;
}
c\_m = math.fabs(c)
c\_s = math.copysign(1.0, c)
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
def code(c_s, x, y, z, t, a, b, c_m):
	t_1 = (x * 9.0) * y
	t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c_m)
	tmp = 0
	if t_2 <= 0.0:
		tmp = ((((y * x) * 9.0) - ((((4.0 * z) * t) * a) - b)) / z) / c_m
	elif t_2 <= math.inf:
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m)
	else:
		tmp = ((t / c_m) * -4.0) * a
	return c_s * tmp
c\_m = abs(c)
c\_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	t_1 = Float64(Float64(x * 9.0) * y)
	t_2 = Float64(Float64(Float64(t_1 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m))
	tmp = 0.0
	if (t_2 <= 0.0)
		tmp = Float64(Float64(Float64(Float64(Float64(y * x) * 9.0) - Float64(Float64(Float64(Float64(4.0 * z) * t) * a) - b)) / z) / c_m);
	elseif (t_2 <= Inf)
		tmp = Float64(Float64(Float64(t_1 - Float64(Float64(4.0 * z) * Float64(a * t))) + b) / Float64(z * c_m));
	else
		tmp = Float64(Float64(Float64(t / c_m) * -4.0) * a);
	end
	return Float64(c_s * tmp)
end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	t_1 = (x * 9.0) * y;
	t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	tmp = 0.0;
	if (t_2 <= 0.0)
		tmp = ((((y * x) * 9.0) - ((((4.0 * z) * t) * a) - b)) / z) / c_m;
	elseif (t_2 <= Inf)
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m);
	else
		tmp = ((t / c_m) * -4.0) * a;
	end
	tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$2, 0.0], N[(N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0), $MachinePrecision] - N[(N[(N[(N[(4.0 * z), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(N[(t$95$1 - N[(N[(4.0 * z), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t / c$95$m), $MachinePrecision] * -4.0), $MachinePrecision] * a), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
t_2 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\frac{\frac{\left(y \cdot x\right) \cdot 9 - \left(\left(\left(4 \cdot z\right) \cdot t\right) \cdot a - b\right)}{z}}{c\_m}\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c\_m}\\

\mathbf{else}:\\
\;\;\;\;\left(\frac{t}{c\_m} \cdot -4\right) \cdot a\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -0.0

    1. Initial program 82.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z}}{c}} \]
    3. Applied rewrites85.1%

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

    if -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(4 \cdot z\right)} \cdot \left(a \cdot t\right)\right) + b}{z \cdot c} \]
      9. lower-*.f6489.4

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(4 \cdot z\right) \cdot \color{blue}{\left(a \cdot t\right)}\right) + b}{z \cdot c} \]
    3. Applied rewrites89.4%

      \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(4 \cdot z\right) \cdot \left(a \cdot t\right)}\right) + b}{z \cdot c} \]

    if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c))

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{a \cdot \left(-4 \cdot \frac{t}{c} + \left(9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)} + \frac{b}{a \cdot \left(c \cdot z\right)}\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-4 \cdot \frac{t}{c} + \left(9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)} + \frac{b}{a \cdot \left(c \cdot z\right)}\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites63.1%

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

      \[\leadsto \left(-4 \cdot \frac{t}{c}\right) \cdot a \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
      3. lift-/.f6470.9

        \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
    7. Applied rewrites70.9%

      \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 5: 84.9% accurate, 0.5× speedup?

\[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m} \leq \infty:\\ \;\;\;\;\frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c\_m}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{t}{c\_m} \cdot -4\right) \cdot a\\ \end{array} \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (let* ((t_1 (* (* x 9.0) y)))
   (*
    c_s
    (if (<= (/ (+ (- t_1 (* (* (* z 4.0) t) a)) b) (* z c_m)) INFINITY)
      (/ (+ (- t_1 (* (* 4.0 z) (* a t))) b) (* z c_m))
      (* (* (/ t c_m) -4.0) a)))))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = (x * 9.0) * y;
	double tmp;
	if ((((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c_m)) <= ((double) INFINITY)) {
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m);
	} else {
		tmp = ((t / c_m) * -4.0) * a;
	}
	return c_s * tmp;
}
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = (x * 9.0) * y;
	double tmp;
	if ((((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c_m)) <= Double.POSITIVE_INFINITY) {
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m);
	} else {
		tmp = ((t / c_m) * -4.0) * a;
	}
	return c_s * tmp;
}
c\_m = math.fabs(c)
c\_s = math.copysign(1.0, c)
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
def code(c_s, x, y, z, t, a, b, c_m):
	t_1 = (x * 9.0) * y
	tmp = 0
	if (((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c_m)) <= math.inf:
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m)
	else:
		tmp = ((t / c_m) * -4.0) * a
	return c_s * tmp
c\_m = abs(c)
c\_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	t_1 = Float64(Float64(x * 9.0) * y)
	tmp = 0.0
	if (Float64(Float64(Float64(t_1 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m)) <= Inf)
		tmp = Float64(Float64(Float64(t_1 - Float64(Float64(4.0 * z) * Float64(a * t))) + b) / Float64(z * c_m));
	else
		tmp = Float64(Float64(Float64(t / c_m) * -4.0) * a);
	end
	return Float64(c_s * tmp)
end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	t_1 = (x * 9.0) * y;
	tmp = 0.0;
	if ((((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c_m)) <= Inf)
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m);
	else
		tmp = ((t / c_m) * -4.0) * a;
	end
	tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, N[(c$95$s * If[LessEqual[N[(N[(N[(t$95$1 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(t$95$1 - N[(N[(4.0 * z), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t / c$95$m), $MachinePrecision] * -4.0), $MachinePrecision] * a), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m} \leq \infty:\\
\;\;\;\;\frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c\_m}\\

\mathbf{else}:\\
\;\;\;\;\left(\frac{t}{c\_m} \cdot -4\right) \cdot a\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0

    1. Initial program 85.5%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(4 \cdot z\right)} \cdot \left(a \cdot t\right)\right) + b}{z \cdot c} \]
      9. lower-*.f6486.0

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(4 \cdot z\right) \cdot \color{blue}{\left(a \cdot t\right)}\right) + b}{z \cdot c} \]
    3. Applied rewrites86.0%

      \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(4 \cdot z\right) \cdot \left(a \cdot t\right)}\right) + b}{z \cdot c} \]

    if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c))

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{a \cdot \left(-4 \cdot \frac{t}{c} + \left(9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)} + \frac{b}{a \cdot \left(c \cdot z\right)}\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-4 \cdot \frac{t}{c} + \left(9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)} + \frac{b}{a \cdot \left(c \cdot z\right)}\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites63.1%

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

      \[\leadsto \left(-4 \cdot \frac{t}{c}\right) \cdot a \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
      3. lift-/.f6470.9

        \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
    7. Applied rewrites70.9%

      \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 6: 85.6% accurate, 0.5× speedup?

\[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ c\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+124}:\\ \;\;\;\;\left(\mathsf{fma}\left(\frac{y}{c\_m \cdot z}, 9, \frac{b}{\left(z \cdot x\right) \cdot c\_m}\right) - \frac{\frac{a \cdot t}{c\_m}}{x} \cdot 4\right) \cdot x\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{+160}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{a}{c\_m}, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{\left(t \cdot z\right) \cdot c\_m}\right) \cdot t\\ \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (*
  c_s
  (if (<= z -5.2e+124)
    (*
     (-
      (fma (/ y (* c_m z)) 9.0 (/ b (* (* z x) c_m)))
      (* (/ (/ (* a t) c_m) x) 4.0))
     x)
    (if (<= z 9.6e+160)
      (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c_m))
      (* (fma (/ a c_m) -4.0 (/ (fma (* y x) 9.0 b) (* (* t z) c_m))) t)))))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double tmp;
	if (z <= -5.2e+124) {
		tmp = (fma((y / (c_m * z)), 9.0, (b / ((z * x) * c_m))) - ((((a * t) / c_m) / x) * 4.0)) * x;
	} else if (z <= 9.6e+160) {
		tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	} else {
		tmp = fma((a / c_m), -4.0, (fma((y * x), 9.0, b) / ((t * z) * c_m))) * t;
	}
	return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	tmp = 0.0
	if (z <= -5.2e+124)
		tmp = Float64(Float64(fma(Float64(y / Float64(c_m * z)), 9.0, Float64(b / Float64(Float64(z * x) * c_m))) - Float64(Float64(Float64(Float64(a * t) / c_m) / x) * 4.0)) * x);
	elseif (z <= 9.6e+160)
		tmp = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m));
	else
		tmp = Float64(fma(Float64(a / c_m), -4.0, Float64(fma(Float64(y * x), 9.0, b) / Float64(Float64(t * z) * c_m))) * t);
	end
	return Float64(c_s * tmp)
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[z, -5.2e+124], N[(N[(N[(N[(y / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] * 9.0 + N[(b / N[(N[(z * x), $MachinePrecision] * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision] / x), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 9.6e+160], N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a / c$95$m), $MachinePrecision] * -4.0 + N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+124}:\\
\;\;\;\;\left(\mathsf{fma}\left(\frac{y}{c\_m \cdot z}, 9, \frac{b}{\left(z \cdot x\right) \cdot c\_m}\right) - \frac{\frac{a \cdot t}{c\_m}}{x} \cdot 4\right) \cdot x\\

\mathbf{elif}\;z \leq 9.6 \cdot 10^{+160}:\\
\;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.2000000000000001e124

    1. Initial program 50.9%

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

      \[\leadsto \color{blue}{x \cdot \left(\left(9 \cdot \frac{y}{c \cdot z} + \frac{b}{c \cdot \left(x \cdot z\right)}\right) - 4 \cdot \frac{a \cdot t}{c \cdot x}\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(\left(9 \cdot \frac{y}{c \cdot z} + \frac{b}{c \cdot \left(x \cdot z\right)}\right) - 4 \cdot \frac{a \cdot t}{c \cdot x}\right) \cdot \color{blue}{x} \]
    4. Applied rewrites72.3%

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

    if -5.2000000000000001e124 < z < 9.6000000000000006e160

    1. Initial program 89.7%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]

    if 9.6000000000000006e160 < z

    1. Initial program 50.0%

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

      \[\leadsto \color{blue}{t \cdot \left(-4 \cdot \frac{a}{c} + \left(9 \cdot \frac{x \cdot y}{c \cdot \left(t \cdot z\right)} + \frac{b}{c \cdot \left(t \cdot z\right)}\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \left(-4 \cdot \frac{a}{c} + \left(9 \cdot \frac{x \cdot y}{c \cdot \left(t \cdot z\right)} + \frac{b}{c \cdot \left(t \cdot z\right)}\right)\right) \cdot \color{blue}{t} \]
    4. Applied rewrites76.7%

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

Alternative 7: 72.2% accurate, 0.6× speedup?

\[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-90}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(9, x, \frac{b}{y}\right) \cdot y}{c\_m}}{z}\\ \mathbf{elif}\;t\_1 \leq 2000000:\\ \;\;\;\;\frac{\frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z}}{c\_m}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+222}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c\_m}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{9 \cdot x}{c\_m} \cdot \frac{y}{z}\\ \end{array} \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (let* ((t_1 (* (* x 9.0) y)))
   (*
    c_s
    (if (<= t_1 -5e-90)
      (/ (/ (* (fma 9.0 x (/ b y)) y) c_m) z)
      (if (<= t_1 2000000.0)
        (/ (/ (+ (* (* (* a z) -4.0) t) b) z) c_m)
        (if (<= t_1 2e+222)
          (/ (/ (fma (* 9.0 x) y b) c_m) z)
          (* (/ (* 9.0 x) c_m) (/ y z))))))))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = (x * 9.0) * y;
	double tmp;
	if (t_1 <= -5e-90) {
		tmp = ((fma(9.0, x, (b / y)) * y) / c_m) / z;
	} else if (t_1 <= 2000000.0) {
		tmp = (((((a * z) * -4.0) * t) + b) / z) / c_m;
	} else if (t_1 <= 2e+222) {
		tmp = (fma((9.0 * x), y, b) / c_m) / z;
	} else {
		tmp = ((9.0 * x) / c_m) * (y / z);
	}
	return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	t_1 = Float64(Float64(x * 9.0) * y)
	tmp = 0.0
	if (t_1 <= -5e-90)
		tmp = Float64(Float64(Float64(fma(9.0, x, Float64(b / y)) * y) / c_m) / z);
	elseif (t_1 <= 2000000.0)
		tmp = Float64(Float64(Float64(Float64(Float64(Float64(a * z) * -4.0) * t) + b) / z) / c_m);
	elseif (t_1 <= 2e+222)
		tmp = Float64(Float64(fma(Float64(9.0 * x), y, b) / c_m) / z);
	else
		tmp = Float64(Float64(Float64(9.0 * x) / c_m) * Float64(y / z));
	end
	return Float64(c_s * tmp)
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -5e-90], N[(N[(N[(N[(9.0 * x + N[(b / y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 2000000.0], N[(N[(N[(N[(N[(N[(a * z), $MachinePrecision] * -4.0), $MachinePrecision] * t), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[t$95$1, 2e+222], N[(N[(N[(N[(9.0 * x), $MachinePrecision] * y + b), $MachinePrecision] / c$95$m), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(9.0 * x), $MachinePrecision] / c$95$m), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-90}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(9, x, \frac{b}{y}\right) \cdot y}{c\_m}}{z}\\

\mathbf{elif}\;t\_1 \leq 2000000:\\
\;\;\;\;\frac{\frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z}}{c\_m}\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+222}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c\_m}}{z}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.00000000000000019e-90

    1. Initial program 79.0%

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

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

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

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

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      4. +-commutativeN/A

        \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right) + b}{c}}{z} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9 + b}{c}}{z} \]
      6. lower-fma.f64N/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z} \]
      7. *-commutativeN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
      8. lower-*.f6466.6

        \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
    4. Applied rewrites66.6%

      \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z}} \]
    5. Taylor expanded in y around inf

      \[\leadsto \frac{\frac{y \cdot \left(9 \cdot x + \frac{b}{y}\right)}{c}}{z} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\frac{\left(9 \cdot x + \frac{b}{y}\right) \cdot y}{c}}{z} \]
      2. lower-*.f64N/A

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

        \[\leadsto \frac{\frac{\mathsf{fma}\left(9, x, \frac{b}{y}\right) \cdot y}{c}}{z} \]
      4. lower-/.f6464.8

        \[\leadsto \frac{\frac{\mathsf{fma}\left(9, x, \frac{b}{y}\right) \cdot y}{c}}{z} \]
    7. Applied rewrites64.8%

      \[\leadsto \frac{\frac{\mathsf{fma}\left(9, x, \frac{b}{y}\right) \cdot y}{c}}{z} \]

    if -5.00000000000000019e-90 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2e6

    1. Initial program 80.4%

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

      \[\leadsto \frac{\color{blue}{t \cdot \left(9 \cdot \frac{x \cdot y}{t} - 4 \cdot \left(a \cdot z\right)\right)} + b}{z \cdot c} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \frac{\left(9 \cdot \frac{x \cdot y}{t} - 4 \cdot \left(a \cdot z\right)\right) \cdot \color{blue}{t} + b}{z \cdot c} \]
      3. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \frac{\left(\frac{x \cdot y}{t} \cdot 9 + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot z\right)\right) \cdot t + b}{z \cdot c} \]
      5. metadata-evalN/A

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

        \[\leadsto \frac{\mathsf{fma}\left(\frac{x \cdot y}{t}, 9, -4 \cdot \left(a \cdot z\right)\right) \cdot t + b}{z \cdot c} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{x \cdot y}{t}, 9, -4 \cdot \left(a \cdot z\right)\right) \cdot t + b}{z \cdot c} \]
      8. *-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{y \cdot x}{t}, 9, -4 \cdot \left(a \cdot z\right)\right) \cdot t + b}{z \cdot c} \]
      9. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{y \cdot x}{t}, 9, -4 \cdot \left(a \cdot z\right)\right) \cdot t + b}{z \cdot c} \]
      10. *-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{y \cdot x}{t}, 9, \left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z \cdot c} \]
      11. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{y \cdot x}{t}, 9, \left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z \cdot c} \]
      12. lower-*.f6481.0

        \[\leadsto \frac{\mathsf{fma}\left(\frac{y \cdot x}{t}, 9, \left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z \cdot c} \]
    4. Applied rewrites81.0%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{y \cdot x}{t}, 9, \left(a \cdot z\right) \cdot -4\right) \cdot t} + b}{z \cdot c} \]
    5. Taylor expanded in x around 0

      \[\leadsto \frac{\left(-4 \cdot \left(a \cdot z\right)\right) \cdot t + b}{z \cdot c} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z \cdot c} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z \cdot c} \]
      3. lift-*.f6476.1

        \[\leadsto \frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z \cdot c} \]
    7. Applied rewrites76.1%

      \[\leadsto \frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z \cdot c} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{\color{blue}{z \cdot c}} \]
      2. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z \cdot c}} \]
      3. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z}}{c}} \]
      4. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z}}{c}} \]
      5. lower-/.f6476.3

        \[\leadsto \frac{\color{blue}{\frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z}}}{c} \]
    9. Applied rewrites76.3%

      \[\leadsto \color{blue}{\frac{\frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z}}{c}} \]

    if 2e6 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.0000000000000001e222

    1. Initial program 82.4%

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

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

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

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

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      4. +-commutativeN/A

        \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right) + b}{c}}{z} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9 + b}{c}}{z} \]
      6. lower-fma.f64N/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z} \]
      7. *-commutativeN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
      8. lower-*.f6467.1

        \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
    4. Applied rewrites67.1%

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

        \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z} \]
      3. lower-fma.f64N/A

        \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9 + b}{c}}{z} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right) + b}{c}}{z} \]
      5. associate-*r*N/A

        \[\leadsto \frac{\frac{\left(9 \cdot x\right) \cdot y + b}{c}}{z} \]
      6. lower-fma.f64N/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c}}{z} \]
      7. lower-*.f6467.1

        \[\leadsto \frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c}}{z} \]
    6. Applied rewrites67.1%

      \[\leadsto \frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c}}{z} \]

    if 2.0000000000000001e222 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 70.1%

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

      \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]
    3. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot y}{\color{blue}{c} \cdot z} \]
      3. times-fracN/A

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

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

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

        \[\leadsto \frac{9 \cdot x}{c} \cdot \frac{y}{z} \]
      7. lower-/.f6483.6

        \[\leadsto \frac{9 \cdot x}{c} \cdot \frac{y}{\color{blue}{z}} \]
    4. Applied rewrites83.6%

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

Alternative 8: 72.8% accurate, 0.6× speedup?

\[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := \frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c\_m}}{z}\\ t_2 := \left(x \cdot 9\right) \cdot y\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq -5 \cdot 10^{-90}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2000000:\\ \;\;\;\;\frac{\frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z}}{c\_m}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+222}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{9 \cdot x}{c\_m} \cdot \frac{y}{z}\\ \end{array} \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (let* ((t_1 (/ (/ (fma (* 9.0 x) y b) c_m) z)) (t_2 (* (* x 9.0) y)))
   (*
    c_s
    (if (<= t_2 -5e-90)
      t_1
      (if (<= t_2 2000000.0)
        (/ (/ (+ (* (* (* a z) -4.0) t) b) z) c_m)
        (if (<= t_2 2e+222) t_1 (* (/ (* 9.0 x) c_m) (/ y z))))))))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = (fma((9.0 * x), y, b) / c_m) / z;
	double t_2 = (x * 9.0) * y;
	double tmp;
	if (t_2 <= -5e-90) {
		tmp = t_1;
	} else if (t_2 <= 2000000.0) {
		tmp = (((((a * z) * -4.0) * t) + b) / z) / c_m;
	} else if (t_2 <= 2e+222) {
		tmp = t_1;
	} else {
		tmp = ((9.0 * x) / c_m) * (y / z);
	}
	return c_s * tmp;
}
c\_m = abs(c)
c\_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	t_1 = Float64(Float64(fma(Float64(9.0 * x), y, b) / c_m) / z)
	t_2 = Float64(Float64(x * 9.0) * y)
	tmp = 0.0
	if (t_2 <= -5e-90)
		tmp = t_1;
	elseif (t_2 <= 2000000.0)
		tmp = Float64(Float64(Float64(Float64(Float64(Float64(a * z) * -4.0) * t) + b) / z) / c_m);
	elseif (t_2 <= 2e+222)
		tmp = t_1;
	else
		tmp = Float64(Float64(Float64(9.0 * x) / c_m) * Float64(y / z));
	end
	return Float64(c_s * tmp)
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(N[(N[(9.0 * x), $MachinePrecision] * y + b), $MachinePrecision] / c$95$m), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$2, -5e-90], t$95$1, If[LessEqual[t$95$2, 2000000.0], N[(N[(N[(N[(N[(N[(a * z), $MachinePrecision] * -4.0), $MachinePrecision] * t), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[t$95$2, 2e+222], t$95$1, N[(N[(N[(9.0 * x), $MachinePrecision] / c$95$m), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c\_m}}{z}\\
t_2 := \left(x \cdot 9\right) \cdot y\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-90}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 2000000:\\
\;\;\;\;\frac{\frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z}}{c\_m}\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+222}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.00000000000000019e-90 or 2e6 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.0000000000000001e222

    1. Initial program 80.1%

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

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

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

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

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      4. +-commutativeN/A

        \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right) + b}{c}}{z} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9 + b}{c}}{z} \]
      6. lower-fma.f64N/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z} \]
      7. *-commutativeN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
      8. lower-*.f6466.8

        \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
    4. Applied rewrites66.8%

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

        \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z} \]
      3. lower-fma.f64N/A

        \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9 + b}{c}}{z} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right) + b}{c}}{z} \]
      5. associate-*r*N/A

        \[\leadsto \frac{\frac{\left(9 \cdot x\right) \cdot y + b}{c}}{z} \]
      6. lower-fma.f64N/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c}}{z} \]
      7. lower-*.f6466.7

        \[\leadsto \frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c}}{z} \]
    6. Applied rewrites66.7%

      \[\leadsto \frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c}}{z} \]

    if -5.00000000000000019e-90 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2e6

    1. Initial program 80.4%

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

      \[\leadsto \frac{\color{blue}{t \cdot \left(9 \cdot \frac{x \cdot y}{t} - 4 \cdot \left(a \cdot z\right)\right)} + b}{z \cdot c} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \frac{\left(9 \cdot \frac{x \cdot y}{t} - 4 \cdot \left(a \cdot z\right)\right) \cdot \color{blue}{t} + b}{z \cdot c} \]
      3. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \frac{\left(\frac{x \cdot y}{t} \cdot 9 + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot z\right)\right) \cdot t + b}{z \cdot c} \]
      5. metadata-evalN/A

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

        \[\leadsto \frac{\mathsf{fma}\left(\frac{x \cdot y}{t}, 9, -4 \cdot \left(a \cdot z\right)\right) \cdot t + b}{z \cdot c} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{x \cdot y}{t}, 9, -4 \cdot \left(a \cdot z\right)\right) \cdot t + b}{z \cdot c} \]
      8. *-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{y \cdot x}{t}, 9, -4 \cdot \left(a \cdot z\right)\right) \cdot t + b}{z \cdot c} \]
      9. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{y \cdot x}{t}, 9, -4 \cdot \left(a \cdot z\right)\right) \cdot t + b}{z \cdot c} \]
      10. *-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{y \cdot x}{t}, 9, \left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z \cdot c} \]
      11. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{y \cdot x}{t}, 9, \left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z \cdot c} \]
      12. lower-*.f6481.0

        \[\leadsto \frac{\mathsf{fma}\left(\frac{y \cdot x}{t}, 9, \left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z \cdot c} \]
    4. Applied rewrites81.0%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{y \cdot x}{t}, 9, \left(a \cdot z\right) \cdot -4\right) \cdot t} + b}{z \cdot c} \]
    5. Taylor expanded in x around 0

      \[\leadsto \frac{\left(-4 \cdot \left(a \cdot z\right)\right) \cdot t + b}{z \cdot c} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z \cdot c} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z \cdot c} \]
      3. lift-*.f6476.1

        \[\leadsto \frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z \cdot c} \]
    7. Applied rewrites76.1%

      \[\leadsto \frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z \cdot c} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{\color{blue}{z \cdot c}} \]
      2. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z \cdot c}} \]
      3. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z}}{c}} \]
      4. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z}}{c}} \]
      5. lower-/.f6476.3

        \[\leadsto \frac{\color{blue}{\frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z}}}{c} \]
    9. Applied rewrites76.3%

      \[\leadsto \color{blue}{\frac{\frac{\left(\left(a \cdot z\right) \cdot -4\right) \cdot t + b}{z}}{c}} \]

    if 2.0000000000000001e222 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 70.1%

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

      \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]
    3. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot y}{\color{blue}{c} \cdot z} \]
      3. times-fracN/A

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

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

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

        \[\leadsto \frac{9 \cdot x}{c} \cdot \frac{y}{z} \]
      7. lower-/.f6483.6

        \[\leadsto \frac{9 \cdot x}{c} \cdot \frac{y}{\color{blue}{z}} \]
    4. Applied rewrites83.6%

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

Alternative 9: 52.1% accurate, 0.6× speedup?

\[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-67}:\\ \;\;\;\;\frac{\left(y \cdot x\right) \cdot 9}{z \cdot c\_m}\\ \mathbf{elif}\;t\_1 \leq -4 \cdot 10^{-201}:\\ \;\;\;\;\frac{\frac{b}{c\_m}}{z}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+21}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{y}{c\_m \cdot z} \cdot 9\right) \cdot x\\ \end{array} \end{array} \end{array} \]
c\_m = (fabs.f64 c)
c\_s = (copysign.f64 #s(literal 1 binary64) c)
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
(FPCore (c_s x y z t a b c_m)
 :precision binary64
 (let* ((t_1 (* (* x 9.0) y)))
   (*
    c_s
    (if (<= t_1 -2e-67)
      (/ (* (* y x) 9.0) (* z c_m))
      (if (<= t_1 -4e-201)
        (/ (/ b c_m) z)
        (if (<= t_1 5e+21)
          (* -4.0 (/ (* a t) c_m))
          (* (* (/ y (* c_m z)) 9.0) x)))))))
c\_m = fabs(c);
c\_s = copysign(1.0, c);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = (x * 9.0) * y;
	double tmp;
	if (t_1 <= -2e-67) {
		tmp = ((y * x) * 9.0) / (z * c_m);
	} else if (t_1 <= -4e-201) {
		tmp = (b / c_m) / z;
	} else if (t_1 <= 5e+21) {
		tmp = -4.0 * ((a * t) / c_m);
	} else {
		tmp = ((y / (c_m * z)) * 9.0) * x;
	}
	return c_s * tmp;
}
c\_m =     private
c\_s =     private
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m 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(c_s, x, y, z, t, a, b, c_m)
use fmin_fmax_functions
    real(8), intent (in) :: c_s
    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
    real(8), intent (in) :: b
    real(8), intent (in) :: c_m
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x * 9.0d0) * y
    if (t_1 <= (-2d-67)) then
        tmp = ((y * x) * 9.0d0) / (z * c_m)
    else if (t_1 <= (-4d-201)) then
        tmp = (b / c_m) / z
    else if (t_1 <= 5d+21) then
        tmp = (-4.0d0) * ((a * t) / c_m)
    else
        tmp = ((y / (c_m * z)) * 9.0d0) * x
    end if
    code = c_s * tmp
end function
c\_m = Math.abs(c);
c\_s = Math.copySign(1.0, c);
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
assert x < y && y < z && z < t && t < a && a < b && b < c_m;
public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
	double t_1 = (x * 9.0) * y;
	double tmp;
	if (t_1 <= -2e-67) {
		tmp = ((y * x) * 9.0) / (z * c_m);
	} else if (t_1 <= -4e-201) {
		tmp = (b / c_m) / z;
	} else if (t_1 <= 5e+21) {
		tmp = -4.0 * ((a * t) / c_m);
	} else {
		tmp = ((y / (c_m * z)) * 9.0) * x;
	}
	return c_s * tmp;
}
c\_m = math.fabs(c)
c\_s = math.copysign(1.0, c)
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
[x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
def code(c_s, x, y, z, t, a, b, c_m):
	t_1 = (x * 9.0) * y
	tmp = 0
	if t_1 <= -2e-67:
		tmp = ((y * x) * 9.0) / (z * c_m)
	elif t_1 <= -4e-201:
		tmp = (b / c_m) / z
	elif t_1 <= 5e+21:
		tmp = -4.0 * ((a * t) / c_m)
	else:
		tmp = ((y / (c_m * z)) * 9.0) * x
	return c_s * tmp
c\_m = abs(c)
c\_s = copysign(1.0, c)
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
function code(c_s, x, y, z, t, a, b, c_m)
	t_1 = Float64(Float64(x * 9.0) * y)
	tmp = 0.0
	if (t_1 <= -2e-67)
		tmp = Float64(Float64(Float64(y * x) * 9.0) / Float64(z * c_m));
	elseif (t_1 <= -4e-201)
		tmp = Float64(Float64(b / c_m) / z);
	elseif (t_1 <= 5e+21)
		tmp = Float64(-4.0 * Float64(Float64(a * t) / c_m));
	else
		tmp = Float64(Float64(Float64(y / Float64(c_m * z)) * 9.0) * x);
	end
	return Float64(c_s * tmp)
end
c\_m = abs(c);
c\_s = sign(c) * abs(1.0);
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
	t_1 = (x * 9.0) * y;
	tmp = 0.0;
	if (t_1 <= -2e-67)
		tmp = ((y * x) * 9.0) / (z * c_m);
	elseif (t_1 <= -4e-201)
		tmp = (b / c_m) / z;
	elseif (t_1 <= 5e+21)
		tmp = -4.0 * ((a * t) / c_m);
	else
		tmp = ((y / (c_m * z)) * 9.0) * x;
	end
	tmp_2 = c_s * tmp;
end
c\_m = N[Abs[c], $MachinePrecision]
c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -2e-67], N[(N[(N[(y * x), $MachinePrecision] * 9.0), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -4e-201], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 5e+21], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision] * x), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
c\_m = \left|c\right|
\\
c\_s = \mathsf{copysign}\left(1, c\right)
\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
[x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-67}:\\
\;\;\;\;\frac{\left(y \cdot x\right) \cdot 9}{z \cdot c\_m}\\

\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{-201}:\\
\;\;\;\;\frac{\frac{b}{c\_m}}{z}\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+21}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\

\mathbf{else}:\\
\;\;\;\;\left(\frac{y}{c\_m \cdot z} \cdot 9\right) \cdot x\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.99999999999999989e-67

    1. Initial program 78.7%

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

      \[\leadsto \frac{\color{blue}{9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto \frac{\left(y \cdot x\right) \cdot 9}{z \cdot c} \]
      4. lower-*.f6451.2

        \[\leadsto \frac{\left(y \cdot x\right) \cdot 9}{z \cdot c} \]
    4. Applied rewrites51.2%

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

    if -1.99999999999999989e-67 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -3.99999999999999978e-201

    1. Initial program 82.1%

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

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

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

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

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      4. +-commutativeN/A

        \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right) + b}{c}}{z} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9 + b}{c}}{z} \]
      6. lower-fma.f64N/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z} \]
      7. *-commutativeN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
      8. lower-*.f6453.3

        \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
    4. Applied rewrites53.3%

      \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z}} \]
    5. Taylor expanded in x around 0

      \[\leadsto \frac{\frac{b}{c}}{z} \]
    6. Step-by-step derivation
      1. Applied rewrites44.5%

        \[\leadsto \frac{\frac{b}{c}}{z} \]

      if -3.99999999999999978e-201 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5e21

      1. Initial program 80.4%

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

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lower-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lower-*.f6448.9

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      4. Applied rewrites48.9%

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]

      if 5e21 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

      1. Initial program 76.8%

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

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

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

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

          \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
        4. +-commutativeN/A

          \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right) + b}{c}}{z} \]
        5. *-commutativeN/A

          \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9 + b}{c}}{z} \]
        6. lower-fma.f64N/A

          \[\leadsto \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z} \]
        7. *-commutativeN/A

          \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
        8. lower-*.f6468.7

          \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
      4. Applied rewrites68.7%

        \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z}} \]
      5. Taylor expanded in x around inf

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

          \[\leadsto \left(9 \cdot \frac{y}{c \cdot z} + \frac{b}{c \cdot \left(x \cdot z\right)}\right) \cdot x \]
        2. lower-*.f64N/A

          \[\leadsto \left(9 \cdot \frac{y}{c \cdot z} + \frac{b}{c \cdot \left(x \cdot z\right)}\right) \cdot x \]
        3. *-commutativeN/A

          \[\leadsto \left(\frac{y}{c \cdot z} \cdot 9 + \frac{b}{c \cdot \left(x \cdot z\right)}\right) \cdot x \]
        4. lower-fma.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{y}{c \cdot z}, 9, \frac{b}{c \cdot \left(x \cdot z\right)}\right) \cdot x \]
        5. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{y}{c \cdot z}, 9, \frac{b}{c \cdot \left(x \cdot z\right)}\right) \cdot x \]
        6. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{y}{c \cdot z}, 9, \frac{b}{c \cdot \left(x \cdot z\right)}\right) \cdot x \]
        7. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{y}{c \cdot z}, 9, \frac{b}{c \cdot \left(x \cdot z\right)}\right) \cdot x \]
        8. *-commutativeN/A

          \[\leadsto \mathsf{fma}\left(\frac{y}{c \cdot z}, 9, \frac{b}{\left(x \cdot z\right) \cdot c}\right) \cdot x \]
        9. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{y}{c \cdot z}, 9, \frac{b}{\left(x \cdot z\right) \cdot c}\right) \cdot x \]
        10. *-commutativeN/A

          \[\leadsto \mathsf{fma}\left(\frac{y}{c \cdot z}, 9, \frac{b}{\left(z \cdot x\right) \cdot c}\right) \cdot x \]
        11. lower-*.f6463.8

          \[\leadsto \mathsf{fma}\left(\frac{y}{c \cdot z}, 9, \frac{b}{\left(z \cdot x\right) \cdot c}\right) \cdot x \]
      7. Applied rewrites63.8%

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

        \[\leadsto \left(9 \cdot \frac{y}{c \cdot z}\right) \cdot x \]
      9. Step-by-step derivation
        1. *-commutativeN/A

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

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

          \[\leadsto \left(\frac{y}{c \cdot z} \cdot 9\right) \cdot x \]
        4. lift-*.f6461.5

          \[\leadsto \left(\frac{y}{c \cdot z} \cdot 9\right) \cdot x \]
      10. Applied rewrites61.5%

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

    Alternative 10: 53.5% accurate, 0.6× speedup?

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

      1. Initial program 76.8%

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

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

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

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

          \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
        4. +-commutativeN/A

          \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right) + b}{c}}{z} \]
        5. *-commutativeN/A

          \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9 + b}{c}}{z} \]
        6. lower-fma.f64N/A

          \[\leadsto \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z} \]
        7. *-commutativeN/A

          \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
        8. lower-*.f6469.2

          \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
      4. Applied rewrites69.2%

        \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z}} \]
      5. Taylor expanded in x around inf

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

          \[\leadsto \left(9 \cdot \frac{y}{c \cdot z} + \frac{b}{c \cdot \left(x \cdot z\right)}\right) \cdot x \]
        2. lower-*.f64N/A

          \[\leadsto \left(9 \cdot \frac{y}{c \cdot z} + \frac{b}{c \cdot \left(x \cdot z\right)}\right) \cdot x \]
        3. *-commutativeN/A

          \[\leadsto \left(\frac{y}{c \cdot z} \cdot 9 + \frac{b}{c \cdot \left(x \cdot z\right)}\right) \cdot x \]
        4. lower-fma.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{y}{c \cdot z}, 9, \frac{b}{c \cdot \left(x \cdot z\right)}\right) \cdot x \]
        5. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{y}{c \cdot z}, 9, \frac{b}{c \cdot \left(x \cdot z\right)}\right) \cdot x \]
        6. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{y}{c \cdot z}, 9, \frac{b}{c \cdot \left(x \cdot z\right)}\right) \cdot x \]
        7. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{y}{c \cdot z}, 9, \frac{b}{c \cdot \left(x \cdot z\right)}\right) \cdot x \]
        8. *-commutativeN/A

          \[\leadsto \mathsf{fma}\left(\frac{y}{c \cdot z}, 9, \frac{b}{\left(x \cdot z\right) \cdot c}\right) \cdot x \]
        9. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{y}{c \cdot z}, 9, \frac{b}{\left(x \cdot z\right) \cdot c}\right) \cdot x \]
        10. *-commutativeN/A

          \[\leadsto \mathsf{fma}\left(\frac{y}{c \cdot z}, 9, \frac{b}{\left(z \cdot x\right) \cdot c}\right) \cdot x \]
        11. lower-*.f6464.5

          \[\leadsto \mathsf{fma}\left(\frac{y}{c \cdot z}, 9, \frac{b}{\left(z \cdot x\right) \cdot c}\right) \cdot x \]
      7. Applied rewrites64.5%

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

        \[\leadsto \left(9 \cdot \frac{y}{c \cdot z}\right) \cdot x \]
      9. Step-by-step derivation
        1. *-commutativeN/A

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

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

          \[\leadsto \left(\frac{y}{c \cdot z} \cdot 9\right) \cdot x \]
        4. lift-*.f6462.2

          \[\leadsto \left(\frac{y}{c \cdot z} \cdot 9\right) \cdot x \]
      10. Applied rewrites62.2%

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

      if -1.99999999999999989e49 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -3.99999999999999978e-201

      1. Initial program 82.7%

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

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

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

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

          \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
        4. +-commutativeN/A

          \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right) + b}{c}}{z} \]
        5. *-commutativeN/A

          \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9 + b}{c}}{z} \]
        6. lower-fma.f64N/A

          \[\leadsto \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z} \]
        7. *-commutativeN/A

          \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
        8. lower-*.f6457.5

          \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
      4. Applied rewrites57.5%

        \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z}} \]
      5. Taylor expanded in x around 0

        \[\leadsto \frac{\frac{b}{c}}{z} \]
      6. Step-by-step derivation
        1. Applied rewrites41.6%

          \[\leadsto \frac{\frac{b}{c}}{z} \]

        if -3.99999999999999978e-201 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5e21

        1. Initial program 80.4%

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

          \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
        3. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
          2. lower-/.f64N/A

            \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
          3. lower-*.f6448.9

            \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
        4. Applied rewrites48.9%

          \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      7. Recombined 3 regimes into one program.
      8. Add Preprocessing

      Alternative 11: 68.0% accurate, 1.0× speedup?

      \[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ c\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq -3.2 \cdot 10^{-30}:\\ \;\;\;\;\left(\frac{t}{c\_m} \cdot -4\right) \cdot a\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+38}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c\_m}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{-4 \cdot \left(\left(t \cdot z\right) \cdot a\right) + b}{z \cdot c\_m}\\ \end{array} \end{array} \]
      c\_m = (fabs.f64 c)
      c\_s = (copysign.f64 #s(literal 1 binary64) c)
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      (FPCore (c_s x y z t a b c_m)
       :precision binary64
       (*
        c_s
        (if (<= a -3.2e-30)
          (* (* (/ t c_m) -4.0) a)
          (if (<= a 3.6e+38)
            (/ (/ (fma (* 9.0 x) y b) c_m) z)
            (/ (+ (* -4.0 (* (* t z) a)) b) (* z c_m))))))
      c\_m = fabs(c);
      c\_s = copysign(1.0, c);
      assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
      assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
      double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	double tmp;
      	if (a <= -3.2e-30) {
      		tmp = ((t / c_m) * -4.0) * a;
      	} else if (a <= 3.6e+38) {
      		tmp = (fma((9.0 * x), y, b) / c_m) / z;
      	} else {
      		tmp = ((-4.0 * ((t * z) * a)) + b) / (z * c_m);
      	}
      	return c_s * tmp;
      }
      
      c\_m = abs(c)
      c\_s = copysign(1.0, c)
      x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
      x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
      function code(c_s, x, y, z, t, a, b, c_m)
      	tmp = 0.0
      	if (a <= -3.2e-30)
      		tmp = Float64(Float64(Float64(t / c_m) * -4.0) * a);
      	elseif (a <= 3.6e+38)
      		tmp = Float64(Float64(fma(Float64(9.0 * x), y, b) / c_m) / z);
      	else
      		tmp = Float64(Float64(Float64(-4.0 * Float64(Float64(t * z) * a)) + b) / Float64(z * c_m));
      	end
      	return Float64(c_s * tmp)
      end
      
      c\_m = N[Abs[c], $MachinePrecision]
      c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[a, -3.2e-30], N[(N[(N[(t / c$95$m), $MachinePrecision] * -4.0), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[a, 3.6e+38], N[(N[(N[(N[(9.0 * x), $MachinePrecision] * y + b), $MachinePrecision] / c$95$m), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(-4.0 * N[(N[(t * z), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
      
      \begin{array}{l}
      c\_m = \left|c\right|
      \\
      c\_s = \mathsf{copysign}\left(1, c\right)
      \\
      [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
      [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
      \\
      c\_s \cdot \begin{array}{l}
      \mathbf{if}\;a \leq -3.2 \cdot 10^{-30}:\\
      \;\;\;\;\left(\frac{t}{c\_m} \cdot -4\right) \cdot a\\
      
      \mathbf{elif}\;a \leq 3.6 \cdot 10^{+38}:\\
      \;\;\;\;\frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c\_m}}{z}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{-4 \cdot \left(\left(t \cdot z\right) \cdot a\right) + b}{z \cdot c\_m}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if a < -3.2e-30

        1. Initial program 76.5%

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

          \[\leadsto \color{blue}{a \cdot \left(-4 \cdot \frac{t}{c} + \left(9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)} + \frac{b}{a \cdot \left(c \cdot z\right)}\right)\right)} \]
        3. Step-by-step derivation
          1. *-commutativeN/A

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

            \[\leadsto \left(-4 \cdot \frac{t}{c} + \left(9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)} + \frac{b}{a \cdot \left(c \cdot z\right)}\right)\right) \cdot \color{blue}{a} \]
        4. Applied rewrites85.9%

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

          \[\leadsto \left(-4 \cdot \frac{t}{c}\right) \cdot a \]
        6. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
          2. lower-*.f64N/A

            \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
          3. lift-/.f6474.6

            \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
        7. Applied rewrites74.6%

          \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]

        if -3.2e-30 < a < 3.59999999999999969e38

        1. Initial program 80.3%

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

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

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

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

            \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
          4. +-commutativeN/A

            \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right) + b}{c}}{z} \]
          5. *-commutativeN/A

            \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9 + b}{c}}{z} \]
          6. lower-fma.f64N/A

            \[\leadsto \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z} \]
          7. *-commutativeN/A

            \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
          8. lower-*.f6473.0

            \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
        4. Applied rewrites73.0%

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

            \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
          2. *-commutativeN/A

            \[\leadsto \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z} \]
          3. lower-fma.f64N/A

            \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9 + b}{c}}{z} \]
          4. *-commutativeN/A

            \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right) + b}{c}}{z} \]
          5. associate-*r*N/A

            \[\leadsto \frac{\frac{\left(9 \cdot x\right) \cdot y + b}{c}}{z} \]
          6. lower-fma.f64N/A

            \[\leadsto \frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c}}{z} \]
          7. lower-*.f6472.9

            \[\leadsto \frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c}}{z} \]
        6. Applied rewrites72.9%

          \[\leadsto \frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c}}{z} \]

        if 3.59999999999999969e38 < a

        1. Initial program 78.2%

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

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

            \[\leadsto \frac{-4 \cdot \color{blue}{\left(a \cdot \left(t \cdot z\right)\right)} + b}{z \cdot c} \]
          2. *-commutativeN/A

            \[\leadsto \frac{-4 \cdot \left(\left(t \cdot z\right) \cdot \color{blue}{a}\right) + b}{z \cdot c} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{-4 \cdot \left(\left(t \cdot z\right) \cdot \color{blue}{a}\right) + b}{z \cdot c} \]
          4. lower-*.f6460.1

            \[\leadsto \frac{-4 \cdot \left(\left(t \cdot z\right) \cdot a\right) + b}{z \cdot c} \]
        4. Applied rewrites60.1%

          \[\leadsto \frac{\color{blue}{-4 \cdot \left(\left(t \cdot z\right) \cdot a\right)} + b}{z \cdot c} \]
      3. Recombined 3 regimes into one program.
      4. Add Preprocessing

      Alternative 12: 67.9% accurate, 1.0× speedup?

      \[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := \left(\frac{t}{c\_m} \cdot -4\right) \cdot a\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq -3.2 \cdot 10^{-30}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{+165}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c\_m}}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
      c\_m = (fabs.f64 c)
      c\_s = (copysign.f64 #s(literal 1 binary64) c)
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      (FPCore (c_s x y z t a b c_m)
       :precision binary64
       (let* ((t_1 (* (* (/ t c_m) -4.0) a)))
         (*
          c_s
          (if (<= a -3.2e-30)
            t_1
            (if (<= a 9.2e+165) (/ (/ (fma (* 9.0 x) y b) c_m) z) t_1)))))
      c\_m = fabs(c);
      c\_s = copysign(1.0, c);
      assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
      assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
      double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	double t_1 = ((t / c_m) * -4.0) * a;
      	double tmp;
      	if (a <= -3.2e-30) {
      		tmp = t_1;
      	} else if (a <= 9.2e+165) {
      		tmp = (fma((9.0 * x), y, b) / c_m) / z;
      	} else {
      		tmp = t_1;
      	}
      	return c_s * tmp;
      }
      
      c\_m = abs(c)
      c\_s = copysign(1.0, c)
      x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
      x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
      function code(c_s, x, y, z, t, a, b, c_m)
      	t_1 = Float64(Float64(Float64(t / c_m) * -4.0) * a)
      	tmp = 0.0
      	if (a <= -3.2e-30)
      		tmp = t_1;
      	elseif (a <= 9.2e+165)
      		tmp = Float64(Float64(fma(Float64(9.0 * x), y, b) / c_m) / z);
      	else
      		tmp = t_1;
      	end
      	return Float64(c_s * tmp)
      end
      
      c\_m = N[Abs[c], $MachinePrecision]
      c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(N[(t / c$95$m), $MachinePrecision] * -4.0), $MachinePrecision] * a), $MachinePrecision]}, N[(c$95$s * If[LessEqual[a, -3.2e-30], t$95$1, If[LessEqual[a, 9.2e+165], N[(N[(N[(N[(9.0 * x), $MachinePrecision] * y + b), $MachinePrecision] / c$95$m), $MachinePrecision] / z), $MachinePrecision], t$95$1]]), $MachinePrecision]]
      
      \begin{array}{l}
      c\_m = \left|c\right|
      \\
      c\_s = \mathsf{copysign}\left(1, c\right)
      \\
      [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
      [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
      \\
      \begin{array}{l}
      t_1 := \left(\frac{t}{c\_m} \cdot -4\right) \cdot a\\
      c\_s \cdot \begin{array}{l}
      \mathbf{if}\;a \leq -3.2 \cdot 10^{-30}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;a \leq 9.2 \cdot 10^{+165}:\\
      \;\;\;\;\frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c\_m}}{z}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if a < -3.2e-30 or 9.20000000000000063e165 < a

        1. Initial program 76.0%

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

          \[\leadsto \color{blue}{a \cdot \left(-4 \cdot \frac{t}{c} + \left(9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)} + \frac{b}{a \cdot \left(c \cdot z\right)}\right)\right)} \]
        3. Step-by-step derivation
          1. *-commutativeN/A

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

            \[\leadsto \left(-4 \cdot \frac{t}{c} + \left(9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)} + \frac{b}{a \cdot \left(c \cdot z\right)}\right)\right) \cdot \color{blue}{a} \]
        4. Applied rewrites83.0%

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

          \[\leadsto \left(-4 \cdot \frac{t}{c}\right) \cdot a \]
        6. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
          2. lower-*.f64N/A

            \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
          3. lift-/.f6464.9

            \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
        7. Applied rewrites64.9%

          \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]

        if -3.2e-30 < a < 9.20000000000000063e165

        1. Initial program 80.5%

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

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

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

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

            \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
          4. +-commutativeN/A

            \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right) + b}{c}}{z} \]
          5. *-commutativeN/A

            \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9 + b}{c}}{z} \]
          6. lower-fma.f64N/A

            \[\leadsto \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z} \]
          7. *-commutativeN/A

            \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
          8. lower-*.f6469.2

            \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
        4. Applied rewrites69.2%

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

            \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
          2. *-commutativeN/A

            \[\leadsto \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z} \]
          3. lower-fma.f64N/A

            \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9 + b}{c}}{z} \]
          4. *-commutativeN/A

            \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right) + b}{c}}{z} \]
          5. associate-*r*N/A

            \[\leadsto \frac{\frac{\left(9 \cdot x\right) \cdot y + b}{c}}{z} \]
          6. lower-fma.f64N/A

            \[\leadsto \frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c}}{z} \]
          7. lower-*.f6469.1

            \[\leadsto \frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c}}{z} \]
        6. Applied rewrites69.1%

          \[\leadsto \frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c}}{z} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 13: 67.5% accurate, 1.2× speedup?

      \[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := \left(\frac{t}{c\_m} \cdot -4\right) \cdot a\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq -3.2 \cdot 10^{-30}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{+165}:\\ \;\;\;\;\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{z \cdot c\_m}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
      c\_m = (fabs.f64 c)
      c\_s = (copysign.f64 #s(literal 1 binary64) c)
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      (FPCore (c_s x y z t a b c_m)
       :precision binary64
       (let* ((t_1 (* (* (/ t c_m) -4.0) a)))
         (*
          c_s
          (if (<= a -3.2e-30)
            t_1
            (if (<= a 9.2e+165) (/ (fma (* 9.0 x) y b) (* z c_m)) t_1)))))
      c\_m = fabs(c);
      c\_s = copysign(1.0, c);
      assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
      assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
      double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	double t_1 = ((t / c_m) * -4.0) * a;
      	double tmp;
      	if (a <= -3.2e-30) {
      		tmp = t_1;
      	} else if (a <= 9.2e+165) {
      		tmp = fma((9.0 * x), y, b) / (z * c_m);
      	} else {
      		tmp = t_1;
      	}
      	return c_s * tmp;
      }
      
      c\_m = abs(c)
      c\_s = copysign(1.0, c)
      x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
      x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
      function code(c_s, x, y, z, t, a, b, c_m)
      	t_1 = Float64(Float64(Float64(t / c_m) * -4.0) * a)
      	tmp = 0.0
      	if (a <= -3.2e-30)
      		tmp = t_1;
      	elseif (a <= 9.2e+165)
      		tmp = Float64(fma(Float64(9.0 * x), y, b) / Float64(z * c_m));
      	else
      		tmp = t_1;
      	end
      	return Float64(c_s * tmp)
      end
      
      c\_m = N[Abs[c], $MachinePrecision]
      c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(N[(t / c$95$m), $MachinePrecision] * -4.0), $MachinePrecision] * a), $MachinePrecision]}, N[(c$95$s * If[LessEqual[a, -3.2e-30], t$95$1, If[LessEqual[a, 9.2e+165], N[(N[(N[(9.0 * x), $MachinePrecision] * y + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], t$95$1]]), $MachinePrecision]]
      
      \begin{array}{l}
      c\_m = \left|c\right|
      \\
      c\_s = \mathsf{copysign}\left(1, c\right)
      \\
      [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
      [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
      \\
      \begin{array}{l}
      t_1 := \left(\frac{t}{c\_m} \cdot -4\right) \cdot a\\
      c\_s \cdot \begin{array}{l}
      \mathbf{if}\;a \leq -3.2 \cdot 10^{-30}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;a \leq 9.2 \cdot 10^{+165}:\\
      \;\;\;\;\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{z \cdot c\_m}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if a < -3.2e-30 or 9.20000000000000063e165 < a

        1. Initial program 76.0%

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

          \[\leadsto \color{blue}{a \cdot \left(-4 \cdot \frac{t}{c} + \left(9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)} + \frac{b}{a \cdot \left(c \cdot z\right)}\right)\right)} \]
        3. Step-by-step derivation
          1. *-commutativeN/A

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

            \[\leadsto \left(-4 \cdot \frac{t}{c} + \left(9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)} + \frac{b}{a \cdot \left(c \cdot z\right)}\right)\right) \cdot \color{blue}{a} \]
        4. Applied rewrites83.0%

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

          \[\leadsto \left(-4 \cdot \frac{t}{c}\right) \cdot a \]
        6. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
          2. lower-*.f64N/A

            \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
          3. lift-/.f6464.9

            \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
        7. Applied rewrites64.9%

          \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]

        if -3.2e-30 < a < 9.20000000000000063e165

        1. Initial program 80.5%

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

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

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

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

            \[\leadsto \frac{\mathsf{fma}\left(x \cdot y, \color{blue}{9}, b\right)}{z \cdot c} \]
          4. *-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z \cdot c} \]
          5. lower-*.f6468.6

            \[\leadsto \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z \cdot c} \]
        4. Applied rewrites68.6%

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

            \[\leadsto \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z \cdot c} \]
          2. *-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{z \cdot c} \]
          3. lower-fma.f64N/A

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

            \[\leadsto \frac{9 \cdot \left(x \cdot y\right) + b}{z \cdot c} \]
          5. associate-*r*N/A

            \[\leadsto \frac{\left(9 \cdot x\right) \cdot y + b}{z \cdot c} \]
          6. lower-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(9 \cdot x, \color{blue}{y}, b\right)}{z \cdot c} \]
          7. lower-*.f6468.6

            \[\leadsto \frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{z \cdot c} \]
        6. Applied rewrites68.6%

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

      Alternative 14: 50.4% accurate, 1.4× speedup?

      \[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := \left(\frac{t}{c\_m} \cdot -4\right) \cdot a\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{-44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-31}:\\ \;\;\;\;\frac{b}{z \cdot c\_m}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
      c\_m = (fabs.f64 c)
      c\_s = (copysign.f64 #s(literal 1 binary64) c)
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      (FPCore (c_s x y z t a b c_m)
       :precision binary64
       (let* ((t_1 (* (* (/ t c_m) -4.0) a)))
         (* c_s (if (<= t -2.6e-44) t_1 (if (<= t 6.5e-31) (/ b (* z c_m)) t_1)))))
      c\_m = fabs(c);
      c\_s = copysign(1.0, c);
      assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
      assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
      double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	double t_1 = ((t / c_m) * -4.0) * a;
      	double tmp;
      	if (t <= -2.6e-44) {
      		tmp = t_1;
      	} else if (t <= 6.5e-31) {
      		tmp = b / (z * c_m);
      	} else {
      		tmp = t_1;
      	}
      	return c_s * tmp;
      }
      
      c\_m =     private
      c\_s =     private
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      NOTE: x, y, z, t, a, b, and c_m 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(c_s, x, y, z, t, a, b, c_m)
      use fmin_fmax_functions
          real(8), intent (in) :: c_s
          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
          real(8), intent (in) :: b
          real(8), intent (in) :: c_m
          real(8) :: t_1
          real(8) :: tmp
          t_1 = ((t / c_m) * (-4.0d0)) * a
          if (t <= (-2.6d-44)) then
              tmp = t_1
          else if (t <= 6.5d-31) then
              tmp = b / (z * c_m)
          else
              tmp = t_1
          end if
          code = c_s * tmp
      end function
      
      c\_m = Math.abs(c);
      c\_s = Math.copySign(1.0, c);
      assert x < y && y < z && z < t && t < a && a < b && b < c_m;
      assert x < y && y < z && z < t && t < a && a < b && b < c_m;
      public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	double t_1 = ((t / c_m) * -4.0) * a;
      	double tmp;
      	if (t <= -2.6e-44) {
      		tmp = t_1;
      	} else if (t <= 6.5e-31) {
      		tmp = b / (z * c_m);
      	} else {
      		tmp = t_1;
      	}
      	return c_s * tmp;
      }
      
      c\_m = math.fabs(c)
      c\_s = math.copysign(1.0, c)
      [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
      [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
      def code(c_s, x, y, z, t, a, b, c_m):
      	t_1 = ((t / c_m) * -4.0) * a
      	tmp = 0
      	if t <= -2.6e-44:
      		tmp = t_1
      	elif t <= 6.5e-31:
      		tmp = b / (z * c_m)
      	else:
      		tmp = t_1
      	return c_s * tmp
      
      c\_m = abs(c)
      c\_s = copysign(1.0, c)
      x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
      x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
      function code(c_s, x, y, z, t, a, b, c_m)
      	t_1 = Float64(Float64(Float64(t / c_m) * -4.0) * a)
      	tmp = 0.0
      	if (t <= -2.6e-44)
      		tmp = t_1;
      	elseif (t <= 6.5e-31)
      		tmp = Float64(b / Float64(z * c_m));
      	else
      		tmp = t_1;
      	end
      	return Float64(c_s * tmp)
      end
      
      c\_m = abs(c);
      c\_s = sign(c) * abs(1.0);
      x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
      x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
      function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
      	t_1 = ((t / c_m) * -4.0) * a;
      	tmp = 0.0;
      	if (t <= -2.6e-44)
      		tmp = t_1;
      	elseif (t <= 6.5e-31)
      		tmp = b / (z * c_m);
      	else
      		tmp = t_1;
      	end
      	tmp_2 = c_s * tmp;
      end
      
      c\_m = N[Abs[c], $MachinePrecision]
      c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(N[(t / c$95$m), $MachinePrecision] * -4.0), $MachinePrecision] * a), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t, -2.6e-44], t$95$1, If[LessEqual[t, 6.5e-31], N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], t$95$1]]), $MachinePrecision]]
      
      \begin{array}{l}
      c\_m = \left|c\right|
      \\
      c\_s = \mathsf{copysign}\left(1, c\right)
      \\
      [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
      [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
      \\
      \begin{array}{l}
      t_1 := \left(\frac{t}{c\_m} \cdot -4\right) \cdot a\\
      c\_s \cdot \begin{array}{l}
      \mathbf{if}\;t \leq -2.6 \cdot 10^{-44}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t \leq 6.5 \cdot 10^{-31}:\\
      \;\;\;\;\frac{b}{z \cdot c\_m}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < -2.5999999999999998e-44 or 6.49999999999999967e-31 < t

        1. Initial program 74.3%

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

          \[\leadsto \color{blue}{a \cdot \left(-4 \cdot \frac{t}{c} + \left(9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)} + \frac{b}{a \cdot \left(c \cdot z\right)}\right)\right)} \]
        3. Step-by-step derivation
          1. *-commutativeN/A

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

            \[\leadsto \left(-4 \cdot \frac{t}{c} + \left(9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)} + \frac{b}{a \cdot \left(c \cdot z\right)}\right)\right) \cdot \color{blue}{a} \]
        4. Applied rewrites77.9%

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

          \[\leadsto \left(-4 \cdot \frac{t}{c}\right) \cdot a \]
        6. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
          2. lower-*.f64N/A

            \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
          3. lift-/.f6455.4

            \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]
        7. Applied rewrites55.4%

          \[\leadsto \left(\frac{t}{c} \cdot -4\right) \cdot a \]

        if -2.5999999999999998e-44 < t < 6.49999999999999967e-31

        1. Initial program 85.4%

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

          \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
        3. Step-by-step derivation
          1. Applied rewrites44.1%

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

        Alternative 15: 47.7% accurate, 1.4× speedup?

        \[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := -4 \cdot \frac{a \cdot t}{c\_m}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{-44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-31}:\\ \;\;\;\;\frac{b}{z \cdot c\_m}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
        c\_m = (fabs.f64 c)
        c\_s = (copysign.f64 #s(literal 1 binary64) c)
        NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
        NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
        (FPCore (c_s x y z t a b c_m)
         :precision binary64
         (let* ((t_1 (* -4.0 (/ (* a t) c_m))))
           (* c_s (if (<= t -2.6e-44) t_1 (if (<= t 6.5e-31) (/ b (* z c_m)) t_1)))))
        c\_m = fabs(c);
        c\_s = copysign(1.0, c);
        assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
        assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
        double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
        	double t_1 = -4.0 * ((a * t) / c_m);
        	double tmp;
        	if (t <= -2.6e-44) {
        		tmp = t_1;
        	} else if (t <= 6.5e-31) {
        		tmp = b / (z * c_m);
        	} else {
        		tmp = t_1;
        	}
        	return c_s * tmp;
        }
        
        c\_m =     private
        c\_s =     private
        NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
        NOTE: x, y, z, t, a, b, and c_m 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(c_s, x, y, z, t, a, b, c_m)
        use fmin_fmax_functions
            real(8), intent (in) :: c_s
            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
            real(8), intent (in) :: b
            real(8), intent (in) :: c_m
            real(8) :: t_1
            real(8) :: tmp
            t_1 = (-4.0d0) * ((a * t) / c_m)
            if (t <= (-2.6d-44)) then
                tmp = t_1
            else if (t <= 6.5d-31) then
                tmp = b / (z * c_m)
            else
                tmp = t_1
            end if
            code = c_s * tmp
        end function
        
        c\_m = Math.abs(c);
        c\_s = Math.copySign(1.0, c);
        assert x < y && y < z && z < t && t < a && a < b && b < c_m;
        assert x < y && y < z && z < t && t < a && a < b && b < c_m;
        public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
        	double t_1 = -4.0 * ((a * t) / c_m);
        	double tmp;
        	if (t <= -2.6e-44) {
        		tmp = t_1;
        	} else if (t <= 6.5e-31) {
        		tmp = b / (z * c_m);
        	} else {
        		tmp = t_1;
        	}
        	return c_s * tmp;
        }
        
        c\_m = math.fabs(c)
        c\_s = math.copysign(1.0, c)
        [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
        [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
        def code(c_s, x, y, z, t, a, b, c_m):
        	t_1 = -4.0 * ((a * t) / c_m)
        	tmp = 0
        	if t <= -2.6e-44:
        		tmp = t_1
        	elif t <= 6.5e-31:
        		tmp = b / (z * c_m)
        	else:
        		tmp = t_1
        	return c_s * tmp
        
        c\_m = abs(c)
        c\_s = copysign(1.0, c)
        x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
        x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
        function code(c_s, x, y, z, t, a, b, c_m)
        	t_1 = Float64(-4.0 * Float64(Float64(a * t) / c_m))
        	tmp = 0.0
        	if (t <= -2.6e-44)
        		tmp = t_1;
        	elseif (t <= 6.5e-31)
        		tmp = Float64(b / Float64(z * c_m));
        	else
        		tmp = t_1;
        	end
        	return Float64(c_s * tmp)
        end
        
        c\_m = abs(c);
        c\_s = sign(c) * abs(1.0);
        x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
        x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
        function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
        	t_1 = -4.0 * ((a * t) / c_m);
        	tmp = 0.0;
        	if (t <= -2.6e-44)
        		tmp = t_1;
        	elseif (t <= 6.5e-31)
        		tmp = b / (z * c_m);
        	else
        		tmp = t_1;
        	end
        	tmp_2 = c_s * tmp;
        end
        
        c\_m = N[Abs[c], $MachinePrecision]
        c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
        NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
        NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
        code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t, -2.6e-44], t$95$1, If[LessEqual[t, 6.5e-31], N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], t$95$1]]), $MachinePrecision]]
        
        \begin{array}{l}
        c\_m = \left|c\right|
        \\
        c\_s = \mathsf{copysign}\left(1, c\right)
        \\
        [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\\\
        [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
        \\
        \begin{array}{l}
        t_1 := -4 \cdot \frac{a \cdot t}{c\_m}\\
        c\_s \cdot \begin{array}{l}
        \mathbf{if}\;t \leq -2.6 \cdot 10^{-44}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \leq 6.5 \cdot 10^{-31}:\\
        \;\;\;\;\frac{b}{z \cdot c\_m}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if t < -2.5999999999999998e-44 or 6.49999999999999967e-31 < t

          1. Initial program 74.3%

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

            \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
          3. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
            2. lower-/.f64N/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
            3. lower-*.f6450.5

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
          4. Applied rewrites50.5%

            \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]

          if -2.5999999999999998e-44 < t < 6.49999999999999967e-31

          1. Initial program 85.4%

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

            \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
          3. Step-by-step derivation
            1. Applied rewrites44.1%

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

          Alternative 16: 35.7% accurate, 2.8× speedup?

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

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

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

              \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
            2. Add Preprocessing

            Developer Target 1: 80.5% accurate, 0.1× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{b}{c \cdot z}\\ t_2 := 4 \cdot \frac{a \cdot t}{c}\\ t_3 := \left(x \cdot 9\right) \cdot y\\ t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\ t_5 := \frac{t\_4}{z \cdot c}\\ t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\ \mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\ \;\;\;\;t\_6\\ \mathbf{elif}\;t\_5 < 0:\\ \;\;\;\;\frac{\frac{t\_4}{z}}{c}\\ \mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\ \;\;\;\;t\_6\\ \mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\ \;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\ \mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\ \;\;\;\;t\_6\\ \mathbf{else}:\\ \;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\ \end{array} \end{array} \]
            (FPCore (x y z t a b c)
             :precision binary64
             (let* ((t_1 (/ b (* c z)))
                    (t_2 (* 4.0 (/ (* a t) c)))
                    (t_3 (* (* x 9.0) y))
                    (t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
                    (t_5 (/ t_4 (* z c)))
                    (t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
               (if (< t_5 -1.100156740804105e-171)
                 t_6
                 (if (< t_5 0.0)
                   (/ (/ t_4 z) c)
                   (if (< t_5 1.1708877911747488e-53)
                     t_6
                     (if (< t_5 2.876823679546137e+130)
                       (- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
                       (if (< t_5 1.3838515042456319e+158)
                         t_6
                         (- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
            double code(double x, double y, double z, double t, double a, double b, double c) {
            	double t_1 = b / (c * z);
            	double t_2 = 4.0 * ((a * t) / c);
            	double t_3 = (x * 9.0) * y;
            	double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
            	double t_5 = t_4 / (z * c);
            	double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
            	double tmp;
            	if (t_5 < -1.100156740804105e-171) {
            		tmp = t_6;
            	} else if (t_5 < 0.0) {
            		tmp = (t_4 / z) / c;
            	} else if (t_5 < 1.1708877911747488e-53) {
            		tmp = t_6;
            	} else if (t_5 < 2.876823679546137e+130) {
            		tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
            	} else if (t_5 < 1.3838515042456319e+158) {
            		tmp = t_6;
            	} else {
            		tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
            	}
            	return tmp;
            }
            
            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, b, c)
            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
                real(8), intent (in) :: b
                real(8), intent (in) :: c
                real(8) :: t_1
                real(8) :: t_2
                real(8) :: t_3
                real(8) :: t_4
                real(8) :: t_5
                real(8) :: t_6
                real(8) :: tmp
                t_1 = b / (c * z)
                t_2 = 4.0d0 * ((a * t) / c)
                t_3 = (x * 9.0d0) * y
                t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
                t_5 = t_4 / (z * c)
                t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
                if (t_5 < (-1.100156740804105d-171)) then
                    tmp = t_6
                else if (t_5 < 0.0d0) then
                    tmp = (t_4 / z) / c
                else if (t_5 < 1.1708877911747488d-53) then
                    tmp = t_6
                else if (t_5 < 2.876823679546137d+130) then
                    tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
                else if (t_5 < 1.3838515042456319d+158) then
                    tmp = t_6
                else
                    tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a, double b, double c) {
            	double t_1 = b / (c * z);
            	double t_2 = 4.0 * ((a * t) / c);
            	double t_3 = (x * 9.0) * y;
            	double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
            	double t_5 = t_4 / (z * c);
            	double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
            	double tmp;
            	if (t_5 < -1.100156740804105e-171) {
            		tmp = t_6;
            	} else if (t_5 < 0.0) {
            		tmp = (t_4 / z) / c;
            	} else if (t_5 < 1.1708877911747488e-53) {
            		tmp = t_6;
            	} else if (t_5 < 2.876823679546137e+130) {
            		tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
            	} else if (t_5 < 1.3838515042456319e+158) {
            		tmp = t_6;
            	} else {
            		tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b, c):
            	t_1 = b / (c * z)
            	t_2 = 4.0 * ((a * t) / c)
            	t_3 = (x * 9.0) * y
            	t_4 = (t_3 - (((z * 4.0) * t) * a)) + b
            	t_5 = t_4 / (z * c)
            	t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c)
            	tmp = 0
            	if t_5 < -1.100156740804105e-171:
            		tmp = t_6
            	elif t_5 < 0.0:
            		tmp = (t_4 / z) / c
            	elif t_5 < 1.1708877911747488e-53:
            		tmp = t_6
            	elif t_5 < 2.876823679546137e+130:
            		tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2
            	elif t_5 < 1.3838515042456319e+158:
            		tmp = t_6
            	else:
            		tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2
            	return tmp
            
            function code(x, y, z, t, a, b, c)
            	t_1 = Float64(b / Float64(c * z))
            	t_2 = Float64(4.0 * Float64(Float64(a * t) / c))
            	t_3 = Float64(Float64(x * 9.0) * y)
            	t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b)
            	t_5 = Float64(t_4 / Float64(z * c))
            	t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c))
            	tmp = 0.0
            	if (t_5 < -1.100156740804105e-171)
            		tmp = t_6;
            	elseif (t_5 < 0.0)
            		tmp = Float64(Float64(t_4 / z) / c);
            	elseif (t_5 < 1.1708877911747488e-53)
            		tmp = t_6;
            	elseif (t_5 < 2.876823679546137e+130)
            		tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2);
            	elseif (t_5 < 1.3838515042456319e+158)
            		tmp = t_6;
            	else
            		tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b, c)
            	t_1 = b / (c * z);
            	t_2 = 4.0 * ((a * t) / c);
            	t_3 = (x * 9.0) * y;
            	t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
            	t_5 = t_4 / (z * c);
            	t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
            	tmp = 0.0;
            	if (t_5 < -1.100156740804105e-171)
            		tmp = t_6;
            	elseif (t_5 < 0.0)
            		tmp = (t_4 / z) / c;
            	elseif (t_5 < 1.1708877911747488e-53)
            		tmp = t_6;
            	elseif (t_5 < 2.876823679546137e+130)
            		tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
            	elseif (t_5 < 1.3838515042456319e+158)
            		tmp = t_6;
            	else
            		tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{b}{c \cdot z}\\
            t_2 := 4 \cdot \frac{a \cdot t}{c}\\
            t_3 := \left(x \cdot 9\right) \cdot y\\
            t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
            t_5 := \frac{t\_4}{z \cdot c}\\
            t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
            \mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\
            \;\;\;\;t\_6\\
            
            \mathbf{elif}\;t\_5 < 0:\\
            \;\;\;\;\frac{\frac{t\_4}{z}}{c}\\
            
            \mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\
            \;\;\;\;t\_6\\
            
            \mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\
            \;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\
            
            \mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\
            \;\;\;\;t\_6\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\
            
            
            \end{array}
            \end{array}
            

            Reproduce

            ?
            herbie shell --seed 2025095 
            (FPCore (x y z t a b c)
              :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, J"
              :precision binary64
            
              :alt
              (! :herbie-platform default (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) -220031348160821/200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 0) (/ (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 365902434742109/31250000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 28768236795461370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ (* (* 9 (/ y c)) (/ x z)) (/ b (* c z))) (* 4 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 138385150424563190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (- (+ (* 9 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4 (/ (* a t) c)))))))))
            
              (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))