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

Percentage Accurate: 79.9% → 90.4%
Time: 5.8s
Alternatives: 14
Speedup: 0.8×

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 14 alternatives:

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

Initial Program: 79.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: 90.4% accurate, 0.7× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \frac{-\mathsf{fma}\left(-9, \frac{y}{z}, -\frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{b}{z}\right)}{x}\right) \cdot x}{c}\\ \mathbf{if}\;z \leq -3.1 \cdot 10^{+16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+56}:\\ \;\;\;\;\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{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.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1
         (/
          (- (* (fma -9.0 (/ y z) (- (/ (fma (* -4.0 a) t (/ b z)) x))) x))
          c)))
   (if (<= z -3.1e+16)
     t_1
     (if (<= z 6.8e+56)
       (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c))
       t_1))))
assert(x < y && y < z && z < t && t < a && a < b && b < 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 = -(fma(-9.0, (y / z), -(fma((-4.0 * a), t, (b / z)) / x)) * x) / c;
	double tmp;
	if (z <= -3.1e+16) {
		tmp = t_1;
	} else if (z <= 6.8e+56) {
		tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
	} else {
		tmp = t_1;
	}
	return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
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(fma(-9.0, Float64(y / z), Float64(-Float64(fma(Float64(-4.0 * a), t, Float64(b / z)) / x))) * x)) / c)
	tmp = 0.0
	if (z <= -3.1e+16)
		tmp = t_1;
	elseif (z <= 6.8e+56)
		tmp = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c));
	else
		tmp = t_1;
	end
	return tmp
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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[(-9.0 * N[(y / z), $MachinePrecision] + (-N[(N[(N[(-4.0 * a), $MachinePrecision] * t + N[(b / z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision])), $MachinePrecision] * x), $MachinePrecision]) / c), $MachinePrecision]}, If[LessEqual[z, -3.1e+16], t$95$1, If[LessEqual[z, 6.8e+56], 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], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{-\mathsf{fma}\left(-9, \frac{y}{z}, -\frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{b}{z}\right)}{x}\right) \cdot x}{c}\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 6.8 \cdot 10^{+56}:\\
\;\;\;\;\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{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.1e16 or 6.80000000000000002e56 < z

    1. Initial program 79.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.1e16 < z < 6.80000000000000002e56

    1. Initial program 79.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} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 89.3% accurate, 0.3× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [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 0:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{x}{t} \cdot \frac{y}{z}, 9, -4 \cdot a\right)}{c} \cdot t\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 0.0)
     (/ (fma (* -4.0 a) t (/ (fma (* y x) 9.0 b) z)) c)
     (if (<= t_1 INFINITY)
       t_1
       (* (/ (fma (* (/ x t) (/ y z)) 9.0 (* -4.0 a)) c) t)))))
assert(x < y && y < z && z < t && t < a && a < b && b < 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 <= 0.0) {
		tmp = fma((-4.0 * a), t, (fma((y * x), 9.0, b) / z)) / c;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = (fma(((x / t) * (y / z)), 9.0, (-4.0 * a)) / c) * t;
	}
	return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
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 <= 0.0)
		tmp = Float64(fma(Float64(-4.0 * a), t, Float64(fma(Float64(y * x), 9.0, b) / z)) / c);
	elseif (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(Float64(fma(Float64(Float64(x / t) * Float64(y / z)), 9.0, Float64(-4.0 * a)) / c) * t);
	end
	return tmp
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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, 0.0], N[(N[(N[(-4.0 * a), $MachinePrecision] * t + N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(N[(N[(N[(x / t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision] * 9.0 + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] * t), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[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 0:\\
\;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c}\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 79.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 79.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} \]

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

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

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

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

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

        \[\leadsto \frac{-4 \cdot a + 9 \cdot \frac{x \cdot y}{t \cdot z}}{c} \cdot t \]
      3. Step-by-step derivation
        1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 89.2% accurate, 0.3× speedup?

    \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\\ t_2 := \frac{\left(\left(x \cdot 9\right) \cdot y - t\_1\right) + b}{z \cdot c}\\ \mathbf{if}\;t\_2 \leq 0:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\frac{\left(x \cdot \left(y \cdot 9\right) - t\_1\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{x}{t} \cdot \frac{y}{z}, 9, -4 \cdot a\right)}{c} \cdot t\\ \end{array} \end{array} \]
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    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 (* (* (* z 4.0) t) a))
            (t_2 (/ (+ (- (* (* x 9.0) y) t_1) b) (* z c))))
       (if (<= t_2 0.0)
         (/ (fma (* -4.0 a) t (/ (fma (* y x) 9.0 b) z)) c)
         (if (<= t_2 INFINITY)
           (/ (+ (- (* x (* y 9.0)) t_1) b) (* z c))
           (* (/ (fma (* (/ x t) (/ y z)) 9.0 (* -4.0 a)) c) t)))))
    assert(x < y && y < z && z < t && t < a && a < b && b < 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 = ((z * 4.0) * t) * a;
    	double t_2 = ((((x * 9.0) * y) - t_1) + b) / (z * c);
    	double tmp;
    	if (t_2 <= 0.0) {
    		tmp = fma((-4.0 * a), t, (fma((y * x), 9.0, b) / z)) / c;
    	} else if (t_2 <= ((double) INFINITY)) {
    		tmp = (((x * (y * 9.0)) - t_1) + b) / (z * c);
    	} else {
    		tmp = (fma(((x / t) * (y / z)), 9.0, (-4.0 * a)) / c) * t;
    	}
    	return tmp;
    }
    
    x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
    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(z * 4.0) * t) * a)
    	t_2 = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - t_1) + b) / Float64(z * c))
    	tmp = 0.0
    	if (t_2 <= 0.0)
    		tmp = Float64(fma(Float64(-4.0 * a), t, Float64(fma(Float64(y * x), 9.0, b) / z)) / c);
    	elseif (t_2 <= Inf)
    		tmp = Float64(Float64(Float64(Float64(x * Float64(y * 9.0)) - t_1) + b) / Float64(z * c));
    	else
    		tmp = Float64(Float64(fma(Float64(Float64(x / t) * Float64(y / z)), 9.0, Float64(-4.0 * a)) / c) * t);
    	end
    	return tmp
    end
    
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    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[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - t$95$1), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[(N[(-4.0 * a), $MachinePrecision] * t + N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(N[(N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(x / t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision] * 9.0 + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] * t), $MachinePrecision]]]]]
    
    \begin{array}{l}
    [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
    [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
    \\
    \begin{array}{l}
    t_1 := \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\\
    t_2 := \frac{\left(\left(x \cdot 9\right) \cdot y - t\_1\right) + b}{z \cdot c}\\
    \mathbf{if}\;t\_2 \leq 0:\\
    \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c}\\
    
    \mathbf{elif}\;t\_2 \leq \infty:\\
    \;\;\;\;\frac{\left(x \cdot \left(y \cdot 9\right) - t\_1\right) + b}{z \cdot c}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(\frac{x}{t} \cdot \frac{y}{z}, 9, -4 \cdot a\right)}{c} \cdot t\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 0.0

      1. Initial program 79.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{-4 \cdot a + 9 \cdot \frac{x \cdot y}{t \cdot z}}{c} \cdot t \]
        3. Step-by-step derivation
          1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 4: 88.7% accurate, 0.5× speedup?

      \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [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 \infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{x}{t} \cdot \frac{y}{z}, 9, -4 \cdot a\right)}{c} \cdot t\\ \end{array} \end{array} \]
      NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
      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)) INFINITY)
         (/ (fma (* -4.0 a) t (/ (fma (* y x) 9.0 b) z)) c)
         (* (/ (fma (* (/ x t) (/ y z)) 9.0 (* -4.0 a)) c) t)))
      assert(x < y && y < z && z < t && t < a && a < b && b < c);
      assert(x < y && y < z && z < t && t < a && a < b && b < c);
      double code(double x, double y, double z, double t, double a, double b, double c) {
      	double tmp;
      	if ((((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)) <= ((double) INFINITY)) {
      		tmp = fma((-4.0 * a), t, (fma((y * x), 9.0, b) / z)) / c;
      	} else {
      		tmp = (fma(((x / t) * (y / z)), 9.0, (-4.0 * a)) / c) * t;
      	}
      	return tmp;
      }
      
      x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
      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)) <= Inf)
      		tmp = Float64(fma(Float64(-4.0 * a), t, Float64(fma(Float64(y * x), 9.0, b) / z)) / c);
      	else
      		tmp = Float64(Float64(fma(Float64(Float64(x / t) * Float64(y / z)), 9.0, Float64(-4.0 * a)) / c) * t);
      	end
      	return tmp
      end
      
      NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
      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], Infinity], N[(N[(N[(-4.0 * a), $MachinePrecision] * t + N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(N[(N[(N[(x / t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision] * 9.0 + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] * t), $MachinePrecision]]
      
      \begin{array}{l}
      [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
      [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 \infty:\\
      \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\mathsf{fma}\left(\frac{x}{t} \cdot \frac{y}{z}, 9, -4 \cdot a\right)}{c} \cdot t\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0

        1. Initial program 79.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{-4 \cdot a + 9 \cdot \frac{x \cdot y}{t \cdot z}}{c} \cdot t \]
          3. Step-by-step derivation
            1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 5: 88.4% accurate, 0.5× speedup?

        \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [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 \infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x \cdot \frac{y}{t \cdot z}, 9, -4 \cdot a\right)}{c} \cdot t\\ \end{array} \end{array} \]
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        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)) INFINITY)
           (/ (fma (* -4.0 a) t (/ (fma (* y x) 9.0 b) z)) c)
           (* (/ (fma (* x (/ y (* t z))) 9.0 (* -4.0 a)) c) t)))
        assert(x < y && y < z && z < t && t < a && a < b && b < c);
        assert(x < y && y < z && z < t && t < a && a < b && b < c);
        double code(double x, double y, double z, double t, double a, double b, double c) {
        	double tmp;
        	if ((((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)) <= ((double) INFINITY)) {
        		tmp = fma((-4.0 * a), t, (fma((y * x), 9.0, b) / z)) / c;
        	} else {
        		tmp = (fma((x * (y / (t * z))), 9.0, (-4.0 * a)) / c) * t;
        	}
        	return tmp;
        }
        
        x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
        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)) <= Inf)
        		tmp = Float64(fma(Float64(-4.0 * a), t, Float64(fma(Float64(y * x), 9.0, b) / z)) / c);
        	else
        		tmp = Float64(Float64(fma(Float64(x * Float64(y / Float64(t * z))), 9.0, Float64(-4.0 * a)) / c) * t);
        	end
        	return tmp
        end
        
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        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], Infinity], N[(N[(N[(-4.0 * a), $MachinePrecision] * t + N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(N[(N[(x * N[(y / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 9.0 + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] * t), $MachinePrecision]]
        
        \begin{array}{l}
        [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
        [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 \infty:\\
        \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(x \cdot \frac{y}{t \cdot z}, 9, -4 \cdot a\right)}{c} \cdot t\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0

          1. Initial program 79.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{-4 \cdot a + 9 \cdot \frac{x \cdot y}{t \cdot z}}{c} \cdot t \]
            3. Step-by-step derivation
              1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

          Alternative 6: 87.7% accurate, 0.8× speedup?

          \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;\left(x \cdot 9\right) \cdot y \leq 10^{+268}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{x}{z}, 9, \frac{b}{z \cdot y}\right) \cdot y}{c}\\ \end{array} \end{array} \]
          NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
          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) 1e+268)
             (/ (fma (* -4.0 a) t (/ (fma (* y x) 9.0 b) z)) c)
             (/ (* (fma (/ x z) 9.0 (/ b (* z y))) y) c)))
          assert(x < y && y < z && z < t && t < a && a < b && b < c);
          assert(x < y && y < z && z < t && t < a && a < b && b < c);
          double code(double x, double y, double z, double t, double a, double b, double c) {
          	double tmp;
          	if (((x * 9.0) * y) <= 1e+268) {
          		tmp = fma((-4.0 * a), t, (fma((y * x), 9.0, b) / z)) / c;
          	} else {
          		tmp = (fma((x / z), 9.0, (b / (z * y))) * y) / c;
          	}
          	return tmp;
          }
          
          x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
          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(x * 9.0) * y) <= 1e+268)
          		tmp = Float64(fma(Float64(-4.0 * a), t, Float64(fma(Float64(y * x), 9.0, b) / z)) / c);
          	else
          		tmp = Float64(Float64(fma(Float64(x / z), 9.0, Float64(b / Float64(z * y))) * y) / c);
          	end
          	return tmp
          end
          
          NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
          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[(x * 9.0), $MachinePrecision] * y), $MachinePrecision], 1e+268], N[(N[(N[(-4.0 * a), $MachinePrecision] * t + N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(N[(N[(x / z), $MachinePrecision] * 9.0 + N[(b / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] / c), $MachinePrecision]]
          
          \begin{array}{l}
          [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
          [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
          \\
          \begin{array}{l}
          \mathbf{if}\;\left(x \cdot 9\right) \cdot y \leq 10^{+268}:\\
          \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{\mathsf{fma}\left(\frac{x}{z}, 9, \frac{b}{z \cdot y}\right) \cdot y}{c}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.9999999999999997e267

            1. Initial program 79.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 9.9999999999999997e267 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

            1. Initial program 79.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 7: 75.6% accurate, 0.6× speedup?

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

            1. Initial program 79.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -3.9999999999999997e-40 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.0000000000000001e148

            1. Initial program 79.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 1.00000000000000002e306 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

              1. Initial program 79.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{-\left(\frac{y}{z} \cdot -9\right) \cdot x}{c} \]
              12. Applied rewrites35.7%

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

            Alternative 8: 75.3% accurate, 0.7× speedup?

            \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [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 -4 \cdot 10^{-40}:\\ \;\;\;\;\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c \cdot z}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+148}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{b}{z}\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\frac{-9 \cdot y - \frac{b}{x}}{z} \cdot x}{c}\\ \end{array} \end{array} \]
            NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
            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 -4e-40)
                 (/ (fma (* 9.0 x) y b) (* c z))
                 (if (<= t_1 2e+148)
                   (/ (fma (* -4.0 a) t (/ b z)) c)
                   (/ (- (* (/ (- (* -9.0 y) (/ b x)) z) x)) c)))))
            assert(x < y && y < z && z < t && t < a && a < b && b < c);
            assert(x < y && y < z && z < t && t < a && a < b && b < c);
            double code(double x, double y, double z, double t, double a, double b, double c) {
            	double t_1 = (x * 9.0) * y;
            	double tmp;
            	if (t_1 <= -4e-40) {
            		tmp = fma((9.0 * x), y, b) / (c * z);
            	} else if (t_1 <= 2e+148) {
            		tmp = fma((-4.0 * a), t, (b / z)) / c;
            	} else {
            		tmp = -((((-9.0 * y) - (b / x)) / z) * x) / c;
            	}
            	return tmp;
            }
            
            x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
            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 <= -4e-40)
            		tmp = Float64(fma(Float64(9.0 * x), y, b) / Float64(c * z));
            	elseif (t_1 <= 2e+148)
            		tmp = Float64(fma(Float64(-4.0 * a), t, Float64(b / z)) / c);
            	else
            		tmp = Float64(Float64(-Float64(Float64(Float64(Float64(-9.0 * y) - Float64(b / x)) / z) * x)) / c);
            	end
            	return tmp
            end
            
            NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
            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, -4e-40], N[(N[(N[(9.0 * x), $MachinePrecision] * y + b), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+148], N[(N[(N[(-4.0 * a), $MachinePrecision] * t + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[((-N[(N[(N[(N[(-9.0 * y), $MachinePrecision] - N[(b / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision]) / c), $MachinePrecision]]]]
            
            \begin{array}{l}
            [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
            [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 -4 \cdot 10^{-40}:\\
            \;\;\;\;\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c \cdot z}\\
            
            \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+148}:\\
            \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{b}{z}\right)}{c}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{-\frac{-9 \cdot y - \frac{b}{x}}{z} \cdot x}{c}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -3.9999999999999997e-40

              1. Initial program 79.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -3.9999999999999997e-40 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.0000000000000001e148

              1. Initial program 79.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                1. Initial program 79.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{-\frac{-9 \cdot y - \frac{b}{x}}{z} \cdot x}{c} \]
                  4. lower-/.f6455.1

                    \[\leadsto \frac{-\frac{-9 \cdot y - \frac{b}{x}}{z} \cdot x}{c} \]
                12. Applied rewrites55.1%

                  \[\leadsto \frac{-\frac{-9 \cdot y - \frac{b}{x}}{z} \cdot x}{c} \]
              12. Recombined 3 regimes into one program.
              13. Add Preprocessing

              Alternative 9: 66.3% accurate, 1.2× speedup?

              \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \left(\frac{t}{c} \cdot -4\right) \cdot a\\ \mathbf{if}\;a \leq -1.2 \cdot 10^{-39}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{+73}:\\ \;\;\;\;\frac{\mathsf{fma}\left(9 \cdot x, 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.
              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 (* (* (/ t c) -4.0) a)))
                 (if (<= a -1.2e-39)
                   t_1
                   (if (<= a 1.65e+73) (/ (fma (* 9.0 x) y b) (* c z)) t_1))))
              assert(x < y && y < z && z < t && t < a && a < b && b < 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 = ((t / c) * -4.0) * a;
              	double tmp;
              	if (a <= -1.2e-39) {
              		tmp = t_1;
              	} else if (a <= 1.65e+73) {
              		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])
              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(t / c) * -4.0) * a)
              	tmp = 0.0
              	if (a <= -1.2e-39)
              		tmp = t_1;
              	elseif (a <= 1.65e+73)
              		tmp = Float64(fma(Float64(9.0 * 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.
              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[(t / c), $MachinePrecision] * -4.0), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -1.2e-39], t$95$1, If[LessEqual[a, 1.65e+73], N[(N[(N[(9.0 * x), $MachinePrecision] * y + 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])\\\\
              [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
              \\
              \begin{array}{l}
              t_1 := \left(\frac{t}{c} \cdot -4\right) \cdot a\\
              \mathbf{if}\;a \leq -1.2 \cdot 10^{-39}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;a \leq 1.65 \cdot 10^{+73}:\\
              \;\;\;\;\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c \cdot z}\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if a < -1.20000000000000008e-39 or 1.65000000000000015e73 < a

                1. Initial program 79.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 a around inf

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

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

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

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

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

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

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

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

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

                if -1.20000000000000008e-39 < a < 1.65000000000000015e73

                1. Initial program 79.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 10: 49.7% accurate, 0.9× speedup?

              \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \frac{\left(y \cdot x\right) \cdot 9}{c \cdot z}\\ \mathbf{if}\;b \leq -55000000:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;b \leq -2.7 \cdot 10^{-122}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -1.08 \cdot 10^{-291}:\\ \;\;\;\;\left(\frac{t}{c} \cdot -4\right) \cdot a\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{-194}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 4.2 \cdot 10^{-23}:\\ \;\;\;\;\left(\frac{a}{c} \cdot -4\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{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.
              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 (/ (* (* y x) 9.0) (* c z))))
                 (if (<= b -55000000.0)
                   (/ (/ b c) z)
                   (if (<= b -2.7e-122)
                     t_1
                     (if (<= b -1.08e-291)
                       (* (* (/ t c) -4.0) a)
                       (if (<= b 2.4e-194)
                         t_1
                         (if (<= b 4.2e-23) (* (* (/ a c) -4.0) t) (/ b (* c z)))))))))
              assert(x < y && y < z && z < t && t < a && a < b && b < 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 = ((y * x) * 9.0) / (c * z);
              	double tmp;
              	if (b <= -55000000.0) {
              		tmp = (b / c) / z;
              	} else if (b <= -2.7e-122) {
              		tmp = t_1;
              	} else if (b <= -1.08e-291) {
              		tmp = ((t / c) * -4.0) * a;
              	} else if (b <= 2.4e-194) {
              		tmp = t_1;
              	} else if (b <= 4.2e-23) {
              		tmp = ((a / c) * -4.0) * t;
              	} else {
              		tmp = b / (c * z);
              	}
              	return tmp;
              }
              
              NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
              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 = ((y * x) * 9.0d0) / (c * z)
                  if (b <= (-55000000.0d0)) then
                      tmp = (b / c) / z
                  else if (b <= (-2.7d-122)) then
                      tmp = t_1
                  else if (b <= (-1.08d-291)) then
                      tmp = ((t / c) * (-4.0d0)) * a
                  else if (b <= 2.4d-194) then
                      tmp = t_1
                  else if (b <= 4.2d-23) then
                      tmp = ((a / c) * (-4.0d0)) * t
                  else
                      tmp = b / (c * z)
                  end if
                  code = tmp
              end function
              
              assert x < y && y < z && z < t && t < a && a < b && b < c;
              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 = ((y * x) * 9.0) / (c * z);
              	double tmp;
              	if (b <= -55000000.0) {
              		tmp = (b / c) / z;
              	} else if (b <= -2.7e-122) {
              		tmp = t_1;
              	} else if (b <= -1.08e-291) {
              		tmp = ((t / c) * -4.0) * a;
              	} else if (b <= 2.4e-194) {
              		tmp = t_1;
              	} else if (b <= 4.2e-23) {
              		tmp = ((a / c) * -4.0) * t;
              	} else {
              		tmp = b / (c * z);
              	}
              	return tmp;
              }
              
              [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
              [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 = ((y * x) * 9.0) / (c * z)
              	tmp = 0
              	if b <= -55000000.0:
              		tmp = (b / c) / z
              	elif b <= -2.7e-122:
              		tmp = t_1
              	elif b <= -1.08e-291:
              		tmp = ((t / c) * -4.0) * a
              	elif b <= 2.4e-194:
              		tmp = t_1
              	elif b <= 4.2e-23:
              		tmp = ((a / c) * -4.0) * t
              	else:
              		tmp = b / (c * z)
              	return tmp
              
              x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
              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(y * x) * 9.0) / Float64(c * z))
              	tmp = 0.0
              	if (b <= -55000000.0)
              		tmp = Float64(Float64(b / c) / z);
              	elseif (b <= -2.7e-122)
              		tmp = t_1;
              	elseif (b <= -1.08e-291)
              		tmp = Float64(Float64(Float64(t / c) * -4.0) * a);
              	elseif (b <= 2.4e-194)
              		tmp = t_1;
              	elseif (b <= 4.2e-23)
              		tmp = Float64(Float64(Float64(a / c) * -4.0) * t);
              	else
              		tmp = 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])){:}
              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 = ((y * x) * 9.0) / (c * z);
              	tmp = 0.0;
              	if (b <= -55000000.0)
              		tmp = (b / c) / z;
              	elseif (b <= -2.7e-122)
              		tmp = t_1;
              	elseif (b <= -1.08e-291)
              		tmp = ((t / c) * -4.0) * a;
              	elseif (b <= 2.4e-194)
              		tmp = t_1;
              	elseif (b <= 4.2e-23)
              		tmp = ((a / c) * -4.0) * t;
              	else
              		tmp = 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.
              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[(y * x), $MachinePrecision] * 9.0), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -55000000.0], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, -2.7e-122], t$95$1, If[LessEqual[b, -1.08e-291], N[(N[(N[(t / c), $MachinePrecision] * -4.0), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 2.4e-194], t$95$1, If[LessEqual[b, 4.2e-23], N[(N[(N[(a / c), $MachinePrecision] * -4.0), $MachinePrecision] * t), $MachinePrecision], 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])\\\\
              [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
              \\
              \begin{array}{l}
              t_1 := \frac{\left(y \cdot x\right) \cdot 9}{c \cdot z}\\
              \mathbf{if}\;b \leq -55000000:\\
              \;\;\;\;\frac{\frac{b}{c}}{z}\\
              
              \mathbf{elif}\;b \leq -2.7 \cdot 10^{-122}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;b \leq -1.08 \cdot 10^{-291}:\\
              \;\;\;\;\left(\frac{t}{c} \cdot -4\right) \cdot a\\
              
              \mathbf{elif}\;b \leq 2.4 \cdot 10^{-194}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;b \leq 4.2 \cdot 10^{-23}:\\
              \;\;\;\;\left(\frac{a}{c} \cdot -4\right) \cdot t\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{b}{c \cdot z}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 5 regimes
              2. if b < -5.5e7

                1. Initial program 79.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-*.f6435.7

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

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

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

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

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

                    \[\leadsto \frac{\frac{b}{c}}{\color{blue}{z}} \]
                  5. lower-/.f6435.2

                    \[\leadsto \frac{\frac{b}{c}}{z} \]
                6. Applied rewrites35.2%

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

                if -5.5e7 < b < -2.70000000000000009e-122 or -1.08e-291 < b < 2.4e-194

                1. Initial program 79.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. associate-*r/N/A

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

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

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

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

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

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

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

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

                if -2.70000000000000009e-122 < b < -1.08e-291

                1. Initial program 79.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 a around inf

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

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

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

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

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

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

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

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

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

                if 2.4e-194 < b < 4.2000000000000002e-23

                1. Initial program 79.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. *-commutativeN/A

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

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

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

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

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

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

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

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

                if 4.2000000000000002e-23 < b

                1. Initial program 79.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-*.f6435.7

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

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

              Alternative 11: 49.0% accurate, 1.5× speedup?

              \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;b \leq -2.05 \cdot 10^{-60}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;b \leq 4.2 \cdot 10^{-23}:\\ \;\;\;\;\left(\frac{t}{c} \cdot -4\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{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.
              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 (<= b -2.05e-60)
                 (/ (/ b c) z)
                 (if (<= b 4.2e-23) (* (* (/ t c) -4.0) a) (/ b (* c z)))))
              assert(x < y && y < z && z < t && t < a && a < b && b < c);
              assert(x < y && y < z && z < t && t < a && a < b && b < c);
              double code(double x, double y, double z, double t, double a, double b, double c) {
              	double tmp;
              	if (b <= -2.05e-60) {
              		tmp = (b / c) / z;
              	} else if (b <= 4.2e-23) {
              		tmp = ((t / c) * -4.0) * a;
              	} else {
              		tmp = b / (c * z);
              	}
              	return tmp;
              }
              
              NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
              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 (b <= (-2.05d-60)) then
                      tmp = (b / c) / z
                  else if (b <= 4.2d-23) then
                      tmp = ((t / c) * (-4.0d0)) * a
                  else
                      tmp = b / (c * z)
                  end if
                  code = tmp
              end function
              
              assert x < y && y < z && z < t && t < a && a < b && b < c;
              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 (b <= -2.05e-60) {
              		tmp = (b / c) / z;
              	} else if (b <= 4.2e-23) {
              		tmp = ((t / c) * -4.0) * a;
              	} else {
              		tmp = b / (c * z);
              	}
              	return tmp;
              }
              
              [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
              [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 b <= -2.05e-60:
              		tmp = (b / c) / z
              	elif b <= 4.2e-23:
              		tmp = ((t / c) * -4.0) * a
              	else:
              		tmp = b / (c * z)
              	return tmp
              
              x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
              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 (b <= -2.05e-60)
              		tmp = Float64(Float64(b / c) / z);
              	elseif (b <= 4.2e-23)
              		tmp = Float64(Float64(Float64(t / c) * -4.0) * a);
              	else
              		tmp = 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])){:}
              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 (b <= -2.05e-60)
              		tmp = (b / c) / z;
              	elseif (b <= 4.2e-23)
              		tmp = ((t / c) * -4.0) * a;
              	else
              		tmp = 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.
              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[b, -2.05e-60], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 4.2e-23], N[(N[(N[(t / c), $MachinePrecision] * -4.0), $MachinePrecision] * a), $MachinePrecision], 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])\\\\
              [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
              \\
              \begin{array}{l}
              \mathbf{if}\;b \leq -2.05 \cdot 10^{-60}:\\
              \;\;\;\;\frac{\frac{b}{c}}{z}\\
              
              \mathbf{elif}\;b \leq 4.2 \cdot 10^{-23}:\\
              \;\;\;\;\left(\frac{t}{c} \cdot -4\right) \cdot a\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{b}{c \cdot z}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if b < -2.05000000000000006e-60

                1. Initial program 79.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-*.f6435.7

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

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

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

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

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

                    \[\leadsto \frac{\frac{b}{c}}{\color{blue}{z}} \]
                  5. lower-/.f6435.2

                    \[\leadsto \frac{\frac{b}{c}}{z} \]
                6. Applied rewrites35.2%

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

                if -2.05000000000000006e-60 < b < 4.2000000000000002e-23

                1. Initial program 79.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 a around inf

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

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

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

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

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

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

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

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

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

                if 4.2000000000000002e-23 < b

                1. Initial program 79.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-*.f6435.7

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

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

              Alternative 12: 48.8% accurate, 1.5× speedup?

              \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;b \leq -2.65 \cdot 10^{-67}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;b \leq 4.2 \cdot 10^{-23}:\\ \;\;\;\;\left(\frac{a}{c} \cdot -4\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{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.
              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 (<= b -2.65e-67)
                 (/ (/ b c) z)
                 (if (<= b 4.2e-23) (* (* (/ a c) -4.0) t) (/ b (* c z)))))
              assert(x < y && y < z && z < t && t < a && a < b && b < c);
              assert(x < y && y < z && z < t && t < a && a < b && b < c);
              double code(double x, double y, double z, double t, double a, double b, double c) {
              	double tmp;
              	if (b <= -2.65e-67) {
              		tmp = (b / c) / z;
              	} else if (b <= 4.2e-23) {
              		tmp = ((a / c) * -4.0) * t;
              	} else {
              		tmp = b / (c * z);
              	}
              	return tmp;
              }
              
              NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
              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 (b <= (-2.65d-67)) then
                      tmp = (b / c) / z
                  else if (b <= 4.2d-23) then
                      tmp = ((a / c) * (-4.0d0)) * t
                  else
                      tmp = b / (c * z)
                  end if
                  code = tmp
              end function
              
              assert x < y && y < z && z < t && t < a && a < b && b < c;
              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 (b <= -2.65e-67) {
              		tmp = (b / c) / z;
              	} else if (b <= 4.2e-23) {
              		tmp = ((a / c) * -4.0) * t;
              	} else {
              		tmp = b / (c * z);
              	}
              	return tmp;
              }
              
              [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
              [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 b <= -2.65e-67:
              		tmp = (b / c) / z
              	elif b <= 4.2e-23:
              		tmp = ((a / c) * -4.0) * t
              	else:
              		tmp = b / (c * z)
              	return tmp
              
              x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
              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 (b <= -2.65e-67)
              		tmp = Float64(Float64(b / c) / z);
              	elseif (b <= 4.2e-23)
              		tmp = Float64(Float64(Float64(a / c) * -4.0) * t);
              	else
              		tmp = 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])){:}
              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 (b <= -2.65e-67)
              		tmp = (b / c) / z;
              	elseif (b <= 4.2e-23)
              		tmp = ((a / c) * -4.0) * t;
              	else
              		tmp = 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.
              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[b, -2.65e-67], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 4.2e-23], N[(N[(N[(a / c), $MachinePrecision] * -4.0), $MachinePrecision] * t), $MachinePrecision], 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])\\\\
              [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
              \\
              \begin{array}{l}
              \mathbf{if}\;b \leq -2.65 \cdot 10^{-67}:\\
              \;\;\;\;\frac{\frac{b}{c}}{z}\\
              
              \mathbf{elif}\;b \leq 4.2 \cdot 10^{-23}:\\
              \;\;\;\;\left(\frac{a}{c} \cdot -4\right) \cdot t\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{b}{c \cdot z}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if b < -2.64999999999999986e-67

                1. Initial program 79.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-*.f6435.7

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

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

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

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

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

                    \[\leadsto \frac{\frac{b}{c}}{\color{blue}{z}} \]
                  5. lower-/.f6435.2

                    \[\leadsto \frac{\frac{b}{c}}{z} \]
                6. Applied rewrites35.2%

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

                if -2.64999999999999986e-67 < b < 4.2000000000000002e-23

                1. Initial program 79.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. *-commutativeN/A

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

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

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

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

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

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

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

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

                if 4.2000000000000002e-23 < b

                1. Initial program 79.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-*.f6435.7

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

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

              Alternative 13: 48.7% accurate, 1.5× speedup?

              \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;b \leq -1.5 \cdot 10^{-60}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;b \leq 4.2 \cdot 10^{-23}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{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.
              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 (<= b -1.5e-60)
                 (/ (/ b c) z)
                 (if (<= b 4.2e-23) (* -4.0 (/ (* a t) c)) (/ b (* c z)))))
              assert(x < y && y < z && z < t && t < a && a < b && b < c);
              assert(x < y && y < z && z < t && t < a && a < b && b < c);
              double code(double x, double y, double z, double t, double a, double b, double c) {
              	double tmp;
              	if (b <= -1.5e-60) {
              		tmp = (b / c) / z;
              	} else if (b <= 4.2e-23) {
              		tmp = -4.0 * ((a * t) / c);
              	} else {
              		tmp = b / (c * z);
              	}
              	return tmp;
              }
              
              NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
              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 (b <= (-1.5d-60)) then
                      tmp = (b / c) / z
                  else if (b <= 4.2d-23) then
                      tmp = (-4.0d0) * ((a * t) / c)
                  else
                      tmp = b / (c * z)
                  end if
                  code = tmp
              end function
              
              assert x < y && y < z && z < t && t < a && a < b && b < c;
              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 (b <= -1.5e-60) {
              		tmp = (b / c) / z;
              	} else if (b <= 4.2e-23) {
              		tmp = -4.0 * ((a * t) / c);
              	} else {
              		tmp = b / (c * z);
              	}
              	return tmp;
              }
              
              [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
              [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 b <= -1.5e-60:
              		tmp = (b / c) / z
              	elif b <= 4.2e-23:
              		tmp = -4.0 * ((a * t) / c)
              	else:
              		tmp = b / (c * z)
              	return tmp
              
              x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
              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 (b <= -1.5e-60)
              		tmp = Float64(Float64(b / c) / z);
              	elseif (b <= 4.2e-23)
              		tmp = Float64(-4.0 * Float64(Float64(a * t) / c));
              	else
              		tmp = 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])){:}
              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 (b <= -1.5e-60)
              		tmp = (b / c) / z;
              	elseif (b <= 4.2e-23)
              		tmp = -4.0 * ((a * t) / c);
              	else
              		tmp = 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.
              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[b, -1.5e-60], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 4.2e-23], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], 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])\\\\
              [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
              \\
              \begin{array}{l}
              \mathbf{if}\;b \leq -1.5 \cdot 10^{-60}:\\
              \;\;\;\;\frac{\frac{b}{c}}{z}\\
              
              \mathbf{elif}\;b \leq 4.2 \cdot 10^{-23}:\\
              \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{b}{c \cdot z}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if b < -1.50000000000000009e-60

                1. Initial program 79.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-*.f6435.7

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

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

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

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

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

                    \[\leadsto \frac{\frac{b}{c}}{\color{blue}{z}} \]
                  5. lower-/.f6435.2

                    \[\leadsto \frac{\frac{b}{c}}{z} \]
                6. Applied rewrites35.2%

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

                if -1.50000000000000009e-60 < b < 4.2000000000000002e-23

                1. Initial program 79.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-*.f6437.6

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

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

                if 4.2000000000000002e-23 < b

                1. Initial program 79.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-*.f6435.7

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

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

              Alternative 14: 35.7% accurate, 3.8× speedup?

              \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [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.
              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);
              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.
              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;
              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])
              [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])
              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])){:}
              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.
              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])\\\\
              [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 79.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-*.f6435.7

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

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

              Reproduce

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