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

Percentage Accurate: 79.3% → 85.7%
Time: 5.5s
Alternatives: 11
Speedup: 0.7×

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 11 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.3% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 85.7% accurate, 0.5× speedup?

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

\mathbf{elif}\;z \leq 9.2 \cdot 10^{+91}:\\
\;\;\;\;\frac{\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}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-9}{z}, \frac{y}{c}, \frac{t\_2 - t\_1 \cdot 4}{-x}\right) \cdot \left(-x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.4e95

    1. Initial program 54.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. 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 rewrites67.6%

      \[\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 x around -inf

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

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

    if -2.4e95 < z < 9.19999999999999965e91

    1. Initial program 94.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

    if 9.19999999999999965e91 < z

    1. Initial program 50.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}{-1 \cdot \left(x \cdot \left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

Alternative 2: 85.1% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ \mathbf{if}\;\frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq \infty:\\ \;\;\;\;\frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* (* x 9.0) y)))
   (if (<= (/ (+ (- t_1 (* (* (* z 4.0) t) a)) b) (* z c)) INFINITY)
     (/ (+ (- t_1 (* (* 4.0 z) (* a t))) b) (* z c))
     (* -4.0 (* a (/ t c))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (x * 9.0) * y;
	double tmp;
	if ((((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c)) <= ((double) INFINITY)) {
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c);
	} else {
		tmp = -4.0 * (a * (t / c));
	}
	return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (x * 9.0) * y;
	double tmp;
	if ((((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c)) <= Double.POSITIVE_INFINITY) {
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c);
	} else {
		tmp = -4.0 * (a * (t / c));
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
def code(x, y, z, t, a, b, c):
	t_1 = (x * 9.0) * y
	tmp = 0
	if (((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c)) <= math.inf:
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c)
	else:
		tmp = -4.0 * (a * (t / c))
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(x * 9.0) * y)
	tmp = 0.0
	if (Float64(Float64(Float64(t_1 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) <= Inf)
		tmp = Float64(Float64(Float64(t_1 - Float64(Float64(4.0 * z) * Float64(a * t))) + b) / Float64(z * c));
	else
		tmp = Float64(-4.0 * Float64(a * Float64(t / c)));
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = (x * 9.0) * y;
	tmp = 0.0;
	if ((((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c)) <= Inf)
		tmp = ((t_1 - ((4.0 * z) * (a * t))) + b) / (z * c);
	else
		tmp = -4.0 * (a * (t / c));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, 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), $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), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;\frac{\left(t\_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \leq \infty:\\
\;\;\;\;\frac{\left(t\_1 - \left(4 \cdot z\right) \cdot \left(a \cdot t\right)\right) + b}{z \cdot c}\\

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


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

    1. Initial program 86.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. 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.9

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

      \[\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 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-*.f6452.0

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
      3. associate-/l*N/A

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

        \[\leadsto -4 \cdot \left(a \cdot \color{blue}{\frac{t}{c}}\right) \]
      5. lower-/.f6467.0

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

      \[\leadsto -4 \cdot \left(a \cdot \color{blue}{\frac{t}{c}}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification85.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 \infty:\\ \;\;\;\;\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{else}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 85.6% accurate, 0.5× speedup?

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

\mathbf{elif}\;z \leq 7.5 \cdot 10^{+92}:\\
\;\;\;\;\frac{\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}:\\
\;\;\;\;\left(\mathsf{fma}\left(t\_2, 9, \frac{b}{\left(z \cdot x\right) \cdot c}\right) - \frac{t\_1}{x} \cdot 4\right) \cdot x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.4e95

    1. Initial program 54.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. 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 rewrites67.6%

      \[\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 x around -inf

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

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

    if -2.4e95 < z < 7.49999999999999946e92

    1. Initial program 94.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

    if 7.49999999999999946e92 < z

    1. Initial program 49.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 rewrites78.9%

      \[\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} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification88.9%

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

Alternative 4: 86.0% accurate, 0.6× speedup?

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

\mathbf{elif}\;z \leq 1.15 \cdot 10^{+92}:\\
\;\;\;\;\frac{\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}:\\
\;\;\;\;\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\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.4e95

    1. Initial program 54.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. 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 rewrites67.6%

      \[\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 x around -inf

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

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

    if -2.4e95 < z < 1.14999999999999999e92

    1. Initial program 94.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

    if 1.14999999999999999e92 < z

    1. Initial program 50.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 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 rewrites80.4%

      \[\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} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification89.1%

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

Alternative 5: 71.4% accurate, 0.7× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2 or 1.0000000000000001e44 < (*.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 z around 0

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

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

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

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

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

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

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

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

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

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

    if -2 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.0000000000000001e44

    1. Initial program 83.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 0

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{b - \left(\left(t \cdot z\right) \cdot a\right) \cdot 4}{c}}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification78.0%

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

Alternative 6: 84.2% accurate, 0.7× speedup?

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

\mathbf{elif}\;z \leq 1.15 \cdot 10^{+92}:\\
\;\;\;\;\frac{\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}:\\
\;\;\;\;\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\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.39999999999999992e152

    1. Initial program 50.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 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-*.f6466.4

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
      3. associate-/l*N/A

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

        \[\leadsto -4 \cdot \left(a \cdot \color{blue}{\frac{t}{c}}\right) \]
      5. lower-/.f6468.8

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

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

    if -7.39999999999999992e152 < z < 1.14999999999999999e92

    1. Initial program 93.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

    if 1.14999999999999999e92 < z

    1. Initial program 50.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 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 rewrites80.4%

      \[\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} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification87.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.4 \cdot 10^{+152}:\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+92}:\\ \;\;\;\;\frac{\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}:\\ \;\;\;\;\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\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 65.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 1.05 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.65 \cdot 10^{+170}:\\
\;\;\;\;\frac{9 \cdot x}{z} \cdot \frac{y}{c}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.2999999999999998e149 or 0.0074999999999999997 < z < 1.05000000000000002e106

    1. Initial program 62.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 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-*.f6467.4

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
      3. associate-/l*N/A

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

        \[\leadsto -4 \cdot \left(a \cdot \color{blue}{\frac{t}{c}}\right) \]
      5. lower-/.f6469.0

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

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

    if -2.2999999999999998e149 < z < 0.0074999999999999997

    1. Initial program 95.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 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-*.f6480.6

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

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

    if 1.05000000000000002e106 < z < 1.65000000000000012e170

    1. Initial program 59.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. 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-*.f6464.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 rewrites64.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} \]
    5. Taylor expanded in x around inf

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

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

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

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

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

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

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

        \[\leadsto \frac{9 \cdot x}{z} \cdot \frac{y}{c} \]
      8. lower-/.f6463.6

        \[\leadsto \frac{9 \cdot x}{z} \cdot \frac{y}{\color{blue}{c}} \]
    7. Applied rewrites63.6%

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

    if 1.65000000000000012e170 < z

    1. Initial program 38.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 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-*.f6478.3

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

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

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

Alternative 8: 67.4% accurate, 1.0× speedup?

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

\mathbf{elif}\;z \leq 1.65 \cdot 10^{+170}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.2999999999999998e149

    1. Initial program 50.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 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-*.f6466.4

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
      3. associate-/l*N/A

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

        \[\leadsto -4 \cdot \left(a \cdot \color{blue}{\frac{t}{c}}\right) \]
      5. lower-/.f6468.8

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

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

    if -2.2999999999999998e149 < z < 1.65000000000000012e170

    1. Initial program 90.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 \color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c \cdot z}} \]
    4. Step-by-step derivation
      1. associate-/r*N/A

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

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

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

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

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

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

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

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

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

    if 1.65000000000000012e170 < z

    1. Initial program 38.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 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-*.f6478.3

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

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

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

Alternative 9: 67.1% accurate, 1.2× speedup?

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

\mathbf{elif}\;z \leq 1.65 \cdot 10^{+170}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z \cdot c}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.2999999999999998e149

    1. Initial program 50.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 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-*.f6466.4

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
      3. associate-/l*N/A

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

        \[\leadsto -4 \cdot \left(a \cdot \color{blue}{\frac{t}{c}}\right) \]
      5. lower-/.f6468.8

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

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

    if -2.2999999999999998e149 < z < 1.65000000000000012e170

    1. Initial program 90.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-*.f6474.2

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

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

    if 1.65000000000000012e170 < z

    1. Initial program 38.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 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-*.f6478.3

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification73.8%

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

Alternative 10: 48.1% accurate, 1.4× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+149} \lor \neg \left(z \leq 6 \cdot 10^{-7}\right):\\ \;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (if (or (<= z -1.2e+149) (not (<= z 6e-7)))
   (* -4.0 (* a (/ t c)))
   (/ b (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((z <= -1.2e+149) || !(z <= 6e-7)) {
		tmp = -4.0 * (a * (t / c));
	} else {
		tmp = b / (z * c);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if ((z <= (-1.2d+149)) .or. (.not. (z <= 6d-7))) then
        tmp = (-4.0d0) * (a * (t / c))
    else
        tmp = b / (z * c)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((z <= -1.2e+149) || !(z <= 6e-7)) {
		tmp = -4.0 * (a * (t / c));
	} else {
		tmp = b / (z * c);
	}
	return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
def code(x, y, z, t, a, b, c):
	tmp = 0
	if (z <= -1.2e+149) or not (z <= 6e-7):
		tmp = -4.0 * (a * (t / c))
	else:
		tmp = b / (z * c)
	return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if ((z <= -1.2e+149) || !(z <= 6e-7))
		tmp = Float64(-4.0 * Float64(a * Float64(t / c)));
	else
		tmp = Float64(b / Float64(z * c));
	end
	return tmp
end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
	tmp = 0.0;
	if ((z <= -1.2e+149) || ~((z <= 6e-7)))
		tmp = -4.0 * (a * (t / c));
	else
		tmp = b / (z * c);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.2e+149], N[Not[LessEqual[z, 6e-7]], $MachinePrecision]], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+149} \lor \neg \left(z \leq 6 \cdot 10^{-7}\right):\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.20000000000000006e149 or 5.9999999999999997e-7 < z

    1. Initial program 56.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
    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-*.f6460.6

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
      3. associate-/l*N/A

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

        \[\leadsto -4 \cdot \left(a \cdot \color{blue}{\frac{t}{c}}\right) \]
      5. lower-/.f6459.7

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

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

    if -1.20000000000000006e149 < z < 5.9999999999999997e-7

    1. Initial program 95.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 b around inf

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

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

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

    Alternative 11: 35.0% accurate, 2.8× speedup?

    \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \frac{b}{z \cdot c} \end{array} \]
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    (FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
    assert(x < y && y < z && z < t && t < a && a < b && b < c);
    assert(x < y && y < z && z < t && t < a && a < b && b < c);
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	return b / (z * c);
    }
    
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        code = b / (z * c)
    end function
    
    assert x < y && y < z && z < t && t < a && a < b && b < c;
    assert x < y && y < z && z < t && t < a && a < b && b < c;
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	return b / (z * c);
    }
    
    [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
    [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
    def code(x, y, z, t, a, b, c):
    	return b / (z * c)
    
    x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
    x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
    function code(x, y, z, t, a, b, c)
    	return Float64(b / Float64(z * c))
    end
    
    x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
    x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
    function tmp = code(x, y, z, t, a, b, c)
    	tmp = b / (z * c);
    end
    
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
    [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
    \\
    \frac{b}{z \cdot c}
    \end{array}
    
    Derivation
    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 b around inf

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

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

      Reproduce

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