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

Percentage Accurate: 79.5% → 88.4%
Time: 5.6s
Alternatives: 15
Speedup: 0.5×

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}

Sampling outcomes in binary64 precision:

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

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

Initial Program: 79.5% 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: 88.4% accurate, 0.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 := \left(x \cdot 9\right) \cdot y\\ t_2 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+45}:\\ \;\;\;\;\frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c\_m}\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;\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\_m}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+278}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-9, \frac{y}{z}, \frac{-b}{z \cdot x}\right) - \frac{t \cdot a}{x} \cdot -4}{-c\_m} \cdot x\\ \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))
        (t_2 (/ (+ (- t_1 (* (* (* z 4.0) t) a)) b) (* z c_m))))
   (*
    c_s
    (if (<= t_2 -5e+45)
      (/ (+ (- t_1 (* (* 4.0 z) (* a t))) b) (* z c_m))
      (if (<= t_2 0.0)
        (/ (/ (- (* (* y x) 9.0) (- (* (* (* 4.0 z) t) a) b)) z) c_m)
        (if (<= t_2 2e+278)
          t_2
          (*
           (/
            (- (fma -9.0 (/ y z) (/ (- b) (* z x))) (* (/ (* t a) x) -4.0))
            (- c_m))
           x)))))))
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 t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	double tmp;
	if (t_2 <= -5e+45) {
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m);
	} else if (t_2 <= 0.0) {
		tmp = ((((y * x) * 9.0) - ((((4.0 * z) * t) * a) - b)) / z) / c_m;
	} else if (t_2 <= 2e+278) {
		tmp = t_2;
	} else {
		tmp = ((fma(-9.0, (y / z), (-b / (z * x))) - (((t * a) / x) * -4.0)) / -c_m) * x;
	}
	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)
	t_2 = Float64(Float64(Float64(t_1 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m))
	tmp = 0.0
	if (t_2 <= -5e+45)
		tmp = Float64(Float64(Float64(t_1 - Float64(Float64(4.0 * z) * Float64(a * t))) + b) / Float64(z * c_m));
	elseif (t_2 <= 0.0)
		tmp = Float64(Float64(Float64(Float64(Float64(y * x) * 9.0) - Float64(Float64(Float64(Float64(4.0 * z) * t) * a) - b)) / z) / c_m);
	elseif (t_2 <= 2e+278)
		tmp = t_2;
	else
		tmp = Float64(Float64(Float64(fma(-9.0, Float64(y / z), Float64(Float64(-b) / Float64(z * x))) - Float64(Float64(Float64(t * a) / x) * -4.0)) / Float64(-c_m)) * x);
	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]}, Block[{t$95$2 = N[(N[(N[(t$95$1 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$2, -5e+45], N[(N[(N[(t$95$1 - N[(N[(4.0 * z), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0), $MachinePrecision] - N[(N[(N[(N[(4.0 * z), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[t$95$2, 2e+278], t$95$2, N[(N[(N[(N[(-9.0 * N[(y / z), $MachinePrecision] + N[((-b) / N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * a), $MachinePrecision] / x), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] / (-c$95$m)), $MachinePrecision] * x), $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\\
t_2 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+45}:\\
\;\;\;\;\frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c\_m}\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\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\_m}\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+278}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 72.8%

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

      \[\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}} \]

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

    1. Initial program 99.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Add Preprocessing

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

    1. Initial program 63.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq -5 \cdot 10^{+45}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq 0:\\ \;\;\;\;\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}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq 2 \cdot 10^{+278}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-9, \frac{y}{z}, \frac{-b}{z \cdot x}\right) - \frac{t \cdot a}{x} \cdot -4}{-c} \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 88.6% accurate, 0.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 := \left(x \cdot 9\right) \cdot y\\ t_2 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+45}:\\ \;\;\;\;\frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c\_m}\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;\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\_m}\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+299}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(\frac{a}{c\_m}, 4, \frac{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c\_m}}{z}}{-t}\right) \cdot \left(-t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{c\_m \cdot z} - \frac{t \cdot a}{c\_m} \cdot 4\\ \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))
        (t_2 (/ (+ (- t_1 (* (* (* z 4.0) t) a)) b) (* z c_m))))
   (*
    c_s
    (if (<= t_2 -5e+45)
      (/ (+ (- t_1 (* (* 4.0 z) (* a t))) b) (* z c_m))
      (if (<= t_2 0.0)
        (/ (/ (- (* (* y x) 9.0) (- (* (* (* 4.0 z) t) a) b)) z) c_m)
        (if (<= t_2 5e+299)
          t_2
          (if (<= t_2 INFINITY)
            (*
             (fma (/ a c_m) 4.0 (/ (/ (/ (fma (* y x) 9.0 b) c_m) z) (- t)))
             (- t))
            (- (/ b (* c_m z)) (* (/ (* t a) c_m) 4.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 t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	double tmp;
	if (t_2 <= -5e+45) {
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m);
	} else if (t_2 <= 0.0) {
		tmp = ((((y * x) * 9.0) - ((((4.0 * z) * t) * a) - b)) / z) / c_m;
	} else if (t_2 <= 5e+299) {
		tmp = t_2;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = fma((a / c_m), 4.0, (((fma((y * x), 9.0, b) / c_m) / z) / -t)) * -t;
	} else {
		tmp = (b / (c_m * z)) - (((t * a) / c_m) * 4.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)
	t_2 = Float64(Float64(Float64(t_1 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m))
	tmp = 0.0
	if (t_2 <= -5e+45)
		tmp = Float64(Float64(Float64(t_1 - Float64(Float64(4.0 * z) * Float64(a * t))) + b) / Float64(z * c_m));
	elseif (t_2 <= 0.0)
		tmp = Float64(Float64(Float64(Float64(Float64(y * x) * 9.0) - Float64(Float64(Float64(Float64(4.0 * z) * t) * a) - b)) / z) / c_m);
	elseif (t_2 <= 5e+299)
		tmp = t_2;
	elseif (t_2 <= Inf)
		tmp = Float64(fma(Float64(a / c_m), 4.0, Float64(Float64(Float64(fma(Float64(y * x), 9.0, b) / c_m) / z) / Float64(-t))) * Float64(-t));
	else
		tmp = Float64(Float64(b / Float64(c_m * z)) - Float64(Float64(Float64(t * a) / c_m) * 4.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]}, Block[{t$95$2 = N[(N[(N[(t$95$1 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$2, -5e+45], N[(N[(N[(t$95$1 - N[(N[(4.0 * z), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0), $MachinePrecision] - N[(N[(N[(N[(4.0 * z), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[t$95$2, 5e+299], t$95$2, If[LessEqual[t$95$2, Infinity], N[(N[(N[(a / c$95$m), $MachinePrecision] * 4.0 + N[(N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / c$95$m), $MachinePrecision] / z), $MachinePrecision] / (-t)), $MachinePrecision]), $MachinePrecision] * (-t)), $MachinePrecision], N[(N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision] * 4.0), $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 := \left(x \cdot 9\right) \cdot y\\
t_2 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+45}:\\
\;\;\;\;\frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c\_m}\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\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\_m}\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;t\_2\\

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

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


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

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 72.8%

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

      \[\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}} \]

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

    1. Initial program 99.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Add Preprocessing

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

    1. Initial program 80.0%

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{b}{c \cdot z} - \frac{a \cdot t}{c} \cdot 4 \]
      6. lift-/.f64N/A

        \[\leadsto \frac{b}{c \cdot z} - \frac{a \cdot t}{c} \cdot 4 \]
      7. *-commutativeN/A

        \[\leadsto \frac{b}{c \cdot z} - \frac{t \cdot a}{c} \cdot 4 \]
      8. lower-*.f6454.5

        \[\leadsto \frac{b}{c \cdot z} - \frac{t \cdot a}{c} \cdot 4 \]
    8. Applied rewrites54.5%

      \[\leadsto \frac{b}{c \cdot z} - \color{blue}{\frac{t \cdot a}{c} \cdot 4} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification89.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq -5 \cdot 10^{+45}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq 0:\\ \;\;\;\;\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}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq 5 \cdot 10^{+299}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(\frac{a}{c}, 4, \frac{\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z}}{-t}\right) \cdot \left(-t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{c \cdot z} - \frac{t \cdot a}{c} \cdot 4\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 89.1% accurate, 0.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 := \left(x \cdot 9\right) \cdot y\\ t_2 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+45}:\\ \;\;\;\;\frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c\_m}\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;\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\_m}\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+299}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(\frac{a}{c\_m}, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{\left(t \cdot z\right) \cdot c\_m}\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{c\_m \cdot z} - \frac{t \cdot a}{c\_m} \cdot 4\\ \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))
        (t_2 (/ (+ (- t_1 (* (* (* z 4.0) t) a)) b) (* z c_m))))
   (*
    c_s
    (if (<= t_2 -5e+45)
      (/ (+ (- t_1 (* (* 4.0 z) (* a t))) b) (* z c_m))
      (if (<= t_2 0.0)
        (/ (/ (- (* (* y x) 9.0) (- (* (* (* 4.0 z) t) a) b)) z) c_m)
        (if (<= t_2 5e+299)
          t_2
          (if (<= t_2 INFINITY)
            (* (fma (/ a c_m) -4.0 (/ (fma (* y x) 9.0 b) (* (* t z) c_m))) t)
            (- (/ b (* c_m z)) (* (/ (* t a) c_m) 4.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 t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	double tmp;
	if (t_2 <= -5e+45) {
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m);
	} else if (t_2 <= 0.0) {
		tmp = ((((y * x) * 9.0) - ((((4.0 * z) * t) * a) - b)) / z) / c_m;
	} else if (t_2 <= 5e+299) {
		tmp = t_2;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = fma((a / c_m), -4.0, (fma((y * x), 9.0, b) / ((t * z) * c_m))) * t;
	} else {
		tmp = (b / (c_m * z)) - (((t * a) / c_m) * 4.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)
	t_2 = Float64(Float64(Float64(t_1 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m))
	tmp = 0.0
	if (t_2 <= -5e+45)
		tmp = Float64(Float64(Float64(t_1 - Float64(Float64(4.0 * z) * Float64(a * t))) + b) / Float64(z * c_m));
	elseif (t_2 <= 0.0)
		tmp = Float64(Float64(Float64(Float64(Float64(y * x) * 9.0) - Float64(Float64(Float64(Float64(4.0 * z) * t) * a) - b)) / z) / c_m);
	elseif (t_2 <= 5e+299)
		tmp = t_2;
	elseif (t_2 <= Inf)
		tmp = Float64(fma(Float64(a / c_m), -4.0, Float64(fma(Float64(y * x), 9.0, b) / Float64(Float64(t * z) * c_m))) * t);
	else
		tmp = Float64(Float64(b / Float64(c_m * z)) - Float64(Float64(Float64(t * a) / c_m) * 4.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]}, Block[{t$95$2 = N[(N[(N[(t$95$1 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$2, -5e+45], N[(N[(N[(t$95$1 - N[(N[(4.0 * z), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0), $MachinePrecision] - N[(N[(N[(N[(4.0 * z), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[t$95$2, 5e+299], t$95$2, If[LessEqual[t$95$2, Infinity], N[(N[(N[(a / c$95$m), $MachinePrecision] * -4.0 + N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] * c$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision] * 4.0), $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 := \left(x \cdot 9\right) \cdot y\\
t_2 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+45}:\\
\;\;\;\;\frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c\_m}\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\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\_m}\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;t\_2\\

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

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


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

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 72.8%

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

      \[\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}} \]

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

    1. Initial program 99.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Add Preprocessing

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

    1. Initial program 80.0%

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{b}{c \cdot z} - \frac{a \cdot t}{c} \cdot 4 \]
      6. lift-/.f64N/A

        \[\leadsto \frac{b}{c \cdot z} - \frac{a \cdot t}{c} \cdot 4 \]
      7. *-commutativeN/A

        \[\leadsto \frac{b}{c \cdot z} - \frac{t \cdot a}{c} \cdot 4 \]
      8. lower-*.f6454.5

        \[\leadsto \frac{b}{c \cdot z} - \frac{t \cdot a}{c} \cdot 4 \]
    8. Applied rewrites54.5%

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

Alternative 4: 88.7% accurate, 0.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 := \left(x \cdot 9\right) \cdot y\\ t_2 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+45}:\\ \;\;\;\;\frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c\_m}\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;\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\_m}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+278}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-9, \frac{y}{z}, \frac{-b}{z \cdot x}\right) - \left(a \cdot \frac{t}{x}\right) \cdot -4}{-c\_m} \cdot x\\ \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))
        (t_2 (/ (+ (- t_1 (* (* (* z 4.0) t) a)) b) (* z c_m))))
   (*
    c_s
    (if (<= t_2 -5e+45)
      (/ (+ (- t_1 (* (* 4.0 z) (* a t))) b) (* z c_m))
      (if (<= t_2 0.0)
        (/ (/ (- (* (* y x) 9.0) (- (* (* (* 4.0 z) t) a) b)) z) c_m)
        (if (<= t_2 2e+278)
          t_2
          (*
           (/
            (- (fma -9.0 (/ y z) (/ (- b) (* z x))) (* (* a (/ t x)) -4.0))
            (- c_m))
           x)))))))
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 t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	double tmp;
	if (t_2 <= -5e+45) {
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m);
	} else if (t_2 <= 0.0) {
		tmp = ((((y * x) * 9.0) - ((((4.0 * z) * t) * a) - b)) / z) / c_m;
	} else if (t_2 <= 2e+278) {
		tmp = t_2;
	} else {
		tmp = ((fma(-9.0, (y / z), (-b / (z * x))) - ((a * (t / x)) * -4.0)) / -c_m) * x;
	}
	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)
	t_2 = Float64(Float64(Float64(t_1 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m))
	tmp = 0.0
	if (t_2 <= -5e+45)
		tmp = Float64(Float64(Float64(t_1 - Float64(Float64(4.0 * z) * Float64(a * t))) + b) / Float64(z * c_m));
	elseif (t_2 <= 0.0)
		tmp = Float64(Float64(Float64(Float64(Float64(y * x) * 9.0) - Float64(Float64(Float64(Float64(4.0 * z) * t) * a) - b)) / z) / c_m);
	elseif (t_2 <= 2e+278)
		tmp = t_2;
	else
		tmp = Float64(Float64(Float64(fma(-9.0, Float64(y / z), Float64(Float64(-b) / Float64(z * x))) - Float64(Float64(a * Float64(t / x)) * -4.0)) / Float64(-c_m)) * x);
	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]}, Block[{t$95$2 = N[(N[(N[(t$95$1 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$2, -5e+45], N[(N[(N[(t$95$1 - N[(N[(4.0 * z), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0), $MachinePrecision] - N[(N[(N[(N[(4.0 * z), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[t$95$2, 2e+278], t$95$2, N[(N[(N[(N[(-9.0 * N[(y / z), $MachinePrecision] + N[((-b) / N[(z * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(a * N[(t / x), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] / (-c$95$m)), $MachinePrecision] * x), $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\\
t_2 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+45}:\\
\;\;\;\;\frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c\_m}\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\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\_m}\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+278}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 72.8%

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

      \[\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}} \]

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

    1. Initial program 99.4%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Add Preprocessing

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

    1. Initial program 63.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq -5 \cdot 10^{+45}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq 0:\\ \;\;\;\;\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}\\ \mathbf{elif}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq 2 \cdot 10^{+278}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-9, \frac{y}{z}, \frac{-b}{z \cdot x}\right) - \left(a \cdot \frac{t}{x}\right) \cdot -4}{-c} \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 88.3% accurate, 0.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 := \left(x \cdot 9\right) \cdot y\\ t_2 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\ t_3 := \frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c\_m}\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+45}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;\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\_m}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{c\_m \cdot z} - \frac{t \cdot a}{c\_m} \cdot 4\\ \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))
        (t_2 (/ (+ (- t_1 (* (* (* z 4.0) t) a)) b) (* z c_m)))
        (t_3 (/ (+ (- t_1 (* (* 4.0 z) (* a t))) b) (* z c_m))))
   (*
    c_s
    (if (<= t_2 -5e+45)
      t_3
      (if (<= t_2 0.0)
        (/ (/ (- (* (* y x) 9.0) (- (* (* (* 4.0 z) t) a) b)) z) c_m)
        (if (<= t_2 INFINITY)
          t_3
          (- (/ b (* c_m z)) (* (/ (* t a) c_m) 4.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 t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	double t_3 = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m);
	double tmp;
	if (t_2 <= -5e+45) {
		tmp = t_3;
	} else if (t_2 <= 0.0) {
		tmp = ((((y * x) * 9.0) - ((((4.0 * z) * t) * a) - b)) / z) / c_m;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = t_3;
	} else {
		tmp = (b / (c_m * z)) - (((t * a) / c_m) * 4.0);
	}
	return c_s * tmp;
}
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 t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	double t_3 = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m);
	double tmp;
	if (t_2 <= -5e+45) {
		tmp = t_3;
	} else if (t_2 <= 0.0) {
		tmp = ((((y * x) * 9.0) - ((((4.0 * z) * t) * a) - b)) / z) / c_m;
	} else if (t_2 <= Double.POSITIVE_INFINITY) {
		tmp = t_3;
	} else {
		tmp = (b / (c_m * z)) - (((t * a) / c_m) * 4.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
	t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c_m)
	t_3 = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m)
	tmp = 0
	if t_2 <= -5e+45:
		tmp = t_3
	elif t_2 <= 0.0:
		tmp = ((((y * x) * 9.0) - ((((4.0 * z) * t) * a) - b)) / z) / c_m
	elif t_2 <= math.inf:
		tmp = t_3
	else:
		tmp = (b / (c_m * z)) - (((t * a) / c_m) * 4.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)
	t_2 = Float64(Float64(Float64(t_1 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m))
	t_3 = Float64(Float64(Float64(t_1 - Float64(Float64(4.0 * z) * Float64(a * t))) + b) / Float64(z * c_m))
	tmp = 0.0
	if (t_2 <= -5e+45)
		tmp = t_3;
	elseif (t_2 <= 0.0)
		tmp = Float64(Float64(Float64(Float64(Float64(y * x) * 9.0) - Float64(Float64(Float64(Float64(4.0 * z) * t) * a) - b)) / z) / c_m);
	elseif (t_2 <= Inf)
		tmp = t_3;
	else
		tmp = Float64(Float64(b / Float64(c_m * z)) - Float64(Float64(Float64(t * a) / c_m) * 4.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;
	t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c_m);
	t_3 = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m);
	tmp = 0.0;
	if (t_2 <= -5e+45)
		tmp = t_3;
	elseif (t_2 <= 0.0)
		tmp = ((((y * x) * 9.0) - ((((4.0 * z) * t) * a) - b)) / z) / c_m;
	elseif (t_2 <= Inf)
		tmp = t_3;
	else
		tmp = (b / (c_m * z)) - (((t * a) / c_m) * 4.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]}, Block[{t$95$2 = N[(N[(N[(t$95$1 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 - N[(N[(4.0 * z), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision]}, N[(c$95$s * If[LessEqual[t$95$2, -5e+45], t$95$3, If[LessEqual[t$95$2, 0.0], N[(N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0), $MachinePrecision] - N[(N[(N[(N[(4.0 * z), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / c$95$m), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$3, N[(N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision] * 4.0), $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 := \left(x \cdot 9\right) \cdot y\\
t_2 := \frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m}\\
t_3 := \frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c\_m}\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+45}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\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\_m}\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_3\\

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


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

    1. Initial program 88.2%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 72.8%

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

      \[\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}} \]

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{b}{c \cdot z} - \frac{a \cdot t}{c} \cdot 4 \]
      6. lift-/.f64N/A

        \[\leadsto \frac{b}{c \cdot z} - \frac{a \cdot t}{c} \cdot 4 \]
      7. *-commutativeN/A

        \[\leadsto \frac{b}{c \cdot z} - \frac{t \cdot a}{c} \cdot 4 \]
      8. lower-*.f6454.5

        \[\leadsto \frac{b}{c \cdot z} - \frac{t \cdot a}{c} \cdot 4 \]
    8. Applied rewrites54.5%

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

Alternative 6: 84.4% 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}\;\frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m} \leq \infty:\\ \;\;\;\;\frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{c\_m \cdot z} - \frac{t \cdot a}{c\_m} \cdot 4\\ \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 (* (* (* z 4.0) t) a)) b) (* z c_m)) INFINITY)
      (/ (+ (- t_1 (* (* 4.0 z) (* a t))) b) (* z c_m))
      (- (/ b (* c_m z)) (* (/ (* t a) c_m) 4.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 - (((z * 4.0) * t) * a)) + b) / (z * c_m)) <= ((double) INFINITY)) {
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m);
	} else {
		tmp = (b / (c_m * z)) - (((t * a) / c_m) * 4.0);
	}
	return c_s * tmp;
}
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 - (((z * 4.0) * t) * a)) + b) / (z * c_m)) <= Double.POSITIVE_INFINITY) {
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m);
	} else {
		tmp = (b / (c_m * z)) - (((t * a) / c_m) * 4.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 - (((z * 4.0) * t) * a)) + b) / (z * c_m)) <= math.inf:
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m)
	else:
		tmp = (b / (c_m * z)) - (((t * a) / c_m) * 4.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 (Float64(Float64(Float64(t_1 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c_m)) <= Inf)
		tmp = Float64(Float64(Float64(t_1 - Float64(Float64(4.0 * z) * Float64(a * t))) + b) / Float64(z * c_m));
	else
		tmp = Float64(Float64(b / Float64(c_m * z)) - Float64(Float64(Float64(t * a) / c_m) * 4.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 - (((z * 4.0) * t) * a)) + b) / (z * c_m)) <= Inf)
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c_m);
	else
		tmp = (b / (c_m * z)) - (((t * a) / c_m) * 4.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[N[(N[(N[(t$95$1 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(t$95$1 - N[(N[(4.0 * z), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision] * 4.0), $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 := \left(x \cdot 9\right) \cdot y\\
c\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c\_m} \leq \infty:\\
\;\;\;\;\frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c\_m}\\

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


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

    1. Initial program 85.5%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{b}{c \cdot z} - \frac{a \cdot t}{c} \cdot 4 \]
      6. lift-/.f64N/A

        \[\leadsto \frac{b}{c \cdot z} - \frac{a \cdot t}{c} \cdot 4 \]
      7. *-commutativeN/A

        \[\leadsto \frac{b}{c \cdot z} - \frac{t \cdot a}{c} \cdot 4 \]
      8. lower-*.f6454.5

        \[\leadsto \frac{b}{c \cdot z} - \frac{t \cdot a}{c} \cdot 4 \]
    8. Applied rewrites54.5%

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

Alternative 7: 75.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 -2 \cdot 10^{+270}:\\ \;\;\;\;\frac{\left(\frac{y}{c\_m} \cdot 9\right) \cdot x}{z}\\ \mathbf{elif}\;t\_1 \leq -4 \cdot 10^{+58}:\\ \;\;\;\;\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{z \cdot c\_m}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+241}:\\ \;\;\;\;\frac{b}{c\_m \cdot z} - \frac{t \cdot a}{c\_m} \cdot 4\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{z} \cdot -9}{-c\_m} \cdot x\\ \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 -2e+270)
      (/ (* (* (/ y c_m) 9.0) x) z)
      (if (<= t_1 -4e+58)
        (/ (fma (* 9.0 x) y b) (* z c_m))
        (if (<= t_1 5e+241)
          (- (/ b (* c_m z)) (* (/ (* t a) c_m) 4.0))
          (* (/ (* (/ y z) -9.0) (- c_m)) x)))))))
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 <= -2e+270) {
		tmp = (((y / c_m) * 9.0) * x) / z;
	} else if (t_1 <= -4e+58) {
		tmp = fma((9.0 * x), y, b) / (z * c_m);
	} else if (t_1 <= 5e+241) {
		tmp = (b / (c_m * z)) - (((t * a) / c_m) * 4.0);
	} else {
		tmp = (((y / z) * -9.0) / -c_m) * x;
	}
	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 <= -2e+270)
		tmp = Float64(Float64(Float64(Float64(y / c_m) * 9.0) * x) / z);
	elseif (t_1 <= -4e+58)
		tmp = Float64(fma(Float64(9.0 * x), y, b) / Float64(z * c_m));
	elseif (t_1 <= 5e+241)
		tmp = Float64(Float64(b / Float64(c_m * z)) - Float64(Float64(Float64(t * a) / c_m) * 4.0));
	else
		tmp = Float64(Float64(Float64(Float64(y / z) * -9.0) / Float64(-c_m)) * x);
	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, -2e+270], N[(N[(N[(N[(y / c$95$m), $MachinePrecision] * 9.0), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, -4e+58], N[(N[(N[(9.0 * x), $MachinePrecision] * y + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+241], N[(N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y / z), $MachinePrecision] * -9.0), $MachinePrecision] / (-c$95$m)), $MachinePrecision] * x), $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 -2 \cdot 10^{+270}:\\
\;\;\;\;\frac{\left(\frac{y}{c\_m} \cdot 9\right) \cdot x}{z}\\

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+241}:\\
\;\;\;\;\frac{b}{c\_m \cdot z} - \frac{t \cdot a}{c\_m} \cdot 4\\

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


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

    1. Initial program 61.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000001e270 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -3.99999999999999978e58

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.99999999999999978e58 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5.00000000000000025e241

    1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{b}{c \cdot z} - \frac{a \cdot t}{c} \cdot 4 \]
      6. lift-/.f64N/A

        \[\leadsto \frac{b}{c \cdot z} - \frac{a \cdot t}{c} \cdot 4 \]
      7. *-commutativeN/A

        \[\leadsto \frac{b}{c \cdot z} - \frac{t \cdot a}{c} \cdot 4 \]
      8. lower-*.f6479.4

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

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

    if 5.00000000000000025e241 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 75.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. Add Preprocessing
    3. Taylor expanded in x around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(-\frac{\frac{y}{z} \cdot -9}{c}\right) \cdot x \]
  3. Recombined 4 regimes into one program.
  4. Final simplification80.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(x \cdot 9\right) \cdot y \leq -2 \cdot 10^{+270}:\\ \;\;\;\;\frac{\left(\frac{y}{c} \cdot 9\right) \cdot x}{z}\\ \mathbf{elif}\;\left(x \cdot 9\right) \cdot y \leq -4 \cdot 10^{+58}:\\ \;\;\;\;\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{z \cdot c}\\ \mathbf{elif}\;\left(x \cdot 9\right) \cdot y \leq 5 \cdot 10^{+241}:\\ \;\;\;\;\frac{b}{c \cdot z} - \frac{t \cdot a}{c} \cdot 4\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{z} \cdot -9}{-c} \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 75.4% 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 := \left(x \cdot 9\right) \cdot y\\ c\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+58}:\\ \;\;\;\;\frac{x}{c\_m} \cdot \frac{\mathsf{fma}\left(y, 9, \frac{b}{x}\right)}{z}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+241}:\\ \;\;\;\;\frac{b}{c\_m \cdot z} - \frac{t \cdot a}{c\_m} \cdot 4\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{z} \cdot -9}{-c\_m} \cdot x\\ \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+58)
      (* (/ x c_m) (/ (fma y 9.0 (/ b x)) z))
      (if (<= t_1 5e+241)
        (- (/ b (* c_m z)) (* (/ (* t a) c_m) 4.0))
        (* (/ (* (/ y z) -9.0) (- c_m)) x))))))
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+58) {
		tmp = (x / c_m) * (fma(y, 9.0, (b / x)) / z);
	} else if (t_1 <= 5e+241) {
		tmp = (b / (c_m * z)) - (((t * a) / c_m) * 4.0);
	} else {
		tmp = (((y / z) * -9.0) / -c_m) * x;
	}
	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+58)
		tmp = Float64(Float64(x / c_m) * Float64(fma(y, 9.0, Float64(b / x)) / z));
	elseif (t_1 <= 5e+241)
		tmp = Float64(Float64(b / Float64(c_m * z)) - Float64(Float64(Float64(t * a) / c_m) * 4.0));
	else
		tmp = Float64(Float64(Float64(Float64(y / z) * -9.0) / Float64(-c_m)) * x);
	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, -4e+58], N[(N[(x / c$95$m), $MachinePrecision] * N[(N[(y * 9.0 + N[(b / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+241], N[(N[(b / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * a), $MachinePrecision] / c$95$m), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y / z), $MachinePrecision] * -9.0), $MachinePrecision] / (-c$95$m)), $MachinePrecision] * x), $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^{+58}:\\
\;\;\;\;\frac{x}{c\_m} \cdot \frac{\mathsf{fma}\left(y, 9, \frac{b}{x}\right)}{z}\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+241}:\\
\;\;\;\;\frac{b}{c\_m \cdot z} - \frac{t \cdot a}{c\_m} \cdot 4\\

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


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

    1. Initial program 78.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{c} \cdot \frac{9 \cdot y + \frac{b}{x}}{z} \]
      2. div-addN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.99999999999999978e58 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5.00000000000000025e241

    1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{b}{c \cdot z} - \frac{a \cdot t}{c} \cdot 4 \]
      6. lift-/.f64N/A

        \[\leadsto \frac{b}{c \cdot z} - \frac{a \cdot t}{c} \cdot 4 \]
      7. *-commutativeN/A

        \[\leadsto \frac{b}{c \cdot z} - \frac{t \cdot a}{c} \cdot 4 \]
      8. lower-*.f6479.4

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

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

    if 5.00000000000000025e241 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 75.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. Add Preprocessing
    3. Taylor expanded in x around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(-\frac{\frac{y}{z} \cdot -9}{c}\right) \cdot x \]
  3. Recombined 3 regimes into one program.
  4. Final simplification78.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(x \cdot 9\right) \cdot y \leq -4 \cdot 10^{+58}:\\ \;\;\;\;\frac{x}{c} \cdot \frac{\mathsf{fma}\left(y, 9, \frac{b}{x}\right)}{z}\\ \mathbf{elif}\;\left(x \cdot 9\right) \cdot y \leq 5 \cdot 10^{+241}:\\ \;\;\;\;\frac{b}{c \cdot z} - \frac{t \cdot a}{c} \cdot 4\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{z} \cdot -9}{-c} \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 50.5% 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])\\ \\ c\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+55}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{-136}:\\ \;\;\;\;\left(x \cdot \frac{y}{c\_m \cdot z}\right) \cdot 9\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+36}:\\ \;\;\;\;\frac{b}{z \cdot c\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(t \cdot a\right) \cdot -4}{c\_m}\\ \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 (<= z -3.1e+55)
    (* -4.0 (/ (* a t) c_m))
    (if (<= z -1.55e-136)
      (* (* x (/ y (* c_m z))) 9.0)
      (if (<= z 3.8e+36) (/ b (* z c_m)) (/ (* (* t a) -4.0) c_m))))))
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 (z <= -3.1e+55) {
		tmp = -4.0 * ((a * t) / c_m);
	} else if (z <= -1.55e-136) {
		tmp = (x * (y / (c_m * z))) * 9.0;
	} else if (z <= 3.8e+36) {
		tmp = b / (z * c_m);
	} else {
		tmp = ((t * a) * -4.0) / c_m;
	}
	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 (z <= (-3.1d+55)) then
        tmp = (-4.0d0) * ((a * t) / c_m)
    else if (z <= (-1.55d-136)) then
        tmp = (x * (y / (c_m * z))) * 9.0d0
    else if (z <= 3.8d+36) then
        tmp = b / (z * c_m)
    else
        tmp = ((t * a) * (-4.0d0)) / c_m
    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 (z <= -3.1e+55) {
		tmp = -4.0 * ((a * t) / c_m);
	} else if (z <= -1.55e-136) {
		tmp = (x * (y / (c_m * z))) * 9.0;
	} else if (z <= 3.8e+36) {
		tmp = b / (z * c_m);
	} else {
		tmp = ((t * a) * -4.0) / c_m;
	}
	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 z <= -3.1e+55:
		tmp = -4.0 * ((a * t) / c_m)
	elif z <= -1.55e-136:
		tmp = (x * (y / (c_m * z))) * 9.0
	elif z <= 3.8e+36:
		tmp = b / (z * c_m)
	else:
		tmp = ((t * a) * -4.0) / c_m
	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 (z <= -3.1e+55)
		tmp = Float64(-4.0 * Float64(Float64(a * t) / c_m));
	elseif (z <= -1.55e-136)
		tmp = Float64(Float64(x * Float64(y / Float64(c_m * z))) * 9.0);
	elseif (z <= 3.8e+36)
		tmp = Float64(b / Float64(z * c_m));
	else
		tmp = Float64(Float64(Float64(t * a) * -4.0) / c_m);
	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 (z <= -3.1e+55)
		tmp = -4.0 * ((a * t) / c_m);
	elseif (z <= -1.55e-136)
		tmp = (x * (y / (c_m * z))) * 9.0;
	elseif (z <= 3.8e+36)
		tmp = b / (z * c_m);
	else
		tmp = ((t * a) * -4.0) / c_m;
	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[z, -3.1e+55], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.55e-136], N[(N[(x * N[(y / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision], If[LessEqual[z, 3.8e+36], N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] / c$95$m), $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}\;z \leq -3.1 \cdot 10^{+55}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\

\mathbf{elif}\;z \leq -1.55 \cdot 10^{-136}:\\
\;\;\;\;\left(x \cdot \frac{y}{c\_m \cdot z}\right) \cdot 9\\

\mathbf{elif}\;z \leq 3.8 \cdot 10^{+36}:\\
\;\;\;\;\frac{b}{z \cdot c\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(t \cdot a\right) \cdot -4}{c\_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.09999999999999994e55

    1. Initial program 57.2%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    4. 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-*.f6456.0

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

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

    if -3.09999999999999994e55 < z < -1.55e-136

    1. Initial program 87.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. Add Preprocessing
    3. Taylor expanded in x around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.55e-136 < z < 3.80000000000000025e36

    1. Initial program 96.3%

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

      \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
    4. Step-by-step derivation
      1. Applied rewrites58.5%

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

      if 3.80000000000000025e36 < z

      1. Initial program 62.9%

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

        \[\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}} \]
      5. Taylor expanded in z around inf

        \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot t\right)}}{c} \]
      6. 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. *-commutativeN/A

          \[\leadsto \frac{\left(t \cdot a\right) \cdot -4}{c} \]
        4. lower-*.f6466.8

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

        \[\leadsto \frac{\color{blue}{\left(t \cdot a\right) \cdot -4}}{c} \]
    5. Recombined 4 regimes into one program.
    6. Final simplification60.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+55}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{-136}:\\ \;\;\;\;\left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+36}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(t \cdot a\right) \cdot -4}{c}\\ \end{array} \]
    7. Add Preprocessing

    Alternative 10: 50.5% 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])\\ \\ c\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+55}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{-136}:\\ \;\;\;\;\left(\frac{y}{c\_m \cdot z} \cdot 9\right) \cdot x\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+36}:\\ \;\;\;\;\frac{b}{z \cdot c\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(t \cdot a\right) \cdot -4}{c\_m}\\ \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 (<= z -3.1e+55)
        (* -4.0 (/ (* a t) c_m))
        (if (<= z -1.55e-136)
          (* (* (/ y (* c_m z)) 9.0) x)
          (if (<= z 3.8e+36) (/ b (* z c_m)) (/ (* (* t a) -4.0) c_m))))))
    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 (z <= -3.1e+55) {
    		tmp = -4.0 * ((a * t) / c_m);
    	} else if (z <= -1.55e-136) {
    		tmp = ((y / (c_m * z)) * 9.0) * x;
    	} else if (z <= 3.8e+36) {
    		tmp = b / (z * c_m);
    	} else {
    		tmp = ((t * a) * -4.0) / c_m;
    	}
    	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 (z <= (-3.1d+55)) then
            tmp = (-4.0d0) * ((a * t) / c_m)
        else if (z <= (-1.55d-136)) then
            tmp = ((y / (c_m * z)) * 9.0d0) * x
        else if (z <= 3.8d+36) then
            tmp = b / (z * c_m)
        else
            tmp = ((t * a) * (-4.0d0)) / c_m
        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 (z <= -3.1e+55) {
    		tmp = -4.0 * ((a * t) / c_m);
    	} else if (z <= -1.55e-136) {
    		tmp = ((y / (c_m * z)) * 9.0) * x;
    	} else if (z <= 3.8e+36) {
    		tmp = b / (z * c_m);
    	} else {
    		tmp = ((t * a) * -4.0) / c_m;
    	}
    	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 z <= -3.1e+55:
    		tmp = -4.0 * ((a * t) / c_m)
    	elif z <= -1.55e-136:
    		tmp = ((y / (c_m * z)) * 9.0) * x
    	elif z <= 3.8e+36:
    		tmp = b / (z * c_m)
    	else:
    		tmp = ((t * a) * -4.0) / c_m
    	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 (z <= -3.1e+55)
    		tmp = Float64(-4.0 * Float64(Float64(a * t) / c_m));
    	elseif (z <= -1.55e-136)
    		tmp = Float64(Float64(Float64(y / Float64(c_m * z)) * 9.0) * x);
    	elseif (z <= 3.8e+36)
    		tmp = Float64(b / Float64(z * c_m));
    	else
    		tmp = Float64(Float64(Float64(t * a) * -4.0) / c_m);
    	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 (z <= -3.1e+55)
    		tmp = -4.0 * ((a * t) / c_m);
    	elseif (z <= -1.55e-136)
    		tmp = ((y / (c_m * z)) * 9.0) * x;
    	elseif (z <= 3.8e+36)
    		tmp = b / (z * c_m);
    	else
    		tmp = ((t * a) * -4.0) / c_m;
    	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[z, -3.1e+55], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.55e-136], N[(N[(N[(y / N[(c$95$m * z), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 3.8e+36], N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] / c$95$m), $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}\;z \leq -3.1 \cdot 10^{+55}:\\
    \;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\
    
    \mathbf{elif}\;z \leq -1.55 \cdot 10^{-136}:\\
    \;\;\;\;\left(\frac{y}{c\_m \cdot z} \cdot 9\right) \cdot x\\
    
    \mathbf{elif}\;z \leq 3.8 \cdot 10^{+36}:\\
    \;\;\;\;\frac{b}{z \cdot c\_m}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\left(t \cdot a\right) \cdot -4}{c\_m}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if z < -3.09999999999999994e55

      1. Initial program 57.2%

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

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      4. 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-*.f6456.0

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

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

      if -3.09999999999999994e55 < z < -1.55e-136

      1. Initial program 87.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. Add Preprocessing
      3. Taylor expanded in x around inf

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

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

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

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

        \[\leadsto \left(9 \cdot \frac{y}{c \cdot z}\right) \cdot x \]
      7. 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-*.f6462.3

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

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

      if -1.55e-136 < z < 3.80000000000000025e36

      1. Initial program 96.3%

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

        \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
      4. Step-by-step derivation
        1. Applied rewrites58.5%

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

        if 3.80000000000000025e36 < z

        1. Initial program 62.9%

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

          \[\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}} \]
        5. Taylor expanded in z around inf

          \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot t\right)}}{c} \]
        6. 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. *-commutativeN/A

            \[\leadsto \frac{\left(t \cdot a\right) \cdot -4}{c} \]
          4. lower-*.f6466.8

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

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

      Alternative 11: 68.7% 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])\\ \\ c\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -2.15 \cdot 10^{+149}:\\ \;\;\;\;\left(\frac{a}{c\_m} \cdot -4\right) \cdot t\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+36}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z \cdot c\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(t \cdot a\right) \cdot -4}{c\_m}\\ \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 (<= z -2.15e+149)
          (* (* (/ a c_m) -4.0) t)
          (if (<= z 5.2e+36)
            (/ (fma (* y x) 9.0 b) (* z c_m))
            (/ (* (* t a) -4.0) c_m)))))
      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 (z <= -2.15e+149) {
      		tmp = ((a / c_m) * -4.0) * t;
      	} else if (z <= 5.2e+36) {
      		tmp = fma((y * x), 9.0, b) / (z * c_m);
      	} else {
      		tmp = ((t * a) * -4.0) / c_m;
      	}
      	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 (z <= -2.15e+149)
      		tmp = Float64(Float64(Float64(a / c_m) * -4.0) * t);
      	elseif (z <= 5.2e+36)
      		tmp = Float64(fma(Float64(y * x), 9.0, b) / Float64(z * c_m));
      	else
      		tmp = Float64(Float64(Float64(t * a) * -4.0) / c_m);
      	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[z, -2.15e+149], N[(N[(N[(a / c$95$m), $MachinePrecision] * -4.0), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 5.2e+36], N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] / c$95$m), $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}\;z \leq -2.15 \cdot 10^{+149}:\\
      \;\;\;\;\left(\frac{a}{c\_m} \cdot -4\right) \cdot t\\
      
      \mathbf{elif}\;z \leq 5.2 \cdot 10^{+36}:\\
      \;\;\;\;\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z \cdot c\_m}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\left(t \cdot a\right) \cdot -4}{c\_m}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if z < -2.15000000000000008e149

        1. Initial program 57.9%

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

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

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

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

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

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

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

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

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

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

        if -2.15000000000000008e149 < z < 5.2000000000000003e36

        1. Initial program 89.2%

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

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

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

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

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

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

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

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

        if 5.2000000000000003e36 < z

        1. Initial program 62.9%

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

          \[\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}} \]
        5. Taylor expanded in z around inf

          \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot t\right)}}{c} \]
        6. 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. *-commutativeN/A

            \[\leadsto \frac{\left(t \cdot a\right) \cdot -4}{c} \]
          4. lower-*.f6466.8

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

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

      Alternative 12: 68.6% 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])\\ \\ c\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -2.15 \cdot 10^{+149}:\\ \;\;\;\;\left(\frac{a}{c\_m} \cdot -4\right) \cdot t\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+36}:\\ \;\;\;\;\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{z \cdot c\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(t \cdot a\right) \cdot -4}{c\_m}\\ \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 (<= z -2.15e+149)
          (* (* (/ a c_m) -4.0) t)
          (if (<= z 5.2e+36)
            (/ (fma (* 9.0 x) y b) (* z c_m))
            (/ (* (* t a) -4.0) c_m)))))
      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 (z <= -2.15e+149) {
      		tmp = ((a / c_m) * -4.0) * t;
      	} else if (z <= 5.2e+36) {
      		tmp = fma((9.0 * x), y, b) / (z * c_m);
      	} else {
      		tmp = ((t * a) * -4.0) / c_m;
      	}
      	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 (z <= -2.15e+149)
      		tmp = Float64(Float64(Float64(a / c_m) * -4.0) * t);
      	elseif (z <= 5.2e+36)
      		tmp = Float64(fma(Float64(9.0 * x), y, b) / Float64(z * c_m));
      	else
      		tmp = Float64(Float64(Float64(t * a) * -4.0) / c_m);
      	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[z, -2.15e+149], N[(N[(N[(a / c$95$m), $MachinePrecision] * -4.0), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 5.2e+36], N[(N[(N[(9.0 * x), $MachinePrecision] * y + b), $MachinePrecision] / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] / c$95$m), $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}\;z \leq -2.15 \cdot 10^{+149}:\\
      \;\;\;\;\left(\frac{a}{c\_m} \cdot -4\right) \cdot t\\
      
      \mathbf{elif}\;z \leq 5.2 \cdot 10^{+36}:\\
      \;\;\;\;\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{z \cdot c\_m}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\left(t \cdot a\right) \cdot -4}{c\_m}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if z < -2.15000000000000008e149

        1. Initial program 57.9%

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

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

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

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

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

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

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

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

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

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

        if -2.15000000000000008e149 < z < 5.2000000000000003e36

        1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 5.2000000000000003e36 < z

        1. Initial program 62.9%

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

          \[\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}} \]
        5. Taylor expanded in z around inf

          \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot t\right)}}{c} \]
        6. 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. *-commutativeN/A

            \[\leadsto \frac{\left(t \cdot a\right) \cdot -4}{c} \]
          4. lower-*.f6466.8

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

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

      Alternative 13: 50.6% accurate, 1.4× 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}\;z \leq -1.1 \cdot 10^{-7} \lor \neg \left(z \leq 3.8 \cdot 10^{+36}\right):\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c\_m}\\ \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 (or (<= z -1.1e-7) (not (<= z 3.8e+36)))
          (* -4.0 (/ (* a t) c_m))
          (/ b (* z c_m)))))
      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 ((z <= -1.1e-7) || !(z <= 3.8e+36)) {
      		tmp = -4.0 * ((a * t) / c_m);
      	} else {
      		tmp = b / (z * c_m);
      	}
      	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 ((z <= (-1.1d-7)) .or. (.not. (z <= 3.8d+36))) then
              tmp = (-4.0d0) * ((a * t) / c_m)
          else
              tmp = b / (z * c_m)
          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 ((z <= -1.1e-7) || !(z <= 3.8e+36)) {
      		tmp = -4.0 * ((a * t) / c_m);
      	} else {
      		tmp = b / (z * c_m);
      	}
      	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 (z <= -1.1e-7) or not (z <= 3.8e+36):
      		tmp = -4.0 * ((a * t) / c_m)
      	else:
      		tmp = b / (z * c_m)
      	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 ((z <= -1.1e-7) || !(z <= 3.8e+36))
      		tmp = Float64(-4.0 * Float64(Float64(a * t) / c_m));
      	else
      		tmp = Float64(b / Float64(z * c_m));
      	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 ((z <= -1.1e-7) || ~((z <= 3.8e+36)))
      		tmp = -4.0 * ((a * t) / c_m);
      	else
      		tmp = b / (z * c_m);
      	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[Or[LessEqual[z, -1.1e-7], N[Not[LessEqual[z, 3.8e+36]], $MachinePrecision]], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c$95$m), $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}\;z \leq -1.1 \cdot 10^{-7} \lor \neg \left(z \leq 3.8 \cdot 10^{+36}\right):\\
      \;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{b}{z \cdot c\_m}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -1.1000000000000001e-7 or 3.80000000000000025e36 < z

        1. Initial program 61.0%

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

          \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
        4. 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-*.f6457.8

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

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

        if -1.1000000000000001e-7 < z < 3.80000000000000025e36

        1. Initial program 95.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. Add Preprocessing
        3. Taylor expanded in b around inf

          \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
        4. Step-by-step derivation
          1. Applied rewrites54.9%

            \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
        5. Recombined 2 regimes into one program.
        6. Final simplification56.3%

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{-7} \lor \neg \left(z \leq 3.8 \cdot 10^{+36}\right):\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \]
        7. Add Preprocessing

        Alternative 14: 50.6% accurate, 1.4× 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}\;z \leq -1.1 \cdot 10^{-7}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+36}:\\ \;\;\;\;\frac{b}{z \cdot c\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(t \cdot a\right) \cdot -4}{c\_m}\\ \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 (<= z -1.1e-7)
            (* -4.0 (/ (* a t) c_m))
            (if (<= z 3.8e+36) (/ b (* z c_m)) (/ (* (* t a) -4.0) c_m)))))
        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 (z <= -1.1e-7) {
        		tmp = -4.0 * ((a * t) / c_m);
        	} else if (z <= 3.8e+36) {
        		tmp = b / (z * c_m);
        	} else {
        		tmp = ((t * a) * -4.0) / c_m;
        	}
        	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 (z <= (-1.1d-7)) then
                tmp = (-4.0d0) * ((a * t) / c_m)
            else if (z <= 3.8d+36) then
                tmp = b / (z * c_m)
            else
                tmp = ((t * a) * (-4.0d0)) / c_m
            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 (z <= -1.1e-7) {
        		tmp = -4.0 * ((a * t) / c_m);
        	} else if (z <= 3.8e+36) {
        		tmp = b / (z * c_m);
        	} else {
        		tmp = ((t * a) * -4.0) / c_m;
        	}
        	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 z <= -1.1e-7:
        		tmp = -4.0 * ((a * t) / c_m)
        	elif z <= 3.8e+36:
        		tmp = b / (z * c_m)
        	else:
        		tmp = ((t * a) * -4.0) / c_m
        	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 (z <= -1.1e-7)
        		tmp = Float64(-4.0 * Float64(Float64(a * t) / c_m));
        	elseif (z <= 3.8e+36)
        		tmp = Float64(b / Float64(z * c_m));
        	else
        		tmp = Float64(Float64(Float64(t * a) * -4.0) / c_m);
        	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 (z <= -1.1e-7)
        		tmp = -4.0 * ((a * t) / c_m);
        	elseif (z <= 3.8e+36)
        		tmp = b / (z * c_m);
        	else
        		tmp = ((t * a) * -4.0) / c_m;
        	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[z, -1.1e-7], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e+36], N[(b / N[(z * c$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] / c$95$m), $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}\;z \leq -1.1 \cdot 10^{-7}:\\
        \;\;\;\;-4 \cdot \frac{a \cdot t}{c\_m}\\
        
        \mathbf{elif}\;z \leq 3.8 \cdot 10^{+36}:\\
        \;\;\;\;\frac{b}{z \cdot c\_m}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\left(t \cdot a\right) \cdot -4}{c\_m}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if z < -1.1000000000000001e-7

          1. Initial program 59.8%

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

            \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
          4. 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-*.f6451.8

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

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

          if -1.1000000000000001e-7 < z < 3.80000000000000025e36

          1. Initial program 95.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. Add Preprocessing
          3. Taylor expanded in b around inf

            \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
          4. Step-by-step derivation
            1. Applied rewrites54.9%

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

            if 3.80000000000000025e36 < z

            1. Initial program 62.9%

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

              \[\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}} \]
            5. Taylor expanded in z around inf

              \[\leadsto \frac{\color{blue}{-4 \cdot \left(a \cdot t\right)}}{c} \]
            6. 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. *-commutativeN/A

                \[\leadsto \frac{\left(t \cdot a\right) \cdot -4}{c} \]
              4. lower-*.f6466.8

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

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

          Alternative 15: 35.0% accurate, 2.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}{z \cdot c\_m} \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 (* z c_m))))
          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 / (z * c_m));
          }
          
          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 / (z * c_m))
          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 / (z * c_m));
          }
          
          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 / (z * c_m))
          
          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(z * c_m)))
          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 / (z * c_m));
          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[(z * c$95$m), $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}{z \cdot c\_m}
          \end{array}
          
          Derivation
          1. Initial program 79.9%

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

            \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
          4. Step-by-step derivation
            1. Applied rewrites38.6%

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

            Reproduce

            ?
            herbie shell --seed 2025085 
            (FPCore (x y z t a b c)
              :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, J"
              :precision binary64
            
              :alt
              (! :herbie-platform default (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) -220031348160821/200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 0) (/ (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 365902434742109/31250000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 28768236795461370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ (* (* 9 (/ y c)) (/ x z)) (/ b (* c z))) (* 4 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 138385150424563190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (- (+ (* 9 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4 (/ (* a t) c)))))))))
            
              (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))