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

Percentage Accurate: 78.7% → 89.4%
Time: 5.4s
Alternatives: 13
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 13 alternatives:

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

Initial Program: 78.7% 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: 89.4% accurate, 0.9× speedup?

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

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


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

    1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.4999999999999999e100 < c

    1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 85.5% accurate, 0.8× speedup?

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

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


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

    1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 75.5% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -4.00000000000000027e-68 or 2.00000000000000018e-111 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.00000000000000027e-68 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.00000000000000018e-111

    1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 74.9% accurate, 0.8× speedup?

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

      1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 5: 63.4% accurate, 1.2× speedup?

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

        1. Initial program 78.7%

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

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

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

        if -3.70000000000000011e217 < t < 2.24999999999999987e-51

        1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 6: 52.7% accurate, 0.5× speedup?

      \[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+134}:\\ \;\;\;\;-\left(\frac{\frac{y}{c\_m}}{z} \cdot -9\right) \cdot x\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-198}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\ \mathbf{elif}\;t\_1 \leq 10^{-252}:\\ \;\;\;\;\frac{\frac{b}{c\_m}}{z}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+38}:\\ \;\;\;\;\frac{\left(a \cdot t\right) \cdot -4}{c\_m}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{y}{c\_m \cdot z} \cdot x\right) \cdot 9\\ \end{array} \end{array} \end{array} \]
      c\_m = (fabs.f64 c)
      c\_s = (copysign.f64 #s(literal 1 binary64) c)
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      (FPCore (c_s x y z t a b c_m)
       :precision binary64
       (let* ((t_1 (* (* x 9.0) y)))
         (*
          c_s
          (if (<= t_1 -4e+134)
            (- (* (* (/ (/ y c_m) z) -9.0) x))
            (if (<= t_1 -1e-198)
              (* -4.0 (/ (* a t) c_m))
              (if (<= t_1 1e-252)
                (/ (/ b c_m) z)
                (if (<= t_1 2e+38)
                  (/ (* (* a t) -4.0) c_m)
                  (* (* (/ y (* c_m z)) x) 9.0))))))))
      c\_m = fabs(c);
      c\_s = copysign(1.0, c);
      assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
      double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	double t_1 = (x * 9.0) * y;
      	double tmp;
      	if (t_1 <= -4e+134) {
      		tmp = -((((y / c_m) / z) * -9.0) * x);
      	} else if (t_1 <= -1e-198) {
      		tmp = -4.0 * ((a * t) / c_m);
      	} else if (t_1 <= 1e-252) {
      		tmp = (b / c_m) / z;
      	} else if (t_1 <= 2e+38) {
      		tmp = ((a * t) * -4.0) / c_m;
      	} else {
      		tmp = ((y / (c_m * z)) * x) * 9.0;
      	}
      	return c_s * tmp;
      }
      
      c\_m =     private
      c\_s =     private
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(c_s, x, y, z, t, a, b, c_m)
      use fmin_fmax_functions
          real(8), intent (in) :: c_s
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8), intent (in) :: c_m
          real(8) :: t_1
          real(8) :: tmp
          t_1 = (x * 9.0d0) * y
          if (t_1 <= (-4d+134)) then
              tmp = -((((y / c_m) / z) * (-9.0d0)) * x)
          else if (t_1 <= (-1d-198)) then
              tmp = (-4.0d0) * ((a * t) / c_m)
          else if (t_1 <= 1d-252) then
              tmp = (b / c_m) / z
          else if (t_1 <= 2d+38) then
              tmp = ((a * t) * (-4.0d0)) / c_m
          else
              tmp = ((y / (c_m * z)) * x) * 9.0d0
          end if
          code = c_s * tmp
      end function
      
      c\_m = Math.abs(c);
      c\_s = Math.copySign(1.0, c);
      assert x < y && y < z && z < t && t < a && a < b && b < c_m;
      public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	double t_1 = (x * 9.0) * y;
      	double tmp;
      	if (t_1 <= -4e+134) {
      		tmp = -((((y / c_m) / z) * -9.0) * x);
      	} else if (t_1 <= -1e-198) {
      		tmp = -4.0 * ((a * t) / c_m);
      	} else if (t_1 <= 1e-252) {
      		tmp = (b / c_m) / z;
      	} else if (t_1 <= 2e+38) {
      		tmp = ((a * t) * -4.0) / c_m;
      	} else {
      		tmp = ((y / (c_m * z)) * x) * 9.0;
      	}
      	return c_s * tmp;
      }
      
      c\_m = math.fabs(c)
      c\_s = math.copysign(1.0, c)
      [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
      def code(c_s, x, y, z, t, a, b, c_m):
      	t_1 = (x * 9.0) * y
      	tmp = 0
      	if t_1 <= -4e+134:
      		tmp = -((((y / c_m) / z) * -9.0) * x)
      	elif t_1 <= -1e-198:
      		tmp = -4.0 * ((a * t) / c_m)
      	elif t_1 <= 1e-252:
      		tmp = (b / c_m) / z
      	elif t_1 <= 2e+38:
      		tmp = ((a * t) * -4.0) / c_m
      	else:
      		tmp = ((y / (c_m * z)) * x) * 9.0
      	return c_s * tmp
      
      c\_m = abs(c)
      c\_s = copysign(1.0, c)
      x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
      function code(c_s, x, y, z, t, a, b, c_m)
      	t_1 = Float64(Float64(x * 9.0) * y)
      	tmp = 0.0
      	if (t_1 <= -4e+134)
      		tmp = Float64(-Float64(Float64(Float64(Float64(y / c_m) / z) * -9.0) * x));
      	elseif (t_1 <= -1e-198)
      		tmp = Float64(-4.0 * Float64(Float64(a * t) / c_m));
      	elseif (t_1 <= 1e-252)
      		tmp = Float64(Float64(b / c_m) / z);
      	elseif (t_1 <= 2e+38)
      		tmp = Float64(Float64(Float64(a * t) * -4.0) / c_m);
      	else
      		tmp = Float64(Float64(Float64(y / Float64(c_m * z)) * x) * 9.0);
      	end
      	return Float64(c_s * tmp)
      end
      
      c\_m = abs(c);
      c\_s = sign(c) * abs(1.0);
      x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
      function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
      	t_1 = (x * 9.0) * y;
      	tmp = 0.0;
      	if (t_1 <= -4e+134)
      		tmp = -((((y / c_m) / z) * -9.0) * x);
      	elseif (t_1 <= -1e-198)
      		tmp = -4.0 * ((a * t) / c_m);
      	elseif (t_1 <= 1e-252)
      		tmp = (b / c_m) / z;
      	elseif (t_1 <= 2e+38)
      		tmp = ((a * t) * -4.0) / c_m;
      	else
      		tmp = ((y / (c_m * z)) * x) * 9.0;
      	end
      	tmp_2 = c_s * tmp;
      end
      
      c\_m = N[Abs[c], $MachinePrecision]
      c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -4e+134], (-N[(N[(N[(N[(y / c$95$m), $MachinePrecision] / z), $MachinePrecision] * -9.0), $MachinePrecision] * x), $MachinePrecision]), If[LessEqual[t$95$1, -1e-198], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-252], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 2e+38], N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(N[(y / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] * 9.0), $MachinePrecision]]]]]), $MachinePrecision]]
      
      \begin{array}{l}
      c\_m = \left|c\right|
      \\
      c\_s = \mathsf{copysign}\left(1, c\right)
      \\
      [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
      \\
      \begin{array}{l}
      t_1 := \left(x \cdot 9\right) \cdot y\\
      c\_s \cdot \begin{array}{l}
      \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+134}:\\
      \;\;\;\;-\left(\frac{\frac{y}{c\_m}}{z} \cdot -9\right) \cdot x\\
      
      \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-198}:\\
      \;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\
      
      \mathbf{elif}\;t\_1 \leq 10^{-252}:\\
      \;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
      
      \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+38}:\\
      \;\;\;\;\frac{\left(a \cdot t\right) \cdot -4}{c\_m}\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\frac{y}{c\_m \cdot z} \cdot x\right) \cdot 9\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 5 regimes
      2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -3.99999999999999969e134

        1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -3.99999999999999969e134 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.9999999999999991e-199

        1. Initial program 78.7%

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

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

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

        if -9.9999999999999991e-199 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.99999999999999943e-253

        1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

        if 9.99999999999999943e-253 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999995e38

        1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\left(a \cdot t\right) \cdot \color{blue}{-4}}{c} \]
          3. lift-*.f6438.4

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

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

        if 1.99999999999999995e38 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

        1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 7: 51.2% accurate, 0.5× speedup?

      \[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -5000:\\ \;\;\;\;-\frac{\left(-9 \cdot x\right) \cdot y}{c\_m \cdot z}\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-198}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\ \mathbf{elif}\;t\_1 \leq 10^{-252}:\\ \;\;\;\;\frac{\frac{b}{c\_m}}{z}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+38}:\\ \;\;\;\;\frac{\left(a \cdot t\right) \cdot -4}{c\_m}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{y}{c\_m \cdot z} \cdot x\right) \cdot 9\\ \end{array} \end{array} \end{array} \]
      c\_m = (fabs.f64 c)
      c\_s = (copysign.f64 #s(literal 1 binary64) c)
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      (FPCore (c_s x y z t a b c_m)
       :precision binary64
       (let* ((t_1 (* (* x 9.0) y)))
         (*
          c_s
          (if (<= t_1 -5000.0)
            (- (/ (* (* -9.0 x) y) (* c_m z)))
            (if (<= t_1 -1e-198)
              (* -4.0 (/ (* a t) c_m))
              (if (<= t_1 1e-252)
                (/ (/ b c_m) z)
                (if (<= t_1 2e+38)
                  (/ (* (* a t) -4.0) c_m)
                  (* (* (/ y (* c_m z)) x) 9.0))))))))
      c\_m = fabs(c);
      c\_s = copysign(1.0, c);
      assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
      double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	double t_1 = (x * 9.0) * y;
      	double tmp;
      	if (t_1 <= -5000.0) {
      		tmp = -(((-9.0 * x) * y) / (c_m * z));
      	} else if (t_1 <= -1e-198) {
      		tmp = -4.0 * ((a * t) / c_m);
      	} else if (t_1 <= 1e-252) {
      		tmp = (b / c_m) / z;
      	} else if (t_1 <= 2e+38) {
      		tmp = ((a * t) * -4.0) / c_m;
      	} else {
      		tmp = ((y / (c_m * z)) * x) * 9.0;
      	}
      	return c_s * tmp;
      }
      
      c\_m =     private
      c\_s =     private
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(c_s, x, y, z, t, a, b, c_m)
      use fmin_fmax_functions
          real(8), intent (in) :: c_s
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8), intent (in) :: c_m
          real(8) :: t_1
          real(8) :: tmp
          t_1 = (x * 9.0d0) * y
          if (t_1 <= (-5000.0d0)) then
              tmp = -((((-9.0d0) * x) * y) / (c_m * z))
          else if (t_1 <= (-1d-198)) then
              tmp = (-4.0d0) * ((a * t) / c_m)
          else if (t_1 <= 1d-252) then
              tmp = (b / c_m) / z
          else if (t_1 <= 2d+38) then
              tmp = ((a * t) * (-4.0d0)) / c_m
          else
              tmp = ((y / (c_m * z)) * x) * 9.0d0
          end if
          code = c_s * tmp
      end function
      
      c\_m = Math.abs(c);
      c\_s = Math.copySign(1.0, c);
      assert x < y && y < z && z < t && t < a && a < b && b < c_m;
      public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	double t_1 = (x * 9.0) * y;
      	double tmp;
      	if (t_1 <= -5000.0) {
      		tmp = -(((-9.0 * x) * y) / (c_m * z));
      	} else if (t_1 <= -1e-198) {
      		tmp = -4.0 * ((a * t) / c_m);
      	} else if (t_1 <= 1e-252) {
      		tmp = (b / c_m) / z;
      	} else if (t_1 <= 2e+38) {
      		tmp = ((a * t) * -4.0) / c_m;
      	} else {
      		tmp = ((y / (c_m * z)) * x) * 9.0;
      	}
      	return c_s * tmp;
      }
      
      c\_m = math.fabs(c)
      c\_s = math.copysign(1.0, c)
      [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
      def code(c_s, x, y, z, t, a, b, c_m):
      	t_1 = (x * 9.0) * y
      	tmp = 0
      	if t_1 <= -5000.0:
      		tmp = -(((-9.0 * x) * y) / (c_m * z))
      	elif t_1 <= -1e-198:
      		tmp = -4.0 * ((a * t) / c_m)
      	elif t_1 <= 1e-252:
      		tmp = (b / c_m) / z
      	elif t_1 <= 2e+38:
      		tmp = ((a * t) * -4.0) / c_m
      	else:
      		tmp = ((y / (c_m * z)) * x) * 9.0
      	return c_s * tmp
      
      c\_m = abs(c)
      c\_s = copysign(1.0, c)
      x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
      function code(c_s, x, y, z, t, a, b, c_m)
      	t_1 = Float64(Float64(x * 9.0) * y)
      	tmp = 0.0
      	if (t_1 <= -5000.0)
      		tmp = Float64(-Float64(Float64(Float64(-9.0 * x) * y) / Float64(c_m * z)));
      	elseif (t_1 <= -1e-198)
      		tmp = Float64(-4.0 * Float64(Float64(a * t) / c_m));
      	elseif (t_1 <= 1e-252)
      		tmp = Float64(Float64(b / c_m) / z);
      	elseif (t_1 <= 2e+38)
      		tmp = Float64(Float64(Float64(a * t) * -4.0) / c_m);
      	else
      		tmp = Float64(Float64(Float64(y / Float64(c_m * z)) * x) * 9.0);
      	end
      	return Float64(c_s * tmp)
      end
      
      c\_m = abs(c);
      c\_s = sign(c) * abs(1.0);
      x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
      function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
      	t_1 = (x * 9.0) * y;
      	tmp = 0.0;
      	if (t_1 <= -5000.0)
      		tmp = -(((-9.0 * x) * y) / (c_m * z));
      	elseif (t_1 <= -1e-198)
      		tmp = -4.0 * ((a * t) / c_m);
      	elseif (t_1 <= 1e-252)
      		tmp = (b / c_m) / z;
      	elseif (t_1 <= 2e+38)
      		tmp = ((a * t) * -4.0) / c_m;
      	else
      		tmp = ((y / (c_m * z)) * x) * 9.0;
      	end
      	tmp_2 = c_s * tmp;
      end
      
      c\_m = N[Abs[c], $MachinePrecision]
      c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -5000.0], (-N[(N[(N[(-9.0 * x), $MachinePrecision] * y), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), If[LessEqual[t$95$1, -1e-198], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-252], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 2e+38], N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(N[(y / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] * 9.0), $MachinePrecision]]]]]), $MachinePrecision]]
      
      \begin{array}{l}
      c\_m = \left|c\right|
      \\
      c\_s = \mathsf{copysign}\left(1, c\right)
      \\
      [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
      \\
      \begin{array}{l}
      t_1 := \left(x \cdot 9\right) \cdot y\\
      c\_s \cdot \begin{array}{l}
      \mathbf{if}\;t\_1 \leq -5000:\\
      \;\;\;\;-\frac{\left(-9 \cdot x\right) \cdot y}{c\_m \cdot z}\\
      
      \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-198}:\\
      \;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\
      
      \mathbf{elif}\;t\_1 \leq 10^{-252}:\\
      \;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
      
      \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+38}:\\
      \;\;\;\;\frac{\left(a \cdot t\right) \cdot -4}{c\_m}\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\frac{y}{c\_m \cdot z} \cdot x\right) \cdot 9\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 5 regimes
      2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5e3

        1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
        8. Taylor expanded in x around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -5e3 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.9999999999999991e-199

        1. Initial program 78.7%

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

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

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

        if -9.9999999999999991e-199 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.99999999999999943e-253

        1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

        if 9.99999999999999943e-253 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999995e38

        1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\left(a \cdot t\right) \cdot \color{blue}{-4}}{c} \]
          3. lift-*.f6438.4

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

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

        if 1.99999999999999995e38 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

        1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 8: 51.2% accurate, 0.5× speedup?

      \[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -5000:\\ \;\;\;\;\frac{\left(y \cdot x\right) \cdot 9}{c\_m \cdot z}\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-198}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\ \mathbf{elif}\;t\_1 \leq 10^{-252}:\\ \;\;\;\;\frac{\frac{b}{c\_m}}{z}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+38}:\\ \;\;\;\;\frac{\left(a \cdot t\right) \cdot -4}{c\_m}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{y}{c\_m \cdot z} \cdot x\right) \cdot 9\\ \end{array} \end{array} \end{array} \]
      c\_m = (fabs.f64 c)
      c\_s = (copysign.f64 #s(literal 1 binary64) c)
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      (FPCore (c_s x y z t a b c_m)
       :precision binary64
       (let* ((t_1 (* (* x 9.0) y)))
         (*
          c_s
          (if (<= t_1 -5000.0)
            (/ (* (* y x) 9.0) (* c_m z))
            (if (<= t_1 -1e-198)
              (* -4.0 (/ (* a t) c_m))
              (if (<= t_1 1e-252)
                (/ (/ b c_m) z)
                (if (<= t_1 2e+38)
                  (/ (* (* a t) -4.0) c_m)
                  (* (* (/ y (* c_m z)) x) 9.0))))))))
      c\_m = fabs(c);
      c\_s = copysign(1.0, c);
      assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
      double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	double t_1 = (x * 9.0) * y;
      	double tmp;
      	if (t_1 <= -5000.0) {
      		tmp = ((y * x) * 9.0) / (c_m * z);
      	} else if (t_1 <= -1e-198) {
      		tmp = -4.0 * ((a * t) / c_m);
      	} else if (t_1 <= 1e-252) {
      		tmp = (b / c_m) / z;
      	} else if (t_1 <= 2e+38) {
      		tmp = ((a * t) * -4.0) / c_m;
      	} else {
      		tmp = ((y / (c_m * z)) * x) * 9.0;
      	}
      	return c_s * tmp;
      }
      
      c\_m =     private
      c\_s =     private
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(c_s, x, y, z, t, a, b, c_m)
      use fmin_fmax_functions
          real(8), intent (in) :: c_s
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8), intent (in) :: c_m
          real(8) :: t_1
          real(8) :: tmp
          t_1 = (x * 9.0d0) * y
          if (t_1 <= (-5000.0d0)) then
              tmp = ((y * x) * 9.0d0) / (c_m * z)
          else if (t_1 <= (-1d-198)) then
              tmp = (-4.0d0) * ((a * t) / c_m)
          else if (t_1 <= 1d-252) then
              tmp = (b / c_m) / z
          else if (t_1 <= 2d+38) then
              tmp = ((a * t) * (-4.0d0)) / c_m
          else
              tmp = ((y / (c_m * z)) * x) * 9.0d0
          end if
          code = c_s * tmp
      end function
      
      c\_m = Math.abs(c);
      c\_s = Math.copySign(1.0, c);
      assert x < y && y < z && z < t && t < a && a < b && b < c_m;
      public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	double t_1 = (x * 9.0) * y;
      	double tmp;
      	if (t_1 <= -5000.0) {
      		tmp = ((y * x) * 9.0) / (c_m * z);
      	} else if (t_1 <= -1e-198) {
      		tmp = -4.0 * ((a * t) / c_m);
      	} else if (t_1 <= 1e-252) {
      		tmp = (b / c_m) / z;
      	} else if (t_1 <= 2e+38) {
      		tmp = ((a * t) * -4.0) / c_m;
      	} else {
      		tmp = ((y / (c_m * z)) * x) * 9.0;
      	}
      	return c_s * tmp;
      }
      
      c\_m = math.fabs(c)
      c\_s = math.copysign(1.0, c)
      [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
      def code(c_s, x, y, z, t, a, b, c_m):
      	t_1 = (x * 9.0) * y
      	tmp = 0
      	if t_1 <= -5000.0:
      		tmp = ((y * x) * 9.0) / (c_m * z)
      	elif t_1 <= -1e-198:
      		tmp = -4.0 * ((a * t) / c_m)
      	elif t_1 <= 1e-252:
      		tmp = (b / c_m) / z
      	elif t_1 <= 2e+38:
      		tmp = ((a * t) * -4.0) / c_m
      	else:
      		tmp = ((y / (c_m * z)) * x) * 9.0
      	return c_s * tmp
      
      c\_m = abs(c)
      c\_s = copysign(1.0, c)
      x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
      function code(c_s, x, y, z, t, a, b, c_m)
      	t_1 = Float64(Float64(x * 9.0) * y)
      	tmp = 0.0
      	if (t_1 <= -5000.0)
      		tmp = Float64(Float64(Float64(y * x) * 9.0) / Float64(c_m * z));
      	elseif (t_1 <= -1e-198)
      		tmp = Float64(-4.0 * Float64(Float64(a * t) / c_m));
      	elseif (t_1 <= 1e-252)
      		tmp = Float64(Float64(b / c_m) / z);
      	elseif (t_1 <= 2e+38)
      		tmp = Float64(Float64(Float64(a * t) * -4.0) / c_m);
      	else
      		tmp = Float64(Float64(Float64(y / Float64(c_m * z)) * x) * 9.0);
      	end
      	return Float64(c_s * tmp)
      end
      
      c\_m = abs(c);
      c\_s = sign(c) * abs(1.0);
      x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
      function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
      	t_1 = (x * 9.0) * y;
      	tmp = 0.0;
      	if (t_1 <= -5000.0)
      		tmp = ((y * x) * 9.0) / (c_m * z);
      	elseif (t_1 <= -1e-198)
      		tmp = -4.0 * ((a * t) / c_m);
      	elseif (t_1 <= 1e-252)
      		tmp = (b / c_m) / z;
      	elseif (t_1 <= 2e+38)
      		tmp = ((a * t) * -4.0) / c_m;
      	else
      		tmp = ((y / (c_m * z)) * x) * 9.0;
      	end
      	tmp_2 = c_s * tmp;
      end
      
      c\_m = N[Abs[c], $MachinePrecision]
      c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$1, -5000.0], N[(N[(N[(y * x), $MachinePrecision] * 9.0), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-198], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-252], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 2e+38], N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision], N[(N[(N[(y / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] * 9.0), $MachinePrecision]]]]]), $MachinePrecision]]
      
      \begin{array}{l}
      c\_m = \left|c\right|
      \\
      c\_s = \mathsf{copysign}\left(1, c\right)
      \\
      [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
      \\
      \begin{array}{l}
      t_1 := \left(x \cdot 9\right) \cdot y\\
      c\_s \cdot \begin{array}{l}
      \mathbf{if}\;t\_1 \leq -5000:\\
      \;\;\;\;\frac{\left(y \cdot x\right) \cdot 9}{c\_m \cdot z}\\
      
      \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-198}:\\
      \;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\
      
      \mathbf{elif}\;t\_1 \leq 10^{-252}:\\
      \;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
      
      \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+38}:\\
      \;\;\;\;\frac{\left(a \cdot t\right) \cdot -4}{c\_m}\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\frac{y}{c\_m \cdot z} \cdot x\right) \cdot 9\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 5 regimes
      2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5e3

        1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

        if -5e3 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.9999999999999991e-199

        1. Initial program 78.7%

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

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

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

        if -9.9999999999999991e-199 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.99999999999999943e-253

        1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

        if 9.99999999999999943e-253 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999995e38

        1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\left(a \cdot t\right) \cdot \color{blue}{-4}}{c} \]
          3. lift-*.f6438.4

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

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

        if 1.99999999999999995e38 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

        1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 9: 50.7% accurate, 0.5× speedup?

      \[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ \begin{array}{l} t_1 := \frac{\left(y \cdot x\right) \cdot 9}{c\_m \cdot z}\\ t_2 := \left(x \cdot 9\right) \cdot y\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq -5000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-198}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\ \mathbf{elif}\;t\_2 \leq 10^{-252}:\\ \;\;\;\;\frac{\frac{b}{c\_m}}{z}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+38}:\\ \;\;\;\;\frac{\left(a \cdot t\right) \cdot -4}{c\_m}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
      c\_m = (fabs.f64 c)
      c\_s = (copysign.f64 #s(literal 1 binary64) c)
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      (FPCore (c_s x y z t a b c_m)
       :precision binary64
       (let* ((t_1 (/ (* (* y x) 9.0) (* c_m z))) (t_2 (* (* x 9.0) y)))
         (*
          c_s
          (if (<= t_2 -5000.0)
            t_1
            (if (<= t_2 -1e-198)
              (* -4.0 (/ (* a t) c_m))
              (if (<= t_2 1e-252)
                (/ (/ b c_m) z)
                (if (<= t_2 2e+38) (/ (* (* a t) -4.0) c_m) t_1)))))))
      c\_m = fabs(c);
      c\_s = copysign(1.0, c);
      assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
      double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	double t_1 = ((y * x) * 9.0) / (c_m * z);
      	double t_2 = (x * 9.0) * y;
      	double tmp;
      	if (t_2 <= -5000.0) {
      		tmp = t_1;
      	} else if (t_2 <= -1e-198) {
      		tmp = -4.0 * ((a * t) / c_m);
      	} else if (t_2 <= 1e-252) {
      		tmp = (b / c_m) / z;
      	} else if (t_2 <= 2e+38) {
      		tmp = ((a * t) * -4.0) / c_m;
      	} else {
      		tmp = t_1;
      	}
      	return c_s * tmp;
      }
      
      c\_m =     private
      c\_s =     private
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(c_s, x, y, z, t, a, b, c_m)
      use fmin_fmax_functions
          real(8), intent (in) :: c_s
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8), intent (in) :: c_m
          real(8) :: t_1
          real(8) :: t_2
          real(8) :: tmp
          t_1 = ((y * x) * 9.0d0) / (c_m * z)
          t_2 = (x * 9.0d0) * y
          if (t_2 <= (-5000.0d0)) then
              tmp = t_1
          else if (t_2 <= (-1d-198)) then
              tmp = (-4.0d0) * ((a * t) / c_m)
          else if (t_2 <= 1d-252) then
              tmp = (b / c_m) / z
          else if (t_2 <= 2d+38) then
              tmp = ((a * t) * (-4.0d0)) / c_m
          else
              tmp = t_1
          end if
          code = c_s * tmp
      end function
      
      c\_m = Math.abs(c);
      c\_s = Math.copySign(1.0, c);
      assert x < y && y < z && z < t && t < a && a < b && b < c_m;
      public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	double t_1 = ((y * x) * 9.0) / (c_m * z);
      	double t_2 = (x * 9.0) * y;
      	double tmp;
      	if (t_2 <= -5000.0) {
      		tmp = t_1;
      	} else if (t_2 <= -1e-198) {
      		tmp = -4.0 * ((a * t) / c_m);
      	} else if (t_2 <= 1e-252) {
      		tmp = (b / c_m) / z;
      	} else if (t_2 <= 2e+38) {
      		tmp = ((a * t) * -4.0) / c_m;
      	} else {
      		tmp = t_1;
      	}
      	return c_s * tmp;
      }
      
      c\_m = math.fabs(c)
      c\_s = math.copysign(1.0, c)
      [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
      def code(c_s, x, y, z, t, a, b, c_m):
      	t_1 = ((y * x) * 9.0) / (c_m * z)
      	t_2 = (x * 9.0) * y
      	tmp = 0
      	if t_2 <= -5000.0:
      		tmp = t_1
      	elif t_2 <= -1e-198:
      		tmp = -4.0 * ((a * t) / c_m)
      	elif t_2 <= 1e-252:
      		tmp = (b / c_m) / z
      	elif t_2 <= 2e+38:
      		tmp = ((a * t) * -4.0) / c_m
      	else:
      		tmp = t_1
      	return c_s * tmp
      
      c\_m = abs(c)
      c\_s = copysign(1.0, c)
      x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
      function code(c_s, x, y, z, t, a, b, c_m)
      	t_1 = Float64(Float64(Float64(y * x) * 9.0) / Float64(c_m * z))
      	t_2 = Float64(Float64(x * 9.0) * y)
      	tmp = 0.0
      	if (t_2 <= -5000.0)
      		tmp = t_1;
      	elseif (t_2 <= -1e-198)
      		tmp = Float64(-4.0 * Float64(Float64(a * t) / c_m));
      	elseif (t_2 <= 1e-252)
      		tmp = Float64(Float64(b / c_m) / z);
      	elseif (t_2 <= 2e+38)
      		tmp = Float64(Float64(Float64(a * t) * -4.0) / c_m);
      	else
      		tmp = t_1;
      	end
      	return Float64(c_s * tmp)
      end
      
      c\_m = abs(c);
      c\_s = sign(c) * abs(1.0);
      x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
      function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
      	t_1 = ((y * x) * 9.0) / (c_m * z);
      	t_2 = (x * 9.0) * y;
      	tmp = 0.0;
      	if (t_2 <= -5000.0)
      		tmp = t_1;
      	elseif (t_2 <= -1e-198)
      		tmp = -4.0 * ((a * t) / c_m);
      	elseif (t_2 <= 1e-252)
      		tmp = (b / c_m) / z;
      	elseif (t_2 <= 2e+38)
      		tmp = ((a * t) * -4.0) / c_m;
      	else
      		tmp = t_1;
      	end
      	tmp_2 = c_s * tmp;
      end
      
      c\_m = N[Abs[c], $MachinePrecision]
      c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := Block[{t$95$1 = N[(N[(N[(y * x), $MachinePrecision] * 9.0), $MachinePrecision] / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$2, -5000.0], t$95$1, If[LessEqual[t$95$2, -1e-198], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e-252], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, 2e+38], N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision], t$95$1]]]]), $MachinePrecision]]]
      
      \begin{array}{l}
      c\_m = \left|c\right|
      \\
      c\_s = \mathsf{copysign}\left(1, c\right)
      \\
      [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
      \\
      \begin{array}{l}
      t_1 := \frac{\left(y \cdot x\right) \cdot 9}{c\_m \cdot z}\\
      t_2 := \left(x \cdot 9\right) \cdot y\\
      c\_s \cdot \begin{array}{l}
      \mathbf{if}\;t\_2 \leq -5000:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-198}:\\
      \;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\
      
      \mathbf{elif}\;t\_2 \leq 10^{-252}:\\
      \;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
      
      \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+38}:\\
      \;\;\;\;\frac{\left(a \cdot t\right) \cdot -4}{c\_m}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5e3 or 1.99999999999999995e38 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

        1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

        if -5e3 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.9999999999999991e-199

        1. Initial program 78.7%

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

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

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

        if -9.9999999999999991e-199 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.99999999999999943e-253

        1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

        if 9.99999999999999943e-253 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999995e38

        1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\left(a \cdot t\right) \cdot \color{blue}{-4}}{c} \]
          3. lift-*.f6438.4

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

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

      Alternative 10: 50.7% accurate, 1.5× speedup?

      \[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ c\_s \cdot \begin{array}{l} \mathbf{if}\;b \leq -1.12 \cdot 10^{+67}:\\ \;\;\;\;\frac{\frac{b}{c\_m}}{z}\\ \mathbf{elif}\;b \leq 1.06 \cdot 10^{+29}:\\ \;\;\;\;\frac{\left(a \cdot t\right) \cdot -4}{c\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{c\_m \cdot z}\\ \end{array} \end{array} \]
      c\_m = (fabs.f64 c)
      c\_s = (copysign.f64 #s(literal 1 binary64) c)
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      (FPCore (c_s x y z t a b c_m)
       :precision binary64
       (*
        c_s
        (if (<= b -1.12e+67)
          (/ (/ b c_m) z)
          (if (<= b 1.06e+29) (/ (* (* a t) -4.0) c_m) (/ b (* c_m z))))))
      c\_m = fabs(c);
      c\_s = copysign(1.0, c);
      assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
      double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	double tmp;
      	if (b <= -1.12e+67) {
      		tmp = (b / c_m) / z;
      	} else if (b <= 1.06e+29) {
      		tmp = ((a * t) * -4.0) / c_m;
      	} else {
      		tmp = b / (c_m * z);
      	}
      	return c_s * tmp;
      }
      
      c\_m =     private
      c\_s =     private
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(c_s, x, y, z, t, a, b, c_m)
      use fmin_fmax_functions
          real(8), intent (in) :: c_s
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8), intent (in) :: c_m
          real(8) :: tmp
          if (b <= (-1.12d+67)) then
              tmp = (b / c_m) / z
          else if (b <= 1.06d+29) then
              tmp = ((a * t) * (-4.0d0)) / c_m
          else
              tmp = b / (c_m * z)
          end if
          code = c_s * tmp
      end function
      
      c\_m = Math.abs(c);
      c\_s = Math.copySign(1.0, c);
      assert x < y && y < z && z < t && t < a && a < b && b < c_m;
      public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	double tmp;
      	if (b <= -1.12e+67) {
      		tmp = (b / c_m) / z;
      	} else if (b <= 1.06e+29) {
      		tmp = ((a * t) * -4.0) / c_m;
      	} else {
      		tmp = b / (c_m * z);
      	}
      	return c_s * tmp;
      }
      
      c\_m = math.fabs(c)
      c\_s = math.copysign(1.0, c)
      [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
      def code(c_s, x, y, z, t, a, b, c_m):
      	tmp = 0
      	if b <= -1.12e+67:
      		tmp = (b / c_m) / z
      	elif b <= 1.06e+29:
      		tmp = ((a * t) * -4.0) / c_m
      	else:
      		tmp = b / (c_m * z)
      	return c_s * tmp
      
      c\_m = abs(c)
      c\_s = copysign(1.0, c)
      x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
      function code(c_s, x, y, z, t, a, b, c_m)
      	tmp = 0.0
      	if (b <= -1.12e+67)
      		tmp = Float64(Float64(b / c_m) / z);
      	elseif (b <= 1.06e+29)
      		tmp = Float64(Float64(Float64(a * t) * -4.0) / c_m);
      	else
      		tmp = Float64(b / Float64(c_m * z));
      	end
      	return Float64(c_s * tmp)
      end
      
      c\_m = abs(c);
      c\_s = sign(c) * abs(1.0);
      x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
      function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
      	tmp = 0.0;
      	if (b <= -1.12e+67)
      		tmp = (b / c_m) / z;
      	elseif (b <= 1.06e+29)
      		tmp = ((a * t) * -4.0) / c_m;
      	else
      		tmp = b / (c_m * z);
      	end
      	tmp_2 = c_s * tmp;
      end
      
      c\_m = N[Abs[c], $MachinePrecision]
      c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[b, -1.12e+67], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 1.06e+29], N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] / c$95$m), $MachinePrecision], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
      
      \begin{array}{l}
      c\_m = \left|c\right|
      \\
      c\_s = \mathsf{copysign}\left(1, c\right)
      \\
      [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
      \\
      c\_s \cdot \begin{array}{l}
      \mathbf{if}\;b \leq -1.12 \cdot 10^{+67}:\\
      \;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
      
      \mathbf{elif}\;b \leq 1.06 \cdot 10^{+29}:\\
      \;\;\;\;\frac{\left(a \cdot t\right) \cdot -4}{c\_m}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{b}{c\_m \cdot z}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if b < -1.12e67

        1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

        if -1.12e67 < b < 1.0600000000000001e29

        1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\left(a \cdot t\right) \cdot \color{blue}{-4}}{c} \]
          3. lift-*.f6438.4

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

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

        if 1.0600000000000001e29 < b

        1. Initial program 78.7%

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

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

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

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

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

      Alternative 11: 50.4% accurate, 1.5× speedup?

      \[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ c\_s \cdot \begin{array}{l} \mathbf{if}\;b \leq -1.12 \cdot 10^{+67}:\\ \;\;\;\;\frac{\frac{b}{c\_m}}{z}\\ \mathbf{elif}\;b \leq 1.06 \cdot 10^{+29}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{c\_m \cdot z}\\ \end{array} \end{array} \]
      c\_m = (fabs.f64 c)
      c\_s = (copysign.f64 #s(literal 1 binary64) c)
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      (FPCore (c_s x y z t a b c_m)
       :precision binary64
       (*
        c_s
        (if (<= b -1.12e+67)
          (/ (/ b c_m) z)
          (if (<= b 1.06e+29) (* -4.0 (/ (* a t) c_m)) (/ b (* c_m z))))))
      c\_m = fabs(c);
      c\_s = copysign(1.0, c);
      assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
      double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	double tmp;
      	if (b <= -1.12e+67) {
      		tmp = (b / c_m) / z;
      	} else if (b <= 1.06e+29) {
      		tmp = -4.0 * ((a * t) / c_m);
      	} else {
      		tmp = b / (c_m * z);
      	}
      	return c_s * tmp;
      }
      
      c\_m =     private
      c\_s =     private
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(c_s, x, y, z, t, a, b, c_m)
      use fmin_fmax_functions
          real(8), intent (in) :: c_s
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8), intent (in) :: c_m
          real(8) :: tmp
          if (b <= (-1.12d+67)) then
              tmp = (b / c_m) / z
          else if (b <= 1.06d+29) then
              tmp = (-4.0d0) * ((a * t) / c_m)
          else
              tmp = b / (c_m * z)
          end if
          code = c_s * tmp
      end function
      
      c\_m = Math.abs(c);
      c\_s = Math.copySign(1.0, c);
      assert x < y && y < z && z < t && t < a && a < b && b < c_m;
      public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	double tmp;
      	if (b <= -1.12e+67) {
      		tmp = (b / c_m) / z;
      	} else if (b <= 1.06e+29) {
      		tmp = -4.0 * ((a * t) / c_m);
      	} else {
      		tmp = b / (c_m * z);
      	}
      	return c_s * tmp;
      }
      
      c\_m = math.fabs(c)
      c\_s = math.copysign(1.0, c)
      [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
      def code(c_s, x, y, z, t, a, b, c_m):
      	tmp = 0
      	if b <= -1.12e+67:
      		tmp = (b / c_m) / z
      	elif b <= 1.06e+29:
      		tmp = -4.0 * ((a * t) / c_m)
      	else:
      		tmp = b / (c_m * z)
      	return c_s * tmp
      
      c\_m = abs(c)
      c\_s = copysign(1.0, c)
      x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
      function code(c_s, x, y, z, t, a, b, c_m)
      	tmp = 0.0
      	if (b <= -1.12e+67)
      		tmp = Float64(Float64(b / c_m) / z);
      	elseif (b <= 1.06e+29)
      		tmp = Float64(-4.0 * Float64(Float64(a * t) / c_m));
      	else
      		tmp = Float64(b / Float64(c_m * z));
      	end
      	return Float64(c_s * tmp)
      end
      
      c\_m = abs(c);
      c\_s = sign(c) * abs(1.0);
      x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
      function tmp_2 = code(c_s, x, y, z, t, a, b, c_m)
      	tmp = 0.0;
      	if (b <= -1.12e+67)
      		tmp = (b / c_m) / z;
      	elseif (b <= 1.06e+29)
      		tmp = -4.0 * ((a * t) / c_m);
      	else
      		tmp = b / (c_m * z);
      	end
      	tmp_2 = c_s * tmp;
      end
      
      c\_m = N[Abs[c], $MachinePrecision]
      c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * If[LessEqual[b, -1.12e+67], N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 1.06e+29], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
      
      \begin{array}{l}
      c\_m = \left|c\right|
      \\
      c\_s = \mathsf{copysign}\left(1, c\right)
      \\
      [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
      \\
      c\_s \cdot \begin{array}{l}
      \mathbf{if}\;b \leq -1.12 \cdot 10^{+67}:\\
      \;\;\;\;\frac{\frac{b}{c\_m}}{z}\\
      
      \mathbf{elif}\;b \leq 1.06 \cdot 10^{+29}:\\
      \;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{b}{c\_m \cdot z}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if b < -1.12e67

        1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

        if -1.12e67 < b < 1.0600000000000001e29

        1. Initial program 78.7%

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

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

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

        if 1.0600000000000001e29 < b

        1. Initial program 78.7%

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

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

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

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

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

      Alternative 12: 35.9% accurate, 3.6× speedup?

      \[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ c\_s \cdot \frac{\frac{b}{c\_m}}{z} \end{array} \]
      c\_m = (fabs.f64 c)
      c\_s = (copysign.f64 #s(literal 1 binary64) c)
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      (FPCore (c_s x y z t a b c_m) :precision binary64 (* c_s (/ (/ b c_m) z)))
      c\_m = fabs(c);
      c\_s = copysign(1.0, c);
      assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
      double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	return c_s * ((b / c_m) / z);
      }
      
      c\_m =     private
      c\_s =     private
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(c_s, x, y, z, t, a, b, c_m)
      use fmin_fmax_functions
          real(8), intent (in) :: c_s
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8), intent (in) :: c_m
          code = c_s * ((b / c_m) / z)
      end function
      
      c\_m = Math.abs(c);
      c\_s = Math.copySign(1.0, c);
      assert x < y && y < z && z < t && t < a && a < b && b < c_m;
      public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	return c_s * ((b / c_m) / z);
      }
      
      c\_m = math.fabs(c)
      c\_s = math.copysign(1.0, c)
      [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
      def code(c_s, x, y, z, t, a, b, c_m):
      	return c_s * ((b / c_m) / z)
      
      c\_m = abs(c)
      c\_s = copysign(1.0, c)
      x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
      function code(c_s, x, y, z, t, a, b, c_m)
      	return Float64(c_s * Float64(Float64(b / c_m) / z))
      end
      
      c\_m = abs(c);
      c\_s = sign(c) * abs(1.0);
      x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
      function tmp = code(c_s, x, y, z, t, a, b, c_m)
      	tmp = c_s * ((b / c_m) / z);
      end
      
      c\_m = N[Abs[c], $MachinePrecision]
      c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * N[(N[(b / c$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      c\_m = \left|c\right|
      \\
      c\_s = \mathsf{copysign}\left(1, c\right)
      \\
      [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
      \\
      c\_s \cdot \frac{\frac{b}{c\_m}}{z}
      \end{array}
      
      Derivation
      1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{b}{c}}{\color{blue}{z}} \]
      7. Add Preprocessing

      Alternative 13: 35.0% accurate, 3.8× speedup?

      \[\begin{array}{l} c\_m = \left|c\right| \\ c\_s = \mathsf{copysign}\left(1, c\right) \\ [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\ \\ c\_s \cdot \frac{b}{c\_m \cdot z} \end{array} \]
      c\_m = (fabs.f64 c)
      c\_s = (copysign.f64 #s(literal 1 binary64) c)
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      (FPCore (c_s x y z t a b c_m) :precision binary64 (* c_s (/ b (* c_m z))))
      c\_m = fabs(c);
      c\_s = copysign(1.0, c);
      assert(x < y && y < z && z < t && t < a && a < b && b < c_m);
      double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	return c_s * (b / (c_m * z));
      }
      
      c\_m =     private
      c\_s =     private
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(c_s, x, y, z, t, a, b, c_m)
      use fmin_fmax_functions
          real(8), intent (in) :: c_s
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8), intent (in) :: c_m
          code = c_s * (b / (c_m * z))
      end function
      
      c\_m = Math.abs(c);
      c\_s = Math.copySign(1.0, c);
      assert x < y && y < z && z < t && t < a && a < b && b < c_m;
      public static double code(double c_s, double x, double y, double z, double t, double a, double b, double c_m) {
      	return c_s * (b / (c_m * z));
      }
      
      c\_m = math.fabs(c)
      c\_s = math.copysign(1.0, c)
      [x, y, z, t, a, b, c_m] = sort([x, y, z, t, a, b, c_m])
      def code(c_s, x, y, z, t, a, b, c_m):
      	return c_s * (b / (c_m * z))
      
      c\_m = abs(c)
      c\_s = copysign(1.0, c)
      x, y, z, t, a, b, c_m = sort([x, y, z, t, a, b, c_m])
      function code(c_s, x, y, z, t, a, b, c_m)
      	return Float64(c_s * Float64(b / Float64(c_m * z)))
      end
      
      c\_m = abs(c);
      c\_s = sign(c) * abs(1.0);
      x, y, z, t, a, b, c_m = num2cell(sort([x, y, z, t, a, b, c_m])){:}
      function tmp = code(c_s, x, y, z, t, a, b, c_m)
      	tmp = c_s * (b / (c_m * z));
      end
      
      c\_m = N[Abs[c], $MachinePrecision]
      c\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      NOTE: x, y, z, t, a, b, and c_m should be sorted in increasing order before calling this function.
      code[c$95$s_, x_, y_, z_, t_, a_, b_, c$95$m_] := N[(c$95$s * N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      c\_m = \left|c\right|
      \\
      c\_s = \mathsf{copysign}\left(1, c\right)
      \\
      [x, y, z, t, a, b, c_m] = \mathsf{sort}([x, y, z, t, a, b, c_m])\\
      \\
      c\_s \cdot \frac{b}{c\_m \cdot z}
      \end{array}
      
      Derivation
      1. Initial program 78.7%

        \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      2. Taylor expanded in b around inf

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6435.9

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites35.9%

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
      5. Add Preprocessing

      Reproduce

      ?
      herbie shell --seed 2025139 
      (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)))