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

Percentage Accurate: 80.4% → 94.4%
Time: 9.9s
Alternatives: 17
Speedup: 0.9×

Specification

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

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

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

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

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 80.4% 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: 94.4% accurate, 0.7× speedup?

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

\mathbf{elif}\;z \leq 2.5 \cdot 10^{-20}:\\
\;\;\;\;\frac{1}{\frac{c}{\mathsf{fma}\left(\left(-4 \cdot z\right) \cdot t, a, t\_1\right)} \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.49999999999999998e-24

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.49999999999999998e-24 < z < 2.4999999999999999e-20

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.4999999999999999e-20 < z

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 92.5% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.49999999999999998e-24

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.49999999999999998e-24 < z < 3.9999999999999999e-19

    1. Initial program 80.4%

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

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

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

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

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

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

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

    if 3.9999999999999999e-19 < z

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 92.1% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.94999999999999998e-19

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.94999999999999998e-19 < z < 1.0000000000000001e-18

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0000000000000001e-18 < z

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 92.0% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2e-3 or 1.0000000000000001e-18 < z

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e-3 < z < 1.0000000000000001e-18

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 85.5% accurate, 0.9× speedup?

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

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


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

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.1999999999999998e164 < c

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a \cdot -4, \frac{t}{c}, \frac{b}{c \cdot z}\right) \]
      2. lower-*.f6463.0

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

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

Alternative 6: 76.7% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{c} \]
      3. lower-*.f6434.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.99999999999999945e65

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999945e65 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.00000000000000016e192

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a \cdot -4, \frac{t}{c}, \frac{b}{c \cdot z}\right) \]
      2. lower-*.f6463.0

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

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

    if 4.00000000000000016e192 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{9 \cdot x}{c} \cdot y}{z} \]
      10. lower-*.f6437.1

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

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

Alternative 7: 76.4% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000001e94 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.00000000000000016e192

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a \cdot -4, \frac{t}{c}, \frac{b}{c \cdot z}\right) \]
      2. lower-*.f6463.0

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

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

    if 4.00000000000000016e192 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{9 \cdot x}{c} \cdot y}{z} \]
      10. lower-*.f6437.1

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

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

Alternative 8: 76.2% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 10^{+279}:\\
\;\;\;\;\frac{b - -9 \cdot \left(x \cdot y\right)}{z \cdot c}\\

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


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

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000001e94 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.9999999999999994e38

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      5. lower-*.f6462.1

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

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

    if 9.9999999999999994e38 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.00000000000000006e279

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000006e279 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{9 \cdot x}{c} \cdot y}{z} \]
      10. lower-*.f6437.1

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

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

Alternative 9: 76.0% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 10^{+279}:\\
\;\;\;\;\frac{b - -9 \cdot \left(x \cdot y\right)}{z \cdot c}\\

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


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

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000001e94 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.9999999999999994e38

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c}} \]
    5. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{\color{blue}{c}} \]
      2. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, 9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, 9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c} \]
      4. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c} \]
      5. lower-/.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c} \]
      6. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c} \]
      7. lower-/.f6484.1

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c} \]
    6. Applied rewrites84.1%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c}} \]
    7. Taylor expanded in x around 0

      \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
    8. Step-by-step derivation
      1. lower-/.f6462.9

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
    9. Applied rewrites62.9%

      \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]

    if 9.9999999999999994e38 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.00000000000000006e279

    1. Initial program 80.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}}{z \cdot c} \]
      2. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{b + \left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)}}{z \cdot c} \]
      3. add-flipN/A

        \[\leadsto \frac{\color{blue}{b - \left(\mathsf{neg}\left(\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)\right)\right)}}{z \cdot c} \]
      4. lower--.f64N/A

        \[\leadsto \frac{\color{blue}{b - \left(\mathsf{neg}\left(\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)\right)\right)}}{z \cdot c} \]
      5. lift--.f64N/A

        \[\leadsto \frac{b - \left(\mathsf{neg}\left(\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)}\right)\right)}{z \cdot c} \]
      6. sub-negate-revN/A

        \[\leadsto \frac{b - \color{blue}{\left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - \left(x \cdot 9\right) \cdot y\right)}}{z \cdot c} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{b - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - \color{blue}{\left(x \cdot 9\right) \cdot y}\right)}{z \cdot c} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{b - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - \color{blue}{\left(x \cdot 9\right)} \cdot y\right)}{z \cdot c} \]
      9. *-commutativeN/A

        \[\leadsto \frac{b - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - \color{blue}{\left(9 \cdot x\right)} \cdot y\right)}{z \cdot c} \]
      10. associate-*l*N/A

        \[\leadsto \frac{b - \left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a - \color{blue}{9 \cdot \left(x \cdot y\right)}\right)}{z \cdot c} \]
      11. fp-cancel-sub-sign-invN/A

        \[\leadsto \frac{b - \color{blue}{\left(\left(\left(z \cdot 4\right) \cdot t\right) \cdot a + \left(\mathsf{neg}\left(9\right)\right) \cdot \left(x \cdot y\right)\right)}}{z \cdot c} \]
      12. lift-*.f64N/A

        \[\leadsto \frac{b - \left(\color{blue}{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a} + \left(\mathsf{neg}\left(9\right)\right) \cdot \left(x \cdot y\right)\right)}{z \cdot c} \]
      13. *-commutativeN/A

        \[\leadsto \frac{b - \left(\color{blue}{a \cdot \left(\left(z \cdot 4\right) \cdot t\right)} + \left(\mathsf{neg}\left(9\right)\right) \cdot \left(x \cdot y\right)\right)}{z \cdot c} \]
      14. lift-*.f64N/A

        \[\leadsto \frac{b - \left(a \cdot \color{blue}{\left(\left(z \cdot 4\right) \cdot t\right)} + \left(\mathsf{neg}\left(9\right)\right) \cdot \left(x \cdot y\right)\right)}{z \cdot c} \]
      15. associate-*r*N/A

        \[\leadsto \frac{b - \left(\color{blue}{\left(a \cdot \left(z \cdot 4\right)\right) \cdot t} + \left(\mathsf{neg}\left(9\right)\right) \cdot \left(x \cdot y\right)\right)}{z \cdot c} \]
      16. lower-fma.f64N/A

        \[\leadsto \frac{b - \color{blue}{\mathsf{fma}\left(a \cdot \left(z \cdot 4\right), t, \left(\mathsf{neg}\left(9\right)\right) \cdot \left(x \cdot y\right)\right)}}{z \cdot c} \]
      17. lower-*.f64N/A

        \[\leadsto \frac{b - \mathsf{fma}\left(\color{blue}{a \cdot \left(z \cdot 4\right)}, t, \left(\mathsf{neg}\left(9\right)\right) \cdot \left(x \cdot y\right)\right)}{z \cdot c} \]
      18. lift-*.f64N/A

        \[\leadsto \frac{b - \mathsf{fma}\left(a \cdot \color{blue}{\left(z \cdot 4\right)}, t, \left(\mathsf{neg}\left(9\right)\right) \cdot \left(x \cdot y\right)\right)}{z \cdot c} \]
      19. *-commutativeN/A

        \[\leadsto \frac{b - \mathsf{fma}\left(a \cdot \color{blue}{\left(4 \cdot z\right)}, t, \left(\mathsf{neg}\left(9\right)\right) \cdot \left(x \cdot y\right)\right)}{z \cdot c} \]
      20. lower-*.f64N/A

        \[\leadsto \frac{b - \mathsf{fma}\left(a \cdot \color{blue}{\left(4 \cdot z\right)}, t, \left(\mathsf{neg}\left(9\right)\right) \cdot \left(x \cdot y\right)\right)}{z \cdot c} \]
      21. lower-*.f64N/A

        \[\leadsto \frac{b - \mathsf{fma}\left(a \cdot \left(4 \cdot z\right), t, \color{blue}{\left(\mathsf{neg}\left(9\right)\right) \cdot \left(x \cdot y\right)}\right)}{z \cdot c} \]
      22. metadata-evalN/A

        \[\leadsto \frac{b - \mathsf{fma}\left(a \cdot \left(4 \cdot z\right), t, \color{blue}{-9} \cdot \left(x \cdot y\right)\right)}{z \cdot c} \]
      23. lower-*.f6480.2

        \[\leadsto \frac{b - \mathsf{fma}\left(a \cdot \left(4 \cdot z\right), t, -9 \cdot \color{blue}{\left(x \cdot y\right)}\right)}{z \cdot c} \]
    3. Applied rewrites80.2%

      \[\leadsto \frac{\color{blue}{b - \mathsf{fma}\left(a \cdot \left(4 \cdot z\right), t, -9 \cdot \left(x \cdot y\right)\right)}}{z \cdot c} \]
    4. Taylor expanded in z around 0

      \[\leadsto \frac{\color{blue}{b - -9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
    5. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto \frac{b - \color{blue}{-9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{b - -9 \cdot \color{blue}{\left(x \cdot y\right)}}{z \cdot c} \]
      3. lower-*.f6460.6

        \[\leadsto \frac{b - -9 \cdot \left(x \cdot \color{blue}{y}\right)}{z \cdot c} \]
    6. Applied rewrites60.6%

      \[\leadsto \frac{\color{blue}{b - -9 \cdot \left(x \cdot y\right)}}{z \cdot c} \]

    if 1.00000000000000006e279 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 80.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
      4. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites80.2%

      \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{c}}{z}} \]
    4. Taylor expanded in x around inf

      \[\leadsto \frac{\color{blue}{9 \cdot \frac{x \cdot y}{c}}}{z} \]
    5. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{9 \cdot \color{blue}{\frac{x \cdot y}{c}}}{z} \]
      2. lower-/.f64N/A

        \[\leadsto \frac{9 \cdot \frac{x \cdot y}{\color{blue}{c}}}{z} \]
      3. lower-*.f6435.8

        \[\leadsto \frac{9 \cdot \frac{x \cdot y}{c}}{z} \]
    6. Applied rewrites35.8%

      \[\leadsto \frac{\color{blue}{9 \cdot \frac{x \cdot y}{c}}}{z} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{9 \cdot \color{blue}{\frac{x \cdot y}{c}}}{z} \]
      2. lift-/.f64N/A

        \[\leadsto \frac{9 \cdot \frac{x \cdot y}{\color{blue}{c}}}{z} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{9 \cdot \frac{x \cdot y}{c}}{z} \]
      4. associate-/l*N/A

        \[\leadsto \frac{9 \cdot \left(x \cdot \color{blue}{\frac{y}{c}}\right)}{z} \]
      5. associate-*r*N/A

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot \color{blue}{\frac{y}{c}}}{z} \]
      6. lift-*.f64N/A

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot \frac{\color{blue}{y}}{c}}{z} \]
      7. associate-/l*N/A

        \[\leadsto \frac{\frac{\left(9 \cdot x\right) \cdot y}{\color{blue}{c}}}{z} \]
      8. associate-*l/N/A

        \[\leadsto \frac{\frac{9 \cdot x}{c} \cdot \color{blue}{y}}{z} \]
      9. lift-/.f64N/A

        \[\leadsto \frac{\frac{9 \cdot x}{c} \cdot y}{z} \]
      10. lower-*.f6437.1

        \[\leadsto \frac{\frac{9 \cdot x}{c} \cdot \color{blue}{y}}{z} \]
    8. Applied rewrites37.1%

      \[\leadsto \frac{\frac{9 \cdot x}{c} \cdot \color{blue}{y}}{z} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 10: 75.1% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+94}:\\ \;\;\;\;\frac{x \cdot \frac{9 \cdot y}{c}}{z}\\ \mathbf{elif}\;t\_1 \leq 10^{+39}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c}\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+192}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{9 \cdot x}{c} \cdot y}{z}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* (* x 9.0) y)))
   (if (<= t_1 -5e+94)
     (/ (* x (/ (* 9.0 y) c)) z)
     (if (<= t_1 1e+39)
       (/ (fma -4.0 (* a t) (/ b z)) c)
       (if (<= t_1 4e+192)
         (/ (/ (fma (* y x) 9.0 b) c) z)
         (/ (* (/ (* 9.0 x) c) y) z))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (x * 9.0) * y;
	double tmp;
	if (t_1 <= -5e+94) {
		tmp = (x * ((9.0 * y) / c)) / z;
	} else if (t_1 <= 1e+39) {
		tmp = fma(-4.0, (a * t), (b / z)) / c;
	} else if (t_1 <= 4e+192) {
		tmp = (fma((y * x), 9.0, b) / c) / z;
	} else {
		tmp = (((9.0 * x) / c) * y) / z;
	}
	return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(x * 9.0) * y)
	tmp = 0.0
	if (t_1 <= -5e+94)
		tmp = Float64(Float64(x * Float64(Float64(9.0 * y) / c)) / z);
	elseif (t_1 <= 1e+39)
		tmp = Float64(fma(-4.0, Float64(a * t), Float64(b / z)) / c);
	elseif (t_1 <= 4e+192)
		tmp = Float64(Float64(fma(Float64(y * x), 9.0, b) / c) / z);
	else
		tmp = Float64(Float64(Float64(Float64(9.0 * x) / c) * y) / z);
	end
	return tmp
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+94], N[(N[(x * N[(N[(9.0 * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 1e+39], N[(N[(-4.0 * N[(a * t), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$1, 4e+192], N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(N[(9.0 * x), $MachinePrecision] / c), $MachinePrecision] * y), $MachinePrecision] / z), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+94}:\\
\;\;\;\;\frac{x \cdot \frac{9 \cdot y}{c}}{z}\\

\mathbf{elif}\;t\_1 \leq 10^{+39}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c}\\

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+192}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{9 \cdot x}{c} \cdot y}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.0000000000000001e94

    1. Initial program 80.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
      4. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites80.2%

      \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{c}}{z}} \]
    4. Taylor expanded in x around inf

      \[\leadsto \frac{\color{blue}{9 \cdot \frac{x \cdot y}{c}}}{z} \]
    5. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{9 \cdot \color{blue}{\frac{x \cdot y}{c}}}{z} \]
      2. lower-/.f64N/A

        \[\leadsto \frac{9 \cdot \frac{x \cdot y}{\color{blue}{c}}}{z} \]
      3. lower-*.f6435.8

        \[\leadsto \frac{9 \cdot \frac{x \cdot y}{c}}{z} \]
    6. Applied rewrites35.8%

      \[\leadsto \frac{\color{blue}{9 \cdot \frac{x \cdot y}{c}}}{z} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{9 \cdot \color{blue}{\frac{x \cdot y}{c}}}{z} \]
      2. lift-/.f64N/A

        \[\leadsto \frac{9 \cdot \frac{x \cdot y}{\color{blue}{c}}}{z} \]
      3. associate-*r/N/A

        \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right)}{\color{blue}{c}}}{z} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9}{c}}{z} \]
      5. lift-*.f64N/A

        \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9}{c}}{z} \]
      6. *-commutativeN/A

        \[\leadsto \frac{\frac{\left(y \cdot x\right) \cdot 9}{c}}{z} \]
      7. associate-*l*N/A

        \[\leadsto \frac{\frac{y \cdot \left(x \cdot 9\right)}{c}}{z} \]
      8. *-commutativeN/A

        \[\leadsto \frac{\frac{\left(x \cdot 9\right) \cdot y}{c}}{z} \]
      9. associate-*l*N/A

        \[\leadsto \frac{\frac{x \cdot \left(9 \cdot y\right)}{c}}{z} \]
      10. associate-/l*N/A

        \[\leadsto \frac{x \cdot \color{blue}{\frac{9 \cdot y}{c}}}{z} \]
      11. lower-*.f64N/A

        \[\leadsto \frac{x \cdot \color{blue}{\frac{9 \cdot y}{c}}}{z} \]
      12. lower-/.f64N/A

        \[\leadsto \frac{x \cdot \frac{9 \cdot y}{\color{blue}{c}}}{z} \]
      13. lower-*.f6437.1

        \[\leadsto \frac{x \cdot \frac{9 \cdot y}{c}}{z} \]
    8. Applied rewrites37.1%

      \[\leadsto \frac{x \cdot \color{blue}{\frac{9 \cdot y}{c}}}{z} \]

    if -5.0000000000000001e94 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.9999999999999994e38

    1. Initial program 80.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
      2. lift-+.f64N/A

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}}{z \cdot c} \]
      3. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{b + \left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)}}{z \cdot c} \]
      4. div-addN/A

        \[\leadsto \color{blue}{\frac{b}{z \cdot c} + \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}} \]
      5. lift-*.f64N/A

        \[\leadsto \frac{b}{\color{blue}{z \cdot c}} + \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c} \]
      6. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} + \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c} \]
      7. mult-flipN/A

        \[\leadsto \color{blue}{\frac{b}{z} \cdot \frac{1}{c}} + \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c} \]
      8. inv-powN/A

        \[\leadsto \frac{b}{z} \cdot \color{blue}{{c}^{-1}} + \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c} \]
      9. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{b}{z}, {c}^{-1}, \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}\right)} \]
      10. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{b}{z}}, {c}^{-1}, \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}\right) \]
      11. inv-powN/A

        \[\leadsto \mathsf{fma}\left(\frac{b}{z}, \color{blue}{\frac{1}{c}}, \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}\right) \]
      12. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{b}{z}, \color{blue}{\frac{1}{c}}, \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}\right) \]
      13. lower-/.f6473.9

        \[\leadsto \mathsf{fma}\left(\frac{b}{z}, \frac{1}{c}, \color{blue}{\frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}}\right) \]
    3. Applied rewrites75.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{b}{z}, \frac{1}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, -4 \cdot \left(z \cdot \left(a \cdot t\right)\right)\right)}{c \cdot z}\right)} \]
    4. Taylor expanded in c around 0

      \[\leadsto \color{blue}{\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c}} \]
    5. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{\color{blue}{c}} \]
      2. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, 9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, 9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c} \]
      4. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c} \]
      5. lower-/.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c} \]
      6. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c} \]
      7. lower-/.f6484.1

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c} \]
    6. Applied rewrites84.1%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c}} \]
    7. Taylor expanded in x around 0

      \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
    8. Step-by-step derivation
      1. lower-/.f6462.9

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
    9. Applied rewrites62.9%

      \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]

    if 9.9999999999999994e38 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.00000000000000016e192

    1. Initial program 80.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
      4. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites80.2%

      \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{c}}{z}} \]
    4. Taylor expanded in z around 0

      \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, \color{blue}{b}\right)}{c}}{z} \]
    5. Step-by-step derivation
      1. Applied rewrites61.0%

        \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, \color{blue}{b}\right)}{c}}{z} \]

      if 4.00000000000000016e192 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
        4. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      3. Applied rewrites80.2%

        \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{c}}{z}} \]
      4. Taylor expanded in x around inf

        \[\leadsto \frac{\color{blue}{9 \cdot \frac{x \cdot y}{c}}}{z} \]
      5. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \color{blue}{\frac{x \cdot y}{c}}}{z} \]
        2. lower-/.f64N/A

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{\color{blue}{c}}}{z} \]
        3. lower-*.f6435.8

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{c}}{z} \]
      6. Applied rewrites35.8%

        \[\leadsto \frac{\color{blue}{9 \cdot \frac{x \cdot y}{c}}}{z} \]
      7. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{9 \cdot \color{blue}{\frac{x \cdot y}{c}}}{z} \]
        2. lift-/.f64N/A

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{\color{blue}{c}}}{z} \]
        3. lift-*.f64N/A

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{c}}{z} \]
        4. associate-/l*N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot \color{blue}{\frac{y}{c}}\right)}{z} \]
        5. associate-*r*N/A

          \[\leadsto \frac{\left(9 \cdot x\right) \cdot \color{blue}{\frac{y}{c}}}{z} \]
        6. lift-*.f64N/A

          \[\leadsto \frac{\left(9 \cdot x\right) \cdot \frac{\color{blue}{y}}{c}}{z} \]
        7. associate-/l*N/A

          \[\leadsto \frac{\frac{\left(9 \cdot x\right) \cdot y}{\color{blue}{c}}}{z} \]
        8. associate-*l/N/A

          \[\leadsto \frac{\frac{9 \cdot x}{c} \cdot \color{blue}{y}}{z} \]
        9. lift-/.f64N/A

          \[\leadsto \frac{\frac{9 \cdot x}{c} \cdot y}{z} \]
        10. lower-*.f6437.1

          \[\leadsto \frac{\frac{9 \cdot x}{c} \cdot \color{blue}{y}}{z} \]
      8. Applied rewrites37.1%

        \[\leadsto \frac{\frac{9 \cdot x}{c} \cdot \color{blue}{y}}{z} \]
    6. Recombined 4 regimes into one program.
    7. Add Preprocessing

    Alternative 11: 74.1% accurate, 0.8× speedup?

    \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ t_2 := \frac{x \cdot \frac{9 \cdot y}{c}}{z}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+94}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{+39}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    (FPCore (x y z t a b c)
     :precision binary64
     (let* ((t_1 (* (* x 9.0) y)) (t_2 (/ (* x (/ (* 9.0 y) c)) z)))
       (if (<= t_1 -5e+94)
         t_2
         (if (<= t_1 1e+39) (/ (fma -4.0 (* a t) (/ b z)) c) t_2))))
    assert(x < y && y < z && z < t && t < a && a < b && b < c);
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = (x * 9.0) * y;
    	double t_2 = (x * ((9.0 * y) / c)) / z;
    	double tmp;
    	if (t_1 <= -5e+94) {
    		tmp = t_2;
    	} else if (t_1 <= 1e+39) {
    		tmp = fma(-4.0, (a * t), (b / z)) / c;
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
    function code(x, y, z, t, a, b, c)
    	t_1 = Float64(Float64(x * 9.0) * y)
    	t_2 = Float64(Float64(x * Float64(Float64(9.0 * y) / c)) / z)
    	tmp = 0.0
    	if (t_1 <= -5e+94)
    		tmp = t_2;
    	elseif (t_1 <= 1e+39)
    		tmp = Float64(fma(-4.0, Float64(a * t), Float64(b / z)) / c);
    	else
    		tmp = t_2;
    	end
    	return tmp
    end
    
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[(9.0 * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+94], t$95$2, If[LessEqual[t$95$1, 1e+39], N[(N[(-4.0 * N[(a * t), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], t$95$2]]]]
    
    \begin{array}{l}
    [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
    \\
    \begin{array}{l}
    t_1 := \left(x \cdot 9\right) \cdot y\\
    t_2 := \frac{x \cdot \frac{9 \cdot y}{c}}{z}\\
    \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+94}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t\_1 \leq 10^{+39}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_2\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.0000000000000001e94 or 9.9999999999999994e38 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
        4. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      3. Applied rewrites80.2%

        \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{c}}{z}} \]
      4. Taylor expanded in x around inf

        \[\leadsto \frac{\color{blue}{9 \cdot \frac{x \cdot y}{c}}}{z} \]
      5. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \color{blue}{\frac{x \cdot y}{c}}}{z} \]
        2. lower-/.f64N/A

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{\color{blue}{c}}}{z} \]
        3. lower-*.f6435.8

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{c}}{z} \]
      6. Applied rewrites35.8%

        \[\leadsto \frac{\color{blue}{9 \cdot \frac{x \cdot y}{c}}}{z} \]
      7. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{9 \cdot \color{blue}{\frac{x \cdot y}{c}}}{z} \]
        2. lift-/.f64N/A

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{\color{blue}{c}}}{z} \]
        3. associate-*r/N/A

          \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right)}{\color{blue}{c}}}{z} \]
        4. *-commutativeN/A

          \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9}{c}}{z} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9}{c}}{z} \]
        6. *-commutativeN/A

          \[\leadsto \frac{\frac{\left(y \cdot x\right) \cdot 9}{c}}{z} \]
        7. associate-*l*N/A

          \[\leadsto \frac{\frac{y \cdot \left(x \cdot 9\right)}{c}}{z} \]
        8. *-commutativeN/A

          \[\leadsto \frac{\frac{\left(x \cdot 9\right) \cdot y}{c}}{z} \]
        9. associate-*l*N/A

          \[\leadsto \frac{\frac{x \cdot \left(9 \cdot y\right)}{c}}{z} \]
        10. associate-/l*N/A

          \[\leadsto \frac{x \cdot \color{blue}{\frac{9 \cdot y}{c}}}{z} \]
        11. lower-*.f64N/A

          \[\leadsto \frac{x \cdot \color{blue}{\frac{9 \cdot y}{c}}}{z} \]
        12. lower-/.f64N/A

          \[\leadsto \frac{x \cdot \frac{9 \cdot y}{\color{blue}{c}}}{z} \]
        13. lower-*.f6437.1

          \[\leadsto \frac{x \cdot \frac{9 \cdot y}{c}}{z} \]
      8. Applied rewrites37.1%

        \[\leadsto \frac{x \cdot \color{blue}{\frac{9 \cdot y}{c}}}{z} \]

      if -5.0000000000000001e94 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.9999999999999994e38

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
        2. lift-+.f64N/A

          \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}}{z \cdot c} \]
        3. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{b + \left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)}}{z \cdot c} \]
        4. div-addN/A

          \[\leadsto \color{blue}{\frac{b}{z \cdot c} + \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{b}{\color{blue}{z \cdot c}} + \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c} \]
        6. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} + \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c} \]
        7. mult-flipN/A

          \[\leadsto \color{blue}{\frac{b}{z} \cdot \frac{1}{c}} + \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c} \]
        8. inv-powN/A

          \[\leadsto \frac{b}{z} \cdot \color{blue}{{c}^{-1}} + \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c} \]
        9. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{b}{z}, {c}^{-1}, \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}\right)} \]
        10. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{b}{z}}, {c}^{-1}, \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}\right) \]
        11. inv-powN/A

          \[\leadsto \mathsf{fma}\left(\frac{b}{z}, \color{blue}{\frac{1}{c}}, \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}\right) \]
        12. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{b}{z}, \color{blue}{\frac{1}{c}}, \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}\right) \]
        13. lower-/.f6473.9

          \[\leadsto \mathsf{fma}\left(\frac{b}{z}, \frac{1}{c}, \color{blue}{\frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}}\right) \]
      3. Applied rewrites75.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{b}{z}, \frac{1}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, -4 \cdot \left(z \cdot \left(a \cdot t\right)\right)\right)}{c \cdot z}\right)} \]
      4. Taylor expanded in c around 0

        \[\leadsto \color{blue}{\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c}} \]
      5. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{\color{blue}{c}} \]
        2. lower-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, 9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c} \]
        3. lower-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, 9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c} \]
        4. lower-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c} \]
        7. lower-/.f6484.1

          \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c} \]
      6. Applied rewrites84.1%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c}} \]
      7. Taylor expanded in x around 0

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
      8. Step-by-step derivation
        1. lower-/.f6462.9

          \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
      9. Applied rewrites62.9%

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 12: 54.2% accurate, 0.5× speedup?

    \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ t_2 := \frac{x \cdot \frac{9 \cdot y}{c}}{z}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+64}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-232}:\\ \;\;\;\;\frac{b}{c \cdot z}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-11}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+32}:\\ \;\;\;\;\frac{1}{\frac{z}{b} \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    (FPCore (x y z t a b c)
     :precision binary64
     (let* ((t_1 (* (* x 9.0) y)) (t_2 (/ (* x (/ (* 9.0 y) c)) z)))
       (if (<= t_1 -1e+64)
         t_2
         (if (<= t_1 -5e-232)
           (/ b (* c z))
           (if (<= t_1 2e-11)
             (* -4.0 (/ (* a t) c))
             (if (<= t_1 5e+32) (/ 1.0 (* (/ z b) c)) t_2))))))
    assert(x < y && y < z && z < t && t < a && a < b && b < c);
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = (x * 9.0) * y;
    	double t_2 = (x * ((9.0 * y) / c)) / z;
    	double tmp;
    	if (t_1 <= -1e+64) {
    		tmp = t_2;
    	} else if (t_1 <= -5e-232) {
    		tmp = b / (c * z);
    	} else if (t_1 <= 2e-11) {
    		tmp = -4.0 * ((a * t) / c);
    	} else if (t_1 <= 5e+32) {
    		tmp = 1.0 / ((z / b) * c);
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        real(8) :: t_1
        real(8) :: t_2
        real(8) :: tmp
        t_1 = (x * 9.0d0) * y
        t_2 = (x * ((9.0d0 * y) / c)) / z
        if (t_1 <= (-1d+64)) then
            tmp = t_2
        else if (t_1 <= (-5d-232)) then
            tmp = b / (c * z)
        else if (t_1 <= 2d-11) then
            tmp = (-4.0d0) * ((a * t) / c)
        else if (t_1 <= 5d+32) then
            tmp = 1.0d0 / ((z / b) * c)
        else
            tmp = t_2
        end if
        code = tmp
    end function
    
    assert x < y && y < z && z < t && t < a && a < b && b < c;
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = (x * 9.0) * y;
    	double t_2 = (x * ((9.0 * y) / c)) / z;
    	double tmp;
    	if (t_1 <= -1e+64) {
    		tmp = t_2;
    	} else if (t_1 <= -5e-232) {
    		tmp = b / (c * z);
    	} else if (t_1 <= 2e-11) {
    		tmp = -4.0 * ((a * t) / c);
    	} else if (t_1 <= 5e+32) {
    		tmp = 1.0 / ((z / b) * c);
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
    def code(x, y, z, t, a, b, c):
    	t_1 = (x * 9.0) * y
    	t_2 = (x * ((9.0 * y) / c)) / z
    	tmp = 0
    	if t_1 <= -1e+64:
    		tmp = t_2
    	elif t_1 <= -5e-232:
    		tmp = b / (c * z)
    	elif t_1 <= 2e-11:
    		tmp = -4.0 * ((a * t) / c)
    	elif t_1 <= 5e+32:
    		tmp = 1.0 / ((z / b) * c)
    	else:
    		tmp = t_2
    	return tmp
    
    x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
    function code(x, y, z, t, a, b, c)
    	t_1 = Float64(Float64(x * 9.0) * y)
    	t_2 = Float64(Float64(x * Float64(Float64(9.0 * y) / c)) / z)
    	tmp = 0.0
    	if (t_1 <= -1e+64)
    		tmp = t_2;
    	elseif (t_1 <= -5e-232)
    		tmp = Float64(b / Float64(c * z));
    	elseif (t_1 <= 2e-11)
    		tmp = Float64(-4.0 * Float64(Float64(a * t) / c));
    	elseif (t_1 <= 5e+32)
    		tmp = Float64(1.0 / Float64(Float64(z / b) * c));
    	else
    		tmp = t_2;
    	end
    	return tmp
    end
    
    x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
    function tmp_2 = code(x, y, z, t, a, b, c)
    	t_1 = (x * 9.0) * y;
    	t_2 = (x * ((9.0 * y) / c)) / z;
    	tmp = 0.0;
    	if (t_1 <= -1e+64)
    		tmp = t_2;
    	elseif (t_1 <= -5e-232)
    		tmp = b / (c * z);
    	elseif (t_1 <= 2e-11)
    		tmp = -4.0 * ((a * t) / c);
    	elseif (t_1 <= 5e+32)
    		tmp = 1.0 / ((z / b) * c);
    	else
    		tmp = t_2;
    	end
    	tmp_2 = tmp;
    end
    
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[(9.0 * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+64], t$95$2, If[LessEqual[t$95$1, -5e-232], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e-11], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+32], N[(1.0 / N[(N[(z / b), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
    
    \begin{array}{l}
    [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
    \\
    \begin{array}{l}
    t_1 := \left(x \cdot 9\right) \cdot y\\
    t_2 := \frac{x \cdot \frac{9 \cdot y}{c}}{z}\\
    \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+64}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-232}:\\
    \;\;\;\;\frac{b}{c \cdot z}\\
    
    \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-11}:\\
    \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
    
    \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+32}:\\
    \;\;\;\;\frac{1}{\frac{z}{b} \cdot c}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_2\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.00000000000000002e64 or 4.9999999999999997e32 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
        4. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      3. Applied rewrites80.2%

        \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{c}}{z}} \]
      4. Taylor expanded in x around inf

        \[\leadsto \frac{\color{blue}{9 \cdot \frac{x \cdot y}{c}}}{z} \]
      5. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \color{blue}{\frac{x \cdot y}{c}}}{z} \]
        2. lower-/.f64N/A

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{\color{blue}{c}}}{z} \]
        3. lower-*.f6435.8

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{c}}{z} \]
      6. Applied rewrites35.8%

        \[\leadsto \frac{\color{blue}{9 \cdot \frac{x \cdot y}{c}}}{z} \]
      7. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{9 \cdot \color{blue}{\frac{x \cdot y}{c}}}{z} \]
        2. lift-/.f64N/A

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{\color{blue}{c}}}{z} \]
        3. associate-*r/N/A

          \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right)}{\color{blue}{c}}}{z} \]
        4. *-commutativeN/A

          \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9}{c}}{z} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9}{c}}{z} \]
        6. *-commutativeN/A

          \[\leadsto \frac{\frac{\left(y \cdot x\right) \cdot 9}{c}}{z} \]
        7. associate-*l*N/A

          \[\leadsto \frac{\frac{y \cdot \left(x \cdot 9\right)}{c}}{z} \]
        8. *-commutativeN/A

          \[\leadsto \frac{\frac{\left(x \cdot 9\right) \cdot y}{c}}{z} \]
        9. associate-*l*N/A

          \[\leadsto \frac{\frac{x \cdot \left(9 \cdot y\right)}{c}}{z} \]
        10. associate-/l*N/A

          \[\leadsto \frac{x \cdot \color{blue}{\frac{9 \cdot y}{c}}}{z} \]
        11. lower-*.f64N/A

          \[\leadsto \frac{x \cdot \color{blue}{\frac{9 \cdot y}{c}}}{z} \]
        12. lower-/.f64N/A

          \[\leadsto \frac{x \cdot \frac{9 \cdot y}{\color{blue}{c}}}{z} \]
        13. lower-*.f6437.1

          \[\leadsto \frac{x \cdot \frac{9 \cdot y}{c}}{z} \]
      8. Applied rewrites37.1%

        \[\leadsto \frac{x \cdot \color{blue}{\frac{9 \cdot y}{c}}}{z} \]

      if -1.00000000000000002e64 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -4.9999999999999999e-232

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in b around inf

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6434.9

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites34.9%

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]

      if -4.9999999999999999e-232 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999988e-11

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in z around inf

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lower-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lower-*.f6438.1

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      4. Applied rewrites38.1%

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]

      if 1.99999999999999988e-11 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.9999999999999997e32

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in b around inf

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6434.9

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites34.9%

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
      5. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{b}{z \cdot \color{blue}{c}} \]
        4. associate-/l/N/A

          \[\leadsto \frac{\frac{b}{z}}{\color{blue}{c}} \]
        5. div-flipN/A

          \[\leadsto \frac{\frac{1}{\frac{z}{b}}}{c} \]
        6. associate-/l/N/A

          \[\leadsto \frac{1}{\color{blue}{\frac{z}{b} \cdot c}} \]
        7. lower-/.f64N/A

          \[\leadsto \frac{1}{\color{blue}{\frac{z}{b} \cdot c}} \]
        8. lower-*.f64N/A

          \[\leadsto \frac{1}{\frac{z}{b} \cdot \color{blue}{c}} \]
        9. lower-/.f6432.9

          \[\leadsto \frac{1}{\frac{z}{b} \cdot c} \]
      6. Applied rewrites32.9%

        \[\leadsto \frac{1}{\color{blue}{\frac{z}{b} \cdot c}} \]
    3. Recombined 4 regimes into one program.
    4. Add Preprocessing

    Alternative 13: 52.5% accurate, 0.5× speedup?

    \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+66}:\\ \;\;\;\;\frac{y \cdot \frac{9 \cdot x}{z}}{c}\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-232}:\\ \;\;\;\;\frac{b}{c \cdot z}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-11}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+32}:\\ \;\;\;\;\frac{1}{\frac{z}{b} \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{9 \cdot \frac{x \cdot y}{c}}{z}\\ \end{array} \end{array} \]
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    (FPCore (x y z t a b c)
     :precision binary64
     (let* ((t_1 (* (* x 9.0) y)))
       (if (<= t_1 -1e+66)
         (/ (* y (/ (* 9.0 x) z)) c)
         (if (<= t_1 -5e-232)
           (/ b (* c z))
           (if (<= t_1 2e-11)
             (* -4.0 (/ (* a t) c))
             (if (<= t_1 5e+32)
               (/ 1.0 (* (/ z b) c))
               (/ (* 9.0 (/ (* x y) c)) z)))))))
    assert(x < y && y < z && z < t && t < a && a < b && b < c);
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = (x * 9.0) * y;
    	double tmp;
    	if (t_1 <= -1e+66) {
    		tmp = (y * ((9.0 * x) / z)) / c;
    	} else if (t_1 <= -5e-232) {
    		tmp = b / (c * z);
    	} else if (t_1 <= 2e-11) {
    		tmp = -4.0 * ((a * t) / c);
    	} else if (t_1 <= 5e+32) {
    		tmp = 1.0 / ((z / b) * c);
    	} else {
    		tmp = (9.0 * ((x * y) / c)) / z;
    	}
    	return tmp;
    }
    
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        real(8) :: t_1
        real(8) :: tmp
        t_1 = (x * 9.0d0) * y
        if (t_1 <= (-1d+66)) then
            tmp = (y * ((9.0d0 * x) / z)) / c
        else if (t_1 <= (-5d-232)) then
            tmp = b / (c * z)
        else if (t_1 <= 2d-11) then
            tmp = (-4.0d0) * ((a * t) / c)
        else if (t_1 <= 5d+32) then
            tmp = 1.0d0 / ((z / b) * c)
        else
            tmp = (9.0d0 * ((x * y) / c)) / z
        end if
        code = tmp
    end function
    
    assert x < y && y < z && z < t && t < a && a < b && b < c;
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = (x * 9.0) * y;
    	double tmp;
    	if (t_1 <= -1e+66) {
    		tmp = (y * ((9.0 * x) / z)) / c;
    	} else if (t_1 <= -5e-232) {
    		tmp = b / (c * z);
    	} else if (t_1 <= 2e-11) {
    		tmp = -4.0 * ((a * t) / c);
    	} else if (t_1 <= 5e+32) {
    		tmp = 1.0 / ((z / b) * c);
    	} else {
    		tmp = (9.0 * ((x * y) / c)) / z;
    	}
    	return tmp;
    }
    
    [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
    def code(x, y, z, t, a, b, c):
    	t_1 = (x * 9.0) * y
    	tmp = 0
    	if t_1 <= -1e+66:
    		tmp = (y * ((9.0 * x) / z)) / c
    	elif t_1 <= -5e-232:
    		tmp = b / (c * z)
    	elif t_1 <= 2e-11:
    		tmp = -4.0 * ((a * t) / c)
    	elif t_1 <= 5e+32:
    		tmp = 1.0 / ((z / b) * c)
    	else:
    		tmp = (9.0 * ((x * y) / c)) / z
    	return tmp
    
    x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
    function code(x, y, z, t, a, b, c)
    	t_1 = Float64(Float64(x * 9.0) * y)
    	tmp = 0.0
    	if (t_1 <= -1e+66)
    		tmp = Float64(Float64(y * Float64(Float64(9.0 * x) / z)) / c);
    	elseif (t_1 <= -5e-232)
    		tmp = Float64(b / Float64(c * z));
    	elseif (t_1 <= 2e-11)
    		tmp = Float64(-4.0 * Float64(Float64(a * t) / c));
    	elseif (t_1 <= 5e+32)
    		tmp = Float64(1.0 / Float64(Float64(z / b) * c));
    	else
    		tmp = Float64(Float64(9.0 * Float64(Float64(x * y) / c)) / z);
    	end
    	return tmp
    end
    
    x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
    function tmp_2 = code(x, y, z, t, a, b, c)
    	t_1 = (x * 9.0) * y;
    	tmp = 0.0;
    	if (t_1 <= -1e+66)
    		tmp = (y * ((9.0 * x) / z)) / c;
    	elseif (t_1 <= -5e-232)
    		tmp = b / (c * z);
    	elseif (t_1 <= 2e-11)
    		tmp = -4.0 * ((a * t) / c);
    	elseif (t_1 <= 5e+32)
    		tmp = 1.0 / ((z / b) * c);
    	else
    		tmp = (9.0 * ((x * y) / c)) / z;
    	end
    	tmp_2 = tmp;
    end
    
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+66], N[(N[(y * N[(N[(9.0 * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$1, -5e-232], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e-11], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+32], N[(1.0 / N[(N[(z / b), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision], N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]]]]
    
    \begin{array}{l}
    [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
    \\
    \begin{array}{l}
    t_1 := \left(x \cdot 9\right) \cdot y\\
    \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+66}:\\
    \;\;\;\;\frac{y \cdot \frac{9 \cdot x}{z}}{c}\\
    
    \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-232}:\\
    \;\;\;\;\frac{b}{c \cdot z}\\
    
    \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-11}:\\
    \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
    
    \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+32}:\\
    \;\;\;\;\frac{1}{\frac{z}{b} \cdot c}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{9 \cdot \frac{x \cdot y}{c}}{z}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.99999999999999945e65

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
        2. lift-+.f64N/A

          \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}}{z \cdot c} \]
        3. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{b + \left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)}}{z \cdot c} \]
        4. div-addN/A

          \[\leadsto \color{blue}{\frac{b}{z \cdot c} + \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{b}{\color{blue}{z \cdot c}} + \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c} \]
        6. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} + \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c} \]
        7. mult-flipN/A

          \[\leadsto \color{blue}{\frac{b}{z} \cdot \frac{1}{c}} + \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c} \]
        8. inv-powN/A

          \[\leadsto \frac{b}{z} \cdot \color{blue}{{c}^{-1}} + \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c} \]
        9. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{b}{z}, {c}^{-1}, \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}\right)} \]
        10. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{b}{z}}, {c}^{-1}, \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}\right) \]
        11. inv-powN/A

          \[\leadsto \mathsf{fma}\left(\frac{b}{z}, \color{blue}{\frac{1}{c}}, \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}\right) \]
        12. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{b}{z}, \color{blue}{\frac{1}{c}}, \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}\right) \]
        13. lower-/.f6473.9

          \[\leadsto \mathsf{fma}\left(\frac{b}{z}, \frac{1}{c}, \color{blue}{\frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}}\right) \]
      3. Applied rewrites75.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{b}{z}, \frac{1}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, -4 \cdot \left(z \cdot \left(a \cdot t\right)\right)\right)}{c \cdot z}\right)} \]
      4. Taylor expanded in c around 0

        \[\leadsto \color{blue}{\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c}} \]
      5. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{\color{blue}{c}} \]
        2. lower-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, 9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c} \]
        3. lower-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, 9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c} \]
        4. lower-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c} \]
        7. lower-/.f6484.1

          \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c} \]
      6. Applied rewrites84.1%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c}} \]
      7. Taylor expanded in x around inf

        \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{c} \]
      8. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{c} \]
        2. lower-/.f64N/A

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{c} \]
        3. lower-*.f6434.3

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{c} \]
      9. Applied rewrites34.3%

        \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{c} \]
      10. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{c} \]
        2. lift-/.f64N/A

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{c} \]
        3. lift-*.f64N/A

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{c} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{c} \]
        5. associate-*r/N/A

          \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right)}{z}}{c} \]
        6. lift-*.f64N/A

          \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right)}{z}}{c} \]
        7. *-commutativeN/A

          \[\leadsto \frac{\frac{9 \cdot \left(y \cdot x\right)}{z}}{c} \]
        8. associate-*l*N/A

          \[\leadsto \frac{\frac{\left(9 \cdot y\right) \cdot x}{z}}{c} \]
        9. lift-*.f64N/A

          \[\leadsto \frac{\frac{\left(9 \cdot y\right) \cdot x}{z}}{c} \]
        10. *-commutativeN/A

          \[\leadsto \frac{\frac{x \cdot \left(9 \cdot y\right)}{z}}{c} \]
        11. lift-*.f64N/A

          \[\leadsto \frac{\frac{x \cdot \left(9 \cdot y\right)}{z}}{c} \]
        12. associate-*r*N/A

          \[\leadsto \frac{\frac{\left(x \cdot 9\right) \cdot y}{z}}{c} \]
        13. *-commutativeN/A

          \[\leadsto \frac{\frac{y \cdot \left(x \cdot 9\right)}{z}}{c} \]
        14. associate-/l*N/A

          \[\leadsto \frac{y \cdot \frac{x \cdot 9}{z}}{c} \]
        15. lower-*.f64N/A

          \[\leadsto \frac{y \cdot \frac{x \cdot 9}{z}}{c} \]
        16. lower-/.f64N/A

          \[\leadsto \frac{y \cdot \frac{x \cdot 9}{z}}{c} \]
        17. *-commutativeN/A

          \[\leadsto \frac{y \cdot \frac{9 \cdot x}{z}}{c} \]
        18. lower-*.f6435.6

          \[\leadsto \frac{y \cdot \frac{9 \cdot x}{z}}{c} \]
      11. Applied rewrites35.6%

        \[\leadsto \frac{y \cdot \frac{9 \cdot x}{z}}{c} \]

      if -9.99999999999999945e65 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -4.9999999999999999e-232

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in b around inf

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6434.9

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites34.9%

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]

      if -4.9999999999999999e-232 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999988e-11

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in z around inf

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lower-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lower-*.f6438.1

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      4. Applied rewrites38.1%

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]

      if 1.99999999999999988e-11 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.9999999999999997e32

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in b around inf

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6434.9

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites34.9%

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
      5. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{b}{z \cdot \color{blue}{c}} \]
        4. associate-/l/N/A

          \[\leadsto \frac{\frac{b}{z}}{\color{blue}{c}} \]
        5. div-flipN/A

          \[\leadsto \frac{\frac{1}{\frac{z}{b}}}{c} \]
        6. associate-/l/N/A

          \[\leadsto \frac{1}{\color{blue}{\frac{z}{b} \cdot c}} \]
        7. lower-/.f64N/A

          \[\leadsto \frac{1}{\color{blue}{\frac{z}{b} \cdot c}} \]
        8. lower-*.f64N/A

          \[\leadsto \frac{1}{\frac{z}{b} \cdot \color{blue}{c}} \]
        9. lower-/.f6432.9

          \[\leadsto \frac{1}{\frac{z}{b} \cdot c} \]
      6. Applied rewrites32.9%

        \[\leadsto \frac{1}{\color{blue}{\frac{z}{b} \cdot c}} \]

      if 4.9999999999999997e32 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{z \cdot c}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{\color{blue}{c \cdot z}} \]
        4. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      3. Applied rewrites80.2%

        \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b - a \cdot \left(t \cdot \left(4 \cdot z\right)\right)\right)}{c}}{z}} \]
      4. Taylor expanded in x around inf

        \[\leadsto \frac{\color{blue}{9 \cdot \frac{x \cdot y}{c}}}{z} \]
      5. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \color{blue}{\frac{x \cdot y}{c}}}{z} \]
        2. lower-/.f64N/A

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{\color{blue}{c}}}{z} \]
        3. lower-*.f6435.8

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{c}}{z} \]
      6. Applied rewrites35.8%

        \[\leadsto \frac{\color{blue}{9 \cdot \frac{x \cdot y}{c}}}{z} \]
    3. Recombined 5 regimes into one program.
    4. Add Preprocessing

    Alternative 14: 52.3% accurate, 0.5× speedup?

    \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+66}:\\ \;\;\;\;\frac{y \cdot \frac{9 \cdot x}{z}}{c}\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-232}:\\ \;\;\;\;\frac{b}{c \cdot z}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-11}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{elif}\;t\_1 \leq 10^{+39}:\\ \;\;\;\;\frac{1}{\frac{z}{b} \cdot c}\\ \mathbf{else}:\\ \;\;\;\;9 \cdot \frac{x \cdot y}{c \cdot z}\\ \end{array} \end{array} \]
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    (FPCore (x y z t a b c)
     :precision binary64
     (let* ((t_1 (* (* x 9.0) y)))
       (if (<= t_1 -1e+66)
         (/ (* y (/ (* 9.0 x) z)) c)
         (if (<= t_1 -5e-232)
           (/ b (* c z))
           (if (<= t_1 2e-11)
             (* -4.0 (/ (* a t) c))
             (if (<= t_1 1e+39)
               (/ 1.0 (* (/ z b) c))
               (* 9.0 (/ (* x y) (* c z)))))))))
    assert(x < y && y < z && z < t && t < a && a < b && b < c);
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = (x * 9.0) * y;
    	double tmp;
    	if (t_1 <= -1e+66) {
    		tmp = (y * ((9.0 * x) / z)) / c;
    	} else if (t_1 <= -5e-232) {
    		tmp = b / (c * z);
    	} else if (t_1 <= 2e-11) {
    		tmp = -4.0 * ((a * t) / c);
    	} else if (t_1 <= 1e+39) {
    		tmp = 1.0 / ((z / b) * c);
    	} else {
    		tmp = 9.0 * ((x * y) / (c * z));
    	}
    	return tmp;
    }
    
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        real(8) :: t_1
        real(8) :: tmp
        t_1 = (x * 9.0d0) * y
        if (t_1 <= (-1d+66)) then
            tmp = (y * ((9.0d0 * x) / z)) / c
        else if (t_1 <= (-5d-232)) then
            tmp = b / (c * z)
        else if (t_1 <= 2d-11) then
            tmp = (-4.0d0) * ((a * t) / c)
        else if (t_1 <= 1d+39) then
            tmp = 1.0d0 / ((z / b) * c)
        else
            tmp = 9.0d0 * ((x * y) / (c * z))
        end if
        code = tmp
    end function
    
    assert x < y && y < z && z < t && t < a && a < b && b < c;
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = (x * 9.0) * y;
    	double tmp;
    	if (t_1 <= -1e+66) {
    		tmp = (y * ((9.0 * x) / z)) / c;
    	} else if (t_1 <= -5e-232) {
    		tmp = b / (c * z);
    	} else if (t_1 <= 2e-11) {
    		tmp = -4.0 * ((a * t) / c);
    	} else if (t_1 <= 1e+39) {
    		tmp = 1.0 / ((z / b) * c);
    	} else {
    		tmp = 9.0 * ((x * y) / (c * z));
    	}
    	return tmp;
    }
    
    [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
    def code(x, y, z, t, a, b, c):
    	t_1 = (x * 9.0) * y
    	tmp = 0
    	if t_1 <= -1e+66:
    		tmp = (y * ((9.0 * x) / z)) / c
    	elif t_1 <= -5e-232:
    		tmp = b / (c * z)
    	elif t_1 <= 2e-11:
    		tmp = -4.0 * ((a * t) / c)
    	elif t_1 <= 1e+39:
    		tmp = 1.0 / ((z / b) * c)
    	else:
    		tmp = 9.0 * ((x * y) / (c * z))
    	return tmp
    
    x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
    function code(x, y, z, t, a, b, c)
    	t_1 = Float64(Float64(x * 9.0) * y)
    	tmp = 0.0
    	if (t_1 <= -1e+66)
    		tmp = Float64(Float64(y * Float64(Float64(9.0 * x) / z)) / c);
    	elseif (t_1 <= -5e-232)
    		tmp = Float64(b / Float64(c * z));
    	elseif (t_1 <= 2e-11)
    		tmp = Float64(-4.0 * Float64(Float64(a * t) / c));
    	elseif (t_1 <= 1e+39)
    		tmp = Float64(1.0 / Float64(Float64(z / b) * c));
    	else
    		tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(c * z)));
    	end
    	return tmp
    end
    
    x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
    function tmp_2 = code(x, y, z, t, a, b, c)
    	t_1 = (x * 9.0) * y;
    	tmp = 0.0;
    	if (t_1 <= -1e+66)
    		tmp = (y * ((9.0 * x) / z)) / c;
    	elseif (t_1 <= -5e-232)
    		tmp = b / (c * z);
    	elseif (t_1 <= 2e-11)
    		tmp = -4.0 * ((a * t) / c);
    	elseif (t_1 <= 1e+39)
    		tmp = 1.0 / ((z / b) * c);
    	else
    		tmp = 9.0 * ((x * y) / (c * z));
    	end
    	tmp_2 = tmp;
    end
    
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+66], N[(N[(y * N[(N[(9.0 * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$1, -5e-232], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e-11], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+39], N[(1.0 / N[(N[(z / b), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
    
    \begin{array}{l}
    [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
    \\
    \begin{array}{l}
    t_1 := \left(x \cdot 9\right) \cdot y\\
    \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+66}:\\
    \;\;\;\;\frac{y \cdot \frac{9 \cdot x}{z}}{c}\\
    
    \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-232}:\\
    \;\;\;\;\frac{b}{c \cdot z}\\
    
    \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-11}:\\
    \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
    
    \mathbf{elif}\;t\_1 \leq 10^{+39}:\\
    \;\;\;\;\frac{1}{\frac{z}{b} \cdot c}\\
    
    \mathbf{else}:\\
    \;\;\;\;9 \cdot \frac{x \cdot y}{c \cdot z}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.99999999999999945e65

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}} \]
        2. lift-+.f64N/A

          \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}}{z \cdot c} \]
        3. +-commutativeN/A

          \[\leadsto \frac{\color{blue}{b + \left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)}}{z \cdot c} \]
        4. div-addN/A

          \[\leadsto \color{blue}{\frac{b}{z \cdot c} + \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{b}{\color{blue}{z \cdot c}} + \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c} \]
        6. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} + \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c} \]
        7. mult-flipN/A

          \[\leadsto \color{blue}{\frac{b}{z} \cdot \frac{1}{c}} + \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c} \]
        8. inv-powN/A

          \[\leadsto \frac{b}{z} \cdot \color{blue}{{c}^{-1}} + \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c} \]
        9. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{b}{z}, {c}^{-1}, \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}\right)} \]
        10. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{b}{z}}, {c}^{-1}, \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}\right) \]
        11. inv-powN/A

          \[\leadsto \mathsf{fma}\left(\frac{b}{z}, \color{blue}{\frac{1}{c}}, \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}\right) \]
        12. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{b}{z}, \color{blue}{\frac{1}{c}}, \frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}\right) \]
        13. lower-/.f6473.9

          \[\leadsto \mathsf{fma}\left(\frac{b}{z}, \frac{1}{c}, \color{blue}{\frac{\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a}{z \cdot c}}\right) \]
      3. Applied rewrites75.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{b}{z}, \frac{1}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, -4 \cdot \left(z \cdot \left(a \cdot t\right)\right)\right)}{c \cdot z}\right)} \]
      4. Taylor expanded in c around 0

        \[\leadsto \color{blue}{\frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c}} \]
      5. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{-4 \cdot \left(a \cdot t\right) + \left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{\color{blue}{c}} \]
        2. lower-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, 9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c} \]
        3. lower-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, 9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c} \]
        4. lower-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c} \]
        5. lower-/.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c} \]
        7. lower-/.f6484.1

          \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c} \]
      6. Applied rewrites84.1%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-4, a \cdot t, \mathsf{fma}\left(9, \frac{x \cdot y}{z}, \frac{b}{z}\right)\right)}{c}} \]
      7. Taylor expanded in x around inf

        \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{c} \]
      8. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{c} \]
        2. lower-/.f64N/A

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{c} \]
        3. lower-*.f6434.3

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{c} \]
      9. Applied rewrites34.3%

        \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{c} \]
      10. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{c} \]
        2. lift-/.f64N/A

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{c} \]
        3. lift-*.f64N/A

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{c} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{9 \cdot \frac{x \cdot y}{z}}{c} \]
        5. associate-*r/N/A

          \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right)}{z}}{c} \]
        6. lift-*.f64N/A

          \[\leadsto \frac{\frac{9 \cdot \left(x \cdot y\right)}{z}}{c} \]
        7. *-commutativeN/A

          \[\leadsto \frac{\frac{9 \cdot \left(y \cdot x\right)}{z}}{c} \]
        8. associate-*l*N/A

          \[\leadsto \frac{\frac{\left(9 \cdot y\right) \cdot x}{z}}{c} \]
        9. lift-*.f64N/A

          \[\leadsto \frac{\frac{\left(9 \cdot y\right) \cdot x}{z}}{c} \]
        10. *-commutativeN/A

          \[\leadsto \frac{\frac{x \cdot \left(9 \cdot y\right)}{z}}{c} \]
        11. lift-*.f64N/A

          \[\leadsto \frac{\frac{x \cdot \left(9 \cdot y\right)}{z}}{c} \]
        12. associate-*r*N/A

          \[\leadsto \frac{\frac{\left(x \cdot 9\right) \cdot y}{z}}{c} \]
        13. *-commutativeN/A

          \[\leadsto \frac{\frac{y \cdot \left(x \cdot 9\right)}{z}}{c} \]
        14. associate-/l*N/A

          \[\leadsto \frac{y \cdot \frac{x \cdot 9}{z}}{c} \]
        15. lower-*.f64N/A

          \[\leadsto \frac{y \cdot \frac{x \cdot 9}{z}}{c} \]
        16. lower-/.f64N/A

          \[\leadsto \frac{y \cdot \frac{x \cdot 9}{z}}{c} \]
        17. *-commutativeN/A

          \[\leadsto \frac{y \cdot \frac{9 \cdot x}{z}}{c} \]
        18. lower-*.f6435.6

          \[\leadsto \frac{y \cdot \frac{9 \cdot x}{z}}{c} \]
      11. Applied rewrites35.6%

        \[\leadsto \frac{y \cdot \frac{9 \cdot x}{z}}{c} \]

      if -9.99999999999999945e65 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -4.9999999999999999e-232

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in b around inf

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6434.9

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites34.9%

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]

      if -4.9999999999999999e-232 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999988e-11

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in z around inf

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lower-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lower-*.f6438.1

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      4. Applied rewrites38.1%

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]

      if 1.99999999999999988e-11 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.9999999999999994e38

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in b around inf

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6434.9

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites34.9%

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
      5. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{b}{z \cdot \color{blue}{c}} \]
        4. associate-/l/N/A

          \[\leadsto \frac{\frac{b}{z}}{\color{blue}{c}} \]
        5. div-flipN/A

          \[\leadsto \frac{\frac{1}{\frac{z}{b}}}{c} \]
        6. associate-/l/N/A

          \[\leadsto \frac{1}{\color{blue}{\frac{z}{b} \cdot c}} \]
        7. lower-/.f64N/A

          \[\leadsto \frac{1}{\color{blue}{\frac{z}{b} \cdot c}} \]
        8. lower-*.f64N/A

          \[\leadsto \frac{1}{\frac{z}{b} \cdot \color{blue}{c}} \]
        9. lower-/.f6432.9

          \[\leadsto \frac{1}{\frac{z}{b} \cdot c} \]
      6. Applied rewrites32.9%

        \[\leadsto \frac{1}{\color{blue}{\frac{z}{b} \cdot c}} \]

      if 9.9999999999999994e38 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in x around inf

        \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto 9 \cdot \color{blue}{\frac{x \cdot y}{c \cdot z}} \]
        2. lower-/.f64N/A

          \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c \cdot z}} \]
        3. lower-*.f64N/A

          \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c} \cdot z} \]
        4. lower-*.f6436.4

          \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites36.4%

        \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]
    3. Recombined 5 regimes into one program.
    4. Add Preprocessing

    Alternative 15: 52.2% accurate, 0.5× speedup?

    \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ t_2 := 9 \cdot \frac{x \cdot y}{c \cdot z}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+64}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-232}:\\ \;\;\;\;\frac{b}{c \cdot z}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-11}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{elif}\;t\_1 \leq 10^{+39}:\\ \;\;\;\;\frac{1}{\frac{z}{b} \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    (FPCore (x y z t a b c)
     :precision binary64
     (let* ((t_1 (* (* x 9.0) y)) (t_2 (* 9.0 (/ (* x y) (* c z)))))
       (if (<= t_1 -1e+64)
         t_2
         (if (<= t_1 -5e-232)
           (/ b (* c z))
           (if (<= t_1 2e-11)
             (* -4.0 (/ (* a t) c))
             (if (<= t_1 1e+39) (/ 1.0 (* (/ z b) c)) t_2))))))
    assert(x < y && y < z && z < t && t < a && a < b && b < c);
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = (x * 9.0) * y;
    	double t_2 = 9.0 * ((x * y) / (c * z));
    	double tmp;
    	if (t_1 <= -1e+64) {
    		tmp = t_2;
    	} else if (t_1 <= -5e-232) {
    		tmp = b / (c * z);
    	} else if (t_1 <= 2e-11) {
    		tmp = -4.0 * ((a * t) / c);
    	} else if (t_1 <= 1e+39) {
    		tmp = 1.0 / ((z / b) * c);
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        real(8) :: t_1
        real(8) :: t_2
        real(8) :: tmp
        t_1 = (x * 9.0d0) * y
        t_2 = 9.0d0 * ((x * y) / (c * z))
        if (t_1 <= (-1d+64)) then
            tmp = t_2
        else if (t_1 <= (-5d-232)) then
            tmp = b / (c * z)
        else if (t_1 <= 2d-11) then
            tmp = (-4.0d0) * ((a * t) / c)
        else if (t_1 <= 1d+39) then
            tmp = 1.0d0 / ((z / b) * c)
        else
            tmp = t_2
        end if
        code = tmp
    end function
    
    assert x < y && y < z && z < t && t < a && a < b && b < c;
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = (x * 9.0) * y;
    	double t_2 = 9.0 * ((x * y) / (c * z));
    	double tmp;
    	if (t_1 <= -1e+64) {
    		tmp = t_2;
    	} else if (t_1 <= -5e-232) {
    		tmp = b / (c * z);
    	} else if (t_1 <= 2e-11) {
    		tmp = -4.0 * ((a * t) / c);
    	} else if (t_1 <= 1e+39) {
    		tmp = 1.0 / ((z / b) * c);
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
    def code(x, y, z, t, a, b, c):
    	t_1 = (x * 9.0) * y
    	t_2 = 9.0 * ((x * y) / (c * z))
    	tmp = 0
    	if t_1 <= -1e+64:
    		tmp = t_2
    	elif t_1 <= -5e-232:
    		tmp = b / (c * z)
    	elif t_1 <= 2e-11:
    		tmp = -4.0 * ((a * t) / c)
    	elif t_1 <= 1e+39:
    		tmp = 1.0 / ((z / b) * c)
    	else:
    		tmp = t_2
    	return tmp
    
    x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
    function code(x, y, z, t, a, b, c)
    	t_1 = Float64(Float64(x * 9.0) * y)
    	t_2 = Float64(9.0 * Float64(Float64(x * y) / Float64(c * z)))
    	tmp = 0.0
    	if (t_1 <= -1e+64)
    		tmp = t_2;
    	elseif (t_1 <= -5e-232)
    		tmp = Float64(b / Float64(c * z));
    	elseif (t_1 <= 2e-11)
    		tmp = Float64(-4.0 * Float64(Float64(a * t) / c));
    	elseif (t_1 <= 1e+39)
    		tmp = Float64(1.0 / Float64(Float64(z / b) * c));
    	else
    		tmp = t_2;
    	end
    	return tmp
    end
    
    x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
    function tmp_2 = code(x, y, z, t, a, b, c)
    	t_1 = (x * 9.0) * y;
    	t_2 = 9.0 * ((x * y) / (c * z));
    	tmp = 0.0;
    	if (t_1 <= -1e+64)
    		tmp = t_2;
    	elseif (t_1 <= -5e-232)
    		tmp = b / (c * z);
    	elseif (t_1 <= 2e-11)
    		tmp = -4.0 * ((a * t) / c);
    	elseif (t_1 <= 1e+39)
    		tmp = 1.0 / ((z / b) * c);
    	else
    		tmp = t_2;
    	end
    	tmp_2 = tmp;
    end
    
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+64], t$95$2, If[LessEqual[t$95$1, -5e-232], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e-11], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+39], N[(1.0 / N[(N[(z / b), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
    
    \begin{array}{l}
    [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
    \\
    \begin{array}{l}
    t_1 := \left(x \cdot 9\right) \cdot y\\
    t_2 := 9 \cdot \frac{x \cdot y}{c \cdot z}\\
    \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+64}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-232}:\\
    \;\;\;\;\frac{b}{c \cdot z}\\
    
    \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-11}:\\
    \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
    
    \mathbf{elif}\;t\_1 \leq 10^{+39}:\\
    \;\;\;\;\frac{1}{\frac{z}{b} \cdot c}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_2\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.00000000000000002e64 or 9.9999999999999994e38 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in x around inf

        \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto 9 \cdot \color{blue}{\frac{x \cdot y}{c \cdot z}} \]
        2. lower-/.f64N/A

          \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c \cdot z}} \]
        3. lower-*.f64N/A

          \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c} \cdot z} \]
        4. lower-*.f6436.4

          \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites36.4%

        \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]

      if -1.00000000000000002e64 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -4.9999999999999999e-232

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in b around inf

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6434.9

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites34.9%

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]

      if -4.9999999999999999e-232 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999988e-11

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in z around inf

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lower-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lower-*.f6438.1

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      4. Applied rewrites38.1%

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]

      if 1.99999999999999988e-11 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.9999999999999994e38

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in b around inf

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6434.9

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites34.9%

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
      5. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{b}{z \cdot \color{blue}{c}} \]
        4. associate-/l/N/A

          \[\leadsto \frac{\frac{b}{z}}{\color{blue}{c}} \]
        5. div-flipN/A

          \[\leadsto \frac{\frac{1}{\frac{z}{b}}}{c} \]
        6. associate-/l/N/A

          \[\leadsto \frac{1}{\color{blue}{\frac{z}{b} \cdot c}} \]
        7. lower-/.f64N/A

          \[\leadsto \frac{1}{\color{blue}{\frac{z}{b} \cdot c}} \]
        8. lower-*.f64N/A

          \[\leadsto \frac{1}{\frac{z}{b} \cdot \color{blue}{c}} \]
        9. lower-/.f6432.9

          \[\leadsto \frac{1}{\frac{z}{b} \cdot c} \]
      6. Applied rewrites32.9%

        \[\leadsto \frac{1}{\color{blue}{\frac{z}{b} \cdot c}} \]
    3. Recombined 4 regimes into one program.
    4. Add Preprocessing

    Alternative 16: 48.2% accurate, 1.5× speedup?

    \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := -4 \cdot \frac{a \cdot t}{c}\\ \mathbf{if}\;t \leq -1.04 \cdot 10^{+27}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{-96}:\\ \;\;\;\;\frac{b}{c \cdot z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    (FPCore (x y z t a b c)
     :precision binary64
     (let* ((t_1 (* -4.0 (/ (* a t) c))))
       (if (<= t -1.04e+27) t_1 (if (<= t 7.2e-96) (/ b (* c z)) t_1))))
    assert(x < y && y < z && z < t && t < a && a < b && b < c);
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = -4.0 * ((a * t) / c);
    	double tmp;
    	if (t <= -1.04e+27) {
    		tmp = t_1;
    	} else if (t <= 7.2e-96) {
    		tmp = b / (c * z);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        real(8) :: t_1
        real(8) :: tmp
        t_1 = (-4.0d0) * ((a * t) / c)
        if (t <= (-1.04d+27)) then
            tmp = t_1
        else if (t <= 7.2d-96) then
            tmp = b / (c * z)
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    assert x < y && y < z && z < t && t < a && a < b && b < c;
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = -4.0 * ((a * t) / c);
    	double tmp;
    	if (t <= -1.04e+27) {
    		tmp = t_1;
    	} else if (t <= 7.2e-96) {
    		tmp = b / (c * z);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
    def code(x, y, z, t, a, b, c):
    	t_1 = -4.0 * ((a * t) / c)
    	tmp = 0
    	if t <= -1.04e+27:
    		tmp = t_1
    	elif t <= 7.2e-96:
    		tmp = b / (c * z)
    	else:
    		tmp = t_1
    	return tmp
    
    x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
    function code(x, y, z, t, a, b, c)
    	t_1 = Float64(-4.0 * Float64(Float64(a * t) / c))
    	tmp = 0.0
    	if (t <= -1.04e+27)
    		tmp = t_1;
    	elseif (t <= 7.2e-96)
    		tmp = Float64(b / Float64(c * z));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
    function tmp_2 = code(x, y, z, t, a, b, c)
    	t_1 = -4.0 * ((a * t) / c);
    	tmp = 0.0;
    	if (t <= -1.04e+27)
    		tmp = t_1;
    	elseif (t <= 7.2e-96)
    		tmp = b / (c * z);
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.04e+27], t$95$1, If[LessEqual[t, 7.2e-96], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
    \\
    \begin{array}{l}
    t_1 := -4 \cdot \frac{a \cdot t}{c}\\
    \mathbf{if}\;t \leq -1.04 \cdot 10^{+27}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq 7.2 \cdot 10^{-96}:\\
    \;\;\;\;\frac{b}{c \cdot z}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t < -1.04000000000000001e27 or 7.20000000000000016e-96 < t

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in z around inf

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lower-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lower-*.f6438.1

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      4. Applied rewrites38.1%

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]

      if -1.04000000000000001e27 < t < 7.20000000000000016e-96

      1. Initial program 80.4%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in b around inf

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6434.9

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites34.9%

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 17: 34.9% accurate, 3.8× speedup?

    \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \frac{b}{c \cdot z} \end{array} \]
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    (FPCore (x y z t a b c) :precision binary64 (/ b (* c z)))
    assert(x < y && y < z && z < t && t < a && a < b && b < c);
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	return b / (c * z);
    }
    
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        code = b / (c * z)
    end function
    
    assert x < y && y < z && z < t && t < a && a < b && b < c;
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	return b / (c * z);
    }
    
    [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
    def code(x, y, z, t, a, b, c):
    	return b / (c * z)
    
    x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
    function code(x, y, z, t, a, b, c)
    	return Float64(b / Float64(c * z))
    end
    
    x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
    function tmp = code(x, y, z, t, a, b, c)
    	tmp = b / (c * z);
    end
    
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
    \\
    \frac{b}{c \cdot z}
    \end{array}
    
    Derivation
    1. Initial program 80.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Taylor expanded in b around inf

      \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
      2. lower-*.f6434.9

        \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
    4. Applied rewrites34.9%

      \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
    5. Add Preprocessing

    Reproduce

    ?
    herbie shell --seed 2025150 
    (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)))