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

Percentage Accurate: 78.9% → 85.9%
Time: 10.2s
Alternatives: 19
Speedup: 0.9×

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: 78.9% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 85.9% accurate, 0.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 := c \cdot \left(t \cdot z\right)\\ t_2 := t \cdot \mathsf{fma}\left(-4, \frac{a}{c}, \mathsf{fma}\left(9, \frac{x \cdot y}{t\_1}, \frac{b}{t\_1}\right)\right)\\ \mathbf{if}\;z \leq -7.3 \cdot 10^{+87}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{+86}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, \mathsf{fma}\left(\left(-4 \cdot z\right) \cdot a, t, b\right)\right)}{c}}{z}\\ \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 (* c (* t z)))
        (t_2 (* t (fma -4.0 (/ a c) (fma 9.0 (/ (* x y) t_1) (/ b t_1))))))
   (if (<= z -7.3e+87)
     t_2
     (if (<= z 2.25e+86)
       (/ (/ (fma (* y x) 9.0 (fma (* (* -4.0 z) a) t b)) c) z)
       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 = c * (t * z);
	double t_2 = t * fma(-4.0, (a / c), fma(9.0, ((x * y) / t_1), (b / t_1)));
	double tmp;
	if (z <= -7.3e+87) {
		tmp = t_2;
	} else if (z <= 2.25e+86) {
		tmp = (fma((y * x), 9.0, fma(((-4.0 * z) * a), t, b)) / c) / z;
	} 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(c * Float64(t * z))
	t_2 = Float64(t * fma(-4.0, Float64(a / c), fma(9.0, Float64(Float64(x * y) / t_1), Float64(b / t_1))))
	tmp = 0.0
	if (z <= -7.3e+87)
		tmp = t_2;
	elseif (z <= 2.25e+86)
		tmp = Float64(Float64(fma(Float64(y * x), 9.0, fma(Float64(Float64(-4.0 * z) * a), t, b)) / c) / z);
	else
		tmp = t_2;
	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[(c * N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(-4.0 * N[(a / c), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.3e+87], t$95$2, If[LessEqual[z, 2.25e+86], N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0 + N[(N[(N[(-4.0 * z), $MachinePrecision] * a), $MachinePrecision] * t + b), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $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 := c \cdot \left(t \cdot z\right)\\
t_2 := t \cdot \mathsf{fma}\left(-4, \frac{a}{c}, \mathsf{fma}\left(9, \frac{x \cdot y}{t\_1}, \frac{b}{t\_1}\right)\right)\\
\mathbf{if}\;z \leq -7.3 \cdot 10^{+87}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.29999999999999997e87 or 2.24999999999999996e86 < z

    1. Initial program 78.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.29999999999999997e87 < z < 2.24999999999999996e86

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. 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 rewrites79.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 85.2% accurate, 0.3× 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{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\ \mathbf{if}\;t\_1 \leq 2 \cdot 10^{-153}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{c}}{z}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(y \cdot 9, x, -4 \cdot \left(z \cdot \left(a \cdot t\right)\right)\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \mathsf{fma}\left(-4, \frac{a}{c}, 9 \cdot \frac{x \cdot y}{c \cdot \left(t \cdot z\right)}\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) (* (* (* z 4.0) t) a)) b) (* z c))))
   (if (<= t_1 2e-153)
     (/ (/ (fma (* y x) 9.0 (- b (* a (* t (* 4.0 z))))) c) z)
     (if (<= t_1 INFINITY)
       (/ (+ (fma (* y 9.0) x (* -4.0 (* z (* a t)))) b) (* z c))
       (* t (fma -4.0 (/ a c) (* 9.0 (/ (* x y) (* c (* t 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) - (((z * 4.0) * t) * a)) + b) / (z * c);
	double tmp;
	if (t_1 <= 2e-153) {
		tmp = (fma((y * x), 9.0, (b - (a * (t * (4.0 * z))))) / c) / z;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = (fma((y * 9.0), x, (-4.0 * (z * (a * t)))) + b) / (z * c);
	} else {
		tmp = t * fma(-4.0, (a / c), (9.0 * ((x * y) / (c * (t * 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(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c))
	tmp = 0.0
	if (t_1 <= 2e-153)
		tmp = Float64(Float64(fma(Float64(y * x), 9.0, Float64(b - Float64(a * Float64(t * Float64(4.0 * z))))) / c) / z);
	elseif (t_1 <= Inf)
		tmp = Float64(Float64(fma(Float64(y * 9.0), x, Float64(-4.0 * Float64(z * Float64(a * t)))) + b) / Float64(z * c));
	else
		tmp = Float64(t * fma(-4.0, Float64(a / c), Float64(9.0 * Float64(Float64(x * y) / Float64(c * Float64(t * 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[(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]}, If[LessEqual[t$95$1, 2e-153], N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0 + N[(b - N[(a * N[(t * N[(4.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(N[(N[(y * 9.0), $MachinePrecision] * x + N[(-4.0 * N[(z * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t * N[(-4.0 * N[(a / c), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := \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}\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{-153}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{c}}{z}\\

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

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


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

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. 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 rewrites79.6%

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

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

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. 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{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      3. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Taylor expanded in 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.4

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

      \[\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. Taylor expanded in t around inf

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

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

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

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

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

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

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

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

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

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

Alternative 3: 83.9% 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 3.9 \cdot 10^{-81}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y \cdot 9, x, -4 \cdot \left(z \cdot \left(a \cdot t\right)\right)\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{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 (<= c 3.9e-81)
   (/ (+ (fma (* y 9.0) x (* -4.0 (* z (* a t)))) b) (* z c))
   (/ (/ (fma (* y x) 9.0 (- b (* a (* t (* 4.0 z))))) 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 <= 3.9e-81) {
		tmp = (fma((y * 9.0), x, (-4.0 * (z * (a * t)))) + b) / (z * c);
	} else {
		tmp = (fma((y * x), 9.0, (b - (a * (t * (4.0 * z))))) / 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 <= 3.9e-81)
		tmp = Float64(Float64(fma(Float64(y * 9.0), x, Float64(-4.0 * Float64(z * Float64(a * t)))) + b) / Float64(z * c));
	else
		tmp = Float64(Float64(fma(Float64(y * x), 9.0, Float64(b - Float64(a * Float64(t * Float64(4.0 * z))))) / 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, 3.9e-81], N[(N[(N[(N[(y * 9.0), $MachinePrecision] * x + N[(-4.0 * N[(z * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0 + N[(b - N[(a * N[(t * N[(4.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $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}\;c \leq 3.9 \cdot 10^{-81}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y \cdot 9, x, -4 \cdot \left(z \cdot \left(a \cdot t\right)\right)\right) + b}{z \cdot c}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < 3.89999999999999985e-81

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. 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{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      3. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.89999999999999985e-81 < c

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. 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 rewrites79.6%

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

Alternative 4: 83.8% accurate, 0.3× 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{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\ \mathbf{if}\;t\_1 \leq 5 \cdot 10^{-168}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, \mathsf{fma}\left(\left(-4 \cdot z\right) \cdot a, t, b\right)\right)}{c}}{z}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(y \cdot 9, x, -4 \cdot \left(z \cdot \left(a \cdot t\right)\right)\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{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) (* (* (* z 4.0) t) a)) b) (* z c))))
   (if (<= t_1 5e-168)
     (/ (/ (fma (* y x) 9.0 (fma (* (* -4.0 z) a) t b)) c) z)
     (if (<= t_1 INFINITY)
       (/ (+ (fma (* y 9.0) x (* -4.0 (* z (* a t)))) b) (* z c))
       (* -4.0 (/ (* a t) 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) - (((z * 4.0) * t) * a)) + b) / (z * c);
	double tmp;
	if (t_1 <= 5e-168) {
		tmp = (fma((y * x), 9.0, fma(((-4.0 * z) * a), t, b)) / c) / z;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = (fma((y * 9.0), x, (-4.0 * (z * (a * t)))) + b) / (z * c);
	} else {
		tmp = -4.0 * ((a * t) / 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(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c))
	tmp = 0.0
	if (t_1 <= 5e-168)
		tmp = Float64(Float64(fma(Float64(y * x), 9.0, fma(Float64(Float64(-4.0 * z) * a), t, b)) / c) / z);
	elseif (t_1 <= Inf)
		tmp = Float64(Float64(fma(Float64(y * 9.0), x, Float64(-4.0 * Float64(z * Float64(a * t)))) + b) / Float64(z * c));
	else
		tmp = Float64(-4.0 * Float64(Float64(a * t) / 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[(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]}, If[LessEqual[t$95$1, 5e-168], N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0 + N[(N[(N[(-4.0 * z), $MachinePrecision] * a), $MachinePrecision] * t + b), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(N[(N[(y * 9.0), $MachinePrecision] * x + N[(-4.0 * N[(z * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $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 := \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}\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{-168}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, \mathsf{fma}\left(\left(-4 \cdot z\right) \cdot a, t, b\right)\right)}{c}}{z}\\

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

\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\


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

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. 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 rewrites79.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. 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{\left(\left(x \cdot 9\right) \cdot y - \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a}\right) + b}{z \cdot c} \]
      3. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Taylor expanded in 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-*.f6438.8

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

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

Alternative 5: 83.7% accurate, 0.3× 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{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\ \mathbf{if}\;t\_1 \leq 5 \cdot 10^{-168}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, \mathsf{fma}\left(\left(-4 \cdot z\right) \cdot a, t, b\right)\right)}{c}}{z}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(y \cdot 9, x, b - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{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) (* (* (* z 4.0) t) a)) b) (* z c))))
   (if (<= t_1 5e-168)
     (/ (/ (fma (* y x) 9.0 (fma (* (* -4.0 z) a) t b)) c) z)
     (if (<= t_1 INFINITY)
       (/ (fma (* y 9.0) x (- b (* a (* t (* 4.0 z))))) (* z c))
       (* -4.0 (/ (* a t) 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) - (((z * 4.0) * t) * a)) + b) / (z * c);
	double tmp;
	if (t_1 <= 5e-168) {
		tmp = (fma((y * x), 9.0, fma(((-4.0 * z) * a), t, b)) / c) / z;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = fma((y * 9.0), x, (b - (a * (t * (4.0 * z))))) / (z * c);
	} else {
		tmp = -4.0 * ((a * t) / 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(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c))
	tmp = 0.0
	if (t_1 <= 5e-168)
		tmp = Float64(Float64(fma(Float64(y * x), 9.0, fma(Float64(Float64(-4.0 * z) * a), t, b)) / c) / z);
	elseif (t_1 <= Inf)
		tmp = Float64(fma(Float64(y * 9.0), x, Float64(b - Float64(a * Float64(t * Float64(4.0 * z))))) / Float64(z * c));
	else
		tmp = Float64(-4.0 * Float64(Float64(a * t) / 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[(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]}, If[LessEqual[t$95$1, 5e-168], N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0 + N[(N[(N[(-4.0 * z), $MachinePrecision] * a), $MachinePrecision] * t + b), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(N[(y * 9.0), $MachinePrecision] * x + N[(b - N[(a * N[(t * N[(4.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $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 := \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}\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{-168}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, \mathsf{fma}\left(\left(-4 \cdot z\right) \cdot a, t, b\right)\right)}{c}}{z}\\

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

\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\


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

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. 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 rewrites79.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. 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-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Taylor expanded in 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-*.f6438.8

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

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

Alternative 6: 81.4% accurate, 0.3× 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{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\ \mathbf{if}\;t\_1 \leq 5 \cdot 10^{-168}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, \mathsf{fma}\left(\left(-4 \cdot z\right) \cdot a, t, b\right)\right)}{c}}{z}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(9 \cdot x, y, b - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{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) (* (* (* z 4.0) t) a)) b) (* z c))))
   (if (<= t_1 5e-168)
     (/ (/ (fma (* y x) 9.0 (fma (* (* -4.0 z) a) t b)) c) z)
     (if (<= t_1 INFINITY)
       (/ (fma (* 9.0 x) y (- b (* a (* t (* 4.0 z))))) (* z c))
       (* -4.0 (/ (* a t) 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) - (((z * 4.0) * t) * a)) + b) / (z * c);
	double tmp;
	if (t_1 <= 5e-168) {
		tmp = (fma((y * x), 9.0, fma(((-4.0 * z) * a), t, b)) / c) / z;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = fma((9.0 * x), y, (b - (a * (t * (4.0 * z))))) / (z * c);
	} else {
		tmp = -4.0 * ((a * t) / 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(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c))
	tmp = 0.0
	if (t_1 <= 5e-168)
		tmp = Float64(Float64(fma(Float64(y * x), 9.0, fma(Float64(Float64(-4.0 * z) * a), t, b)) / c) / z);
	elseif (t_1 <= Inf)
		tmp = Float64(fma(Float64(9.0 * x), y, Float64(b - Float64(a * Float64(t * Float64(4.0 * z))))) / Float64(z * c));
	else
		tmp = Float64(-4.0 * Float64(Float64(a * t) / 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[(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]}, If[LessEqual[t$95$1, 5e-168], N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0 + N[(N[(N[(-4.0 * z), $MachinePrecision] * a), $MachinePrecision] * t + b), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(N[(9.0 * x), $MachinePrecision] * y + N[(b - N[(a * N[(t * N[(4.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $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 := \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}\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{-168}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, \mathsf{fma}\left(\left(-4 \cdot z\right) \cdot a, t, b\right)\right)}{c}}{z}\\

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

\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\


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

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. 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 rewrites79.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. 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-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Taylor expanded in 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-*.f6438.8

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

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

Alternative 7: 80.9% 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}\;z \leq -2.6 \cdot 10^{+223}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, \mathsf{fma}\left(\left(-4 \cdot z\right) \cdot a, t, b\right)\right)}{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 (<= z -2.6e+223)
   (* -4.0 (/ (* a t) c))
   (/ (/ (fma (* y x) 9.0 (fma (* (* -4.0 z) a) t 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 (z <= -2.6e+223) {
		tmp = -4.0 * ((a * t) / c);
	} else {
		tmp = (fma((y * x), 9.0, fma(((-4.0 * z) * a), t, 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 (z <= -2.6e+223)
		tmp = Float64(-4.0 * Float64(Float64(a * t) / c));
	else
		tmp = Float64(Float64(fma(Float64(y * x), 9.0, fma(Float64(Float64(-4.0 * z) * a), t, b)) / 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[z, -2.6e+223], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0 + N[(N[(N[(-4.0 * z), $MachinePrecision] * a), $MachinePrecision] * t + b), $MachinePrecision]), $MachinePrecision] / c), $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}\;z \leq -2.6 \cdot 10^{+223}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.6000000000000002e223

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Taylor expanded in 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-*.f6438.8

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

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

    if -2.6000000000000002e223 < z

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. 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 rewrites79.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 71.0% accurate, 0.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 := \left(x \cdot 9\right) \cdot y\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-43}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-36}:\\ \;\;\;\;\frac{\frac{b - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c}}{z}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+225}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(9 \cdot x, y, \left(\left(t \cdot a\right) \cdot z\right) \cdot -4\right)}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{9 \cdot x}{c}, \frac{y}{z}, \frac{b}{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
 (let* ((t_1 (* (* x 9.0) y)))
   (if (<= t_1 -5e-43)
     (/ (+ b (* 9.0 (* x y))) (* z c))
     (if (<= t_1 2e-36)
       (/ (/ (- b (* 4.0 (* a (* t z)))) c) z)
       (if (<= t_1 2e+225)
         (/ (/ (fma (* 9.0 x) y (* (* (* t a) z) -4.0)) c) z)
         (fma (/ (* 9.0 x) c) (/ y z) (/ 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 t_1 = (x * 9.0) * y;
	double tmp;
	if (t_1 <= -5e-43) {
		tmp = (b + (9.0 * (x * y))) / (z * c);
	} else if (t_1 <= 2e-36) {
		tmp = ((b - (4.0 * (a * (t * z)))) / c) / z;
	} else if (t_1 <= 2e+225) {
		tmp = (fma((9.0 * x), y, (((t * a) * z) * -4.0)) / c) / z;
	} else {
		tmp = fma(((9.0 * x) / c), (y / z), (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)
	t_1 = Float64(Float64(x * 9.0) * y)
	tmp = 0.0
	if (t_1 <= -5e-43)
		tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c));
	elseif (t_1 <= 2e-36)
		tmp = Float64(Float64(Float64(b - Float64(4.0 * Float64(a * Float64(t * z)))) / c) / z);
	elseif (t_1 <= 2e+225)
		tmp = Float64(Float64(fma(Float64(9.0 * x), y, Float64(Float64(Float64(t * a) * z) * -4.0)) / c) / z);
	else
		tmp = fma(Float64(Float64(9.0 * x) / c), Float64(y / z), Float64(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_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-43], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e-36], N[(N[(N[(b - N[(4.0 * N[(a * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 2e+225], N[(N[(N[(N[(9.0 * x), $MachinePrecision] * y + N[(N[(N[(t * a), $MachinePrecision] * z), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(9.0 * x), $MachinePrecision] / c), $MachinePrecision] * N[(y / z), $MachinePrecision] + N[(b / 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}
t_1 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-43}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\

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

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

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


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

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Taylor expanded in 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-*.f6459.7

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

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

    if -5.00000000000000019e-43 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.9999999999999999e-36

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. 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 rewrites79.6%

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

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

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

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

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

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

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

    if 1.9999999999999999e-36 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999986e225

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Taylor expanded in 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.4

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

      \[\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. Step-by-step derivation
      1. lift-/.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. lift-*.f64N/A

        \[\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}} \]
      3. associate-/r*N/A

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

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

    if 1.99999999999999986e225 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 78.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. 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. associate-/r*N/A

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

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

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

      \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, \color{blue}{b}\right)}{z}}{c} \]
    5. Step-by-step derivation
      1. Applied rewrites57.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 9: 70.6% 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 -5 \cdot 10^{-43}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-57}:\\ \;\;\;\;\frac{\frac{b - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{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 -5e-43)
         (/ (+ b (* 9.0 (* x y))) (* z c))
         (if (<= t_1 5e-57)
           (/ (/ (- b (* 4.0 (* a (* t z)))) c) z)
           (/ (/ (fma (* y x) 9.0 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 t_1 = (x * 9.0) * y;
    	double tmp;
    	if (t_1 <= -5e-43) {
    		tmp = (b + (9.0 * (x * y))) / (z * c);
    	} else if (t_1 <= 5e-57) {
    		tmp = ((b - (4.0 * (a * (t * z)))) / c) / z;
    	} else {
    		tmp = (fma((y * x), 9.0, 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)
    	t_1 = Float64(Float64(x * 9.0) * y)
    	tmp = 0.0
    	if (t_1 <= -5e-43)
    		tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c));
    	elseif (t_1 <= 5e-57)
    		tmp = Float64(Float64(Float64(b - Float64(4.0 * Float64(a * Float64(t * z)))) / c) / z);
    	else
    		tmp = Float64(Float64(fma(Float64(y * x), 9.0, b) / 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, -5e-43], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-57], N[(N[(N[(b - N[(4.0 * N[(a * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / c), $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 -5 \cdot 10^{-43}:\\
    \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
    
    \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-57}:\\
    \;\;\;\;\frac{\frac{b - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c}}{z}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.00000000000000019e-43

      1. Initial program 78.9%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in 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-*.f6459.7

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

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

      if -5.00000000000000019e-43 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5.0000000000000002e-57

      1. Initial program 78.9%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. 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 rewrites79.6%

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

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

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

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

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

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

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

      if 5.0000000000000002e-57 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

      1. Initial program 78.9%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. 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 rewrites79.6%

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

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

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

      Alternative 10: 70.2% 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 -5 \cdot 10^{-43}:\\ \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-57}:\\ \;\;\;\;\frac{b - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{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 -5e-43)
           (/ (+ b (* 9.0 (* x y))) (* z c))
           (if (<= t_1 5e-57)
             (/ (- b (* 4.0 (* a (* t z)))) (* z c))
             (/ (/ (fma (* y x) 9.0 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 t_1 = (x * 9.0) * y;
      	double tmp;
      	if (t_1 <= -5e-43) {
      		tmp = (b + (9.0 * (x * y))) / (z * c);
      	} else if (t_1 <= 5e-57) {
      		tmp = (b - (4.0 * (a * (t * z)))) / (z * c);
      	} else {
      		tmp = (fma((y * x), 9.0, 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)
      	t_1 = Float64(Float64(x * 9.0) * y)
      	tmp = 0.0
      	if (t_1 <= -5e-43)
      		tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c));
      	elseif (t_1 <= 5e-57)
      		tmp = Float64(Float64(b - Float64(4.0 * Float64(a * Float64(t * z)))) / Float64(z * c));
      	else
      		tmp = Float64(Float64(fma(Float64(y * x), 9.0, b) / 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, -5e-43], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-57], N[(N[(b - N[(4.0 * N[(a * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / c), $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 -5 \cdot 10^{-43}:\\
      \;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
      
      \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-57}:\\
      \;\;\;\;\frac{b - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{z \cdot c}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.00000000000000019e-43

        1. Initial program 78.9%

          \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
        2. Taylor expanded in 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-*.f6459.7

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

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

        if -5.00000000000000019e-43 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5.0000000000000002e-57

        1. Initial program 78.9%

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

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

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

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

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

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

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

        if 5.0000000000000002e-57 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

        1. Initial program 78.9%

          \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
        2. 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 rewrites79.6%

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

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

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

        Alternative 11: 66.6% 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 -6.5 \cdot 10^{-78}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+179}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\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 (* -4.0 (/ (* a t) c))))
           (if (<= a -6.5e-78)
             t_1
             (if (<= a 4e+179) (/ (/ (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 = -4.0 * ((a * t) / c);
        	double tmp;
        	if (a <= -6.5e-78) {
        		tmp = t_1;
        	} else if (a <= 4e+179) {
        		tmp = (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(-4.0 * Float64(Float64(a * t) / c))
        	tmp = 0.0
        	if (a <= -6.5e-78)
        		tmp = t_1;
        	elseif (a <= 4e+179)
        		tmp = Float64(Float64(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[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.5e-78], t$95$1, If[LessEqual[a, 4e+179], N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $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 := -4 \cdot \frac{a \cdot t}{c}\\
        \mathbf{if}\;a \leq -6.5 \cdot 10^{-78}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;a \leq 4 \cdot 10^{+179}:\\
        \;\;\;\;\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if a < -6.5000000000000003e-78 or 3.99999999999999992e179 < a

          1. Initial program 78.9%

            \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
          2. Taylor expanded in 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-*.f6438.8

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

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

          if -6.5000000000000003e-78 < a < 3.99999999999999992e179

          1. Initial program 78.9%

            \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
          2. 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 rewrites79.6%

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

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

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

          Alternative 12: 66.2% 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 -6.5 \cdot 10^{-78}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+179}:\\ \;\;\;\;\frac{\mathsf{fma}\left(9, x \cdot y, b\right)}{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 (<= a -6.5e-78)
               t_1
               (if (<= a 4e+179) (/ (fma 9.0 (* x y) 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 (a <= -6.5e-78) {
          		tmp = t_1;
          	} else if (a <= 4e+179) {
          		tmp = fma(9.0, (x * y), 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 (a <= -6.5e-78)
          		tmp = t_1;
          	elseif (a <= 4e+179)
          		tmp = Float64(fma(9.0, Float64(x * y), b) / Float64(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[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.5e-78], t$95$1, If[LessEqual[a, 4e+179], N[(N[(9.0 * N[(x * y), $MachinePrecision] + b), $MachinePrecision] / 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}\;a \leq -6.5 \cdot 10^{-78}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;a \leq 4 \cdot 10^{+179}:\\
          \;\;\;\;\frac{\mathsf{fma}\left(9, x \cdot y, b\right)}{c \cdot z}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if a < -6.5000000000000003e-78 or 3.99999999999999992e179 < a

            1. Initial program 78.9%

              \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
            2. Taylor expanded in 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-*.f6438.8

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

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

            if -6.5000000000000003e-78 < a < 3.99999999999999992e179

            1. Initial program 78.9%

              \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
            2. 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. associate-/r*N/A

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

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

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

              \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, \color{blue}{b}\right)}{z}}{c} \]
            5. Step-by-step derivation
              1. Applied rewrites57.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 13: 50.6% 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{9 \cdot \frac{x \cdot y}{c}}{z}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-43}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-314}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{elif}\;t\_1 \leq 10^{-32}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \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 (/ (* 9.0 (/ (* x y) c)) z)))
               (if (<= t_1 -5e-43)
                 t_2
                 (if (<= t_1 -5e-314)
                   (* -4.0 (/ (* a t) c))
                   (if (<= t_1 1e-32) (/ (/ b c) z) 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 = (9.0 * ((x * y) / c)) / z;
            	double tmp;
            	if (t_1 <= -5e-43) {
            		tmp = t_2;
            	} else if (t_1 <= -5e-314) {
            		tmp = -4.0 * ((a * t) / c);
            	} else if (t_1 <= 1e-32) {
            		tmp = (b / c) / z;
            	} 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 = (9.0d0 * ((x * y) / c)) / z
                if (t_1 <= (-5d-43)) then
                    tmp = t_2
                else if (t_1 <= (-5d-314)) then
                    tmp = (-4.0d0) * ((a * t) / c)
                else if (t_1 <= 1d-32) then
                    tmp = (b / c) / z
                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 = (9.0 * ((x * y) / c)) / z;
            	double tmp;
            	if (t_1 <= -5e-43) {
            		tmp = t_2;
            	} else if (t_1 <= -5e-314) {
            		tmp = -4.0 * ((a * t) / c);
            	} else if (t_1 <= 1e-32) {
            		tmp = (b / c) / z;
            	} 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 = (9.0 * ((x * y) / c)) / z
            	tmp = 0
            	if t_1 <= -5e-43:
            		tmp = t_2
            	elif t_1 <= -5e-314:
            		tmp = -4.0 * ((a * t) / c)
            	elif t_1 <= 1e-32:
            		tmp = (b / c) / z
            	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(9.0 * Float64(Float64(x * y) / c)) / z)
            	tmp = 0.0
            	if (t_1 <= -5e-43)
            		tmp = t_2;
            	elseif (t_1 <= -5e-314)
            		tmp = Float64(-4.0 * Float64(Float64(a * t) / c));
            	elseif (t_1 <= 1e-32)
            		tmp = Float64(Float64(b / c) / z);
            	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 = (9.0 * ((x * y) / c)) / z;
            	tmp = 0.0;
            	if (t_1 <= -5e-43)
            		tmp = t_2;
            	elseif (t_1 <= -5e-314)
            		tmp = -4.0 * ((a * t) / c);
            	elseif (t_1 <= 1e-32)
            		tmp = (b / c) / z;
            	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[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-43], t$95$2, If[LessEqual[t$95$1, -5e-314], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-32], N[(N[(b / c), $MachinePrecision] / z), $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{9 \cdot \frac{x \cdot y}{c}}{z}\\
            \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-43}:\\
            \;\;\;\;t\_2\\
            
            \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-314}:\\
            \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
            
            \mathbf{elif}\;t\_1 \leq 10^{-32}:\\
            \;\;\;\;\frac{\frac{b}{c}}{z}\\
            
            \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) < -5.00000000000000019e-43 or 1.00000000000000006e-32 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

              1. Initial program 78.9%

                \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
              2. 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 rewrites79.6%

                \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b - a \cdot \left(t \cdot \left(4 \cdot z\right)\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.5

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

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

              if -5.00000000000000019e-43 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -4.99999999982e-314

              1. Initial program 78.9%

                \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
              2. Taylor expanded in 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-*.f6438.8

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

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

              if -4.99999999982e-314 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.00000000000000006e-32

              1. Initial program 78.9%

                \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
              2. 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 rewrites79.6%

                \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b - a \cdot \left(t \cdot \left(4 \cdot z\right)\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.3

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

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

            Alternative 14: 50.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\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-43}:\\ \;\;\;\;\frac{9 \cdot \left(x \cdot y\right)}{c \cdot z}\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-314}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{elif}\;t\_1 \leq 100000:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \frac{x \cdot y}{c \cdot 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 -5e-43)
                 (/ (* 9.0 (* x y)) (* c z))
                 (if (<= t_1 -5e-314)
                   (* -4.0 (/ (* a t) c))
                   (if (<= t_1 100000.0) (/ (/ b c) z) (* 9.0 (/ (* x 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 <= -5e-43) {
            		tmp = (9.0 * (x * y)) / (c * z);
            	} else if (t_1 <= -5e-314) {
            		tmp = -4.0 * ((a * t) / c);
            	} else if (t_1 <= 100000.0) {
            		tmp = (b / c) / z;
            	} else {
            		tmp = 9.0 * ((x * y) / (c * z));
            	}
            	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 <= (-5d-43)) then
                    tmp = (9.0d0 * (x * y)) / (c * z)
                else if (t_1 <= (-5d-314)) then
                    tmp = (-4.0d0) * ((a * t) / c)
                else if (t_1 <= 100000.0d0) then
                    tmp = (b / c) / z
                else
                    tmp = 9.0d0 * ((x * y) / (c * z))
                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 <= -5e-43) {
            		tmp = (9.0 * (x * y)) / (c * z);
            	} else if (t_1 <= -5e-314) {
            		tmp = -4.0 * ((a * t) / c);
            	} else if (t_1 <= 100000.0) {
            		tmp = (b / c) / z;
            	} else {
            		tmp = 9.0 * ((x * y) / (c * z));
            	}
            	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 <= -5e-43:
            		tmp = (9.0 * (x * y)) / (c * z)
            	elif t_1 <= -5e-314:
            		tmp = -4.0 * ((a * t) / c)
            	elif t_1 <= 100000.0:
            		tmp = (b / c) / z
            	else:
            		tmp = 9.0 * ((x * 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 <= -5e-43)
            		tmp = Float64(Float64(9.0 * Float64(x * y)) / Float64(c * z));
            	elseif (t_1 <= -5e-314)
            		tmp = Float64(-4.0 * Float64(Float64(a * t) / c));
            	elseif (t_1 <= 100000.0)
            		tmp = Float64(Float64(b / c) / z);
            	else
            		tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(c * z)));
            	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 <= -5e-43)
            		tmp = (9.0 * (x * y)) / (c * z);
            	elseif (t_1 <= -5e-314)
            		tmp = -4.0 * ((a * t) / c);
            	elseif (t_1 <= 100000.0)
            		tmp = (b / c) / z;
            	else
            		tmp = 9.0 * ((x * y) / (c * z));
            	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, -5e-43], N[(N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-314], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 100000.0], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], N[(9.0 * N[(N[(x * y), $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}
            t_1 := \left(x \cdot 9\right) \cdot y\\
            \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-43}:\\
            \;\;\;\;\frac{9 \cdot \left(x \cdot y\right)}{c \cdot z}\\
            
            \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-314}:\\
            \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
            
            \mathbf{elif}\;t\_1 \leq 100000:\\
            \;\;\;\;\frac{\frac{b}{c}}{z}\\
            
            \mathbf{else}:\\
            \;\;\;\;9 \cdot \frac{x \cdot y}{c \cdot z}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 4 regimes
            2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.00000000000000019e-43

              1. Initial program 78.9%

                \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
              2. 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. associate-/r*N/A

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

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

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

                \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, \color{blue}{b}\right)}{z}}{c} \]
              5. Step-by-step derivation
                1. Applied rewrites57.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -5.00000000000000019e-43 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -4.99999999982e-314

                1. Initial program 78.9%

                  \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
                2. Taylor expanded in 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-*.f6438.8

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

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

                if -4.99999999982e-314 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1e5

                1. Initial program 78.9%

                  \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
                2. 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 rewrites79.6%

                  \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b - a \cdot \left(t \cdot \left(4 \cdot z\right)\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.3

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

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

                if 1e5 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

                1. Initial program 78.9%

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

                  \[\leadsto \color{blue}{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}} \]
              6. Recombined 4 regimes into one program.
              7. Add Preprocessing

              Alternative 15: 50.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\\ t_2 := 9 \cdot \frac{x \cdot y}{c \cdot z}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-43}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-314}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{elif}\;t\_1 \leq 100000:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \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 (* 9.0 (/ (* x y) (* c z)))))
                 (if (<= t_1 -5e-43)
                   t_2
                   (if (<= t_1 -5e-314)
                     (* -4.0 (/ (* a t) c))
                     (if (<= t_1 100000.0) (/ (/ b c) z) 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 = 9.0 * ((x * y) / (c * z));
              	double tmp;
              	if (t_1 <= -5e-43) {
              		tmp = t_2;
              	} else if (t_1 <= -5e-314) {
              		tmp = -4.0 * ((a * t) / c);
              	} else if (t_1 <= 100000.0) {
              		tmp = (b / c) / z;
              	} 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 = 9.0d0 * ((x * y) / (c * z))
                  if (t_1 <= (-5d-43)) then
                      tmp = t_2
                  else if (t_1 <= (-5d-314)) then
                      tmp = (-4.0d0) * ((a * t) / c)
                  else if (t_1 <= 100000.0d0) then
                      tmp = (b / c) / z
                  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 = 9.0 * ((x * y) / (c * z));
              	double tmp;
              	if (t_1 <= -5e-43) {
              		tmp = t_2;
              	} else if (t_1 <= -5e-314) {
              		tmp = -4.0 * ((a * t) / c);
              	} else if (t_1 <= 100000.0) {
              		tmp = (b / c) / z;
              	} 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 = 9.0 * ((x * y) / (c * z))
              	tmp = 0
              	if t_1 <= -5e-43:
              		tmp = t_2
              	elif t_1 <= -5e-314:
              		tmp = -4.0 * ((a * t) / c)
              	elif t_1 <= 100000.0:
              		tmp = (b / c) / z
              	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(9.0 * Float64(Float64(x * y) / Float64(c * z)))
              	tmp = 0.0
              	if (t_1 <= -5e-43)
              		tmp = t_2;
              	elseif (t_1 <= -5e-314)
              		tmp = Float64(-4.0 * Float64(Float64(a * t) / c));
              	elseif (t_1 <= 100000.0)
              		tmp = Float64(Float64(b / c) / z);
              	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 = 9.0 * ((x * y) / (c * z));
              	tmp = 0.0;
              	if (t_1 <= -5e-43)
              		tmp = t_2;
              	elseif (t_1 <= -5e-314)
              		tmp = -4.0 * ((a * t) / c);
              	elseif (t_1 <= 100000.0)
              		tmp = (b / c) / z;
              	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[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-43], t$95$2, If[LessEqual[t$95$1, -5e-314], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 100000.0], N[(N[(b / c), $MachinePrecision] / z), $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 := 9 \cdot \frac{x \cdot y}{c \cdot z}\\
              \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-43}:\\
              \;\;\;\;t\_2\\
              
              \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-314}:\\
              \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
              
              \mathbf{elif}\;t\_1 \leq 100000:\\
              \;\;\;\;\frac{\frac{b}{c}}{z}\\
              
              \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) < -5.00000000000000019e-43 or 1e5 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

                1. Initial program 78.9%

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

                  \[\leadsto \color{blue}{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 -5.00000000000000019e-43 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -4.99999999982e-314

                1. Initial program 78.9%

                  \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
                2. Taylor expanded in 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-*.f6438.8

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

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

                if -4.99999999982e-314 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1e5

                1. Initial program 78.9%

                  \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
                2. 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 rewrites79.6%

                  \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b - a \cdot \left(t \cdot \left(4 \cdot z\right)\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.3

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

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

              Alternative 16: 49.8% 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 := \frac{\frac{b}{c}}{z}\\ \mathbf{if}\;b \leq -2.2 \cdot 10^{-50}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 3.5 \cdot 10^{+48}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{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 (/ (/ b c) z)))
                 (if (<= b -2.2e-50) t_1 (if (<= b 3.5e+48) (* -4.0 (/ (* a t) 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 = (b / c) / z;
              	double tmp;
              	if (b <= -2.2e-50) {
              		tmp = t_1;
              	} else if (b <= 3.5e+48) {
              		tmp = -4.0 * ((a * t) / c);
              	} 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 = (b / c) / z
                  if (b <= (-2.2d-50)) then
                      tmp = t_1
                  else if (b <= 3.5d+48) then
                      tmp = (-4.0d0) * ((a * t) / c)
                  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 = (b / c) / z;
              	double tmp;
              	if (b <= -2.2e-50) {
              		tmp = t_1;
              	} else if (b <= 3.5e+48) {
              		tmp = -4.0 * ((a * t) / c);
              	} 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 = (b / c) / z
              	tmp = 0
              	if b <= -2.2e-50:
              		tmp = t_1
              	elif b <= 3.5e+48:
              		tmp = -4.0 * ((a * t) / 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(Float64(b / c) / z)
              	tmp = 0.0
              	if (b <= -2.2e-50)
              		tmp = t_1;
              	elseif (b <= 3.5e+48)
              		tmp = Float64(-4.0 * Float64(Float64(a * t) / c));
              	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 = (b / c) / z;
              	tmp = 0.0;
              	if (b <= -2.2e-50)
              		tmp = t_1;
              	elseif (b <= 3.5e+48)
              		tmp = -4.0 * ((a * t) / c);
              	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[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[b, -2.2e-50], t$95$1, If[LessEqual[b, 3.5e+48], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / 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{\frac{b}{c}}{z}\\
              \mathbf{if}\;b \leq -2.2 \cdot 10^{-50}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;b \leq 3.5 \cdot 10^{+48}:\\
              \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if b < -2.1999999999999999e-50 or 3.4999999999999997e48 < b

                1. Initial program 78.9%

                  \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
                2. 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 rewrites79.6%

                  \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b - a \cdot \left(t \cdot \left(4 \cdot z\right)\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.3

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

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

                if -2.1999999999999999e-50 < b < 3.4999999999999997e48

                1. Initial program 78.9%

                  \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
                2. Taylor expanded in 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-*.f6438.8

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

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

              Alternative 17: 37.6% 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} \mathbf{if}\;\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} \leq 2 \cdot 10^{-192}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{b}{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 (<= (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2e-192)
                 (/ (/ b c) z)
                 (fabs (/ 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 ((((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)) <= 2e-192) {
              		tmp = (b / c) / z;
              	} else {
              		tmp = fabs((b / (c * z)));
              	}
              	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) :: tmp
                  if ((((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)) <= 2d-192) then
                      tmp = (b / c) / z
                  else
                      tmp = abs((b / (c * z)))
                  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 tmp;
              	if ((((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)) <= 2e-192) {
              		tmp = (b / c) / z;
              	} else {
              		tmp = Math.abs((b / (c * z)));
              	}
              	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):
              	tmp = 0
              	if (((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)) <= 2e-192:
              		tmp = (b / c) / z
              	else:
              		tmp = math.fabs((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 (Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) <= 2e-192)
              		tmp = Float64(Float64(b / c) / z);
              	else
              		tmp = abs(Float64(b / Float64(c * z)));
              	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)
              	tmp = 0.0;
              	if ((((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)) <= 2e-192)
              		tmp = (b / c) / z;
              	else
              		tmp = abs((b / (c * z)));
              	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_] := If[LessEqual[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], 2e-192], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], N[Abs[N[(b / 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}\;\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} \leq 2 \cdot 10^{-192}:\\
              \;\;\;\;\frac{\frac{b}{c}}{z}\\
              
              \mathbf{else}:\\
              \;\;\;\;\left|\frac{b}{c \cdot z}\right|\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 2.0000000000000002e-192

                1. Initial program 78.9%

                  \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
                2. 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 rewrites79.6%

                  \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b - a \cdot \left(t \cdot \left(4 \cdot z\right)\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.3

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

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

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

                1. Initial program 78.9%

                  \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
                2. Taylor expanded in 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-*.f6434.6

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

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

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

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

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

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

                    \[\leadsto \frac{1}{\color{blue}{\frac{c \cdot z}{b}}} \]
                  2. inv-powN/A

                    \[\leadsto {\left(\frac{c \cdot z}{b}\right)}^{\color{blue}{-1}} \]
                  3. pow-to-expN/A

                    \[\leadsto e^{\log \left(\frac{c \cdot z}{b}\right) \cdot -1} \]
                  4. exp-fabsN/A

                    \[\leadsto \left|e^{\log \left(\frac{c \cdot z}{b}\right) \cdot -1}\right| \]
                  5. pow-to-expN/A

                    \[\leadsto \left|{\left(\frac{c \cdot z}{b}\right)}^{-1}\right| \]
                  6. inv-powN/A

                    \[\leadsto \left|\frac{1}{\frac{c \cdot z}{b}}\right| \]
                  7. lift-/.f64N/A

                    \[\leadsto \left|\frac{1}{\frac{c \cdot z}{b}}\right| \]
                  8. lower-fabs.f6422.1

                    \[\leadsto \left|\frac{1}{\frac{c \cdot z}{b}}\right| \]
                  9. lift-/.f64N/A

                    \[\leadsto \left|\frac{1}{\frac{c \cdot z}{b}}\right| \]
                  10. lift-/.f64N/A

                    \[\leadsto \left|\frac{1}{\frac{c \cdot z}{b}}\right| \]
                  11. div-flip-revN/A

                    \[\leadsto \left|\frac{b}{c \cdot z}\right| \]
                  12. lower-/.f6422.2

                    \[\leadsto \left|\frac{b}{c \cdot z}\right| \]
                8. Applied rewrites22.2%

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

              Alternative 18: 34.6% 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 78.9%

                \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
              2. 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 rewrites79.6%

                \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b - a \cdot \left(t \cdot \left(4 \cdot z\right)\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.3

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

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

              Alternative 19: 34.3% 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 78.9%

                \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
              2. Taylor expanded in 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-*.f6434.6

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

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

              Reproduce

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