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

Percentage Accurate: 79.6% → 94.1%
Time: 17.7s
Alternatives: 15
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

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

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

Alternative 1: 94.1% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.6e23 or 4.00000000000000003e-35 < z

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(-9 \cdot \frac{x \cdot y}{z} + \left(-1 \cdot \frac{b}{z} + 4 \cdot \left(a \cdot t\right)\right)\right), \color{blue}{\left(-1 \cdot c\right)}\right) \]
    8. Simplified95.6%

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

    if -1.6e23 < z < 4.00000000000000003e-35

    1. Initial program 94.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. Step-by-step derivation
      1. sub-negN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)\right) + \left(\left(x \cdot 9\right) \cdot y + b\right)\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      5. distribute-lft-neg-inN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{neg}\left(z \cdot 4\right)\right), a\right), t, \left(\left(x \cdot 9\right) \cdot y + b\right)\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      10. distribute-rgt-neg-inN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, -4\right), a\right), t, \mathsf{fma.f64}\left(x, \left(9 \cdot y\right), b\right)\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      15. *-lowering-*.f6494.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, -4\right), a\right), t, \mathsf{fma.f64}\left(x, \mathsf{*.f64}\left(9, y\right), b\right)\right), \mathsf{*.f64}\left(z, c\right)\right) \]
    4. Applied egg-rr94.9%

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

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

Alternative 2: 89.0% 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 -4.5 \cdot 10^{+116}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, \frac{y \cdot -9}{z}, 4 \cdot \left(t \cdot a\right)\right)}{0 - c}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-71}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a \cdot \left(z \cdot -4\right), t, \mathsf{fma}\left(x, y \cdot 9, b\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(9, \frac{x \cdot y}{z}, \mathsf{fma}\left(-4, t \cdot a, \frac{b}{z}\right)\right)}{c}\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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 -4.5e+116)
   (/ (fma x (/ (* y -9.0) z) (* 4.0 (* t a))) (- 0.0 c))
   (if (<= z 3.4e-71)
     (/ (fma (* a (* z -4.0)) t (fma x (* y 9.0) b)) (* z c))
     (/ (fma 9.0 (/ (* x y) z) (fma -4.0 (* t a) (/ 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 <= -4.5e+116) {
		tmp = fma(x, ((y * -9.0) / z), (4.0 * (t * a))) / (0.0 - c);
	} else if (z <= 3.4e-71) {
		tmp = fma((a * (z * -4.0)), t, fma(x, (y * 9.0), b)) / (z * c);
	} else {
		tmp = fma(9.0, ((x * y) / z), fma(-4.0, (t * a), (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 <= -4.5e+116)
		tmp = Float64(fma(x, Float64(Float64(y * -9.0) / z), Float64(4.0 * Float64(t * a))) / Float64(0.0 - c));
	elseif (z <= 3.4e-71)
		tmp = Float64(fma(Float64(a * Float64(z * -4.0)), t, fma(x, Float64(y * 9.0), b)) / Float64(z * c));
	else
		tmp = Float64(fma(9.0, Float64(Float64(x * y) / z), fma(-4.0, Float64(t * a), Float64(b / z))) / c);
	end
	return tmp
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
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, -4.5e+116], N[(N[(x * N[(N[(y * -9.0), $MachinePrecision] / z), $MachinePrecision] + N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0 - c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e-71], N[(N[(N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision] * t + N[(x * N[(y * 9.0), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+116}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, \frac{y \cdot -9}{z}, 4 \cdot \left(t \cdot a\right)\right)}{0 - c}\\

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

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


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

    1. Initial program 52.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 x around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(-9 \cdot \frac{x \cdot y}{z} + \left(-1 \cdot \frac{b}{z} + 4 \cdot \left(a \cdot t\right)\right)\right), \color{blue}{\left(-1 \cdot c\right)}\right) \]
    8. Simplified99.8%

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, -9\right), z\right), \mathsf{*.f64}\left(4, \left(a \cdot t\right)\right)\right), \mathsf{neg.f64}\left(c\right)\right) \]
      2. *-lowering-*.f6479.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, -9\right), z\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(a, t\right)\right)\right), \mathsf{neg.f64}\left(c\right)\right) \]
    11. Simplified79.6%

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

    if -4.50000000000000016e116 < z < 3.40000000000000003e-71

    1. Initial program 94.2%

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)\right) + \left(\left(x \cdot 9\right) \cdot y + b\right)\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      5. distribute-lft-neg-inN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{neg}\left(z \cdot 4\right)\right), a\right), t, \left(\left(x \cdot 9\right) \cdot y + b\right)\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      10. distribute-rgt-neg-inN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, -4\right), a\right), t, \mathsf{fma.f64}\left(x, \left(9 \cdot y\right), b\right)\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      15. *-lowering-*.f6494.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, -4\right), a\right), t, \mathsf{fma.f64}\left(x, \mathsf{*.f64}\left(9, y\right), b\right)\right), \mathsf{*.f64}\left(z, c\right)\right) \]
    4. Applied egg-rr94.4%

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

    if 3.40000000000000003e-71 < z

    1. Initial program 68.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 x around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(9, \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{fma.f64}\left(-4, \mathsf{*.f64}\left(a, t\right), \left(\frac{b}{z}\right)\right)\right), c\right) \]
      10. /-lowering-/.f6491.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(9, \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right), \mathsf{fma.f64}\left(-4, \mathsf{*.f64}\left(a, t\right), \mathsf{/.f64}\left(b, z\right)\right)\right), c\right) \]
    8. Simplified91.6%

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

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

Alternative 3: 74.9% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x #s(literal 9 binary64)) < -2e16 or 2.00000000000000007e-97 < (*.f64 x #s(literal 9 binary64))

    1. Initial program 74.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 x around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(-9 \cdot \frac{x \cdot y}{z} + \left(-1 \cdot \frac{b}{z} + 4 \cdot \left(a \cdot t\right)\right)\right), \color{blue}{\left(-1 \cdot c\right)}\right) \]
    8. Simplified83.6%

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, -9\right), z\right), \mathsf{*.f64}\left(4, \left(a \cdot t\right)\right)\right), \mathsf{neg.f64}\left(c\right)\right) \]
      2. *-lowering-*.f6475.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, -9\right), z\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(a, t\right)\right)\right), \mathsf{neg.f64}\left(c\right)\right) \]
    11. Simplified75.0%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(x \cdot \frac{y \cdot -9}{z} + 4 \cdot \left(a \cdot t\right)\right)\right)\right), \color{blue}{c}\right) \]
    13. Applied egg-rr75.0%

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

    if -2e16 < (*.f64 x #s(literal 9 binary64)) < 2.00000000000000007e-97

    1. Initial program 84.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 x around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(a, \mathsf{*.f64}\left(t, \mathsf{/.f64}\left(-4, c\right)\right), \mathsf{/.f64}\left(b, \left(c \cdot z\right)\right)\right) \]
      2. *-lowering-*.f6487.2%

        \[\leadsto \mathsf{fma.f64}\left(a, \mathsf{*.f64}\left(t, \mathsf{/.f64}\left(-4, c\right)\right), \mathsf{/.f64}\left(b, \mathsf{*.f64}\left(c, z\right)\right)\right) \]
    8. Simplified87.2%

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.1000000000000002e121 or 1.15000000000000001e111 < z

    1. Initial program 52.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 x around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(a, \mathsf{*.f64}\left(t, \mathsf{/.f64}\left(-4, c\right)\right), \left(x \cdot \left(9 \cdot \frac{y}{c \cdot z}\right) + \frac{b}{c \cdot z}\right)\right) \]
    5. Simplified85.0%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(-9 \cdot \frac{x \cdot y}{z} + \left(-1 \cdot \frac{b}{z} + 4 \cdot \left(a \cdot t\right)\right)\right), \color{blue}{\left(-1 \cdot c\right)}\right) \]
    8. Simplified97.7%

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, -9\right), z\right), \mathsf{*.f64}\left(4, \left(a \cdot t\right)\right)\right), \mathsf{neg.f64}\left(c\right)\right) \]
      2. *-lowering-*.f6481.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, -9\right), z\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(a, t\right)\right)\right), \mathsf{neg.f64}\left(c\right)\right) \]
    11. Simplified81.7%

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

    if -2.1000000000000002e121 < z < 1.15000000000000001e111

    1. Initial program 92.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. Step-by-step derivation
      1. sub-negN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)\right) + \left(\left(x \cdot 9\right) \cdot y + b\right)\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      5. distribute-lft-neg-inN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{neg}\left(z \cdot 4\right)\right), a\right), t, \left(\left(x \cdot 9\right) \cdot y + b\right)\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      10. distribute-rgt-neg-inN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, -4\right), a\right), t, \mathsf{fma.f64}\left(x, \left(9 \cdot y\right), b\right)\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      15. *-lowering-*.f6493.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, -4\right), a\right), t, \mathsf{fma.f64}\left(x, \mathsf{*.f64}\left(9, y\right), b\right)\right), \mathsf{*.f64}\left(z, c\right)\right) \]
    4. Applied egg-rr93.4%

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

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

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

\mathbf{elif}\;z \leq -3.5 \cdot 10^{-133}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.42 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.49999999999999989e204 or 1.4200000000000001e112 < z

    1. Initial program 50.8%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(-4 \cdot \left(a \cdot t\right)\right), \color{blue}{c}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), c\right) \]
      4. *-lowering-*.f6468.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, t\right)\right), c\right) \]
    5. Simplified68.9%

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

    if -3.49999999999999989e204 < z < -3.50000000000000003e-133 or 1.85e-50 < z < 1.4200000000000001e112

    1. Initial program 83.1%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(b - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)\right)}, \mathsf{*.f64}\left(z, c\right)\right) \]
    4. Step-by-step derivation
      1. cancel-sign-sub-invN/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(b + -4 \cdot \left(a \cdot \left(t \cdot z\right)\right)\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      3. +-commutativeN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot \left(\left(t \cdot z\right) \cdot -4\right) + b\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot \left(-4 \cdot \left(t \cdot z\right)\right) + b\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      7. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(a, \mathsf{*.f64}\left(\left(t \cdot z\right), -4\right), b\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      10. *-lowering-*.f6467.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, z\right), -4\right), b\right), \mathsf{*.f64}\left(z, c\right)\right) \]
    5. Simplified67.6%

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

        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot \left(t \cdot \left(z \cdot -4\right)\right) + b\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(a \cdot t\right) \cdot \left(z \cdot -4\right) + b\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      3. *-commutativeN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\left(a \cdot \left(z \cdot -4\right)\right) \cdot t + b\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      6. accelerator-lowering-fma.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(\mathsf{*.f64}\left(a, \left(z \cdot -4\right)\right), t, b\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      8. *-lowering-*.f6467.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(z, -4\right)\right), t, b\right), \mathsf{*.f64}\left(z, c\right)\right) \]
    7. Applied egg-rr67.0%

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

    if -3.50000000000000003e-133 < z < 1.85e-50

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(9 \cdot \left(x \cdot y\right) + b\right), \mathsf{*.f64}\left(\color{blue}{z}, c\right)\right) \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(9, \left(x \cdot y\right), b\right), \mathsf{*.f64}\left(\color{blue}{z}, c\right)\right) \]
      3. *-lowering-*.f6486.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(9, \mathsf{*.f64}\left(x, y\right), b\right), \mathsf{*.f64}\left(z, c\right)\right) \]
    5. Simplified86.1%

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

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

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

\mathbf{elif}\;z \leq -1.6 \cdot 10^{-132}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 3.35 \cdot 10^{+155}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.50000000000000021e206 or 3.35e155 < z

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(-4 \cdot \left(a \cdot t\right)\right), \color{blue}{c}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), c\right) \]
      4. *-lowering-*.f6470.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, t\right)\right), c\right) \]
    5. Simplified70.7%

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

    if -5.50000000000000021e206 < z < -1.6000000000000001e-132 or 1.2999999999999999e-52 < z < 3.35e155

    1. Initial program 82.3%

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(b - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)\right)}, \mathsf{*.f64}\left(z, c\right)\right) \]
    4. Step-by-step derivation
      1. cancel-sign-sub-invN/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(b + -4 \cdot \left(a \cdot \left(t \cdot z\right)\right)\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      3. +-commutativeN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot \left(\left(t \cdot z\right) \cdot -4\right) + b\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(a \cdot \left(-4 \cdot \left(t \cdot z\right)\right) + b\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      7. accelerator-lowering-fma.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(a, \mathsf{*.f64}\left(\left(t \cdot z\right), -4\right), b\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      10. *-lowering-*.f6467.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, z\right), -4\right), b\right), \mathsf{*.f64}\left(z, c\right)\right) \]
    5. Simplified67.4%

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

    if -1.6000000000000001e-132 < z < 1.2999999999999999e-52

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(9 \cdot \left(x \cdot y\right) + b\right), \mathsf{*.f64}\left(\color{blue}{z}, c\right)\right) \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(9, \left(x \cdot y\right), b\right), \mathsf{*.f64}\left(\color{blue}{z}, c\right)\right) \]
      3. *-lowering-*.f6486.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(9, \mathsf{*.f64}\left(x, y\right), b\right), \mathsf{*.f64}\left(z, c\right)\right) \]
    5. Simplified86.1%

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

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

Alternative 7: 86.8% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.01999999999999997e120 or 6.80000000000000013e109 < z

    1. Initial program 52.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 x around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(a, \mathsf{*.f64}\left(t, \mathsf{/.f64}\left(-4, c\right)\right), \left(x \cdot \left(9 \cdot \frac{y}{c \cdot z}\right) + \frac{b}{c \cdot z}\right)\right) \]
    5. Simplified85.0%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(-9 \cdot \frac{x \cdot y}{z} + \left(-1 \cdot \frac{b}{z} + 4 \cdot \left(a \cdot t\right)\right)\right), \color{blue}{\left(-1 \cdot c\right)}\right) \]
    8. Simplified97.7%

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, -9\right), z\right), \mathsf{*.f64}\left(4, \left(a \cdot t\right)\right)\right), \mathsf{neg.f64}\left(c\right)\right) \]
      2. *-lowering-*.f6481.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(x, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, -9\right), z\right), \mathsf{*.f64}\left(4, \mathsf{*.f64}\left(a, t\right)\right)\right), \mathsf{neg.f64}\left(c\right)\right) \]
    11. Simplified81.7%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(x \cdot \frac{y \cdot -9}{z} + 4 \cdot \left(a \cdot t\right)\right)\right)\right), \color{blue}{c}\right) \]
    13. Applied egg-rr81.6%

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

    if -1.01999999999999997e120 < z < 6.80000000000000013e109

    1. Initial program 92.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. Step-by-step derivation
      1. sub-negN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)\right) + \left(\left(x \cdot 9\right) \cdot y + b\right)\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      5. distribute-lft-neg-inN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{neg}\left(z \cdot 4\right)\right), a\right), t, \left(\left(x \cdot 9\right) \cdot y + b\right)\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      10. distribute-rgt-neg-inN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, -4\right), a\right), t, \mathsf{fma.f64}\left(x, \left(9 \cdot y\right), b\right)\right), \mathsf{*.f64}\left(z, c\right)\right) \]
      15. *-lowering-*.f6493.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, -4\right), a\right), t, \mathsf{fma.f64}\left(x, \mathsf{*.f64}\left(9, y\right), b\right)\right), \mathsf{*.f64}\left(z, c\right)\right) \]
    4. Applied egg-rr93.4%

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

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

Alternative 8: 72.6% accurate, 0.9× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(a, \mathsf{*.f64}\left(t, \mathsf{/.f64}\left(-4, c\right)\right), \left(x \cdot \left(9 \cdot \frac{y}{c \cdot z}\right) + \frac{b}{c \cdot z}\right)\right) \]
    5. Simplified84.1%

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(-4, \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, t\right), c\right), \mathsf{/.f64}\left(b, \left(c \cdot z\right)\right)\right) \]
      5. *-lowering-*.f6467.0%

        \[\leadsto \mathsf{fma.f64}\left(-4, \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, t\right), c\right), \mathsf{/.f64}\left(b, \mathsf{*.f64}\left(c, z\right)\right)\right) \]
    8. Simplified67.0%

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

    if -1.6000000000000001e-132 < z < 1.5e-34

    1. Initial program 96.6%

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(9 \cdot \left(x \cdot y\right) + b\right), \mathsf{*.f64}\left(\color{blue}{z}, c\right)\right) \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(9, \left(x \cdot y\right), b\right), \mathsf{*.f64}\left(\color{blue}{z}, c\right)\right) \]
      3. *-lowering-*.f6484.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(9, \mathsf{*.f64}\left(x, y\right), b\right), \mathsf{*.f64}\left(z, c\right)\right) \]
    5. Simplified84.4%

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

    if 1.5e-34 < z

    1. Initial program 65.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(a, \mathsf{*.f64}\left(t, \mathsf{/.f64}\left(-4, c\right)\right), \mathsf{/.f64}\left(b, \left(c \cdot z\right)\right)\right) \]
      2. *-lowering-*.f6476.3%

        \[\leadsto \mathsf{fma.f64}\left(a, \mathsf{*.f64}\left(t, \mathsf{/.f64}\left(-4, c\right)\right), \mathsf{/.f64}\left(b, \mathsf{*.f64}\left(c, z\right)\right)\right) \]
    8. Simplified76.3%

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

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

Alternative 9: 72.6% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.6000000000000001e-132 or 1.25e-49 < z

    1. Initial program 69.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 x around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(a, \mathsf{*.f64}\left(t, \mathsf{/.f64}\left(-4, c\right)\right), \left(x \cdot \left(9 \cdot \frac{y}{c \cdot z}\right) + \frac{b}{c \cdot z}\right)\right) \]
    5. Simplified86.1%

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

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

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

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

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

        \[\leadsto \mathsf{fma.f64}\left(-4, \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, t\right), c\right), \mathsf{/.f64}\left(b, \left(c \cdot z\right)\right)\right) \]
      5. *-lowering-*.f6471.2%

        \[\leadsto \mathsf{fma.f64}\left(-4, \mathsf{/.f64}\left(\mathsf{*.f64}\left(a, t\right), c\right), \mathsf{/.f64}\left(b, \mathsf{*.f64}\left(c, z\right)\right)\right) \]
    8. Simplified71.2%

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

    if -1.6000000000000001e-132 < z < 1.25e-49

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(9 \cdot \left(x \cdot y\right) + b\right), \mathsf{*.f64}\left(\color{blue}{z}, c\right)\right) \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(9, \left(x \cdot y\right), b\right), \mathsf{*.f64}\left(\color{blue}{z}, c\right)\right) \]
      3. *-lowering-*.f6486.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(9, \mathsf{*.f64}\left(x, y\right), b\right), \mathsf{*.f64}\left(z, c\right)\right) \]
    5. Simplified86.1%

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

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

Alternative 10: 48.6% accurate, 1.2× speedup?

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

\mathbf{elif}\;b \leq -6.6 \cdot 10^{-87}:\\
\;\;\;\;y \cdot \left(9 \cdot \frac{x}{\mathsf{fma}\left(z, c, 0\right)}\right)\\

\mathbf{elif}\;b \leq 1.9 \cdot 10^{+152}:\\
\;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.0999999999999999e130 or 1.9e152 < b

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{b}, \mathsf{*.f64}\left(z, c\right)\right) \]
    4. Step-by-step derivation
      1. Simplified61.6%

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\left(\frac{b}{c}\right), \color{blue}{z}\right) \]
        4. /-lowering-/.f6468.5%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(b, c\right), z\right) \]
      3. Applied egg-rr68.5%

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

      if -2.0999999999999999e130 < b < -6.6000000000000001e-87

      1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\left(\left(9 \cdot y\right) \cdot x\right), \left(\color{blue}{c} \cdot z\right)\right) \]
        5. *-lowering-*.f64N/A

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(9, y\right), x\right), \left(c \cdot z\right)\right) \]
        7. *-lowering-*.f6451.2%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(9, y\right), x\right), \mathsf{*.f64}\left(c, \color{blue}{z}\right)\right) \]
      8. Simplified51.2%

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(9, \left(\frac{x}{z \cdot \color{blue}{c}}\right)\right)\right) \]
        7. +-rgt-identityN/A

          \[\leadsto \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(9, \left(\frac{x}{z \cdot c + \color{blue}{0}}\right)\right)\right) \]
        8. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(9, \mathsf{/.f64}\left(x, \color{blue}{\left(z \cdot c + 0\right)}\right)\right)\right) \]
        9. accelerator-lowering-fma.f6451.6%

          \[\leadsto \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(9, \mathsf{/.f64}\left(x, \mathsf{fma.f64}\left(z, \color{blue}{c}, 0\right)\right)\right)\right) \]
      10. Applied egg-rr51.6%

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

      if -6.6000000000000001e-87 < b < 1.9e152

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

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

          \[\leadsto \mathsf{/.f64}\left(\left(-4 \cdot \left(a \cdot t\right)\right), \color{blue}{c}\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), c\right) \]
        4. *-lowering-*.f6451.7%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, t\right)\right), c\right) \]
      5. Simplified51.7%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.1 \cdot 10^{+130}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;b \leq -6.6 \cdot 10^{-87}:\\ \;\;\;\;y \cdot \left(9 \cdot \frac{x}{\mathsf{fma}\left(z, c, 0\right)}\right)\\ \mathbf{elif}\;b \leq 1.9 \cdot 10^{+152}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \end{array} \]
    7. Add Preprocessing

    Alternative 11: 48.5% accurate, 1.2× speedup?

    \[\begin{array}{l} [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\ [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\ \\ \begin{array}{l} t_1 := \frac{\frac{b}{c}}{z}\\ \mathbf{if}\;b \leq -2.5 \cdot 10^{+130}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -1.75 \cdot 10^{-91}:\\ \;\;\;\;y \cdot \frac{x}{z \cdot \left(c \cdot 0.1111111111111111\right)}\\ \mathbf{elif}\;b \leq 5.5 \cdot 10^{+151}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    (FPCore (x y z t a b c)
     :precision binary64
     (let* ((t_1 (/ (/ b c) z)))
       (if (<= b -2.5e+130)
         t_1
         (if (<= b -1.75e-91)
           (* y (/ x (* z (* c 0.1111111111111111))))
           (if (<= b 5.5e+151) (/ (* -4.0 (* t a)) c) t_1)))))
    assert(x < y && y < z && z < t && t < a && a < b && b < c);
    assert(x < y && y < z && z < t && t < a && a < b && b < c);
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = (b / c) / z;
    	double tmp;
    	if (b <= -2.5e+130) {
    		tmp = t_1;
    	} else if (b <= -1.75e-91) {
    		tmp = y * (x / (z * (c * 0.1111111111111111)));
    	} else if (b <= 5.5e+151) {
    		tmp = (-4.0 * (t * a)) / c;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    real(8) function code(x, y, z, t, a, b, c)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        real(8) :: t_1
        real(8) :: tmp
        t_1 = (b / c) / z
        if (b <= (-2.5d+130)) then
            tmp = t_1
        else if (b <= (-1.75d-91)) then
            tmp = y * (x / (z * (c * 0.1111111111111111d0)))
        else if (b <= 5.5d+151) then
            tmp = ((-4.0d0) * (t * a)) / c
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    assert x < y && y < z && z < t && t < a && a < b && b < c;
    assert x < y && y < z && z < t && t < a && a < b && b < c;
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = (b / c) / z;
    	double tmp;
    	if (b <= -2.5e+130) {
    		tmp = t_1;
    	} else if (b <= -1.75e-91) {
    		tmp = y * (x / (z * (c * 0.1111111111111111)));
    	} else if (b <= 5.5e+151) {
    		tmp = (-4.0 * (t * a)) / c;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
    [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
    def code(x, y, z, t, a, b, c):
    	t_1 = (b / c) / z
    	tmp = 0
    	if b <= -2.5e+130:
    		tmp = t_1
    	elif b <= -1.75e-91:
    		tmp = y * (x / (z * (c * 0.1111111111111111)))
    	elif b <= 5.5e+151:
    		tmp = (-4.0 * (t * a)) / c
    	else:
    		tmp = t_1
    	return tmp
    
    x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
    x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
    function code(x, y, z, t, a, b, c)
    	t_1 = Float64(Float64(b / c) / z)
    	tmp = 0.0
    	if (b <= -2.5e+130)
    		tmp = t_1;
    	elseif (b <= -1.75e-91)
    		tmp = Float64(y * Float64(x / Float64(z * Float64(c * 0.1111111111111111))));
    	elseif (b <= 5.5e+151)
    		tmp = Float64(Float64(-4.0 * Float64(t * a)) / c);
    	else
    		tmp = t_1;
    	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 = (b / c) / z;
    	tmp = 0.0;
    	if (b <= -2.5e+130)
    		tmp = t_1;
    	elseif (b <= -1.75e-91)
    		tmp = y * (x / (z * (c * 0.1111111111111111)));
    	elseif (b <= 5.5e+151)
    		tmp = (-4.0 * (t * a)) / c;
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
    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[(b / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[b, -2.5e+130], t$95$1, If[LessEqual[b, -1.75e-91], N[(y * N[(x / N[(z * N[(c * 0.1111111111111111), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.5e+151], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], t$95$1]]]]
    
    \begin{array}{l}
    [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
    [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
    \\
    \begin{array}{l}
    t_1 := \frac{\frac{b}{c}}{z}\\
    \mathbf{if}\;b \leq -2.5 \cdot 10^{+130}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;b \leq -1.75 \cdot 10^{-91}:\\
    \;\;\;\;y \cdot \frac{x}{z \cdot \left(c \cdot 0.1111111111111111\right)}\\
    
    \mathbf{elif}\;b \leq 5.5 \cdot 10^{+151}:\\
    \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if b < -2.4999999999999998e130 or 5.4999999999999994e151 < b

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

        \[\leadsto \mathsf{/.f64}\left(\color{blue}{b}, \mathsf{*.f64}\left(z, c\right)\right) \]
      4. Step-by-step derivation
        1. Simplified61.6%

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\left(\frac{b}{c}\right), \color{blue}{z}\right) \]
          4. /-lowering-/.f6468.5%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(b, c\right), z\right) \]
        3. Applied egg-rr68.5%

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

        if -2.4999999999999998e130 < b < -1.7499999999999999e-91

        1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\left(-9 \cdot \frac{x \cdot y}{z} + \left(-1 \cdot \frac{b}{z} + 4 \cdot \left(a \cdot t\right)\right)\right), \color{blue}{\left(-1 \cdot c\right)}\right) \]
        8. Simplified93.8%

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(9, \left(z \cdot \color{blue}{c}\right)\right)\right)\right) \]
          12. *-lowering-*.f6448.6%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{/.f64}\left(9, \mathsf{*.f64}\left(z, \color{blue}{c}\right)\right)\right)\right) \]
        11. Simplified48.6%

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\left(x \cdot \frac{1}{\frac{z \cdot c}{9}}\right), y\right) \]
          5. un-div-invN/A

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \left(\frac{c}{9}\right)\right)\right), y\right) \]
          9. div-invN/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(c, \left(\frac{1}{9}\right)\right)\right)\right), y\right) \]
          11. metadata-eval51.5%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(c, \frac{1}{9}\right)\right)\right), y\right) \]
        13. Applied egg-rr51.5%

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

        if -1.7499999999999999e-91 < b < 5.4999999999999994e151

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

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

            \[\leadsto \mathsf{/.f64}\left(\left(-4 \cdot \left(a \cdot t\right)\right), \color{blue}{c}\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), c\right) \]
          4. *-lowering-*.f6451.7%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, t\right)\right), c\right) \]
        5. Simplified51.7%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.5 \cdot 10^{+130}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;b \leq -1.75 \cdot 10^{-91}:\\ \;\;\;\;y \cdot \frac{x}{z \cdot \left(c \cdot 0.1111111111111111\right)}\\ \mathbf{elif}\;b \leq 5.5 \cdot 10^{+151}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \end{array} \]
      7. Add Preprocessing

      Alternative 12: 68.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} t_1 := \frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{if}\;z \leq -1.48 \cdot 10^{+23}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 10^{+104}:\\ \;\;\;\;\frac{\mathsf{fma}\left(9, x \cdot y, b\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
      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 (* t a)) c)))
         (if (<= z -1.48e+23)
           t_1
           (if (<= z 1e+104) (/ (fma 9.0 (* x y) b) (* z c)) t_1))))
      assert(x < y && y < z && z < t && t < a && a < b && b < c);
      assert(x < y && y < z && z < t && t < a && a < b && b < c);
      double code(double x, double y, double z, double t, double a, double b, double c) {
      	double t_1 = (-4.0 * (t * a)) / c;
      	double tmp;
      	if (z <= -1.48e+23) {
      		tmp = t_1;
      	} else if (z <= 1e+104) {
      		tmp = fma(9.0, (x * y), b) / (z * c);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
      x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
      function code(x, y, z, t, a, b, c)
      	t_1 = Float64(Float64(-4.0 * Float64(t * a)) / c)
      	tmp = 0.0
      	if (z <= -1.48e+23)
      		tmp = t_1;
      	elseif (z <= 1e+104)
      		tmp = Float64(fma(9.0, Float64(x * y), b) / Float64(z * c));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
      NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
      code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -1.48e+23], t$95$1, If[LessEqual[z, 1e+104], N[(N[(9.0 * N[(x * y), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
      [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
      \\
      \begin{array}{l}
      t_1 := \frac{-4 \cdot \left(t \cdot a\right)}{c}\\
      \mathbf{if}\;z \leq -1.48 \cdot 10^{+23}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 10^{+104}:\\
      \;\;\;\;\frac{\mathsf{fma}\left(9, x \cdot y, b\right)}{z \cdot c}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -1.4799999999999999e23 or 1e104 < z

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

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

            \[\leadsto \mathsf{/.f64}\left(\left(-4 \cdot \left(a \cdot t\right)\right), \color{blue}{c}\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), c\right) \]
          4. *-lowering-*.f6461.5%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, t\right)\right), c\right) \]
        5. Simplified61.5%

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

        if -1.4799999999999999e23 < z < 1e104

        1. Initial program 92.3%

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

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

            \[\leadsto \mathsf{/.f64}\left(\left(9 \cdot \left(x \cdot y\right) + b\right), \mathsf{*.f64}\left(\color{blue}{z}, c\right)\right) \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(9, \left(x \cdot y\right), b\right), \mathsf{*.f64}\left(\color{blue}{z}, c\right)\right) \]
          3. *-lowering-*.f6473.9%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{fma.f64}\left(9, \mathsf{*.f64}\left(x, y\right), b\right), \mathsf{*.f64}\left(z, c\right)\right) \]
        5. Simplified73.9%

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

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

      Alternative 13: 48.4% 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} t_1 := \frac{\frac{b}{c}}{z}\\ \mathbf{if}\;b \leq -2.4 \cdot 10^{+142}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 1.9 \cdot 10^{+152}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
      NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
      (FPCore (x y z t a b c)
       :precision binary64
       (let* ((t_1 (/ (/ b c) z)))
         (if (<= b -2.4e+142) t_1 (if (<= b 1.9e+152) (/ (* -4.0 (* t a)) c) t_1))))
      assert(x < y && y < z && z < t && t < a && a < b && b < c);
      assert(x < y && y < z && z < t && t < a && a < b && b < c);
      double code(double x, double y, double z, double t, double a, double b, double c) {
      	double t_1 = (b / c) / z;
      	double tmp;
      	if (b <= -2.4e+142) {
      		tmp = t_1;
      	} else if (b <= 1.9e+152) {
      		tmp = (-4.0 * (t * a)) / c;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
      NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
      real(8) function code(x, y, z, t, a, b, c)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8), intent (in) :: c
          real(8) :: t_1
          real(8) :: tmp
          t_1 = (b / c) / z
          if (b <= (-2.4d+142)) then
              tmp = t_1
          else if (b <= 1.9d+152) then
              tmp = ((-4.0d0) * (t * a)) / c
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      assert x < y && y < z && z < t && t < a && a < b && b < c;
      assert x < y && y < z && z < t && t < a && a < b && b < c;
      public static double code(double x, double y, double z, double t, double a, double b, double c) {
      	double t_1 = (b / c) / z;
      	double tmp;
      	if (b <= -2.4e+142) {
      		tmp = t_1;
      	} else if (b <= 1.9e+152) {
      		tmp = (-4.0 * (t * a)) / c;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
      [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
      def code(x, y, z, t, a, b, c):
      	t_1 = (b / c) / z
      	tmp = 0
      	if b <= -2.4e+142:
      		tmp = t_1
      	elif b <= 1.9e+152:
      		tmp = (-4.0 * (t * a)) / c
      	else:
      		tmp = t_1
      	return tmp
      
      x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
      x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
      function code(x, y, z, t, a, b, c)
      	t_1 = Float64(Float64(b / c) / z)
      	tmp = 0.0
      	if (b <= -2.4e+142)
      		tmp = t_1;
      	elseif (b <= 1.9e+152)
      		tmp = Float64(Float64(-4.0 * Float64(t * a)) / c);
      	else
      		tmp = t_1;
      	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 = (b / c) / z;
      	tmp = 0.0;
      	if (b <= -2.4e+142)
      		tmp = t_1;
      	elseif (b <= 1.9e+152)
      		tmp = (-4.0 * (t * a)) / c;
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
      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[(b / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[b, -2.4e+142], t$95$1, If[LessEqual[b, 1.9e+152], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
      [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
      \\
      \begin{array}{l}
      t_1 := \frac{\frac{b}{c}}{z}\\
      \mathbf{if}\;b \leq -2.4 \cdot 10^{+142}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;b \leq 1.9 \cdot 10^{+152}:\\
      \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < -2.3999999999999999e142 or 1.9e152 < b

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

          \[\leadsto \mathsf{/.f64}\left(\color{blue}{b}, \mathsf{*.f64}\left(z, c\right)\right) \]
        4. Step-by-step derivation
          1. Simplified63.5%

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

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

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

              \[\leadsto \mathsf{/.f64}\left(\left(\frac{b}{c}\right), \color{blue}{z}\right) \]
            4. /-lowering-/.f6469.5%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(b, c\right), z\right) \]
          3. Applied egg-rr69.5%

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

          if -2.3999999999999999e142 < b < 1.9e152

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

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

              \[\leadsto \mathsf{/.f64}\left(\left(-4 \cdot \left(a \cdot t\right)\right), \color{blue}{c}\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), c\right) \]
            4. *-lowering-*.f6449.0%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, t\right)\right), c\right) \]
          5. Simplified49.0%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.4 \cdot 10^{+142}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \mathbf{elif}\;b \leq 1.9 \cdot 10^{+152}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{c}}{z}\\ \end{array} \]
        7. Add Preprocessing

        Alternative 14: 48.3% 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} t_1 := \frac{b}{z \cdot c}\\ \mathbf{if}\;b \leq -6 \cdot 10^{+145}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 7.5 \cdot 10^{+152}:\\ \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        (FPCore (x y z t a b c)
         :precision binary64
         (let* ((t_1 (/ b (* z c))))
           (if (<= b -6e+145) t_1 (if (<= b 7.5e+152) (/ (* -4.0 (* t a)) c) t_1))))
        assert(x < y && y < z && z < t && t < a && a < b && b < c);
        assert(x < y && y < z && z < t && t < a && a < b && b < c);
        double code(double x, double y, double z, double t, double a, double b, double c) {
        	double t_1 = b / (z * c);
        	double tmp;
        	if (b <= -6e+145) {
        		tmp = t_1;
        	} else if (b <= 7.5e+152) {
        		tmp = (-4.0 * (t * a)) / c;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        real(8) function code(x, y, z, t, a, b, c)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8), intent (in) :: a
            real(8), intent (in) :: b
            real(8), intent (in) :: c
            real(8) :: t_1
            real(8) :: tmp
            t_1 = b / (z * c)
            if (b <= (-6d+145)) then
                tmp = t_1
            else if (b <= 7.5d+152) then
                tmp = ((-4.0d0) * (t * a)) / c
            else
                tmp = t_1
            end if
            code = tmp
        end function
        
        assert x < y && y < z && z < t && t < a && a < b && b < c;
        assert x < y && y < z && z < t && t < a && a < b && b < c;
        public static double code(double x, double y, double z, double t, double a, double b, double c) {
        	double t_1 = b / (z * c);
        	double tmp;
        	if (b <= -6e+145) {
        		tmp = t_1;
        	} else if (b <= 7.5e+152) {
        		tmp = (-4.0 * (t * a)) / c;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
        [x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c])
        def code(x, y, z, t, a, b, c):
        	t_1 = b / (z * c)
        	tmp = 0
        	if b <= -6e+145:
        		tmp = t_1
        	elif b <= 7.5e+152:
        		tmp = (-4.0 * (t * a)) / c
        	else:
        		tmp = t_1
        	return tmp
        
        x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
        x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c])
        function code(x, y, z, t, a, b, c)
        	t_1 = Float64(b / Float64(z * c))
        	tmp = 0.0
        	if (b <= -6e+145)
        		tmp = t_1;
        	elseif (b <= 7.5e+152)
        		tmp = Float64(Float64(-4.0 * Float64(t * a)) / c);
        	else
        		tmp = t_1;
        	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 = b / (z * c);
        	tmp = 0.0;
        	if (b <= -6e+145)
        		tmp = t_1;
        	elseif (b <= 7.5e+152)
        		tmp = (-4.0 * (t * a)) / c;
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
        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[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6e+145], t$95$1, If[LessEqual[b, 7.5e+152], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\\\
        [x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
        \\
        \begin{array}{l}
        t_1 := \frac{b}{z \cdot c}\\
        \mathbf{if}\;b \leq -6 \cdot 10^{+145}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;b \leq 7.5 \cdot 10^{+152}:\\
        \;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if b < -6.0000000000000005e145 or 7.50000000000000046e152 < b

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

            \[\leadsto \mathsf{/.f64}\left(\color{blue}{b}, \mathsf{*.f64}\left(z, c\right)\right) \]
          4. Step-by-step derivation
            1. Simplified63.5%

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

            if -6.0000000000000005e145 < b < 7.50000000000000046e152

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

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

                \[\leadsto \mathsf{/.f64}\left(\left(-4 \cdot \left(a \cdot t\right)\right), \color{blue}{c}\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), c\right) \]
              4. *-lowering-*.f6449.0%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, t\right)\right), c\right) \]
            5. Simplified49.0%

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

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

          Alternative 15: 35.6% 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.
          real(8) function code(x, y, z, t, a, b, c)
              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 78.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 b around inf

            \[\leadsto \mathsf{/.f64}\left(\color{blue}{b}, \mathsf{*.f64}\left(z, c\right)\right) \]
          4. Step-by-step derivation
            1. Simplified32.3%

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

            Developer Target 1: 80.3% accurate, 0.1× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{b}{c \cdot z}\\ t_2 := 4 \cdot \frac{a \cdot t}{c}\\ t_3 := \left(x \cdot 9\right) \cdot y\\ t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\ t_5 := \frac{t\_4}{z \cdot c}\\ t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\ \mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\ \;\;\;\;t\_6\\ \mathbf{elif}\;t\_5 < 0:\\ \;\;\;\;\frac{\frac{t\_4}{z}}{c}\\ \mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\ \;\;\;\;t\_6\\ \mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\ \;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\ \mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\ \;\;\;\;t\_6\\ \mathbf{else}:\\ \;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\ \end{array} \end{array} \]
            (FPCore (x y z t a b c)
             :precision binary64
             (let* ((t_1 (/ b (* c z)))
                    (t_2 (* 4.0 (/ (* a t) c)))
                    (t_3 (* (* x 9.0) y))
                    (t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
                    (t_5 (/ t_4 (* z c)))
                    (t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
               (if (< t_5 -1.100156740804105e-171)
                 t_6
                 (if (< t_5 0.0)
                   (/ (/ t_4 z) c)
                   (if (< t_5 1.1708877911747488e-53)
                     t_6
                     (if (< t_5 2.876823679546137e+130)
                       (- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
                       (if (< t_5 1.3838515042456319e+158)
                         t_6
                         (- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
            double code(double x, double y, double z, double t, double a, double b, double c) {
            	double t_1 = b / (c * z);
            	double t_2 = 4.0 * ((a * t) / c);
            	double t_3 = (x * 9.0) * y;
            	double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
            	double t_5 = t_4 / (z * c);
            	double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
            	double tmp;
            	if (t_5 < -1.100156740804105e-171) {
            		tmp = t_6;
            	} else if (t_5 < 0.0) {
            		tmp = (t_4 / z) / c;
            	} else if (t_5 < 1.1708877911747488e-53) {
            		tmp = t_6;
            	} else if (t_5 < 2.876823679546137e+130) {
            		tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
            	} else if (t_5 < 1.3838515042456319e+158) {
            		tmp = t_6;
            	} else {
            		tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z, t, a, b, c)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8), intent (in) :: a
                real(8), intent (in) :: b
                real(8), intent (in) :: c
                real(8) :: t_1
                real(8) :: t_2
                real(8) :: t_3
                real(8) :: t_4
                real(8) :: t_5
                real(8) :: t_6
                real(8) :: tmp
                t_1 = b / (c * z)
                t_2 = 4.0d0 * ((a * t) / c)
                t_3 = (x * 9.0d0) * y
                t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
                t_5 = t_4 / (z * c)
                t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
                if (t_5 < (-1.100156740804105d-171)) then
                    tmp = t_6
                else if (t_5 < 0.0d0) then
                    tmp = (t_4 / z) / c
                else if (t_5 < 1.1708877911747488d-53) then
                    tmp = t_6
                else if (t_5 < 2.876823679546137d+130) then
                    tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
                else if (t_5 < 1.3838515042456319d+158) then
                    tmp = t_6
                else
                    tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a, double b, double c) {
            	double t_1 = b / (c * z);
            	double t_2 = 4.0 * ((a * t) / c);
            	double t_3 = (x * 9.0) * y;
            	double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
            	double t_5 = t_4 / (z * c);
            	double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
            	double tmp;
            	if (t_5 < -1.100156740804105e-171) {
            		tmp = t_6;
            	} else if (t_5 < 0.0) {
            		tmp = (t_4 / z) / c;
            	} else if (t_5 < 1.1708877911747488e-53) {
            		tmp = t_6;
            	} else if (t_5 < 2.876823679546137e+130) {
            		tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
            	} else if (t_5 < 1.3838515042456319e+158) {
            		tmp = t_6;
            	} else {
            		tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b, c):
            	t_1 = b / (c * z)
            	t_2 = 4.0 * ((a * t) / c)
            	t_3 = (x * 9.0) * y
            	t_4 = (t_3 - (((z * 4.0) * t) * a)) + b
            	t_5 = t_4 / (z * c)
            	t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c)
            	tmp = 0
            	if t_5 < -1.100156740804105e-171:
            		tmp = t_6
            	elif t_5 < 0.0:
            		tmp = (t_4 / z) / c
            	elif t_5 < 1.1708877911747488e-53:
            		tmp = t_6
            	elif t_5 < 2.876823679546137e+130:
            		tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2
            	elif t_5 < 1.3838515042456319e+158:
            		tmp = t_6
            	else:
            		tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2
            	return tmp
            
            function code(x, y, z, t, a, b, c)
            	t_1 = Float64(b / Float64(c * z))
            	t_2 = Float64(4.0 * Float64(Float64(a * t) / c))
            	t_3 = Float64(Float64(x * 9.0) * y)
            	t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b)
            	t_5 = Float64(t_4 / Float64(z * c))
            	t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c))
            	tmp = 0.0
            	if (t_5 < -1.100156740804105e-171)
            		tmp = t_6;
            	elseif (t_5 < 0.0)
            		tmp = Float64(Float64(t_4 / z) / c);
            	elseif (t_5 < 1.1708877911747488e-53)
            		tmp = t_6;
            	elseif (t_5 < 2.876823679546137e+130)
            		tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2);
            	elseif (t_5 < 1.3838515042456319e+158)
            		tmp = t_6;
            	else
            		tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b, c)
            	t_1 = b / (c * z);
            	t_2 = 4.0 * ((a * t) / c);
            	t_3 = (x * 9.0) * y;
            	t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
            	t_5 = t_4 / (z * c);
            	t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
            	tmp = 0.0;
            	if (t_5 < -1.100156740804105e-171)
            		tmp = t_6;
            	elseif (t_5 < 0.0)
            		tmp = (t_4 / z) / c;
            	elseif (t_5 < 1.1708877911747488e-53)
            		tmp = t_6;
            	elseif (t_5 < 2.876823679546137e+130)
            		tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
            	elseif (t_5 < 1.3838515042456319e+158)
            		tmp = t_6;
            	else
            		tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{b}{c \cdot z}\\
            t_2 := 4 \cdot \frac{a \cdot t}{c}\\
            t_3 := \left(x \cdot 9\right) \cdot y\\
            t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
            t_5 := \frac{t\_4}{z \cdot c}\\
            t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
            \mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\
            \;\;\;\;t\_6\\
            
            \mathbf{elif}\;t\_5 < 0:\\
            \;\;\;\;\frac{\frac{t\_4}{z}}{c}\\
            
            \mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\
            \;\;\;\;t\_6\\
            
            \mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\
            \;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\
            
            \mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\
            \;\;\;\;t\_6\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\
            
            
            \end{array}
            \end{array}
            

            Reproduce

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