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

Percentage Accurate: 80.1% → 92.3%
Time: 10.6s
Alternatives: 19
Speedup: 1.0×

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 19 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: 80.1% 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: 92.3% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+39}:\\ \;\;\;\;\mathsf{fma}\left(\frac{9 \cdot y}{c}, \frac{x}{z}, \frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{b}{z}\right)}{c}\right)\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-26}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(a \cdot \left(-4 \cdot z\right), t, \mathsf{fma}\left(y \cdot x, 9, b\right)\right)}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{z}\right)}{c}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (if (<= z -1.15e+39)
   (fma (/ (* 9.0 y) c) (/ x z) (/ (fma (* -4.0 a) t (/ b z)) c))
   (if (<= z 2.6e-26)
     (/ (/ (fma (* a (* -4.0 z)) t (fma (* y x) 9.0 b)) c) z)
     (/ (fma (* -4.0 t) a (/ (fma (* x y) 9.0 b) z)) c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (z <= -1.15e+39) {
		tmp = fma(((9.0 * y) / c), (x / z), (fma((-4.0 * a), t, (b / z)) / c));
	} else if (z <= 2.6e-26) {
		tmp = (fma((a * (-4.0 * z)), t, fma((y * x), 9.0, b)) / c) / z;
	} else {
		tmp = fma((-4.0 * t), a, (fma((x * y), 9.0, b) / z)) / c;
	}
	return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (z <= -1.15e+39)
		tmp = fma(Float64(Float64(9.0 * y) / c), Float64(x / z), Float64(fma(Float64(-4.0 * a), t, Float64(b / z)) / c));
	elseif (z <= 2.6e-26)
		tmp = Float64(Float64(fma(Float64(a * Float64(-4.0 * z)), t, fma(Float64(y * x), 9.0, b)) / c) / z);
	else
		tmp = Float64(fma(Float64(-4.0 * t), a, Float64(fma(Float64(x * y), 9.0, b) / z)) / c);
	end
	return tmp
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -1.15e+39], N[(N[(N[(9.0 * y), $MachinePrecision] / c), $MachinePrecision] * N[(x / z), $MachinePrecision] + N[(N[(N[(-4.0 * a), $MachinePrecision] * t + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e-26], N[(N[(N[(N[(a * N[(-4.0 * z), $MachinePrecision]), $MachinePrecision] * t + N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(-4.0 * t), $MachinePrecision] * a + N[(N[(N[(x * y), $MachinePrecision] * 9.0 + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+39}:\\
\;\;\;\;\mathsf{fma}\left(\frac{9 \cdot y}{c}, \frac{x}{z}, \frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{b}{z}\right)}{c}\right)\\

\mathbf{elif}\;z \leq 2.6 \cdot 10^{-26}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(a \cdot \left(-4 \cdot z\right), t, \mathsf{fma}\left(y \cdot x, 9, b\right)\right)}{c}}{z}\\

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


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

    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. Step-by-step derivation
      1. 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}} \]
      2. 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}} \]
      3. *-commutativeN/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}{c \cdot z}} \]
      4. 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}{c}}{z}} \]
      5. 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}{c}}{z}} \]
    3. Applied rewrites80.6%

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

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

    if -1.15000000000000006e39 < z < 2.6000000000000001e-26

    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. Step-by-step derivation
      1. 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}} \]
      2. 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}} \]
      3. *-commutativeN/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}{c \cdot z}} \]
      4. 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}{c}}{z}} \]
      5. 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}{c}}{z}} \]
    3. Applied rewrites80.6%

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

    if 2.6000000000000001e-26 < z

    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. Step-by-step derivation
      1. 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}} \]
      2. 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}} \]
      3. *-commutativeN/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}{c \cdot z}} \]
      4. 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}{c}}{z}} \]
      5. 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}{c}}{z}} \]
    3. Applied rewrites80.6%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 91.9% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{z}\right)}{c}\\ \mathbf{if}\;z \leq -2 \cdot 10^{-5}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-26}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(a \cdot \left(-4 \cdot z\right), t, \mathsf{fma}\left(y \cdot x, 9, b\right)\right)}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (/ (fma (* -4.0 t) a (/ (fma (* x y) 9.0 b) z)) c)))
   (if (<= z -2e-5)
     t_1
     (if (<= z 2.6e-26)
       (/ (/ (fma (* a (* -4.0 z)) t (fma (* y x) 9.0 b)) c) z)
       t_1))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = fma((-4.0 * t), a, (fma((x * y), 9.0, b) / z)) / c;
	double tmp;
	if (z <= -2e-5) {
		tmp = t_1;
	} else if (z <= 2.6e-26) {
		tmp = (fma((a * (-4.0 * z)), t, fma((y * x), 9.0, b)) / c) / z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	t_1 = Float64(fma(Float64(-4.0 * t), a, Float64(fma(Float64(x * y), 9.0, b) / z)) / c)
	tmp = 0.0
	if (z <= -2e-5)
		tmp = t_1;
	elseif (z <= 2.6e-26)
		tmp = Float64(Float64(fma(Float64(a * Float64(-4.0 * z)), t, fma(Float64(y * x), 9.0, b)) / c) / z);
	else
		tmp = t_1;
	end
	return tmp
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(-4.0 * t), $MachinePrecision] * a + N[(N[(N[(x * y), $MachinePrecision] * 9.0 + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -2e-5], t$95$1, If[LessEqual[z, 2.6e-26], N[(N[(N[(N[(a * N[(-4.0 * z), $MachinePrecision]), $MachinePrecision] * t + N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{z}\right)}{c}\\
\mathbf{if}\;z \leq -2 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.6 \cdot 10^{-26}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(a \cdot \left(-4 \cdot z\right), t, \mathsf{fma}\left(y \cdot x, 9, b\right)\right)}{c}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.00000000000000016e-5 or 2.6000000000000001e-26 < z

    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. Step-by-step derivation
      1. 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}} \]
      2. 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}} \]
      3. *-commutativeN/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}{c \cdot z}} \]
      4. 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}{c}}{z}} \]
      5. 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}{c}}{z}} \]
    3. Applied rewrites80.6%

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

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

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

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

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

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

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

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

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

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

    if -2.00000000000000016e-5 < z < 2.6000000000000001e-26

    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. Step-by-step derivation
      1. 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}} \]
      2. 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}} \]
      3. *-commutativeN/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}{c \cdot z}} \]
      4. 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}{c}}{z}} \]
      5. 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}{c}}{z}} \]
    3. Applied rewrites80.6%

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

Alternative 3: 90.6% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;c \leq 8.5 \cdot 10^{+68}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{z}\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot -4, \frac{a}{c}, \frac{\mathsf{fma}\left(x \cdot 9, y, b\right)}{c \cdot z}\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (if (<= c 8.5e+68)
   (/ (fma (* -4.0 t) a (/ (fma (* x y) 9.0 b) z)) c)
   (fma (* t -4.0) (/ a c) (/ (fma (* x 9.0) y b) (* c z)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (c <= 8.5e+68) {
		tmp = fma((-4.0 * t), a, (fma((x * y), 9.0, b) / z)) / c;
	} else {
		tmp = fma((t * -4.0), (a / c), (fma((x * 9.0), y, b) / (c * z)));
	}
	return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (c <= 8.5e+68)
		tmp = Float64(fma(Float64(-4.0 * t), a, Float64(fma(Float64(x * y), 9.0, b) / z)) / c);
	else
		tmp = fma(Float64(t * -4.0), Float64(a / c), Float64(fma(Float64(x * 9.0), y, b) / Float64(c * z)));
	end
	return tmp
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 8.5e+68], N[(N[(N[(-4.0 * t), $MachinePrecision] * a + N[(N[(N[(x * y), $MachinePrecision] * 9.0 + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(t * -4.0), $MachinePrecision] * N[(a / c), $MachinePrecision] + N[(N[(N[(x * 9.0), $MachinePrecision] * y + b), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq 8.5 \cdot 10^{+68}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{z}\right)}{c}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < 8.49999999999999966e68

    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. Step-by-step derivation
      1. 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}} \]
      2. 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}} \]
      3. *-commutativeN/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}{c \cdot z}} \]
      4. 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}{c}}{z}} \]
      5. 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}{c}}{z}} \]
    3. Applied rewrites80.6%

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

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

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

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

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

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

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

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

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

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

    if 8.49999999999999966e68 < c

    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. Step-by-step derivation
      1. 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}} \]
      2. 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}} \]
      3. *-commutativeN/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}{c \cdot z}} \]
      4. 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}{c}}{z}} \]
      5. 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}{c}}{z}} \]
    3. Applied rewrites80.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot -4, \frac{a}{c}, \frac{\frac{\color{blue}{\left(9 \cdot y\right) \cdot x + b}}{z}}{c}\right) \]
      12. add-flipN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot -4, \frac{a}{c}, \frac{\frac{\color{blue}{\left(y \cdot x\right) \cdot 9} - \left(\mathsf{neg}\left(b\right)\right)}{z}}{c}\right) \]
      16. add-flipN/A

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

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

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

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

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

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

Alternative 4: 90.5% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{+51}:\\ \;\;\;\;\mathsf{fma}\left(a \cdot -4, t, \frac{\mathsf{fma}\left(x \cdot 9, y, b\right)}{z}\right) \cdot \frac{1}{c}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-21}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y \cdot x, 9, \mathsf{fma}\left(-4, \left(a \cdot t\right) \cdot z, b\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{z}\right)}{c}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (if (<= z -4.6e+51)
   (* (fma (* a -4.0) t (/ (fma (* x 9.0) y b) z)) (/ 1.0 c))
   (if (<= z 3.2e-21)
     (/ (fma (* y x) 9.0 (fma -4.0 (* (* a t) z) b)) (* z c))
     (/ (fma (* -4.0 t) a (/ (fma (* x y) 9.0 b) z)) c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (z <= -4.6e+51) {
		tmp = fma((a * -4.0), t, (fma((x * 9.0), y, b) / z)) * (1.0 / c);
	} else if (z <= 3.2e-21) {
		tmp = fma((y * x), 9.0, fma(-4.0, ((a * t) * z), b)) / (z * c);
	} else {
		tmp = fma((-4.0 * t), a, (fma((x * y), 9.0, b) / z)) / c;
	}
	return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (z <= -4.6e+51)
		tmp = Float64(fma(Float64(a * -4.0), t, Float64(fma(Float64(x * 9.0), y, b) / z)) * Float64(1.0 / c));
	elseif (z <= 3.2e-21)
		tmp = Float64(fma(Float64(y * x), 9.0, fma(-4.0, Float64(Float64(a * t) * z), b)) / Float64(z * c));
	else
		tmp = Float64(fma(Float64(-4.0 * t), a, Float64(fma(Float64(x * y), 9.0, b) / z)) / c);
	end
	return tmp
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -4.6e+51], N[(N[(N[(a * -4.0), $MachinePrecision] * t + N[(N[(N[(x * 9.0), $MachinePrecision] * y + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e-21], N[(N[(N[(y * x), $MachinePrecision] * 9.0 + N[(-4.0 * N[(N[(a * t), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-4.0 * t), $MachinePrecision] * a + N[(N[(N[(x * y), $MachinePrecision] * 9.0 + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+51}:\\
\;\;\;\;\mathsf{fma}\left(a \cdot -4, t, \frac{\mathsf{fma}\left(x \cdot 9, y, b\right)}{z}\right) \cdot \frac{1}{c}\\

\mathbf{elif}\;z \leq 3.2 \cdot 10^{-21}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y \cdot x, 9, \mathsf{fma}\left(-4, \left(a \cdot t\right) \cdot z, b\right)\right)}{z \cdot c}\\

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


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

    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. Step-by-step derivation
      1. 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}} \]
      2. 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}} \]
      3. *-commutativeN/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}{c \cdot z}} \]
      4. 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}{c}}{z}} \]
      5. 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}{c}}{z}} \]
    3. Applied rewrites80.6%

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

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

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

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

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

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

    if -4.6000000000000001e51 < z < 3.2000000000000002e-21

    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. Step-by-step derivation
      1. 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} \]
      2. 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} \]
      3. associate-+l-N/A

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

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\mathsf{neg}\left(\left(b - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)\right)\right)}}{z \cdot c} \]
      5. add-flip-revN/A

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(y \cdot x\right) \cdot 9 + \color{blue}{\left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a + b\right)}}{z \cdot c} \]
      13. add-flip-revN/A

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{y \cdot x}, 9, \left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)\right)}{z \cdot c} \]
      16. add-flip-revN/A

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

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

    if 3.2000000000000002e-21 < z

    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. Step-by-step derivation
      1. 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}} \]
      2. 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}} \]
      3. *-commutativeN/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}{c \cdot z}} \]
      4. 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}{c}}{z}} \]
      5. 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}{c}}{z}} \]
    3. Applied rewrites80.6%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 88.9% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{z}\right)}{c}\\ \mathbf{if}\;z \leq -8.6 \cdot 10^{+45}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-21}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y \cdot x, 9, \mathsf{fma}\left(-4, \left(a \cdot t\right) \cdot z, b\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (/ (fma (* -4.0 t) a (/ (fma (* x y) 9.0 b) z)) c)))
   (if (<= z -8.6e+45)
     t_1
     (if (<= z 3.2e-21)
       (/ (fma (* y x) 9.0 (fma -4.0 (* (* a t) z) b)) (* z c))
       t_1))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = fma((-4.0 * t), a, (fma((x * y), 9.0, b) / z)) / c;
	double tmp;
	if (z <= -8.6e+45) {
		tmp = t_1;
	} else if (z <= 3.2e-21) {
		tmp = fma((y * x), 9.0, fma(-4.0, ((a * t) * z), b)) / (z * c);
	} else {
		tmp = t_1;
	}
	return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	t_1 = Float64(fma(Float64(-4.0 * t), a, Float64(fma(Float64(x * y), 9.0, b) / z)) / c)
	tmp = 0.0
	if (z <= -8.6e+45)
		tmp = t_1;
	elseif (z <= 3.2e-21)
		tmp = Float64(fma(Float64(y * x), 9.0, fma(-4.0, Float64(Float64(a * t) * z), b)) / Float64(z * c));
	else
		tmp = t_1;
	end
	return tmp
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(-4.0 * t), $MachinePrecision] * a + N[(N[(N[(x * y), $MachinePrecision] * 9.0 + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -8.6e+45], t$95$1, If[LessEqual[z, 3.2e-21], N[(N[(N[(y * x), $MachinePrecision] * 9.0 + N[(-4.0 * N[(N[(a * t), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{z}\right)}{c}\\
\mathbf{if}\;z \leq -8.6 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.2 \cdot 10^{-21}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y \cdot x, 9, \mathsf{fma}\left(-4, \left(a \cdot t\right) \cdot z, b\right)\right)}{z \cdot c}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.6000000000000006e45 or 3.2000000000000002e-21 < z

    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. Step-by-step derivation
      1. 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}} \]
      2. 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}} \]
      3. *-commutativeN/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}{c \cdot z}} \]
      4. 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}{c}}{z}} \]
      5. 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}{c}}{z}} \]
    3. Applied rewrites80.6%

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

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

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

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

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

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

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

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

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

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

    if -8.6000000000000006e45 < z < 3.2000000000000002e-21

    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. Step-by-step derivation
      1. 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} \]
      2. 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} \]
      3. associate-+l-N/A

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

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\mathsf{neg}\left(\left(b - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)\right)\right)}}{z \cdot c} \]
      5. add-flip-revN/A

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(y \cdot x\right) \cdot 9 + \color{blue}{\left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a + b\right)}}{z \cdot c} \]
      13. add-flip-revN/A

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{y \cdot x}, 9, \left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)\right)}{z \cdot c} \]
      16. add-flip-revN/A

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

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

Alternative 6: 87.6% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq 2.7 \cdot 10^{+55}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{z}\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x \cdot 9\right) \cdot \frac{y}{c}}{z}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (if (<= x 2.7e+55)
   (/ (fma (* -4.0 t) a (/ (fma (* x y) 9.0 b) z)) c)
   (/ (* (* x 9.0) (/ y c)) z)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (x <= 2.7e+55) {
		tmp = fma((-4.0 * t), a, (fma((x * y), 9.0, b) / z)) / c;
	} else {
		tmp = ((x * 9.0) * (y / c)) / z;
	}
	return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (x <= 2.7e+55)
		tmp = Float64(fma(Float64(-4.0 * t), a, Float64(fma(Float64(x * y), 9.0, b) / z)) / c);
	else
		tmp = Float64(Float64(Float64(x * 9.0) * Float64(y / c)) / z);
	end
	return tmp
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[x, 2.7e+55], N[(N[(N[(-4.0 * t), $MachinePrecision] * a + N[(N[(N[(x * y), $MachinePrecision] * 9.0 + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(N[(x * 9.0), $MachinePrecision] * N[(y / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.7 \cdot 10^{+55}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{z}\right)}{c}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 2.69999999999999977e55

    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. Step-by-step derivation
      1. 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}} \]
      2. 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}} \]
      3. *-commutativeN/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}{c \cdot z}} \]
      4. 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}{c}}{z}} \]
      5. 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}{c}}{z}} \]
    3. Applied rewrites80.6%

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

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

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

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

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

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

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

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

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

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

    if 2.69999999999999977e55 < x

    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. Step-by-step derivation
      1. 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}} \]
      2. 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}} \]
      3. *-commutativeN/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}{c \cdot z}} \]
      4. 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}{c}}{z}} \]
      5. 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}{c}}{z}} \]
    3. Applied rewrites80.6%

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

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

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

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

        \[\leadsto \frac{9 \cdot \frac{x \cdot y}{c}}{z} \]
    6. Applied rewrites35.6%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot \frac{\color{blue}{y}}{c}}{z} \]
      9. lower-/.f6436.5

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot \frac{y}{\color{blue}{c}}}{z} \]
    8. Applied rewrites36.5%

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

Alternative 7: 87.6% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq 2.7 \cdot 10^{+55}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{\mathsf{fma}\left(9 \cdot y, x, b\right)}{z}\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x \cdot 9\right) \cdot \frac{y}{c}}{z}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (if (<= x 2.7e+55)
   (/ (fma (* -4.0 t) a (/ (fma (* 9.0 y) x b) z)) c)
   (/ (* (* x 9.0) (/ y c)) z)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (x <= 2.7e+55) {
		tmp = fma((-4.0 * t), a, (fma((9.0 * y), x, b) / z)) / c;
	} else {
		tmp = ((x * 9.0) * (y / c)) / z;
	}
	return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (x <= 2.7e+55)
		tmp = Float64(fma(Float64(-4.0 * t), a, Float64(fma(Float64(9.0 * y), x, b) / z)) / c);
	else
		tmp = Float64(Float64(Float64(x * 9.0) * Float64(y / c)) / z);
	end
	return tmp
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[x, 2.7e+55], N[(N[(N[(-4.0 * t), $MachinePrecision] * a + N[(N[(N[(9.0 * y), $MachinePrecision] * x + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(N[(x * 9.0), $MachinePrecision] * N[(y / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.7 \cdot 10^{+55}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{\mathsf{fma}\left(9 \cdot y, x, b\right)}{z}\right)}{c}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 2.69999999999999977e55

    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. Step-by-step derivation
      1. 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}} \]
      2. 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}} \]
      3. *-commutativeN/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}{c \cdot z}} \]
      4. 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}{c}}{z}} \]
      5. 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}{c}}{z}} \]
    3. Applied rewrites80.6%

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

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

    if 2.69999999999999977e55 < x

    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. Step-by-step derivation
      1. 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}} \]
      2. 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}} \]
      3. *-commutativeN/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}{c \cdot z}} \]
      4. 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}{c}}{z}} \]
      5. 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}{c}}{z}} \]
    3. Applied rewrites80.6%

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

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

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

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

        \[\leadsto \frac{9 \cdot \frac{x \cdot y}{c}}{z} \]
    6. Applied rewrites35.6%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot \frac{\color{blue}{y}}{c}}{z} \]
      9. lower-/.f6436.5

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot \frac{y}{\color{blue}{c}}}{z} \]
    8. Applied rewrites36.5%

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

Alternative 8: 76.4% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-118}:\\ \;\;\;\;\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+62}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{b}{z}\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{y}{z} \cdot \left(9 \cdot x\right)\right)}{c}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* (* x 9.0) y)))
   (if (<= t_1 -1e-118)
     (/ (/ (+ b (* 9.0 (* x y))) c) z)
     (if (<= t_1 2e+62)
       (/ (fma (* -4.0 t) a (/ b z)) c)
       (/ (fma (* -4.0 t) a (* (/ y z) (* 9.0 x))) c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (x * 9.0) * y;
	double tmp;
	if (t_1 <= -1e-118) {
		tmp = ((b + (9.0 * (x * y))) / c) / z;
	} else if (t_1 <= 2e+62) {
		tmp = fma((-4.0 * t), a, (b / z)) / c;
	} else {
		tmp = fma((-4.0 * t), a, ((y / z) * (9.0 * x))) / c;
	}
	return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(x * 9.0) * y)
	tmp = 0.0
	if (t_1 <= -1e-118)
		tmp = Float64(Float64(Float64(b + Float64(9.0 * Float64(x * y))) / c) / z);
	elseif (t_1 <= 2e+62)
		tmp = Float64(fma(Float64(-4.0 * t), a, Float64(b / z)) / c);
	else
		tmp = Float64(fma(Float64(-4.0 * t), a, Float64(Float64(y / z) * Float64(9.0 * x))) / c);
	end
	return tmp
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-118], N[(N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 2e+62], N[(N[(N[(-4.0 * t), $MachinePrecision] * a + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(N[(-4.0 * t), $MachinePrecision] * a + N[(N[(y / z), $MachinePrecision] * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-118}:\\
\;\;\;\;\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z}\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+62}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{b}{z}\right)}{c}\\

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


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

    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. Step-by-step derivation
      1. 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}} \]
      2. 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}} \]
      3. *-commutativeN/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}{c \cdot z}} \]
      4. 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}{c}}{z}} \]
      5. 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}{c}}{z}} \]
    3. Applied rewrites80.6%

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

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

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

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

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      4. lower-*.f6461.3

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
    6. Applied rewrites61.3%

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

    if -9.99999999999999985e-119 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.00000000000000007e62

    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. Step-by-step derivation
      1. 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}} \]
      2. 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}} \]
      3. *-commutativeN/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}{c \cdot z}} \]
      4. 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}{c}}{z}} \]
      5. 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}{c}}{z}} \]
    3. Applied rewrites80.6%

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

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

      \[\leadsto \frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{\color{blue}{b}}{z}\right)}{c} \]
    6. Step-by-step derivation
      1. Applied rewrites63.4%

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

      if 2.00000000000000007e62 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

      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 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. lower-/.f64N/A

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

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

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

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

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

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

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
        8. lower-*.f6456.5

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

        \[\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}} \]
      5. Applied rewrites65.0%

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

    Alternative 9: 75.9% accurate, 0.6× speedup?

    \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+294}:\\ \;\;\;\;y \cdot \frac{9 \cdot \frac{x}{z}}{c}\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-118}:\\ \;\;\;\;\frac{\mathsf{fma}\left(9, y \cdot x, b\right)}{z \cdot c}\\ \mathbf{elif}\;t\_1 \leq 10^{+142}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{b}{z}\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x \cdot 9\right) \cdot \frac{y}{c}}{z}\\ \end{array} \end{array} \]
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    (FPCore (x y z t a b c)
     :precision binary64
     (let* ((t_1 (* (* x 9.0) y)))
       (if (<= t_1 -2e+294)
         (* y (/ (* 9.0 (/ x z)) c))
         (if (<= t_1 -1e-118)
           (/ (fma 9.0 (* y x) b) (* z c))
           (if (<= t_1 1e+142)
             (/ (fma (* -4.0 t) a (/ b z)) c)
             (/ (* (* x 9.0) (/ y c)) z))))))
    assert(x < y && y < z && z < t && t < a && a < b && b < c);
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = (x * 9.0) * y;
    	double tmp;
    	if (t_1 <= -2e+294) {
    		tmp = y * ((9.0 * (x / z)) / c);
    	} else if (t_1 <= -1e-118) {
    		tmp = fma(9.0, (y * x), b) / (z * c);
    	} else if (t_1 <= 1e+142) {
    		tmp = fma((-4.0 * t), a, (b / z)) / c;
    	} else {
    		tmp = ((x * 9.0) * (y / c)) / z;
    	}
    	return tmp;
    }
    
    x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
    function code(x, y, z, t, a, b, c)
    	t_1 = Float64(Float64(x * 9.0) * y)
    	tmp = 0.0
    	if (t_1 <= -2e+294)
    		tmp = Float64(y * Float64(Float64(9.0 * Float64(x / z)) / c));
    	elseif (t_1 <= -1e-118)
    		tmp = Float64(fma(9.0, Float64(y * x), b) / Float64(z * c));
    	elseif (t_1 <= 1e+142)
    		tmp = Float64(fma(Float64(-4.0 * t), a, Float64(b / z)) / c);
    	else
    		tmp = Float64(Float64(Float64(x * 9.0) * Float64(y / c)) / z);
    	end
    	return tmp
    end
    
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+294], N[(y * N[(N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-118], N[(N[(9.0 * N[(y * x), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+142], N[(N[(N[(-4.0 * t), $MachinePrecision] * a + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(N[(x * 9.0), $MachinePrecision] * N[(y / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]]]
    
    \begin{array}{l}
    [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
    \\
    \begin{array}{l}
    t_1 := \left(x \cdot 9\right) \cdot y\\
    \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+294}:\\
    \;\;\;\;y \cdot \frac{9 \cdot \frac{x}{z}}{c}\\
    
    \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-118}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(9, y \cdot x, b\right)}{z \cdot c}\\
    
    \mathbf{elif}\;t\_1 \leq 10^{+142}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{b}{z}\right)}{c}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\left(x \cdot 9\right) \cdot \frac{y}{c}}{z}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2.00000000000000013e294

      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. Step-by-step derivation
        1. 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}} \]
        2. 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}} \]
        3. *-commutativeN/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}{c \cdot z}} \]
        4. 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}{c}}{z}} \]
        5. 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}{c}}{z}} \]
      3. Applied rewrites80.6%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto 9 \cdot \frac{x \cdot y}{z \cdot \color{blue}{c}} \]
        5. associate-/r*N/A

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

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{\color{blue}{c}} \]
        7. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto y \cdot \frac{9 \cdot \frac{x}{z}}{c} \]
        21. lower-/.f6436.4

          \[\leadsto y \cdot \frac{9 \cdot \frac{x}{z}}{c} \]
      8. Applied rewrites36.4%

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

      if -2.00000000000000013e294 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.99999999999999985e-119

      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 \frac{\color{blue}{b + 9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
      3. Step-by-step derivation
        1. lower-+.f64N/A

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

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

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

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

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

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

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

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

          \[\leadsto \frac{b + \left(x \cdot 9\right) \cdot y}{z \cdot c} \]
        6. lift-*.f6460.8

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

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

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

          \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}}{z \cdot c} \]
        10. sub-flipN/A

          \[\leadsto \frac{\left(x \cdot 9\right) \cdot y + \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right)\right)\right)}}{z \cdot c} \]
        11. remove-double-negN/A

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

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

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

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

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

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

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

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) + b}{z \cdot c} \]
        19. lower-fma.f6460.8

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

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

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

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

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

      if -9.99999999999999985e-119 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.00000000000000005e142

      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. Step-by-step derivation
        1. 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}} \]
        2. 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}} \]
        3. *-commutativeN/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}{c \cdot z}} \]
        4. 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}{c}}{z}} \]
        5. 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}{c}}{z}} \]
      3. Applied rewrites80.6%

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

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

        \[\leadsto \frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{\color{blue}{b}}{z}\right)}{c} \]
      6. Step-by-step derivation
        1. Applied rewrites63.4%

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

        if 1.00000000000000005e142 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

        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. Step-by-step derivation
          1. 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}} \]
          2. 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}} \]
          3. *-commutativeN/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}{c \cdot z}} \]
          4. 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}{c}}{z}} \]
          5. 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}{c}}{z}} \]
        3. Applied rewrites80.6%

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

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

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

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

            \[\leadsto \frac{9 \cdot \frac{x \cdot y}{c}}{z} \]
        6. Applied rewrites35.6%

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\left(x \cdot 9\right) \cdot \frac{\color{blue}{y}}{c}}{z} \]
          9. lower-/.f6436.5

            \[\leadsto \frac{\left(x \cdot 9\right) \cdot \frac{y}{\color{blue}{c}}}{z} \]
        8. Applied rewrites36.5%

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

      Alternative 10: 74.6% accurate, 0.8× speedup?

      \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-118}:\\ \;\;\;\;\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z}\\ \mathbf{elif}\;t\_1 \leq 10^{+142}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{b}{z}\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(x \cdot 9\right) \cdot \frac{y}{c}}{z}\\ \end{array} \end{array} \]
      NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
      (FPCore (x y z t a b c)
       :precision binary64
       (let* ((t_1 (* (* x 9.0) y)))
         (if (<= t_1 -1e-118)
           (/ (/ (+ b (* 9.0 (* x y))) c) z)
           (if (<= t_1 1e+142)
             (/ (fma (* -4.0 t) a (/ b z)) c)
             (/ (* (* x 9.0) (/ y c)) z)))))
      assert(x < y && y < z && z < t && t < a && a < b && b < c);
      double code(double x, double y, double z, double t, double a, double b, double c) {
      	double t_1 = (x * 9.0) * y;
      	double tmp;
      	if (t_1 <= -1e-118) {
      		tmp = ((b + (9.0 * (x * y))) / c) / z;
      	} else if (t_1 <= 1e+142) {
      		tmp = fma((-4.0 * t), a, (b / z)) / c;
      	} else {
      		tmp = ((x * 9.0) * (y / c)) / z;
      	}
      	return tmp;
      }
      
      x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
      function code(x, y, z, t, a, b, c)
      	t_1 = Float64(Float64(x * 9.0) * y)
      	tmp = 0.0
      	if (t_1 <= -1e-118)
      		tmp = Float64(Float64(Float64(b + Float64(9.0 * Float64(x * y))) / c) / z);
      	elseif (t_1 <= 1e+142)
      		tmp = Float64(fma(Float64(-4.0 * t), a, Float64(b / z)) / c);
      	else
      		tmp = Float64(Float64(Float64(x * 9.0) * Float64(y / c)) / z);
      	end
      	return tmp
      end
      
      NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
      code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-118], N[(N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 1e+142], N[(N[(N[(-4.0 * t), $MachinePrecision] * a + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(N[(x * 9.0), $MachinePrecision] * N[(y / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]]
      
      \begin{array}{l}
      [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
      \\
      \begin{array}{l}
      t_1 := \left(x \cdot 9\right) \cdot y\\
      \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-118}:\\
      \;\;\;\;\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z}\\
      
      \mathbf{elif}\;t\_1 \leq 10^{+142}:\\
      \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{b}{z}\right)}{c}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\left(x \cdot 9\right) \cdot \frac{y}{c}}{z}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.99999999999999985e-119

        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. Step-by-step derivation
          1. 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}} \]
          2. 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}} \]
          3. *-commutativeN/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}{c \cdot z}} \]
          4. 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}{c}}{z}} \]
          5. 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}{c}}{z}} \]
        3. Applied rewrites80.6%

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

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

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

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

            \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
          4. lower-*.f6461.3

            \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
        6. Applied rewrites61.3%

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

        if -9.99999999999999985e-119 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.00000000000000005e142

        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. Step-by-step derivation
          1. 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}} \]
          2. 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}} \]
          3. *-commutativeN/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}{c \cdot z}} \]
          4. 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}{c}}{z}} \]
          5. 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}{c}}{z}} \]
        3. Applied rewrites80.6%

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

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

          \[\leadsto \frac{\mathsf{fma}\left(-4 \cdot t, a, \frac{\color{blue}{b}}{z}\right)}{c} \]
        6. Step-by-step derivation
          1. Applied rewrites63.4%

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

          if 1.00000000000000005e142 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

          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. Step-by-step derivation
            1. 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}} \]
            2. 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}} \]
            3. *-commutativeN/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}{c \cdot z}} \]
            4. 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}{c}}{z}} \]
            5. 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}{c}}{z}} \]
          3. Applied rewrites80.6%

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

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

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

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

              \[\leadsto \frac{9 \cdot \frac{x \cdot y}{c}}{z} \]
          6. Applied rewrites35.6%

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\left(x \cdot 9\right) \cdot \frac{\color{blue}{y}}{c}}{z} \]
            9. lower-/.f6436.5

              \[\leadsto \frac{\left(x \cdot 9\right) \cdot \frac{y}{\color{blue}{c}}}{z} \]
          8. Applied rewrites36.5%

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

        Alternative 11: 68.8% accurate, 1.2× speedup?

        \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := -4 \cdot \frac{a \cdot t}{c}\\ \mathbf{if}\;z \leq -5.2 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+82}:\\ \;\;\;\;\frac{\mathsf{fma}\left(9, y \cdot x, b\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        (FPCore (x y z t a b c)
         :precision binary64
         (let* ((t_1 (* -4.0 (/ (* a t) c))))
           (if (<= z -5.2e+40)
             t_1
             (if (<= z 1.45e+82) (/ (fma 9.0 (* y x) b) (* z c)) t_1))))
        assert(x < y && y < z && z < t && t < a && a < b && b < c);
        double code(double x, double y, double z, double t, double a, double b, double c) {
        	double t_1 = -4.0 * ((a * t) / c);
        	double tmp;
        	if (z <= -5.2e+40) {
        		tmp = t_1;
        	} else if (z <= 1.45e+82) {
        		tmp = fma(9.0, (y * x), b) / (z * c);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
        function code(x, y, z, t, a, b, c)
        	t_1 = Float64(-4.0 * Float64(Float64(a * t) / c))
        	tmp = 0.0
        	if (z <= -5.2e+40)
        		tmp = t_1;
        	elseif (z <= 1.45e+82)
        		tmp = Float64(fma(9.0, Float64(y * x), b) / Float64(z * c));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e+40], t$95$1, If[LessEqual[z, 1.45e+82], N[(N[(9.0 * N[(y * x), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
        \\
        \begin{array}{l}
        t_1 := -4 \cdot \frac{a \cdot t}{c}\\
        \mathbf{if}\;z \leq -5.2 \cdot 10^{+40}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;z \leq 1.45 \cdot 10^{+82}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(9, y \cdot x, b\right)}{z \cdot c}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -5.2000000000000001e40 or 1.4500000000000001e82 < z

          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 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-*.f6437.7

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

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

          if -5.2000000000000001e40 < z < 1.4500000000000001e82

          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 \frac{\color{blue}{b + 9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
          3. Step-by-step derivation
            1. lower-+.f64N/A

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

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

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

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

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

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

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

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

              \[\leadsto \frac{b + \left(x \cdot 9\right) \cdot y}{z \cdot c} \]
            6. lift-*.f6460.8

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

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

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

              \[\leadsto \frac{\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}}{z \cdot c} \]
            10. sub-flipN/A

              \[\leadsto \frac{\left(x \cdot 9\right) \cdot y + \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b\right)\right)\right)\right)}}{z \cdot c} \]
            11. remove-double-negN/A

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

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

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

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

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

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

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

              \[\leadsto \frac{9 \cdot \left(x \cdot y\right) + b}{z \cdot c} \]
            19. lower-fma.f6460.8

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

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

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

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

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

        Alternative 12: 52.2% accurate, 0.6× speedup?

        \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ t_2 := \frac{\left(x \cdot 9\right) \cdot \frac{y}{c}}{z}\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+120}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-168}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;t\_1 \leq 10^{+142}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        (FPCore (x y z t a b c)
         :precision binary64
         (let* ((t_1 (* (* x 9.0) y)) (t_2 (/ (* (* x 9.0) (/ y c)) z)))
           (if (<= t_1 -4e+120)
             t_2
             (if (<= t_1 2e-168)
               (/ (/ b c) z)
               (if (<= t_1 1e+142) (* -4.0 (/ (* a t) c)) t_2)))))
        assert(x < y && y < z && z < t && t < a && a < b && b < c);
        double code(double x, double y, double z, double t, double a, double b, double c) {
        	double t_1 = (x * 9.0) * y;
        	double t_2 = ((x * 9.0) * (y / c)) / z;
        	double tmp;
        	if (t_1 <= -4e+120) {
        		tmp = t_2;
        	} else if (t_1 <= 2e-168) {
        		tmp = (b / c) / z;
        	} else if (t_1 <= 1e+142) {
        		tmp = -4.0 * ((a * t) / c);
        	} else {
        		tmp = t_2;
        	}
        	return tmp;
        }
        
        NOTE: x, y, z, t, a, b, and c 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(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) :: tmp
            t_1 = (x * 9.0d0) * y
            t_2 = ((x * 9.0d0) * (y / c)) / z
            if (t_1 <= (-4d+120)) then
                tmp = t_2
            else if (t_1 <= 2d-168) then
                tmp = (b / c) / z
            else if (t_1 <= 1d+142) then
                tmp = (-4.0d0) * ((a * t) / c)
            else
                tmp = t_2
            end if
            code = tmp
        end function
        
        assert x < y && y < z && z < t && t < a && a < b && b < c;
        public static double code(double x, double y, double z, double t, double a, double b, double c) {
        	double t_1 = (x * 9.0) * y;
        	double t_2 = ((x * 9.0) * (y / c)) / z;
        	double tmp;
        	if (t_1 <= -4e+120) {
        		tmp = t_2;
        	} else if (t_1 <= 2e-168) {
        		tmp = (b / c) / z;
        	} else if (t_1 <= 1e+142) {
        		tmp = -4.0 * ((a * t) / c);
        	} else {
        		tmp = t_2;
        	}
        	return tmp;
        }
        
        [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
        def code(x, y, z, t, a, b, c):
        	t_1 = (x * 9.0) * y
        	t_2 = ((x * 9.0) * (y / c)) / z
        	tmp = 0
        	if t_1 <= -4e+120:
        		tmp = t_2
        	elif t_1 <= 2e-168:
        		tmp = (b / c) / z
        	elif t_1 <= 1e+142:
        		tmp = -4.0 * ((a * t) / c)
        	else:
        		tmp = t_2
        	return tmp
        
        x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
        function code(x, y, z, t, a, b, c)
        	t_1 = Float64(Float64(x * 9.0) * y)
        	t_2 = Float64(Float64(Float64(x * 9.0) * Float64(y / c)) / z)
        	tmp = 0.0
        	if (t_1 <= -4e+120)
        		tmp = t_2;
        	elseif (t_1 <= 2e-168)
        		tmp = Float64(Float64(b / c) / z);
        	elseif (t_1 <= 1e+142)
        		tmp = Float64(-4.0 * Float64(Float64(a * t) / c));
        	else
        		tmp = t_2;
        	end
        	return tmp
        end
        
        x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
        function tmp_2 = code(x, y, z, t, a, b, c)
        	t_1 = (x * 9.0) * y;
        	t_2 = ((x * 9.0) * (y / c)) / z;
        	tmp = 0.0;
        	if (t_1 <= -4e+120)
        		tmp = t_2;
        	elseif (t_1 <= 2e-168)
        		tmp = (b / c) / z;
        	elseif (t_1 <= 1e+142)
        		tmp = -4.0 * ((a * t) / c);
        	else
        		tmp = t_2;
        	end
        	tmp_2 = tmp;
        end
        
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * 9.0), $MachinePrecision] * N[(y / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+120], t$95$2, If[LessEqual[t$95$1, 2e-168], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 1e+142], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
        
        \begin{array}{l}
        [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
        \\
        \begin{array}{l}
        t_1 := \left(x \cdot 9\right) \cdot y\\
        t_2 := \frac{\left(x \cdot 9\right) \cdot \frac{y}{c}}{z}\\
        \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+120}:\\
        \;\;\;\;t\_2\\
        
        \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-168}:\\
        \;\;\;\;\frac{\frac{b}{c}}{z}\\
        
        \mathbf{elif}\;t\_1 \leq 10^{+142}:\\
        \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_2\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -3.9999999999999999e120 or 1.00000000000000005e142 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

          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. Step-by-step derivation
            1. 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}} \]
            2. 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}} \]
            3. *-commutativeN/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}{c \cdot z}} \]
            4. 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}{c}}{z}} \]
            5. 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}{c}}{z}} \]
          3. Applied rewrites80.6%

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

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

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

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

              \[\leadsto \frac{9 \cdot \frac{x \cdot y}{c}}{z} \]
          6. Applied rewrites35.6%

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\left(x \cdot 9\right) \cdot \frac{\color{blue}{y}}{c}}{z} \]
            9. lower-/.f6436.5

              \[\leadsto \frac{\left(x \cdot 9\right) \cdot \frac{y}{\color{blue}{c}}}{z} \]
          8. Applied rewrites36.5%

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

          if -3.9999999999999999e120 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.0000000000000001e-168

          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. Step-by-step derivation
            1. 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}} \]
            2. 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}} \]
            3. *-commutativeN/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}{c \cdot z}} \]
            4. 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}{c}}{z}} \]
            5. 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}{c}}{z}} \]
          3. Applied rewrites80.6%

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

            \[\leadsto \frac{\color{blue}{\frac{b}{c}}}{z} \]
          5. Step-by-step derivation
            1. lower-/.f6434.6

              \[\leadsto \frac{\frac{b}{\color{blue}{c}}}{z} \]
          6. Applied rewrites34.6%

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

          if 2.0000000000000001e-168 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.00000000000000005e142

          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 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-*.f6437.7

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

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

        Alternative 13: 52.1% accurate, 0.6× speedup?

        \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+51}:\\ \;\;\;\;y \cdot \frac{9 \cdot \frac{x}{z}}{c}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-168}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;t\_1 \leq 10^{+142}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{9}{z} \cdot \left(y \cdot \frac{x}{c}\right)\\ \end{array} \end{array} \]
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        (FPCore (x y z t a b c)
         :precision binary64
         (let* ((t_1 (* (* x 9.0) y)))
           (if (<= t_1 -2e+51)
             (* y (/ (* 9.0 (/ x z)) c))
             (if (<= t_1 2e-168)
               (/ (/ b c) z)
               (if (<= t_1 1e+142)
                 (* -4.0 (/ (* a t) c))
                 (* (/ 9.0 z) (* y (/ x c))))))))
        assert(x < y && y < z && z < t && t < a && a < b && b < c);
        double code(double x, double y, double z, double t, double a, double b, double c) {
        	double t_1 = (x * 9.0) * y;
        	double tmp;
        	if (t_1 <= -2e+51) {
        		tmp = y * ((9.0 * (x / z)) / c);
        	} else if (t_1 <= 2e-168) {
        		tmp = (b / c) / z;
        	} else if (t_1 <= 1e+142) {
        		tmp = -4.0 * ((a * t) / c);
        	} else {
        		tmp = (9.0 / z) * (y * (x / c));
        	}
        	return tmp;
        }
        
        NOTE: x, y, z, t, a, b, and c 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(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) :: tmp
            t_1 = (x * 9.0d0) * y
            if (t_1 <= (-2d+51)) then
                tmp = y * ((9.0d0 * (x / z)) / c)
            else if (t_1 <= 2d-168) then
                tmp = (b / c) / z
            else if (t_1 <= 1d+142) then
                tmp = (-4.0d0) * ((a * t) / c)
            else
                tmp = (9.0d0 / z) * (y * (x / c))
            end if
            code = tmp
        end function
        
        assert x < y && y < z && z < t && t < a && a < b && b < c;
        public static double code(double x, double y, double z, double t, double a, double b, double c) {
        	double t_1 = (x * 9.0) * y;
        	double tmp;
        	if (t_1 <= -2e+51) {
        		tmp = y * ((9.0 * (x / z)) / c);
        	} else if (t_1 <= 2e-168) {
        		tmp = (b / c) / z;
        	} else if (t_1 <= 1e+142) {
        		tmp = -4.0 * ((a * t) / c);
        	} else {
        		tmp = (9.0 / z) * (y * (x / c));
        	}
        	return tmp;
        }
        
        [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
        def code(x, y, z, t, a, b, c):
        	t_1 = (x * 9.0) * y
        	tmp = 0
        	if t_1 <= -2e+51:
        		tmp = y * ((9.0 * (x / z)) / c)
        	elif t_1 <= 2e-168:
        		tmp = (b / c) / z
        	elif t_1 <= 1e+142:
        		tmp = -4.0 * ((a * t) / c)
        	else:
        		tmp = (9.0 / z) * (y * (x / c))
        	return tmp
        
        x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
        function code(x, y, z, t, a, b, c)
        	t_1 = Float64(Float64(x * 9.0) * y)
        	tmp = 0.0
        	if (t_1 <= -2e+51)
        		tmp = Float64(y * Float64(Float64(9.0 * Float64(x / z)) / c));
        	elseif (t_1 <= 2e-168)
        		tmp = Float64(Float64(b / c) / z);
        	elseif (t_1 <= 1e+142)
        		tmp = Float64(-4.0 * Float64(Float64(a * t) / c));
        	else
        		tmp = Float64(Float64(9.0 / z) * Float64(y * Float64(x / c)));
        	end
        	return tmp
        end
        
        x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
        function tmp_2 = code(x, y, z, t, a, b, c)
        	t_1 = (x * 9.0) * y;
        	tmp = 0.0;
        	if (t_1 <= -2e+51)
        		tmp = y * ((9.0 * (x / z)) / c);
        	elseif (t_1 <= 2e-168)
        		tmp = (b / c) / z;
        	elseif (t_1 <= 1e+142)
        		tmp = -4.0 * ((a * t) / c);
        	else
        		tmp = (9.0 / z) * (y * (x / c));
        	end
        	tmp_2 = tmp;
        end
        
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+51], N[(y * N[(N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e-168], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 1e+142], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(N[(9.0 / z), $MachinePrecision] * N[(y * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
        
        \begin{array}{l}
        [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
        \\
        \begin{array}{l}
        t_1 := \left(x \cdot 9\right) \cdot y\\
        \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+51}:\\
        \;\;\;\;y \cdot \frac{9 \cdot \frac{x}{z}}{c}\\
        
        \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-168}:\\
        \;\;\;\;\frac{\frac{b}{c}}{z}\\
        
        \mathbf{elif}\;t\_1 \leq 10^{+142}:\\
        \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{9}{z} \cdot \left(y \cdot \frac{x}{c}\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2e51

          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. Step-by-step derivation
            1. 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}} \]
            2. 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}} \]
            3. *-commutativeN/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}{c \cdot z}} \]
            4. 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}{c}}{z}} \]
            5. 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}{c}}{z}} \]
          3. Applied rewrites80.6%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto 9 \cdot \frac{x \cdot y}{z \cdot \color{blue}{c}} \]
            5. associate-/r*N/A

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

              \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{\color{blue}{c}} \]
            7. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto y \cdot \frac{9 \cdot \frac{x}{z}}{c} \]
            21. lower-/.f6436.4

              \[\leadsto y \cdot \frac{9 \cdot \frac{x}{z}}{c} \]
          8. Applied rewrites36.4%

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

          if -2e51 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.0000000000000001e-168

          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. Step-by-step derivation
            1. 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}} \]
            2. 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}} \]
            3. *-commutativeN/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}{c \cdot z}} \]
            4. 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}{c}}{z}} \]
            5. 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}{c}}{z}} \]
          3. Applied rewrites80.6%

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

            \[\leadsto \frac{\color{blue}{\frac{b}{c}}}{z} \]
          5. Step-by-step derivation
            1. lower-/.f6434.6

              \[\leadsto \frac{\frac{b}{\color{blue}{c}}}{z} \]
          6. Applied rewrites34.6%

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

          if 2.0000000000000001e-168 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.00000000000000005e142

          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 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-*.f6437.7

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

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

          if 1.00000000000000005e142 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

          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. Step-by-step derivation
            1. 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}} \]
            2. 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}} \]
            3. *-commutativeN/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}{c \cdot z}} \]
            4. 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}{c}}{z}} \]
            5. 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}{c}}{z}} \]
          3. Applied rewrites80.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{9}{z} \cdot \left(y \cdot \color{blue}{\frac{x}{c}}\right) \]
            13. lower-/.f6436.5

              \[\leadsto \frac{9}{z} \cdot \left(y \cdot \frac{x}{\color{blue}{c}}\right) \]
          8. Applied rewrites36.5%

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

        Alternative 14: 51.9% accurate, 0.6× speedup?

        \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ t_2 := y \cdot \frac{9 \cdot \frac{x}{z}}{c}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+51}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-168}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;t\_1 \leq 10^{+142}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        (FPCore (x y z t a b c)
         :precision binary64
         (let* ((t_1 (* (* x 9.0) y)) (t_2 (* y (/ (* 9.0 (/ x z)) c))))
           (if (<= t_1 -2e+51)
             t_2
             (if (<= t_1 2e-168)
               (/ (/ b c) z)
               (if (<= t_1 1e+142) (* -4.0 (/ (* a t) c)) t_2)))))
        assert(x < y && y < z && z < t && t < a && a < b && b < c);
        double code(double x, double y, double z, double t, double a, double b, double c) {
        	double t_1 = (x * 9.0) * y;
        	double t_2 = y * ((9.0 * (x / z)) / c);
        	double tmp;
        	if (t_1 <= -2e+51) {
        		tmp = t_2;
        	} else if (t_1 <= 2e-168) {
        		tmp = (b / c) / z;
        	} else if (t_1 <= 1e+142) {
        		tmp = -4.0 * ((a * t) / c);
        	} else {
        		tmp = t_2;
        	}
        	return tmp;
        }
        
        NOTE: x, y, z, t, a, b, and c 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(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) :: tmp
            t_1 = (x * 9.0d0) * y
            t_2 = y * ((9.0d0 * (x / z)) / c)
            if (t_1 <= (-2d+51)) then
                tmp = t_2
            else if (t_1 <= 2d-168) then
                tmp = (b / c) / z
            else if (t_1 <= 1d+142) then
                tmp = (-4.0d0) * ((a * t) / c)
            else
                tmp = t_2
            end if
            code = tmp
        end function
        
        assert x < y && y < z && z < t && t < a && a < b && b < c;
        public static double code(double x, double y, double z, double t, double a, double b, double c) {
        	double t_1 = (x * 9.0) * y;
        	double t_2 = y * ((9.0 * (x / z)) / c);
        	double tmp;
        	if (t_1 <= -2e+51) {
        		tmp = t_2;
        	} else if (t_1 <= 2e-168) {
        		tmp = (b / c) / z;
        	} else if (t_1 <= 1e+142) {
        		tmp = -4.0 * ((a * t) / c);
        	} else {
        		tmp = t_2;
        	}
        	return tmp;
        }
        
        [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
        def code(x, y, z, t, a, b, c):
        	t_1 = (x * 9.0) * y
        	t_2 = y * ((9.0 * (x / z)) / c)
        	tmp = 0
        	if t_1 <= -2e+51:
        		tmp = t_2
        	elif t_1 <= 2e-168:
        		tmp = (b / c) / z
        	elif t_1 <= 1e+142:
        		tmp = -4.0 * ((a * t) / c)
        	else:
        		tmp = t_2
        	return tmp
        
        x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
        function code(x, y, z, t, a, b, c)
        	t_1 = Float64(Float64(x * 9.0) * y)
        	t_2 = Float64(y * Float64(Float64(9.0 * Float64(x / z)) / c))
        	tmp = 0.0
        	if (t_1 <= -2e+51)
        		tmp = t_2;
        	elseif (t_1 <= 2e-168)
        		tmp = Float64(Float64(b / c) / z);
        	elseif (t_1 <= 1e+142)
        		tmp = Float64(-4.0 * Float64(Float64(a * t) / c));
        	else
        		tmp = t_2;
        	end
        	return tmp
        end
        
        x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
        function tmp_2 = code(x, y, z, t, a, b, c)
        	t_1 = (x * 9.0) * y;
        	t_2 = y * ((9.0 * (x / z)) / c);
        	tmp = 0.0;
        	if (t_1 <= -2e+51)
        		tmp = t_2;
        	elseif (t_1 <= 2e-168)
        		tmp = (b / c) / z;
        	elseif (t_1 <= 1e+142)
        		tmp = -4.0 * ((a * t) / c);
        	else
        		tmp = t_2;
        	end
        	tmp_2 = tmp;
        end
        
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+51], t$95$2, If[LessEqual[t$95$1, 2e-168], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 1e+142], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
        
        \begin{array}{l}
        [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
        \\
        \begin{array}{l}
        t_1 := \left(x \cdot 9\right) \cdot y\\
        t_2 := y \cdot \frac{9 \cdot \frac{x}{z}}{c}\\
        \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+51}:\\
        \;\;\;\;t\_2\\
        
        \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-168}:\\
        \;\;\;\;\frac{\frac{b}{c}}{z}\\
        
        \mathbf{elif}\;t\_1 \leq 10^{+142}:\\
        \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_2\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2e51 or 1.00000000000000005e142 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

          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. Step-by-step derivation
            1. 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}} \]
            2. 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}} \]
            3. *-commutativeN/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}{c \cdot z}} \]
            4. 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}{c}}{z}} \]
            5. 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}{c}}{z}} \]
          3. Applied rewrites80.6%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto 9 \cdot \frac{x \cdot y}{z \cdot \color{blue}{c}} \]
            5. associate-/r*N/A

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

              \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{\color{blue}{c}} \]
            7. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto y \cdot \frac{9 \cdot \frac{x}{z}}{c} \]
            21. lower-/.f6436.4

              \[\leadsto y \cdot \frac{9 \cdot \frac{x}{z}}{c} \]
          8. Applied rewrites36.4%

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

          if -2e51 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.0000000000000001e-168

          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. Step-by-step derivation
            1. 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}} \]
            2. 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}} \]
            3. *-commutativeN/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}{c \cdot z}} \]
            4. 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}{c}}{z}} \]
            5. 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}{c}}{z}} \]
          3. Applied rewrites80.6%

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

            \[\leadsto \frac{\color{blue}{\frac{b}{c}}}{z} \]
          5. Step-by-step derivation
            1. lower-/.f6434.6

              \[\leadsto \frac{\frac{b}{\color{blue}{c}}}{z} \]
          6. Applied rewrites34.6%

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

          if 2.0000000000000001e-168 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.00000000000000005e142

          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 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-*.f6437.7

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

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

        Alternative 15: 49.7% accurate, 1.1× speedup?

        \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \frac{b}{c \cdot z}\\ t_2 := -4 \cdot \frac{a \cdot t}{c}\\ \mathbf{if}\;z \leq -7.4 \cdot 10^{-6}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -5.6 \cdot 10^{-80}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-250}:\\ \;\;\;\;y \cdot \left(9 \cdot \frac{x}{c \cdot z}\right)\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        (FPCore (x y z t a b c)
         :precision binary64
         (let* ((t_1 (/ b (* c z))) (t_2 (* -4.0 (/ (* a t) c))))
           (if (<= z -7.4e-6)
             t_2
             (if (<= z -5.6e-80)
               t_1
               (if (<= z -1.25e-250)
                 (* y (* 9.0 (/ x (* c z))))
                 (if (<= z 2.8e+40) t_1 t_2))))))
        assert(x < y && y < z && z < t && t < a && a < b && b < c);
        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 tmp;
        	if (z <= -7.4e-6) {
        		tmp = t_2;
        	} else if (z <= -5.6e-80) {
        		tmp = t_1;
        	} else if (z <= -1.25e-250) {
        		tmp = y * (9.0 * (x / (c * z)));
        	} else if (z <= 2.8e+40) {
        		tmp = t_1;
        	} else {
        		tmp = t_2;
        	}
        	return tmp;
        }
        
        NOTE: x, y, z, t, a, b, and c 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(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) :: tmp
            t_1 = b / (c * z)
            t_2 = (-4.0d0) * ((a * t) / c)
            if (z <= (-7.4d-6)) then
                tmp = t_2
            else if (z <= (-5.6d-80)) then
                tmp = t_1
            else if (z <= (-1.25d-250)) then
                tmp = y * (9.0d0 * (x / (c * z)))
            else if (z <= 2.8d+40) then
                tmp = t_1
            else
                tmp = t_2
            end if
            code = tmp
        end function
        
        assert x < y && y < z && z < t && t < a && a < b && b < c;
        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 tmp;
        	if (z <= -7.4e-6) {
        		tmp = t_2;
        	} else if (z <= -5.6e-80) {
        		tmp = t_1;
        	} else if (z <= -1.25e-250) {
        		tmp = y * (9.0 * (x / (c * z)));
        	} else if (z <= 2.8e+40) {
        		tmp = t_1;
        	} else {
        		tmp = t_2;
        	}
        	return tmp;
        }
        
        [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
        def code(x, y, z, t, a, b, c):
        	t_1 = b / (c * z)
        	t_2 = -4.0 * ((a * t) / c)
        	tmp = 0
        	if z <= -7.4e-6:
        		tmp = t_2
        	elif z <= -5.6e-80:
        		tmp = t_1
        	elif z <= -1.25e-250:
        		tmp = y * (9.0 * (x / (c * z)))
        	elif z <= 2.8e+40:
        		tmp = t_1
        	else:
        		tmp = t_2
        	return tmp
        
        x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
        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))
        	tmp = 0.0
        	if (z <= -7.4e-6)
        		tmp = t_2;
        	elseif (z <= -5.6e-80)
        		tmp = t_1;
        	elseif (z <= -1.25e-250)
        		tmp = Float64(y * Float64(9.0 * Float64(x / Float64(c * z))));
        	elseif (z <= 2.8e+40)
        		tmp = t_1;
        	else
        		tmp = t_2;
        	end
        	return tmp
        end
        
        x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
        function tmp_2 = code(x, y, z, t, a, b, c)
        	t_1 = b / (c * z);
        	t_2 = -4.0 * ((a * t) / c);
        	tmp = 0.0;
        	if (z <= -7.4e-6)
        		tmp = t_2;
        	elseif (z <= -5.6e-80)
        		tmp = t_1;
        	elseif (z <= -1.25e-250)
        		tmp = y * (9.0 * (x / (c * z)));
        	elseif (z <= 2.8e+40)
        		tmp = t_1;
        	else
        		tmp = t_2;
        	end
        	tmp_2 = tmp;
        end
        
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        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]}, If[LessEqual[z, -7.4e-6], t$95$2, If[LessEqual[z, -5.6e-80], t$95$1, If[LessEqual[z, -1.25e-250], N[(y * N[(9.0 * N[(x / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+40], t$95$1, t$95$2]]]]]]
        
        \begin{array}{l}
        [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
        \\
        \begin{array}{l}
        t_1 := \frac{b}{c \cdot z}\\
        t_2 := -4 \cdot \frac{a \cdot t}{c}\\
        \mathbf{if}\;z \leq -7.4 \cdot 10^{-6}:\\
        \;\;\;\;t\_2\\
        
        \mathbf{elif}\;z \leq -5.6 \cdot 10^{-80}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;z \leq -1.25 \cdot 10^{-250}:\\
        \;\;\;\;y \cdot \left(9 \cdot \frac{x}{c \cdot z}\right)\\
        
        \mathbf{elif}\;z \leq 2.8 \cdot 10^{+40}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_2\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if z < -7.4000000000000003e-6 or 2.8000000000000001e40 < z

          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 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-*.f6437.7

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

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

          if -7.4000000000000003e-6 < z < -5.59999999999999978e-80 or -1.25000000000000007e-250 < z < 2.8000000000000001e40

          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 b around inf

            \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
            2. lower-*.f6435.4

              \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
          4. Applied rewrites35.4%

            \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]

          if -5.59999999999999978e-80 < z < -1.25000000000000007e-250

          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. Step-by-step derivation
            1. 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}} \]
            2. 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}} \]
            3. *-commutativeN/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}{c \cdot z}} \]
            4. 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}{c}}{z}} \]
            5. 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}{c}}{z}} \]
          3. Applied rewrites80.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto y \cdot \frac{9 \cdot x}{\color{blue}{z} \cdot c} \]
            16. associate-/l*N/A

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

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

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

              \[\leadsto y \cdot \left(9 \cdot \frac{x}{\color{blue}{z \cdot c}}\right) \]
            20. lower-/.f6437.5

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

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

              \[\leadsto y \cdot \left(9 \cdot \frac{x}{c \cdot \color{blue}{z}}\right) \]
            23. lift-*.f6437.5

              \[\leadsto y \cdot \left(9 \cdot \frac{x}{c \cdot \color{blue}{z}}\right) \]
          8. Applied rewrites37.5%

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

        Alternative 16: 49.3% accurate, 1.2× speedup?

        \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := -4 \cdot \frac{a \cdot t}{c}\\ \mathbf{if}\;a \leq -4.9 \cdot 10^{-91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-278}:\\ \;\;\;\;9 \cdot \frac{x \cdot y}{c \cdot z}\\ \mathbf{elif}\;a \leq 10^{+121}:\\ \;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        (FPCore (x y z t a b c)
         :precision binary64
         (let* ((t_1 (* -4.0 (/ (* a t) c))))
           (if (<= a -4.9e-91)
             t_1
             (if (<= a -1.1e-278)
               (* 9.0 (/ (* x y) (* c z)))
               (if (<= a 1e+121) (* (/ b c) (/ 1.0 z)) t_1)))))
        assert(x < y && y < z && z < t && t < a && a < b && b < c);
        double code(double x, double y, double z, double t, double a, double b, double c) {
        	double t_1 = -4.0 * ((a * t) / c);
        	double tmp;
        	if (a <= -4.9e-91) {
        		tmp = t_1;
        	} else if (a <= -1.1e-278) {
        		tmp = 9.0 * ((x * y) / (c * z));
        	} else if (a <= 1e+121) {
        		tmp = (b / c) * (1.0 / z);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        NOTE: x, y, z, t, a, b, and c 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(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) :: tmp
            t_1 = (-4.0d0) * ((a * t) / c)
            if (a <= (-4.9d-91)) then
                tmp = t_1
            else if (a <= (-1.1d-278)) then
                tmp = 9.0d0 * ((x * y) / (c * z))
            else if (a <= 1d+121) then
                tmp = (b / c) * (1.0d0 / z)
            else
                tmp = t_1
            end if
            code = tmp
        end function
        
        assert x < y && y < z && z < t && t < a && a < b && b < c;
        public static double code(double x, double y, double z, double t, double a, double b, double c) {
        	double t_1 = -4.0 * ((a * t) / c);
        	double tmp;
        	if (a <= -4.9e-91) {
        		tmp = t_1;
        	} else if (a <= -1.1e-278) {
        		tmp = 9.0 * ((x * y) / (c * z));
        	} else if (a <= 1e+121) {
        		tmp = (b / c) * (1.0 / z);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
        def code(x, y, z, t, a, b, c):
        	t_1 = -4.0 * ((a * t) / c)
        	tmp = 0
        	if a <= -4.9e-91:
        		tmp = t_1
        	elif a <= -1.1e-278:
        		tmp = 9.0 * ((x * y) / (c * z))
        	elif a <= 1e+121:
        		tmp = (b / c) * (1.0 / z)
        	else:
        		tmp = t_1
        	return tmp
        
        x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
        function code(x, y, z, t, a, b, c)
        	t_1 = Float64(-4.0 * Float64(Float64(a * t) / c))
        	tmp = 0.0
        	if (a <= -4.9e-91)
        		tmp = t_1;
        	elseif (a <= -1.1e-278)
        		tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(c * z)));
        	elseif (a <= 1e+121)
        		tmp = Float64(Float64(b / c) * Float64(1.0 / z));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
        function tmp_2 = code(x, y, z, t, a, b, c)
        	t_1 = -4.0 * ((a * t) / c);
        	tmp = 0.0;
        	if (a <= -4.9e-91)
        		tmp = t_1;
        	elseif (a <= -1.1e-278)
        		tmp = 9.0 * ((x * y) / (c * z));
        	elseif (a <= 1e+121)
        		tmp = (b / c) * (1.0 / z);
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.9e-91], t$95$1, If[LessEqual[a, -1.1e-278], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1e+121], N[(N[(b / c), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
        
        \begin{array}{l}
        [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
        \\
        \begin{array}{l}
        t_1 := -4 \cdot \frac{a \cdot t}{c}\\
        \mathbf{if}\;a \leq -4.9 \cdot 10^{-91}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;a \leq -1.1 \cdot 10^{-278}:\\
        \;\;\;\;9 \cdot \frac{x \cdot y}{c \cdot z}\\
        
        \mathbf{elif}\;a \leq 10^{+121}:\\
        \;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if a < -4.8999999999999998e-91 or 1.00000000000000004e121 < a

          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 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-*.f6437.7

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

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

          if -4.8999999999999998e-91 < a < -1.1e-278

          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 x around inf

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

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

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

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

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

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

          if -1.1e-278 < a < 1.00000000000000004e121

          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 b around inf

            \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
            2. lower-*.f6435.4

              \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
          4. Applied rewrites35.4%

            \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
          5. Step-by-step derivation
            1. lift-/.f64N/A

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

              \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
            3. associate-/r*N/A

              \[\leadsto \frac{\frac{b}{c}}{\color{blue}{z}} \]
            4. mult-flipN/A

              \[\leadsto \frac{b}{c} \cdot \color{blue}{\frac{1}{z}} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{b}{c} \cdot \color{blue}{\frac{1}{z}} \]
            6. lower-/.f64N/A

              \[\leadsto \frac{b}{c} \cdot \frac{\color{blue}{1}}{z} \]
            7. lower-/.f6434.6

              \[\leadsto \frac{b}{c} \cdot \frac{1}{\color{blue}{z}} \]
          6. Applied rewrites34.6%

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

        Alternative 17: 45.0% accurate, 1.5× speedup?

        \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := -4 \cdot \frac{a \cdot t}{c}\\ \mathbf{if}\;z \leq -7.4 \cdot 10^{-6}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+40}:\\ \;\;\;\;\frac{b}{c \cdot z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        (FPCore (x y z t a b c)
         :precision binary64
         (let* ((t_1 (* -4.0 (/ (* a t) c))))
           (if (<= z -7.4e-6) t_1 (if (<= z 2.8e+40) (/ b (* c z)) t_1))))
        assert(x < y && y < z && z < t && t < a && a < b && b < c);
        double code(double x, double y, double z, double t, double a, double b, double c) {
        	double t_1 = -4.0 * ((a * t) / c);
        	double tmp;
        	if (z <= -7.4e-6) {
        		tmp = t_1;
        	} else if (z <= 2.8e+40) {
        		tmp = b / (c * z);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        NOTE: x, y, z, t, a, b, and c 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(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) :: tmp
            t_1 = (-4.0d0) * ((a * t) / c)
            if (z <= (-7.4d-6)) then
                tmp = t_1
            else if (z <= 2.8d+40) then
                tmp = b / (c * z)
            else
                tmp = t_1
            end if
            code = tmp
        end function
        
        assert x < y && y < z && z < t && t < a && a < b && b < c;
        public static double code(double x, double y, double z, double t, double a, double b, double c) {
        	double t_1 = -4.0 * ((a * t) / c);
        	double tmp;
        	if (z <= -7.4e-6) {
        		tmp = t_1;
        	} else if (z <= 2.8e+40) {
        		tmp = b / (c * z);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
        def code(x, y, z, t, a, b, c):
        	t_1 = -4.0 * ((a * t) / c)
        	tmp = 0
        	if z <= -7.4e-6:
        		tmp = t_1
        	elif z <= 2.8e+40:
        		tmp = b / (c * z)
        	else:
        		tmp = t_1
        	return tmp
        
        x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
        function code(x, y, z, t, a, b, c)
        	t_1 = Float64(-4.0 * Float64(Float64(a * t) / c))
        	tmp = 0.0
        	if (z <= -7.4e-6)
        		tmp = t_1;
        	elseif (z <= 2.8e+40)
        		tmp = Float64(b / Float64(c * z));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
        function tmp_2 = code(x, y, z, t, a, b, c)
        	t_1 = -4.0 * ((a * t) / c);
        	tmp = 0.0;
        	if (z <= -7.4e-6)
        		tmp = t_1;
        	elseif (z <= 2.8e+40)
        		tmp = b / (c * z);
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.4e-6], t$95$1, If[LessEqual[z, 2.8e+40], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
        \\
        \begin{array}{l}
        t_1 := -4 \cdot \frac{a \cdot t}{c}\\
        \mathbf{if}\;z \leq -7.4 \cdot 10^{-6}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;z \leq 2.8 \cdot 10^{+40}:\\
        \;\;\;\;\frac{b}{c \cdot z}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -7.4000000000000003e-6 or 2.8000000000000001e40 < z

          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 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-*.f6437.7

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

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

          if -7.4000000000000003e-6 < z < 2.8000000000000001e40

          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 b around inf

            \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
            2. lower-*.f6435.4

              \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
          4. Applied rewrites35.4%

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

        Alternative 18: 35.4% accurate, 3.6× speedup?

        \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \frac{\frac{b}{c}}{z} \end{array} \]
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        (FPCore (x y z t a b c) :precision binary64 (/ (/ b c) z))
        assert(x < y && y < z && z < t && t < a && a < b && b < c);
        double code(double x, double y, double z, double t, double a, double b, double c) {
        	return (b / c) / z;
        }
        
        NOTE: x, y, z, t, a, b, and c 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(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 = (b / c) / z
        end function
        
        assert x < y && y < z && z < t && t < a && a < b && b < c;
        public static double code(double x, double y, double z, double t, double a, double b, double c) {
        	return (b / c) / z;
        }
        
        [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
        def code(x, y, z, t, a, b, c):
        	return (b / c) / z
        
        x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
        function code(x, y, z, t, a, b, c)
        	return Float64(Float64(b / c) / z)
        end
        
        x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
        function tmp = code(x, y, z, t, a, b, c)
        	tmp = (b / c) / z;
        end
        
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]
        
        \begin{array}{l}
        [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
        \\
        \frac{\frac{b}{c}}{z}
        \end{array}
        
        Derivation
        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. Step-by-step derivation
          1. 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}} \]
          2. 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}} \]
          3. *-commutativeN/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}{c \cdot z}} \]
          4. 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}{c}}{z}} \]
          5. 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}{c}}{z}} \]
        3. Applied rewrites80.6%

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

          \[\leadsto \frac{\color{blue}{\frac{b}{c}}}{z} \]
        5. Step-by-step derivation
          1. lower-/.f6434.6

            \[\leadsto \frac{\frac{b}{\color{blue}{c}}}{z} \]
        6. Applied rewrites34.6%

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

        Alternative 19: 34.6% accurate, 3.8× speedup?

        \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \frac{b}{c \cdot z} \end{array} \]
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        (FPCore (x y z t a b c) :precision binary64 (/ b (* c z)))
        assert(x < y && y < z && z < t && t < a && a < b && b < c);
        double code(double x, double y, double z, double t, double a, double b, double c) {
        	return b / (c * z);
        }
        
        NOTE: x, y, z, t, a, b, and c 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(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 = b / (c * z)
        end function
        
        assert x < y && y < z && z < t && t < a && a < b && b < c;
        public static double code(double x, double y, double z, double t, double a, double b, double c) {
        	return b / (c * z);
        }
        
        [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
        def code(x, y, z, t, a, b, c):
        	return b / (c * z)
        
        x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
        function code(x, y, z, t, a, b, c)
        	return Float64(b / Float64(c * z))
        end
        
        x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
        function tmp = code(x, y, z, t, a, b, c)
        	tmp = b / (c * z);
        end
        
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]
        
        \begin{array}{l}
        [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
        \\
        \frac{b}{c \cdot z}
        \end{array}
        
        Derivation
        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 b around inf

          \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
          2. lower-*.f6435.4

            \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
        4. Applied rewrites35.4%

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

        Reproduce

        ?
        herbie shell --seed 2025149 
        (FPCore (x y z t a b c)
          :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, J"
          :precision binary64
          (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))