Diagrams.Solve.Polynomial:quartForm from diagrams-solve-0.1, C

Percentage Accurate: 97.9% → 98.6%
Time: 7.7s
Alternatives: 12
Speedup: 0.5×

Specification

?
\[\begin{array}{l} \\ \left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
	return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + 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 * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c):
	return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c)
	return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c)
end
function tmp = code(x, y, z, t, a, b, c)
	tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + 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 12 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: 97.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
	return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + 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 * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c):
	return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c)
	return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c)
end
function tmp = code(x, y, z, t, a, b, c)
	tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 98.6% accurate, 0.1× speedup?

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

\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\


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

    1. Initial program 99.7%

      \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
    2. Step-by-step derivation
      1. associate-+l-99.7%

        \[\leadsto \color{blue}{\left(x \cdot y + \frac{z \cdot t}{16}\right) - \left(\frac{a \cdot b}{4} - c\right)} \]
      2. sub-neg99.7%

        \[\leadsto \color{blue}{\left(x \cdot y + \frac{z \cdot t}{16}\right) + \left(-\left(\frac{a \cdot b}{4} - c\right)\right)} \]
      3. neg-mul-199.7%

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

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

        \[\leadsto \left(x \cdot y + \frac{z \cdot t}{16}\right) + \left(-\color{blue}{\left(--1\right)}\right) \cdot \left(\frac{a \cdot b}{4} - c\right) \]
      6. cancel-sign-sub-inv99.7%

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, \frac{z \cdot t}{16}\right)} - \left(--1\right) \cdot \left(\frac{a \cdot b}{4} - c\right) \]
      8. associate-/l*99.6%

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

        \[\leadsto \mathsf{fma}\left(x, y, \frac{z}{\frac{16}{t}}\right) - \color{blue}{1} \cdot \left(\frac{a \cdot b}{4} - c\right) \]
      10. *-lft-identity99.6%

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

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

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

    if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4))

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{y \cdot x} + c \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\frac{t \cdot z}{16} + x \cdot y\right) - \frac{b \cdot a}{4} \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(x, y, \frac{z}{\frac{16}{t}}\right) + \left(c - \frac{a}{\frac{4}{b}}\right)\\ \mathbf{else}:\\ \;\;\;\;c + x \cdot y\\ \end{array} \]

Alternative 2: 98.9% accurate, 0.1× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ \mathsf{fma}\left(t, \frac{z}{16}, \mathsf{fma}\left(x, y, c - b \cdot \frac{a}{4}\right)\right) \end{array} \]
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (fma t (/ z 16.0) (fma x y (- c (* b (/ a 4.0))))))
assert(z < t);
double code(double x, double y, double z, double t, double a, double b, double c) {
	return fma(t, (z / 16.0), fma(x, y, (c - (b * (a / 4.0)))));
}
z, t = sort([z, t])
function code(x, y, z, t, a, b, c)
	return fma(t, Float64(z / 16.0), fma(x, y, Float64(c - Float64(b * Float64(a / 4.0)))))
end
NOTE: z and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := N[(t * N[(z / 16.0), $MachinePrecision] + N[(x * y + N[(c - N[(b * N[(a / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\mathsf{fma}\left(t, \frac{z}{16}, \mathsf{fma}\left(x, y, c - b \cdot \frac{a}{4}\right)\right)
\end{array}
Derivation
  1. Initial program 96.9%

    \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
  2. Step-by-step derivation
    1. associate-+l-96.9%

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(t, \frac{z}{16}, \mathsf{fma}\left(x, y, \color{blue}{0 - \left(\frac{a \cdot b}{4} - c\right)}\right)\right) \]
    9. associate-+l-98.1%

      \[\leadsto \mathsf{fma}\left(t, \frac{z}{16}, \mathsf{fma}\left(x, y, \color{blue}{\left(0 - \frac{a \cdot b}{4}\right) + c}\right)\right) \]
    10. neg-sub098.1%

      \[\leadsto \mathsf{fma}\left(t, \frac{z}{16}, \mathsf{fma}\left(x, y, \color{blue}{\left(-\frac{a \cdot b}{4}\right)} + c\right)\right) \]
    11. +-commutative98.1%

      \[\leadsto \mathsf{fma}\left(t, \frac{z}{16}, \mathsf{fma}\left(x, y, \color{blue}{c + \left(-\frac{a \cdot b}{4}\right)}\right)\right) \]
    12. unsub-neg98.1%

      \[\leadsto \mathsf{fma}\left(t, \frac{z}{16}, \mathsf{fma}\left(x, y, \color{blue}{c - \frac{a \cdot b}{4}}\right)\right) \]
    13. *-commutative98.1%

      \[\leadsto \mathsf{fma}\left(t, \frac{z}{16}, \mathsf{fma}\left(x, y, c - \frac{\color{blue}{b \cdot a}}{4}\right)\right) \]
    14. associate-*r/98.4%

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

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

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

Alternative 3: 98.6% accurate, 0.5× speedup?

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

\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\


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

    1. Initial program 99.7%

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

    if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4))

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{y \cdot x} + c \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\frac{t \cdot z}{16} + x \cdot y\right) - \frac{b \cdot a}{4} \leq \infty:\\ \;\;\;\;c + \left(\left(\frac{t \cdot z}{16} + x \cdot y\right) - \frac{b \cdot a}{4}\right)\\ \mathbf{else}:\\ \;\;\;\;c + x \cdot y\\ \end{array} \]

Alternative 4: 60.4% accurate, 0.9× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} t_1 := c + a \cdot \left(b \cdot -0.25\right)\\ t_2 := 0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{if}\;b \leq -1.45 \cdot 10^{-5}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.26 \cdot 10^{-225}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{+64}:\\ \;\;\;\;c + t_2\\ \mathbf{elif}\;b \leq 1.02 \cdot 10^{+101} \lor \neg \left(b \leq 2.05 \cdot 10^{+113}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot y + t_2\\ \end{array} \end{array} \]
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (+ c (* a (* b -0.25)))) (t_2 (* 0.0625 (* t z))))
   (if (<= b -1.45e-5)
     t_1
     (if (<= b 1.26e-225)
       (+ c (* x y))
       (if (<= b 2.6e+64)
         (+ c t_2)
         (if (or (<= b 1.02e+101) (not (<= b 2.05e+113)))
           t_1
           (+ (* x y) t_2)))))))
assert(z < t);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = c + (a * (b * -0.25));
	double t_2 = 0.0625 * (t * z);
	double tmp;
	if (b <= -1.45e-5) {
		tmp = t_1;
	} else if (b <= 1.26e-225) {
		tmp = c + (x * y);
	} else if (b <= 2.6e+64) {
		tmp = c + t_2;
	} else if ((b <= 1.02e+101) || !(b <= 2.05e+113)) {
		tmp = t_1;
	} else {
		tmp = (x * y) + t_2;
	}
	return tmp;
}
NOTE: z and t 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) :: t_2
    real(8) :: tmp
    t_1 = c + (a * (b * (-0.25d0)))
    t_2 = 0.0625d0 * (t * z)
    if (b <= (-1.45d-5)) then
        tmp = t_1
    else if (b <= 1.26d-225) then
        tmp = c + (x * y)
    else if (b <= 2.6d+64) then
        tmp = c + t_2
    else if ((b <= 1.02d+101) .or. (.not. (b <= 2.05d+113))) then
        tmp = t_1
    else
        tmp = (x * y) + t_2
    end if
    code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = c + (a * (b * -0.25));
	double t_2 = 0.0625 * (t * z);
	double tmp;
	if (b <= -1.45e-5) {
		tmp = t_1;
	} else if (b <= 1.26e-225) {
		tmp = c + (x * y);
	} else if (b <= 2.6e+64) {
		tmp = c + t_2;
	} else if ((b <= 1.02e+101) || !(b <= 2.05e+113)) {
		tmp = t_1;
	} else {
		tmp = (x * y) + t_2;
	}
	return tmp;
}
[z, t] = sort([z, t])
def code(x, y, z, t, a, b, c):
	t_1 = c + (a * (b * -0.25))
	t_2 = 0.0625 * (t * z)
	tmp = 0
	if b <= -1.45e-5:
		tmp = t_1
	elif b <= 1.26e-225:
		tmp = c + (x * y)
	elif b <= 2.6e+64:
		tmp = c + t_2
	elif (b <= 1.02e+101) or not (b <= 2.05e+113):
		tmp = t_1
	else:
		tmp = (x * y) + t_2
	return tmp
z, t = sort([z, t])
function code(x, y, z, t, a, b, c)
	t_1 = Float64(c + Float64(a * Float64(b * -0.25)))
	t_2 = Float64(0.0625 * Float64(t * z))
	tmp = 0.0
	if (b <= -1.45e-5)
		tmp = t_1;
	elseif (b <= 1.26e-225)
		tmp = Float64(c + Float64(x * y));
	elseif (b <= 2.6e+64)
		tmp = Float64(c + t_2);
	elseif ((b <= 1.02e+101) || !(b <= 2.05e+113))
		tmp = t_1;
	else
		tmp = Float64(Float64(x * y) + t_2);
	end
	return tmp
end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = c + (a * (b * -0.25));
	t_2 = 0.0625 * (t * z);
	tmp = 0.0;
	if (b <= -1.45e-5)
		tmp = t_1;
	elseif (b <= 1.26e-225)
		tmp = c + (x * y);
	elseif (b <= 2.6e+64)
		tmp = c + t_2;
	elseif ((b <= 1.02e+101) || ~((b <= 2.05e+113)))
		tmp = t_1;
	else
		tmp = (x * y) + t_2;
	end
	tmp_2 = tmp;
end
NOTE: z and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.45e-5], t$95$1, If[LessEqual[b, 1.26e-225], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.6e+64], N[(c + t$95$2), $MachinePrecision], If[Or[LessEqual[b, 1.02e+101], N[Not[LessEqual[b, 2.05e+113]], $MachinePrecision]], t$95$1, N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision]]]]]]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := c + a \cdot \left(b \cdot -0.25\right)\\
t_2 := 0.0625 \cdot \left(t \cdot z\right)\\
\mathbf{if}\;b \leq -1.45 \cdot 10^{-5}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 1.26 \cdot 10^{-225}:\\
\;\;\;\;c + x \cdot y\\

\mathbf{elif}\;b \leq 2.6 \cdot 10^{+64}:\\
\;\;\;\;c + t_2\\

\mathbf{elif}\;b \leq 1.02 \cdot 10^{+101} \lor \neg \left(b \leq 2.05 \cdot 10^{+113}\right):\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;x \cdot y + t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.45e-5 or 2.59999999999999997e64 < b < 1.02000000000000002e101 or 2.04999999999999996e113 < b

    1. Initial program 93.6%

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

      \[\leadsto \color{blue}{-0.25 \cdot \left(a \cdot b\right)} + c \]
    3. Step-by-step derivation
      1. *-commutative64.6%

        \[\leadsto \color{blue}{\left(a \cdot b\right) \cdot -0.25} + c \]
      2. associate-*l*65.3%

        \[\leadsto \color{blue}{a \cdot \left(b \cdot -0.25\right)} + c \]
    4. Simplified65.3%

      \[\leadsto \color{blue}{a \cdot \left(b \cdot -0.25\right)} + c \]

    if -1.45e-5 < b < 1.2599999999999999e-225

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{y \cdot x} + c \]

    if 1.2599999999999999e-225 < b < 2.59999999999999997e64

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{0.0625 \cdot \left(t \cdot z\right)} + c \]

    if 1.02000000000000002e101 < b < 2.04999999999999996e113

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{\left(y \cdot x + 0.0625 \cdot \left(t \cdot z\right)\right)} + c \]
    3. Taylor expanded in c around 0 100.0%

      \[\leadsto \color{blue}{y \cdot x + 0.0625 \cdot \left(t \cdot z\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification65.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.45 \cdot 10^{-5}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;b \leq 1.26 \cdot 10^{-225}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{+64}:\\ \;\;\;\;c + 0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;b \leq 1.02 \cdot 10^{+101} \lor \neg \left(b \leq 2.05 \cdot 10^{+113}\right):\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y + 0.0625 \cdot \left(t \cdot z\right)\\ \end{array} \]

Alternative 5: 39.4% accurate, 1.0× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} t_1 := b \cdot \left(a \cdot -0.25\right)\\ t_2 := 0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{if}\;t \leq -2.55 \cdot 10^{-54}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-307}:\\ \;\;\;\;c\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-263}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-214}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{+85}:\\ \;\;\;\;c\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* b (* a -0.25))) (t_2 (* 0.0625 (* t z))))
   (if (<= t -2.55e-54)
     t_2
     (if (<= t 2e-307)
       c
       (if (<= t 4.5e-263)
         t_1
         (if (<= t 7e-214)
           (* x y)
           (if (<= t 1.9e-20) t_1 (if (<= t 5.8e+85) c t_2))))))))
assert(z < t);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = b * (a * -0.25);
	double t_2 = 0.0625 * (t * z);
	double tmp;
	if (t <= -2.55e-54) {
		tmp = t_2;
	} else if (t <= 2e-307) {
		tmp = c;
	} else if (t <= 4.5e-263) {
		tmp = t_1;
	} else if (t <= 7e-214) {
		tmp = x * y;
	} else if (t <= 1.9e-20) {
		tmp = t_1;
	} else if (t <= 5.8e+85) {
		tmp = c;
	} else {
		tmp = t_2;
	}
	return tmp;
}
NOTE: z and t 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) :: t_2
    real(8) :: tmp
    t_1 = b * (a * (-0.25d0))
    t_2 = 0.0625d0 * (t * z)
    if (t <= (-2.55d-54)) then
        tmp = t_2
    else if (t <= 2d-307) then
        tmp = c
    else if (t <= 4.5d-263) then
        tmp = t_1
    else if (t <= 7d-214) then
        tmp = x * y
    else if (t <= 1.9d-20) then
        tmp = t_1
    else if (t <= 5.8d+85) then
        tmp = c
    else
        tmp = t_2
    end if
    code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = b * (a * -0.25);
	double t_2 = 0.0625 * (t * z);
	double tmp;
	if (t <= -2.55e-54) {
		tmp = t_2;
	} else if (t <= 2e-307) {
		tmp = c;
	} else if (t <= 4.5e-263) {
		tmp = t_1;
	} else if (t <= 7e-214) {
		tmp = x * y;
	} else if (t <= 1.9e-20) {
		tmp = t_1;
	} else if (t <= 5.8e+85) {
		tmp = c;
	} else {
		tmp = t_2;
	}
	return tmp;
}
[z, t] = sort([z, t])
def code(x, y, z, t, a, b, c):
	t_1 = b * (a * -0.25)
	t_2 = 0.0625 * (t * z)
	tmp = 0
	if t <= -2.55e-54:
		tmp = t_2
	elif t <= 2e-307:
		tmp = c
	elif t <= 4.5e-263:
		tmp = t_1
	elif t <= 7e-214:
		tmp = x * y
	elif t <= 1.9e-20:
		tmp = t_1
	elif t <= 5.8e+85:
		tmp = c
	else:
		tmp = t_2
	return tmp
z, t = sort([z, t])
function code(x, y, z, t, a, b, c)
	t_1 = Float64(b * Float64(a * -0.25))
	t_2 = Float64(0.0625 * Float64(t * z))
	tmp = 0.0
	if (t <= -2.55e-54)
		tmp = t_2;
	elseif (t <= 2e-307)
		tmp = c;
	elseif (t <= 4.5e-263)
		tmp = t_1;
	elseif (t <= 7e-214)
		tmp = Float64(x * y);
	elseif (t <= 1.9e-20)
		tmp = t_1;
	elseif (t <= 5.8e+85)
		tmp = c;
	else
		tmp = t_2;
	end
	return tmp
end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = b * (a * -0.25);
	t_2 = 0.0625 * (t * z);
	tmp = 0.0;
	if (t <= -2.55e-54)
		tmp = t_2;
	elseif (t <= 2e-307)
		tmp = c;
	elseif (t <= 4.5e-263)
		tmp = t_1;
	elseif (t <= 7e-214)
		tmp = x * y;
	elseif (t <= 1.9e-20)
		tmp = t_1;
	elseif (t <= 5.8e+85)
		tmp = c;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
NOTE: z and t 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[(a * -0.25), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.55e-54], t$95$2, If[LessEqual[t, 2e-307], c, If[LessEqual[t, 4.5e-263], t$95$1, If[LessEqual[t, 7e-214], N[(x * y), $MachinePrecision], If[LessEqual[t, 1.9e-20], t$95$1, If[LessEqual[t, 5.8e+85], c, t$95$2]]]]]]]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot -0.25\right)\\
t_2 := 0.0625 \cdot \left(t \cdot z\right)\\
\mathbf{if}\;t \leq -2.55 \cdot 10^{-54}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 2 \cdot 10^{-307}:\\
\;\;\;\;c\\

\mathbf{elif}\;t \leq 4.5 \cdot 10^{-263}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 7 \cdot 10^{-214}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;t \leq 1.9 \cdot 10^{-20}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 5.8 \cdot 10^{+85}:\\
\;\;\;\;c\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.55000000000000005e-54 or 5.79999999999999995e85 < t

    1. Initial program 97.5%

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

      \[\leadsto \color{blue}{\left(c + 0.0625 \cdot \left(t \cdot z\right)\right) - 0.25 \cdot \left(a \cdot b\right)} \]
    3. Step-by-step derivation
      1. +-commutative81.5%

        \[\leadsto \color{blue}{\left(0.0625 \cdot \left(t \cdot z\right) + c\right)} - 0.25 \cdot \left(a \cdot b\right) \]
      2. *-commutative81.5%

        \[\leadsto \left(0.0625 \cdot \color{blue}{\left(z \cdot t\right)} + c\right) - 0.25 \cdot \left(a \cdot b\right) \]
      3. *-commutative81.5%

        \[\leadsto \left(\color{blue}{\left(z \cdot t\right) \cdot 0.0625} + c\right) - 0.25 \cdot \left(a \cdot b\right) \]
      4. associate-*r*81.5%

        \[\leadsto \left(\color{blue}{z \cdot \left(t \cdot 0.0625\right)} + c\right) - 0.25 \cdot \left(a \cdot b\right) \]
      5. *-commutative81.5%

        \[\leadsto \left(z \cdot \left(t \cdot 0.0625\right) + c\right) - \color{blue}{\left(a \cdot b\right) \cdot 0.25} \]
      6. *-commutative81.5%

        \[\leadsto \left(z \cdot \left(t \cdot 0.0625\right) + c\right) - \color{blue}{\left(b \cdot a\right)} \cdot 0.25 \]
      7. associate-*r*81.5%

        \[\leadsto \left(z \cdot \left(t \cdot 0.0625\right) + c\right) - \color{blue}{b \cdot \left(a \cdot 0.25\right)} \]
      8. associate--l+81.5%

        \[\leadsto \color{blue}{z \cdot \left(t \cdot 0.0625\right) + \left(c - b \cdot \left(a \cdot 0.25\right)\right)} \]
      9. associate-*r*81.5%

        \[\leadsto \color{blue}{\left(z \cdot t\right) \cdot 0.0625} + \left(c - b \cdot \left(a \cdot 0.25\right)\right) \]
      10. *-commutative81.5%

        \[\leadsto \color{blue}{0.0625 \cdot \left(z \cdot t\right)} + \left(c - b \cdot \left(a \cdot 0.25\right)\right) \]
      11. *-commutative81.5%

        \[\leadsto 0.0625 \cdot \color{blue}{\left(t \cdot z\right)} + \left(c - b \cdot \left(a \cdot 0.25\right)\right) \]
      12. sub-neg81.5%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \color{blue}{\left(c + \left(-b \cdot \left(a \cdot 0.25\right)\right)\right)} \]
      13. +-commutative81.5%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \color{blue}{\left(\left(-b \cdot \left(a \cdot 0.25\right)\right) + c\right)} \]
      14. distribute-rgt-neg-in81.5%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \left(\color{blue}{b \cdot \left(-a \cdot 0.25\right)} + c\right) \]
      15. fma-def81.5%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \color{blue}{\mathsf{fma}\left(b, -a \cdot 0.25, c\right)} \]
      16. distribute-rgt-neg-in81.5%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \mathsf{fma}\left(b, \color{blue}{a \cdot \left(-0.25\right)}, c\right) \]
      17. metadata-eval81.5%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \mathsf{fma}\left(b, a \cdot \color{blue}{-0.25}, c\right) \]
    4. Simplified81.5%

      \[\leadsto \color{blue}{0.0625 \cdot \left(t \cdot z\right) + \mathsf{fma}\left(b, a \cdot -0.25, c\right)} \]
    5. Taylor expanded in t around inf 48.6%

      \[\leadsto \color{blue}{0.0625 \cdot \left(t \cdot z\right)} \]

    if -2.55000000000000005e-54 < t < 1.99999999999999982e-307 or 1.8999999999999999e-20 < t < 5.79999999999999995e85

    1. Initial program 99.0%

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

      \[\leadsto \color{blue}{c} \]

    if 1.99999999999999982e-307 < t < 4.4999999999999997e-263 or 7e-214 < t < 1.8999999999999999e-20

    1. Initial program 97.9%

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

      \[\leadsto \color{blue}{\left(c + 0.0625 \cdot \left(t \cdot z\right)\right) - 0.25 \cdot \left(a \cdot b\right)} \]
    3. Step-by-step derivation
      1. +-commutative81.4%

        \[\leadsto \color{blue}{\left(0.0625 \cdot \left(t \cdot z\right) + c\right)} - 0.25 \cdot \left(a \cdot b\right) \]
      2. *-commutative81.4%

        \[\leadsto \left(0.0625 \cdot \color{blue}{\left(z \cdot t\right)} + c\right) - 0.25 \cdot \left(a \cdot b\right) \]
      3. *-commutative81.4%

        \[\leadsto \left(\color{blue}{\left(z \cdot t\right) \cdot 0.0625} + c\right) - 0.25 \cdot \left(a \cdot b\right) \]
      4. associate-*r*81.4%

        \[\leadsto \left(\color{blue}{z \cdot \left(t \cdot 0.0625\right)} + c\right) - 0.25 \cdot \left(a \cdot b\right) \]
      5. *-commutative81.4%

        \[\leadsto \left(z \cdot \left(t \cdot 0.0625\right) + c\right) - \color{blue}{\left(a \cdot b\right) \cdot 0.25} \]
      6. *-commutative81.4%

        \[\leadsto \left(z \cdot \left(t \cdot 0.0625\right) + c\right) - \color{blue}{\left(b \cdot a\right)} \cdot 0.25 \]
      7. associate-*r*81.4%

        \[\leadsto \left(z \cdot \left(t \cdot 0.0625\right) + c\right) - \color{blue}{b \cdot \left(a \cdot 0.25\right)} \]
      8. associate--l+81.4%

        \[\leadsto \color{blue}{z \cdot \left(t \cdot 0.0625\right) + \left(c - b \cdot \left(a \cdot 0.25\right)\right)} \]
      9. associate-*r*81.4%

        \[\leadsto \color{blue}{\left(z \cdot t\right) \cdot 0.0625} + \left(c - b \cdot \left(a \cdot 0.25\right)\right) \]
      10. *-commutative81.4%

        \[\leadsto \color{blue}{0.0625 \cdot \left(z \cdot t\right)} + \left(c - b \cdot \left(a \cdot 0.25\right)\right) \]
      11. *-commutative81.4%

        \[\leadsto 0.0625 \cdot \color{blue}{\left(t \cdot z\right)} + \left(c - b \cdot \left(a \cdot 0.25\right)\right) \]
      12. sub-neg81.4%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \color{blue}{\left(c + \left(-b \cdot \left(a \cdot 0.25\right)\right)\right)} \]
      13. +-commutative81.4%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \color{blue}{\left(\left(-b \cdot \left(a \cdot 0.25\right)\right) + c\right)} \]
      14. distribute-rgt-neg-in81.4%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \left(\color{blue}{b \cdot \left(-a \cdot 0.25\right)} + c\right) \]
      15. fma-def81.4%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \color{blue}{\mathsf{fma}\left(b, -a \cdot 0.25, c\right)} \]
      16. distribute-rgt-neg-in81.4%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \mathsf{fma}\left(b, \color{blue}{a \cdot \left(-0.25\right)}, c\right) \]
      17. metadata-eval81.4%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \mathsf{fma}\left(b, a \cdot \color{blue}{-0.25}, c\right) \]
    4. Simplified81.4%

      \[\leadsto \color{blue}{0.0625 \cdot \left(t \cdot z\right) + \mathsf{fma}\left(b, a \cdot -0.25, c\right)} \]
    5. Taylor expanded in b around inf 51.1%

      \[\leadsto \color{blue}{-0.25 \cdot \left(a \cdot b\right)} \]
    6. Step-by-step derivation
      1. *-commutative51.1%

        \[\leadsto \color{blue}{\left(a \cdot b\right) \cdot -0.25} \]
      2. *-commutative51.1%

        \[\leadsto \color{blue}{\left(b \cdot a\right)} \cdot -0.25 \]
      3. associate-*r*51.1%

        \[\leadsto \color{blue}{b \cdot \left(a \cdot -0.25\right)} \]
      4. *-commutative51.1%

        \[\leadsto b \cdot \color{blue}{\left(-0.25 \cdot a\right)} \]
    7. Simplified51.1%

      \[\leadsto \color{blue}{b \cdot \left(-0.25 \cdot a\right)} \]

    if 4.4999999999999997e-263 < t < 7e-214

    1. Initial program 70.0%

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

      \[\leadsto \color{blue}{y \cdot x} + c \]
    3. Taylor expanded in y around inf 61.4%

      \[\leadsto \color{blue}{y \cdot x} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification45.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.55 \cdot 10^{-54}:\\ \;\;\;\;0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-307}:\\ \;\;\;\;c\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-263}:\\ \;\;\;\;b \cdot \left(a \cdot -0.25\right)\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-214}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-20}:\\ \;\;\;\;b \cdot \left(a \cdot -0.25\right)\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{+85}:\\ \;\;\;\;c\\ \mathbf{else}:\\ \;\;\;\;0.0625 \cdot \left(t \cdot z\right)\\ \end{array} \]

Alternative 6: 77.3% accurate, 1.1× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+221} \lor \neg \left(a \leq 1.6 \cdot 10^{+19}\right):\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{else}:\\ \;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(t \cdot z\right)\right)\\ \end{array} \end{array} \]
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (if (or (<= a -3.5e+221) (not (<= a 1.6e+19)))
   (+ c (* a (* b -0.25)))
   (+ c (+ (* x y) (* 0.0625 (* t z))))))
assert(z < t);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((a <= -3.5e+221) || !(a <= 1.6e+19)) {
		tmp = c + (a * (b * -0.25));
	} else {
		tmp = c + ((x * y) + (0.0625 * (t * z)));
	}
	return tmp;
}
NOTE: z and t 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) :: tmp
    if ((a <= (-3.5d+221)) .or. (.not. (a <= 1.6d+19))) then
        tmp = c + (a * (b * (-0.25d0)))
    else
        tmp = c + ((x * y) + (0.0625d0 * (t * z)))
    end if
    code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((a <= -3.5e+221) || !(a <= 1.6e+19)) {
		tmp = c + (a * (b * -0.25));
	} else {
		tmp = c + ((x * y) + (0.0625 * (t * z)));
	}
	return tmp;
}
[z, t] = sort([z, t])
def code(x, y, z, t, a, b, c):
	tmp = 0
	if (a <= -3.5e+221) or not (a <= 1.6e+19):
		tmp = c + (a * (b * -0.25))
	else:
		tmp = c + ((x * y) + (0.0625 * (t * z)))
	return tmp
z, t = sort([z, t])
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if ((a <= -3.5e+221) || !(a <= 1.6e+19))
		tmp = Float64(c + Float64(a * Float64(b * -0.25)));
	else
		tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(t * z))));
	end
	return tmp
end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
	tmp = 0.0;
	if ((a <= -3.5e+221) || ~((a <= 1.6e+19)))
		tmp = c + (a * (b * -0.25));
	else
		tmp = c + ((x * y) + (0.0625 * (t * z)));
	end
	tmp_2 = tmp;
end
NOTE: z and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[a, -3.5e+221], N[Not[LessEqual[a, 1.6e+19]], $MachinePrecision]], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{+221} \lor \neg \left(a \leq 1.6 \cdot 10^{+19}\right):\\
\;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\

\mathbf{else}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(t \cdot z\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.5000000000000002e221 or 1.6e19 < a

    1. Initial program 93.5%

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

      \[\leadsto \color{blue}{-0.25 \cdot \left(a \cdot b\right)} + c \]
    3. Step-by-step derivation
      1. *-commutative66.0%

        \[\leadsto \color{blue}{\left(a \cdot b\right) \cdot -0.25} + c \]
      2. associate-*l*67.1%

        \[\leadsto \color{blue}{a \cdot \left(b \cdot -0.25\right)} + c \]
    4. Simplified67.1%

      \[\leadsto \color{blue}{a \cdot \left(b \cdot -0.25\right)} + c \]

    if -3.5000000000000002e221 < a < 1.6e19

    1. Initial program 98.3%

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

      \[\leadsto \color{blue}{\left(y \cdot x + 0.0625 \cdot \left(t \cdot z\right)\right)} + c \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+221} \lor \neg \left(a \leq 1.6 \cdot 10^{+19}\right):\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{else}:\\ \;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(t \cdot z\right)\right)\\ \end{array} \]

Alternative 7: 54.0% accurate, 1.3× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} \mathbf{if}\;a \leq -7.3 \cdot 10^{+252} \lor \neg \left(a \leq -4.1 \cdot 10^{+249}\right) \land \left(a \leq -3.5 \cdot 10^{+221} \lor \neg \left(a \leq 1.5 \cdot 10^{+19}\right)\right):\\ \;\;\;\;b \cdot \left(a \cdot -0.25\right)\\ \mathbf{else}:\\ \;\;\;\;c + x \cdot y\\ \end{array} \end{array} \]
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (if (or (<= a -7.3e+252)
         (and (not (<= a -4.1e+249))
              (or (<= a -3.5e+221) (not (<= a 1.5e+19)))))
   (* b (* a -0.25))
   (+ c (* x y))))
assert(z < t);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((a <= -7.3e+252) || (!(a <= -4.1e+249) && ((a <= -3.5e+221) || !(a <= 1.5e+19)))) {
		tmp = b * (a * -0.25);
	} else {
		tmp = c + (x * y);
	}
	return tmp;
}
NOTE: z and t 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) :: tmp
    if ((a <= (-7.3d+252)) .or. (.not. (a <= (-4.1d+249))) .and. (a <= (-3.5d+221)) .or. (.not. (a <= 1.5d+19))) then
        tmp = b * (a * (-0.25d0))
    else
        tmp = c + (x * y)
    end if
    code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((a <= -7.3e+252) || (!(a <= -4.1e+249) && ((a <= -3.5e+221) || !(a <= 1.5e+19)))) {
		tmp = b * (a * -0.25);
	} else {
		tmp = c + (x * y);
	}
	return tmp;
}
[z, t] = sort([z, t])
def code(x, y, z, t, a, b, c):
	tmp = 0
	if (a <= -7.3e+252) or (not (a <= -4.1e+249) and ((a <= -3.5e+221) or not (a <= 1.5e+19))):
		tmp = b * (a * -0.25)
	else:
		tmp = c + (x * y)
	return tmp
z, t = sort([z, t])
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if ((a <= -7.3e+252) || (!(a <= -4.1e+249) && ((a <= -3.5e+221) || !(a <= 1.5e+19))))
		tmp = Float64(b * Float64(a * -0.25));
	else
		tmp = Float64(c + Float64(x * y));
	end
	return tmp
end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
	tmp = 0.0;
	if ((a <= -7.3e+252) || (~((a <= -4.1e+249)) && ((a <= -3.5e+221) || ~((a <= 1.5e+19)))))
		tmp = b * (a * -0.25);
	else
		tmp = c + (x * y);
	end
	tmp_2 = tmp;
end
NOTE: z and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[a, -7.3e+252], And[N[Not[LessEqual[a, -4.1e+249]], $MachinePrecision], Or[LessEqual[a, -3.5e+221], N[Not[LessEqual[a, 1.5e+19]], $MachinePrecision]]]], N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.3 \cdot 10^{+252} \lor \neg \left(a \leq -4.1 \cdot 10^{+249}\right) \land \left(a \leq -3.5 \cdot 10^{+221} \lor \neg \left(a \leq 1.5 \cdot 10^{+19}\right)\right):\\
\;\;\;\;b \cdot \left(a \cdot -0.25\right)\\

\mathbf{else}:\\
\;\;\;\;c + x \cdot y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.2999999999999997e252 or -4.0999999999999997e249 < a < -3.5000000000000002e221 or 1.5e19 < a

    1. Initial program 93.4%

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

      \[\leadsto \color{blue}{\left(c + 0.0625 \cdot \left(t \cdot z\right)\right) - 0.25 \cdot \left(a \cdot b\right)} \]
    3. Step-by-step derivation
      1. +-commutative80.1%

        \[\leadsto \color{blue}{\left(0.0625 \cdot \left(t \cdot z\right) + c\right)} - 0.25 \cdot \left(a \cdot b\right) \]
      2. *-commutative80.1%

        \[\leadsto \left(0.0625 \cdot \color{blue}{\left(z \cdot t\right)} + c\right) - 0.25 \cdot \left(a \cdot b\right) \]
      3. *-commutative80.1%

        \[\leadsto \left(\color{blue}{\left(z \cdot t\right) \cdot 0.0625} + c\right) - 0.25 \cdot \left(a \cdot b\right) \]
      4. associate-*r*80.1%

        \[\leadsto \left(\color{blue}{z \cdot \left(t \cdot 0.0625\right)} + c\right) - 0.25 \cdot \left(a \cdot b\right) \]
      5. *-commutative80.1%

        \[\leadsto \left(z \cdot \left(t \cdot 0.0625\right) + c\right) - \color{blue}{\left(a \cdot b\right) \cdot 0.25} \]
      6. *-commutative80.1%

        \[\leadsto \left(z \cdot \left(t \cdot 0.0625\right) + c\right) - \color{blue}{\left(b \cdot a\right)} \cdot 0.25 \]
      7. associate-*r*81.2%

        \[\leadsto \left(z \cdot \left(t \cdot 0.0625\right) + c\right) - \color{blue}{b \cdot \left(a \cdot 0.25\right)} \]
      8. associate--l+81.2%

        \[\leadsto \color{blue}{z \cdot \left(t \cdot 0.0625\right) + \left(c - b \cdot \left(a \cdot 0.25\right)\right)} \]
      9. associate-*r*81.2%

        \[\leadsto \color{blue}{\left(z \cdot t\right) \cdot 0.0625} + \left(c - b \cdot \left(a \cdot 0.25\right)\right) \]
      10. *-commutative81.2%

        \[\leadsto \color{blue}{0.0625 \cdot \left(z \cdot t\right)} + \left(c - b \cdot \left(a \cdot 0.25\right)\right) \]
      11. *-commutative81.2%

        \[\leadsto 0.0625 \cdot \color{blue}{\left(t \cdot z\right)} + \left(c - b \cdot \left(a \cdot 0.25\right)\right) \]
      12. sub-neg81.2%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \color{blue}{\left(c + \left(-b \cdot \left(a \cdot 0.25\right)\right)\right)} \]
      13. +-commutative81.2%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \color{blue}{\left(\left(-b \cdot \left(a \cdot 0.25\right)\right) + c\right)} \]
      14. distribute-rgt-neg-in81.2%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \left(\color{blue}{b \cdot \left(-a \cdot 0.25\right)} + c\right) \]
      15. fma-def81.3%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \color{blue}{\mathsf{fma}\left(b, -a \cdot 0.25, c\right)} \]
      16. distribute-rgt-neg-in81.3%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \mathsf{fma}\left(b, \color{blue}{a \cdot \left(-0.25\right)}, c\right) \]
      17. metadata-eval81.3%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \mathsf{fma}\left(b, a \cdot \color{blue}{-0.25}, c\right) \]
    4. Simplified81.3%

      \[\leadsto \color{blue}{0.0625 \cdot \left(t \cdot z\right) + \mathsf{fma}\left(b, a \cdot -0.25, c\right)} \]
    5. Taylor expanded in b around inf 55.9%

      \[\leadsto \color{blue}{-0.25 \cdot \left(a \cdot b\right)} \]
    6. Step-by-step derivation
      1. *-commutative55.9%

        \[\leadsto \color{blue}{\left(a \cdot b\right) \cdot -0.25} \]
      2. *-commutative55.9%

        \[\leadsto \color{blue}{\left(b \cdot a\right)} \cdot -0.25 \]
      3. associate-*r*57.0%

        \[\leadsto \color{blue}{b \cdot \left(a \cdot -0.25\right)} \]
      4. *-commutative57.0%

        \[\leadsto b \cdot \color{blue}{\left(-0.25 \cdot a\right)} \]
    7. Simplified57.0%

      \[\leadsto \color{blue}{b \cdot \left(-0.25 \cdot a\right)} \]

    if -7.2999999999999997e252 < a < -4.0999999999999997e249 or -3.5000000000000002e221 < a < 1.5e19

    1. Initial program 98.4%

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

      \[\leadsto \color{blue}{y \cdot x} + c \]
  3. Recombined 2 regimes into one program.
  4. Final simplification57.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.3 \cdot 10^{+252} \lor \neg \left(a \leq -4.1 \cdot 10^{+249}\right) \land \left(a \leq -3.5 \cdot 10^{+221} \lor \neg \left(a \leq 1.5 \cdot 10^{+19}\right)\right):\\ \;\;\;\;b \cdot \left(a \cdot -0.25\right)\\ \mathbf{else}:\\ \;\;\;\;c + x \cdot y\\ \end{array} \]

Alternative 8: 60.6% accurate, 1.3× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} t_1 := c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{if}\;b \leq -1.14 \cdot 10^{-7}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.36 \cdot 10^{-223}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{+63}:\\ \;\;\;\;c + 0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (+ c (* a (* b -0.25)))))
   (if (<= b -1.14e-7)
     t_1
     (if (<= b 1.36e-223)
       (+ c (* x y))
       (if (<= b 2.8e+63) (+ c (* 0.0625 (* t z))) t_1)))))
assert(z < t);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = c + (a * (b * -0.25));
	double tmp;
	if (b <= -1.14e-7) {
		tmp = t_1;
	} else if (b <= 1.36e-223) {
		tmp = c + (x * y);
	} else if (b <= 2.8e+63) {
		tmp = c + (0.0625 * (t * z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: z and t 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 = c + (a * (b * (-0.25d0)))
    if (b <= (-1.14d-7)) then
        tmp = t_1
    else if (b <= 1.36d-223) then
        tmp = c + (x * y)
    else if (b <= 2.8d+63) then
        tmp = c + (0.0625d0 * (t * z))
    else
        tmp = t_1
    end if
    code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = c + (a * (b * -0.25));
	double tmp;
	if (b <= -1.14e-7) {
		tmp = t_1;
	} else if (b <= 1.36e-223) {
		tmp = c + (x * y);
	} else if (b <= 2.8e+63) {
		tmp = c + (0.0625 * (t * z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
[z, t] = sort([z, t])
def code(x, y, z, t, a, b, c):
	t_1 = c + (a * (b * -0.25))
	tmp = 0
	if b <= -1.14e-7:
		tmp = t_1
	elif b <= 1.36e-223:
		tmp = c + (x * y)
	elif b <= 2.8e+63:
		tmp = c + (0.0625 * (t * z))
	else:
		tmp = t_1
	return tmp
z, t = sort([z, t])
function code(x, y, z, t, a, b, c)
	t_1 = Float64(c + Float64(a * Float64(b * -0.25)))
	tmp = 0.0
	if (b <= -1.14e-7)
		tmp = t_1;
	elseif (b <= 1.36e-223)
		tmp = Float64(c + Float64(x * y));
	elseif (b <= 2.8e+63)
		tmp = Float64(c + Float64(0.0625 * Float64(t * z)));
	else
		tmp = t_1;
	end
	return tmp
end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = c + (a * (b * -0.25));
	tmp = 0.0;
	if (b <= -1.14e-7)
		tmp = t_1;
	elseif (b <= 1.36e-223)
		tmp = c + (x * y);
	elseif (b <= 2.8e+63)
		tmp = c + (0.0625 * (t * z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: z and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.14e-7], t$95$1, If[LessEqual[b, 1.36e-223], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.8e+63], N[(c + N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := c + a \cdot \left(b \cdot -0.25\right)\\
\mathbf{if}\;b \leq -1.14 \cdot 10^{-7}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 1.36 \cdot 10^{-223}:\\
\;\;\;\;c + x \cdot y\\

\mathbf{elif}\;b \leq 2.8 \cdot 10^{+63}:\\
\;\;\;\;c + 0.0625 \cdot \left(t \cdot z\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.14000000000000002e-7 or 2.79999999999999987e63 < b

    1. Initial program 93.7%

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

      \[\leadsto \color{blue}{-0.25 \cdot \left(a \cdot b\right)} + c \]
    3. Step-by-step derivation
      1. *-commutative63.6%

        \[\leadsto \color{blue}{\left(a \cdot b\right) \cdot -0.25} + c \]
      2. associate-*l*64.3%

        \[\leadsto \color{blue}{a \cdot \left(b \cdot -0.25\right)} + c \]
    4. Simplified64.3%

      \[\leadsto \color{blue}{a \cdot \left(b \cdot -0.25\right)} + c \]

    if -1.14000000000000002e-7 < b < 1.35999999999999997e-223

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{y \cdot x} + c \]

    if 1.35999999999999997e-223 < b < 2.79999999999999987e63

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{0.0625 \cdot \left(t \cdot z\right)} + c \]
  3. Recombined 3 regimes into one program.
  4. Final simplification64.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.14 \cdot 10^{-7}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;b \leq 1.36 \cdot 10^{-223}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{+63}:\\ \;\;\;\;c + 0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \end{array} \]

Alternative 9: 39.2% accurate, 1.5× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} t_1 := 0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{if}\;t \leq -9 \cdot 10^{-48}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-44}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{+86}:\\ \;\;\;\;c\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* 0.0625 (* t z))))
   (if (<= t -9e-48)
     t_1
     (if (<= t 2.3e-44) (* x y) (if (<= t 2.9e+86) c t_1)))))
assert(z < t);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = 0.0625 * (t * z);
	double tmp;
	if (t <= -9e-48) {
		tmp = t_1;
	} else if (t <= 2.3e-44) {
		tmp = x * y;
	} else if (t <= 2.9e+86) {
		tmp = c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: z and t 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 = 0.0625d0 * (t * z)
    if (t <= (-9d-48)) then
        tmp = t_1
    else if (t <= 2.3d-44) then
        tmp = x * y
    else if (t <= 2.9d+86) then
        tmp = c
    else
        tmp = t_1
    end if
    code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = 0.0625 * (t * z);
	double tmp;
	if (t <= -9e-48) {
		tmp = t_1;
	} else if (t <= 2.3e-44) {
		tmp = x * y;
	} else if (t <= 2.9e+86) {
		tmp = c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
[z, t] = sort([z, t])
def code(x, y, z, t, a, b, c):
	t_1 = 0.0625 * (t * z)
	tmp = 0
	if t <= -9e-48:
		tmp = t_1
	elif t <= 2.3e-44:
		tmp = x * y
	elif t <= 2.9e+86:
		tmp = c
	else:
		tmp = t_1
	return tmp
z, t = sort([z, t])
function code(x, y, z, t, a, b, c)
	t_1 = Float64(0.0625 * Float64(t * z))
	tmp = 0.0
	if (t <= -9e-48)
		tmp = t_1;
	elseif (t <= 2.3e-44)
		tmp = Float64(x * y);
	elseif (t <= 2.9e+86)
		tmp = c;
	else
		tmp = t_1;
	end
	return tmp
end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = 0.0625 * (t * z);
	tmp = 0.0;
	if (t <= -9e-48)
		tmp = t_1;
	elseif (t <= 2.3e-44)
		tmp = x * y;
	elseif (t <= 2.9e+86)
		tmp = c;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: z and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9e-48], t$95$1, If[LessEqual[t, 2.3e-44], N[(x * y), $MachinePrecision], If[LessEqual[t, 2.9e+86], c, t$95$1]]]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(t \cdot z\right)\\
\mathbf{if}\;t \leq -9 \cdot 10^{-48}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2.3 \cdot 10^{-44}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;t \leq 2.9 \cdot 10^{+86}:\\
\;\;\;\;c\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.99999999999999977e-48 or 2.8999999999999999e86 < t

    1. Initial program 97.4%

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

      \[\leadsto \color{blue}{\left(c + 0.0625 \cdot \left(t \cdot z\right)\right) - 0.25 \cdot \left(a \cdot b\right)} \]
    3. Step-by-step derivation
      1. +-commutative82.2%

        \[\leadsto \color{blue}{\left(0.0625 \cdot \left(t \cdot z\right) + c\right)} - 0.25 \cdot \left(a \cdot b\right) \]
      2. *-commutative82.2%

        \[\leadsto \left(0.0625 \cdot \color{blue}{\left(z \cdot t\right)} + c\right) - 0.25 \cdot \left(a \cdot b\right) \]
      3. *-commutative82.2%

        \[\leadsto \left(\color{blue}{\left(z \cdot t\right) \cdot 0.0625} + c\right) - 0.25 \cdot \left(a \cdot b\right) \]
      4. associate-*r*82.2%

        \[\leadsto \left(\color{blue}{z \cdot \left(t \cdot 0.0625\right)} + c\right) - 0.25 \cdot \left(a \cdot b\right) \]
      5. *-commutative82.2%

        \[\leadsto \left(z \cdot \left(t \cdot 0.0625\right) + c\right) - \color{blue}{\left(a \cdot b\right) \cdot 0.25} \]
      6. *-commutative82.2%

        \[\leadsto \left(z \cdot \left(t \cdot 0.0625\right) + c\right) - \color{blue}{\left(b \cdot a\right)} \cdot 0.25 \]
      7. associate-*r*82.2%

        \[\leadsto \left(z \cdot \left(t \cdot 0.0625\right) + c\right) - \color{blue}{b \cdot \left(a \cdot 0.25\right)} \]
      8. associate--l+82.2%

        \[\leadsto \color{blue}{z \cdot \left(t \cdot 0.0625\right) + \left(c - b \cdot \left(a \cdot 0.25\right)\right)} \]
      9. associate-*r*82.2%

        \[\leadsto \color{blue}{\left(z \cdot t\right) \cdot 0.0625} + \left(c - b \cdot \left(a \cdot 0.25\right)\right) \]
      10. *-commutative82.2%

        \[\leadsto \color{blue}{0.0625 \cdot \left(z \cdot t\right)} + \left(c - b \cdot \left(a \cdot 0.25\right)\right) \]
      11. *-commutative82.2%

        \[\leadsto 0.0625 \cdot \color{blue}{\left(t \cdot z\right)} + \left(c - b \cdot \left(a \cdot 0.25\right)\right) \]
      12. sub-neg82.2%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \color{blue}{\left(c + \left(-b \cdot \left(a \cdot 0.25\right)\right)\right)} \]
      13. +-commutative82.2%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \color{blue}{\left(\left(-b \cdot \left(a \cdot 0.25\right)\right) + c\right)} \]
      14. distribute-rgt-neg-in82.2%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \left(\color{blue}{b \cdot \left(-a \cdot 0.25\right)} + c\right) \]
      15. fma-def82.2%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \color{blue}{\mathsf{fma}\left(b, -a \cdot 0.25, c\right)} \]
      16. distribute-rgt-neg-in82.2%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \mathsf{fma}\left(b, \color{blue}{a \cdot \left(-0.25\right)}, c\right) \]
      17. metadata-eval82.2%

        \[\leadsto 0.0625 \cdot \left(t \cdot z\right) + \mathsf{fma}\left(b, a \cdot \color{blue}{-0.25}, c\right) \]
    4. Simplified82.2%

      \[\leadsto \color{blue}{0.0625 \cdot \left(t \cdot z\right) + \mathsf{fma}\left(b, a \cdot -0.25, c\right)} \]
    5. Taylor expanded in t around inf 49.0%

      \[\leadsto \color{blue}{0.0625 \cdot \left(t \cdot z\right)} \]

    if -8.99999999999999977e-48 < t < 2.29999999999999998e-44

    1. Initial program 97.3%

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

      \[\leadsto \color{blue}{y \cdot x} + c \]
    3. Taylor expanded in y around inf 33.0%

      \[\leadsto \color{blue}{y \cdot x} \]

    if 2.29999999999999998e-44 < t < 2.8999999999999999e86

    1. Initial program 93.3%

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

      \[\leadsto \color{blue}{c} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification40.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{-48}:\\ \;\;\;\;0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-44}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{+86}:\\ \;\;\;\;c\\ \mathbf{else}:\\ \;\;\;\;0.0625 \cdot \left(t \cdot z\right)\\ \end{array} \]

Alternative 10: 59.6% accurate, 1.5× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -1.42 \cdot 10^{+26} \lor \neg \left(y \leq 4 \cdot 10^{+52}\right):\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c + 0.0625 \cdot \left(t \cdot z\right)\\ \end{array} \end{array} \]
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (if (or (<= y -1.42e+26) (not (<= y 4e+52)))
   (+ c (* x y))
   (+ c (* 0.0625 (* t z)))))
assert(z < t);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((y <= -1.42e+26) || !(y <= 4e+52)) {
		tmp = c + (x * y);
	} else {
		tmp = c + (0.0625 * (t * z));
	}
	return tmp;
}
NOTE: z and t 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) :: tmp
    if ((y <= (-1.42d+26)) .or. (.not. (y <= 4d+52))) then
        tmp = c + (x * y)
    else
        tmp = c + (0.0625d0 * (t * z))
    end if
    code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((y <= -1.42e+26) || !(y <= 4e+52)) {
		tmp = c + (x * y);
	} else {
		tmp = c + (0.0625 * (t * z));
	}
	return tmp;
}
[z, t] = sort([z, t])
def code(x, y, z, t, a, b, c):
	tmp = 0
	if (y <= -1.42e+26) or not (y <= 4e+52):
		tmp = c + (x * y)
	else:
		tmp = c + (0.0625 * (t * z))
	return tmp
z, t = sort([z, t])
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if ((y <= -1.42e+26) || !(y <= 4e+52))
		tmp = Float64(c + Float64(x * y));
	else
		tmp = Float64(c + Float64(0.0625 * Float64(t * z)));
	end
	return tmp
end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
	tmp = 0.0;
	if ((y <= -1.42e+26) || ~((y <= 4e+52)))
		tmp = c + (x * y);
	else
		tmp = c + (0.0625 * (t * z));
	end
	tmp_2 = tmp;
end
NOTE: z and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[y, -1.42e+26], N[Not[LessEqual[y, 4e+52]], $MachinePrecision]], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], N[(c + N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.42 \cdot 10^{+26} \lor \neg \left(y \leq 4 \cdot 10^{+52}\right):\\
\;\;\;\;c + x \cdot y\\

\mathbf{else}:\\
\;\;\;\;c + 0.0625 \cdot \left(t \cdot z\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.42e26 or 4e52 < y

    1. Initial program 95.1%

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

      \[\leadsto \color{blue}{y \cdot x} + c \]

    if -1.42e26 < y < 4e52

    1. Initial program 98.5%

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

      \[\leadsto \color{blue}{0.0625 \cdot \left(t \cdot z\right)} + c \]
  3. Recombined 2 regimes into one program.
  4. Final simplification63.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.42 \cdot 10^{+26} \lor \neg \left(y \leq 4 \cdot 10^{+52}\right):\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c + 0.0625 \cdot \left(t \cdot z\right)\\ \end{array} \]

Alternative 11: 36.8% accurate, 2.4× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} \mathbf{if}\;c \leq -1.02 \cdot 10^{+127}:\\ \;\;\;\;c\\ \mathbf{elif}\;c \leq 6.6 \cdot 10^{-29}:\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array} \end{array} \]
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
 :precision binary64
 (if (<= c -1.02e+127) c (if (<= c 6.6e-29) (* x y) c)))
assert(z < t);
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (c <= -1.02e+127) {
		tmp = c;
	} else if (c <= 6.6e-29) {
		tmp = x * y;
	} else {
		tmp = c;
	}
	return tmp;
}
NOTE: z and t 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) :: tmp
    if (c <= (-1.02d+127)) then
        tmp = c
    else if (c <= 6.6d-29) then
        tmp = x * y
    else
        tmp = c
    end if
    code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (c <= -1.02e+127) {
		tmp = c;
	} else if (c <= 6.6e-29) {
		tmp = x * y;
	} else {
		tmp = c;
	}
	return tmp;
}
[z, t] = sort([z, t])
def code(x, y, z, t, a, b, c):
	tmp = 0
	if c <= -1.02e+127:
		tmp = c
	elif c <= 6.6e-29:
		tmp = x * y
	else:
		tmp = c
	return tmp
z, t = sort([z, t])
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (c <= -1.02e+127)
		tmp = c;
	elseif (c <= 6.6e-29)
		tmp = Float64(x * y);
	else
		tmp = c;
	end
	return tmp
end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
	tmp = 0.0;
	if (c <= -1.02e+127)
		tmp = c;
	elseif (c <= 6.6e-29)
		tmp = x * y;
	else
		tmp = c;
	end
	tmp_2 = tmp;
end
NOTE: z and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -1.02e+127], c, If[LessEqual[c, 6.6e-29], N[(x * y), $MachinePrecision], c]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.02 \cdot 10^{+127}:\\
\;\;\;\;c\\

\mathbf{elif}\;c \leq 6.6 \cdot 10^{-29}:\\
\;\;\;\;x \cdot y\\

\mathbf{else}:\\
\;\;\;\;c\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -1.02e127 or 6.60000000000000055e-29 < c

    1. Initial program 95.5%

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

      \[\leadsto \color{blue}{c} \]

    if -1.02e127 < c < 6.60000000000000055e-29

    1. Initial program 98.0%

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

      \[\leadsto \color{blue}{y \cdot x} + c \]
    3. Taylor expanded in y around inf 35.2%

      \[\leadsto \color{blue}{y \cdot x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification41.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -1.02 \cdot 10^{+127}:\\ \;\;\;\;c\\ \mathbf{elif}\;c \leq 6.6 \cdot 10^{-29}:\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array} \]

Alternative 12: 23.0% accurate, 17.0× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ c \end{array} \]
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c) :precision binary64 c)
assert(z < t);
double code(double x, double y, double z, double t, double a, double b, double c) {
	return c;
}
NOTE: z and t 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 = c
end function
assert z < t;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	return c;
}
[z, t] = sort([z, t])
def code(x, y, z, t, a, b, c):
	return c
z, t = sort([z, t])
function code(x, y, z, t, a, b, c)
	return c
end
z, t = num2cell(sort([z, t])){:}
function tmp = code(x, y, z, t, a, b, c)
	tmp = c;
end
NOTE: z and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := c
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
c
\end{array}
Derivation
  1. Initial program 96.9%

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

    \[\leadsto \color{blue}{c} \]
  3. Final simplification25.8%

    \[\leadsto c \]

Reproduce

?
herbie shell --seed 2023174 
(FPCore (x y z t a b c)
  :name "Diagrams.Solve.Polynomial:quartForm  from diagrams-solve-0.1, C"
  :precision binary64
  (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))