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

Percentage Accurate: 97.7% → 98.1%
Time: 9.9s
Alternatives: 17
Speedup: 1.0×

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 17 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.7% 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.1% accurate, 0.1× speedup?

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

    \[\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-98.0%

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

      \[\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-198.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 66.8% accurate, 0.5× speedup?

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

\mathbf{elif}\;a \cdot b \leq -1 \cdot 10^{-94}:\\
\;\;\;\;c + x \cdot y\\

\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{-281}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;a \cdot b \leq 4 \cdot 10^{-116}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{-32}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;a \cdot b \leq 10^{+20}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_4\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 a b) < -4.9999999999999997e104 or 1e20 < (*.f64 a b)

    1. Initial program 98.1%

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

      \[\leadsto \color{blue}{\left(c + y \cdot x\right) - 0.25 \cdot \left(a \cdot b\right)} \]
    3. Taylor expanded in c around 0 82.4%

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

    if -4.9999999999999997e104 < (*.f64 a b) < -9.9999999999999996e-95

    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 a around 0 90.2%

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

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

    if -9.9999999999999996e-95 < (*.f64 a b) < 2e-281 or 4e-116 < (*.f64 a b) < 5e-32

    1. Initial program 98.6%

      \[\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-98.6%

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

        \[\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-198.6%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, \frac{z}{\frac{16}{t}}\right) - \left(\frac{a}{\frac{4}{b}} - c\right)} \]
    4. Step-by-step derivation
      1. fma-udef98.5%

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

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

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

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

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

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

      \[\leadsto \left(\left(z \cdot t\right) \cdot 0.0625 + x \cdot y\right) - \color{blue}{0.25 \cdot \left(a \cdot b\right)} \]
    7. Taylor expanded in a around 0 77.3%

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

    if 2e-281 < (*.f64 a b) < 4e-116 or 5e-32 < (*.f64 a b) < 1e20

    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 a around 0 91.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+104}:\\ \;\;\;\;x \cdot y - \left(a \cdot b\right) \cdot 0.25\\ \mathbf{elif}\;a \cdot b \leq -1 \cdot 10^{-94}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{-281}:\\ \;\;\;\;x \cdot y + \left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;a \cdot b \leq 4 \cdot 10^{-116}:\\ \;\;\;\;c + \left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{-32}:\\ \;\;\;\;x \cdot y + \left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;a \cdot b \leq 10^{+20}:\\ \;\;\;\;c + \left(z \cdot t\right) \cdot 0.0625\\ \mathbf{else}:\\ \;\;\;\;x \cdot y - \left(a \cdot b\right) \cdot 0.25\\ \end{array} \]

Alternative 3: 90.1% accurate, 0.7× speedup?

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

\mathbf{else}:\\
\;\;\;\;\left(c + x \cdot y\right) - t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z t) < -9.99999999999999957e110 or 1.0000000000000001e-33 < (*.f64 z t)

    1. Initial program 96.4%

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

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

        \[\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-196.4%

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

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

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

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

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

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

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

        \[\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*98.9%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, \frac{z}{\frac{16}{t}}\right) - \left(\frac{a}{\frac{4}{b}} - c\right)} \]
    4. Step-by-step derivation
      1. fma-udef96.2%

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

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

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

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

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

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

      \[\leadsto \left(\left(z \cdot t\right) \cdot 0.0625 + x \cdot y\right) - \color{blue}{0.25 \cdot \left(a \cdot b\right)} \]

    if -9.99999999999999957e110 < (*.f64 z t) < 1.0000000000000001e-33

    1. Initial program 99.3%

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

      \[\leadsto \color{blue}{\left(c + y \cdot x\right) - 0.25 \cdot \left(a \cdot b\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.2%

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

Alternative 4: 84.7% accurate, 0.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a b) < -5e112 or 1e20 < (*.f64 a b)

    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 z around 0 86.7%

      \[\leadsto \color{blue}{\left(c + y \cdot x\right) - 0.25 \cdot \left(a \cdot b\right)} \]
    3. Taylor expanded in c around 0 82.8%

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

    if -5e112 < (*.f64 a b) < 1e20

    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 a around 0 93.0%

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

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

Alternative 5: 84.8% accurate, 0.9× speedup?

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

\mathbf{elif}\;a \cdot b \leq 10^{+20}:\\
\;\;\;\;c + \left(x \cdot y + t_2\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot y - t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a b) < -5e112

    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 0 91.7%

      \[\leadsto \color{blue}{\left(c + 0.0625 \cdot \left(t \cdot z\right)\right) - 0.25 \cdot \left(a \cdot b\right)} \]
    3. Taylor expanded in c around 0 87.7%

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

    if -5e112 < (*.f64 a b) < 1e20

    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 a around 0 93.0%

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

    if 1e20 < (*.f64 a b)

    1. Initial program 95.8%

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

      \[\leadsto \color{blue}{\left(c + y \cdot x\right) - 0.25 \cdot \left(a \cdot b\right)} \]
    3. Taylor expanded in c around 0 85.8%

      \[\leadsto \color{blue}{y \cdot x - 0.25 \cdot \left(a \cdot b\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification90.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+112}:\\ \;\;\;\;\left(z \cdot t\right) \cdot 0.0625 - \left(a \cdot b\right) \cdot 0.25\\ \mathbf{elif}\;a \cdot b \leq 10^{+20}:\\ \;\;\;\;c + \left(x \cdot y + \left(z \cdot t\right) \cdot 0.0625\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y - \left(a \cdot b\right) \cdot 0.25\\ \end{array} \]

Alternative 6: 87.7% accurate, 0.9× speedup?

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

\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+16}:\\
\;\;\;\;c + \left(x \cdot y + t_1\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot y + \left(c - \frac{a}{\frac{4}{b}}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a b) < -5e112

    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 0 91.7%

      \[\leadsto \color{blue}{\left(c + 0.0625 \cdot \left(t \cdot z\right)\right) - 0.25 \cdot \left(a \cdot b\right)} \]
    3. Taylor expanded in c around 0 87.7%

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

    if -5e112 < (*.f64 a b) < 5e16

    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 a around 0 93.7%

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

    if 5e16 < (*.f64 a b)

    1. Initial program 96.0%

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

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

        \[\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-196.0%

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

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

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

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

        \[\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*97.9%

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

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

        \[\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*97.8%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, \frac{z}{\frac{16}{t}}\right) - \left(\frac{a}{\frac{4}{b}} - c\right)} \]
    4. Step-by-step derivation
      1. fma-udef95.8%

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

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

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

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

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

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

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

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

Alternative 7: 87.7% accurate, 0.9× speedup?

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

\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+16}:\\
\;\;\;\;c + \left(x \cdot y + t_2\right)\\

\mathbf{else}:\\
\;\;\;\;\left(c + x \cdot y\right) - t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a b) < -5e112

    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 0 91.7%

      \[\leadsto \color{blue}{\left(c + 0.0625 \cdot \left(t \cdot z\right)\right) - 0.25 \cdot \left(a \cdot b\right)} \]
    3. Taylor expanded in c around 0 87.7%

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

    if -5e112 < (*.f64 a b) < 5e16

    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 a around 0 93.7%

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

    if 5e16 < (*.f64 a b)

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

      \[\leadsto \color{blue}{\left(c + y \cdot x\right) - 0.25 \cdot \left(a \cdot b\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification91.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+112}:\\ \;\;\;\;\left(z \cdot t\right) \cdot 0.0625 - \left(a \cdot b\right) \cdot 0.25\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+16}:\\ \;\;\;\;c + \left(x \cdot y + \left(z \cdot t\right) \cdot 0.0625\right)\\ \mathbf{else}:\\ \;\;\;\;\left(c + x \cdot y\right) - \left(a \cdot b\right) \cdot 0.25\\ \end{array} \]

Alternative 8: 88.8% accurate, 0.9× speedup?

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

\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+16}:\\
\;\;\;\;c + \left(x \cdot y + t_1\right)\\

\mathbf{else}:\\
\;\;\;\;\left(c + x \cdot y\right) - t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a b) < -5e112

    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 0 91.7%

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

    if -5e112 < (*.f64 a b) < 5e16

    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 a around 0 93.7%

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

    if 5e16 < (*.f64 a b)

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

      \[\leadsto \color{blue}{\left(c + y \cdot x\right) - 0.25 \cdot \left(a \cdot b\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification92.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+112}:\\ \;\;\;\;\left(c + \left(z \cdot t\right) \cdot 0.0625\right) - \left(a \cdot b\right) \cdot 0.25\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+16}:\\ \;\;\;\;c + \left(x \cdot y + \left(z \cdot t\right) \cdot 0.0625\right)\\ \mathbf{else}:\\ \;\;\;\;\left(c + x \cdot y\right) - \left(a \cdot b\right) \cdot 0.25\\ \end{array} \]

Alternative 9: 55.8% accurate, 1.0× speedup?

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

\mathbf{elif}\;z \leq -1.95 \cdot 10^{-204}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -4.2 \cdot 10^{-248}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;z \leq 9.4 \cdot 10^{-154}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 5.7 \cdot 10^{-18}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.24999999999999994e123 or 5.69999999999999971e-18 < z

    1. Initial program 97.1%

      \[\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 79.4%

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

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

    if -1.24999999999999994e123 < z < -1.95e-204 or -4.2e-248 < z < 9.4000000000000003e-154

    1. Initial program 98.2%

      \[\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 68.0%

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

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

    if -1.95e-204 < z < -4.2e-248 or 9.4000000000000003e-154 < z < 5.69999999999999971e-18

    1. Initial program 100.0%

      \[\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-100.0%

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

        \[\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-1100.0%

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

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

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

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

        \[\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*100.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, \frac{z}{\frac{16}{t}}\right) - \left(\frac{a}{\frac{4}{b}} - c\right)} \]
    4. Step-by-step derivation
      1. fma-udef99.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a \cdot \left(b \cdot -0.25\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification59.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+123}:\\ \;\;\;\;c + \left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;z \leq -1.95 \cdot 10^{-204}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-248}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;z \leq 9.4 \cdot 10^{-154}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;z \leq 5.7 \cdot 10^{-18}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \mathbf{else}:\\ \;\;\;\;c + \left(z \cdot t\right) \cdot 0.0625\\ \end{array} \]

Alternative 10: 59.8% accurate, 1.0× speedup?

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

\mathbf{else}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.4000000000000002e158 or -1.12000000000000003e104 < z < -1.90000000000000014e-8 or 2.6999999999999998e-110 < z

    1. Initial program 97.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-97.9%

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

        \[\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-197.9%

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

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

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

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

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

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

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

        \[\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)} \]
    4. Step-by-step derivation
      1. fma-udef97.7%

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

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

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

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

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

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

      \[\leadsto \left(\left(z \cdot t\right) \cdot 0.0625 + x \cdot y\right) - \color{blue}{0.25 \cdot \left(a \cdot b\right)} \]
    7. Taylor expanded in a around 0 63.9%

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

    if -4.4000000000000002e158 < z < -1.12000000000000003e104 or -1.90000000000000014e-8 < z < 2.6999999999999998e-110

    1. Initial program 98.2%

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

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

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

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

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

      \[\leadsto \color{blue}{b \cdot \left(a \cdot -0.25\right)} + c \]
  3. Recombined 2 regimes into one program.
  4. Final simplification63.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{+158} \lor \neg \left(z \leq -1.12 \cdot 10^{+104} \lor \neg \left(z \leq -1.9 \cdot 10^{-8}\right) \land z \leq 2.7 \cdot 10^{-110}\right):\\ \;\;\;\;x \cdot y + \left(z \cdot t\right) \cdot 0.0625\\ \mathbf{else}:\\ \;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\ \end{array} \]

Alternative 11: 97.7% accurate, 1.0× speedup?

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

    \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c \]
  2. Final simplification98.0%

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

Alternative 12: 56.8% accurate, 1.3× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.80000000000000025e179 or -1.0499999999999999e141 < a < -4.09999999999999985e89 or 2.9e-49 < a

    1. Initial program 97.5%

      \[\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-97.5%

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

        \[\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-197.5%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, \frac{z}{\frac{16}{t}}\right) - \left(\frac{a}{\frac{4}{b}} - c\right)} \]
    4. Step-by-step derivation
      1. fma-udef97.4%

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

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

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

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

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

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

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

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

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

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

    if -4.80000000000000025e179 < a < -1.0499999999999999e141 or -4.09999999999999985e89 < a < 2.9e-49

    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 a around 0 87.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.8 \cdot 10^{+179} \lor \neg \left(a \leq -1.05 \cdot 10^{+141}\right) \land \left(a \leq -4.1 \cdot 10^{+89} \lor \neg \left(a \leq 2.9 \cdot 10^{-49}\right)\right):\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \mathbf{else}:\\ \;\;\;\;c + x \cdot y\\ \end{array} \]

Alternative 13: 40.5% accurate, 1.3× speedup?

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

\mathbf{elif}\;b \leq -6 \cdot 10^{-191}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;b \leq -6.3 \cdot 10^{-293}:\\
\;\;\;\;c\\

\mathbf{elif}\;b \leq 2.2 \cdot 10^{+39}:\\
\;\;\;\;x \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.35000000000000002e-31 or 2.2000000000000001e39 < b

    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. sub-neg96.9%

        \[\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-196.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.35000000000000002e-31 < b < -6.0000000000000001e-191 or -6.29999999999999988e-293 < b < 2.2000000000000001e39

    1. Initial program 99.0%

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

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

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

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

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

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

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

        \[\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*98.9%

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

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

        \[\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*98.9%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, \frac{z}{\frac{16}{t}}\right) - \left(\frac{a}{\frac{4}{b}} - c\right)} \]
    4. Step-by-step derivation
      1. fma-udef98.9%

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

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

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

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

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

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

      \[\leadsto \left(\left(z \cdot t\right) \cdot 0.0625 + x \cdot y\right) - \color{blue}{0.25 \cdot \left(a \cdot b\right)} \]
    7. Taylor expanded in x around inf 44.4%

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

    if -6.0000000000000001e-191 < b < -6.29999999999999988e-293

    1. Initial program 99.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 46.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.35 \cdot 10^{-31}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;b \leq -6 \cdot 10^{-191}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;b \leq -6.3 \cdot 10^{-293}:\\ \;\;\;\;c\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{+39}:\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \end{array} \]

Alternative 14: 38.7% accurate, 1.3× speedup?

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

\mathbf{elif}\;z \leq -2.4 \cdot 10^{-86}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;z \leq -2.8 \cdot 10^{-203}:\\
\;\;\;\;c\\

\mathbf{elif}\;z \leq 4.5 \cdot 10^{-13}:\\
\;\;\;\;a \cdot \left(b \cdot -0.25\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.49999999999999963e122 or 4.5e-13 < z

    1. Initial program 97.0%

      \[\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-97.0%

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

        \[\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-197.0%

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

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

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

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

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

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

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

        \[\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)} \]
    4. Step-by-step derivation
      1. fma-udef96.9%

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

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

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

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

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

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

      \[\leadsto \left(\left(z \cdot t\right) \cdot 0.0625 + x \cdot y\right) - \color{blue}{0.25 \cdot \left(a \cdot b\right)} \]
    7. Taylor expanded in z around inf 52.9%

      \[\leadsto \color{blue}{0.0625 \cdot \left(t \cdot z\right)} \]
    8. Step-by-step derivation
      1. associate-*r*52.9%

        \[\leadsto \color{blue}{\left(0.0625 \cdot t\right) \cdot z} \]
      2. *-commutative52.9%

        \[\leadsto \color{blue}{\left(t \cdot 0.0625\right)} \cdot z \]
      3. associate-*l*52.9%

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

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

    if -6.49999999999999963e122 < z < -2.40000000000000013e-86

    1. Initial program 98.0%

      \[\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-98.0%

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

        \[\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-198.0%

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

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

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

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

        \[\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*98.0%

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

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

        \[\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*97.9%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, \frac{z}{\frac{16}{t}}\right) - \left(\frac{a}{\frac{4}{b}} - c\right)} \]
    4. Step-by-step derivation
      1. fma-udef97.9%

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

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

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

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

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

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

      \[\leadsto \left(\left(z \cdot t\right) \cdot 0.0625 + x \cdot y\right) - \color{blue}{0.25 \cdot \left(a \cdot b\right)} \]
    7. Taylor expanded in x around inf 38.5%

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

    if -2.40000000000000013e-86 < z < -2.80000000000000022e-203

    1. Initial program 99.8%

      \[\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 41.7%

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

    if -2.80000000000000022e-203 < z < 4.5e-13

    1. Initial program 98.8%

      \[\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-98.8%

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

        \[\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-198.8%

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

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

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

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

        \[\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*98.8%

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

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

        \[\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*98.6%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, \frac{z}{\frac{16}{t}}\right) - \left(\frac{a}{\frac{4}{b}} - c\right)} \]
    4. Step-by-step derivation
      1. fma-udef98.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \left(b \cdot -0.25\right)} \]
    8. Simplified47.5%

      \[\leadsto \color{blue}{a \cdot \left(b \cdot -0.25\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification47.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+122}:\\ \;\;\;\;t \cdot \left(z \cdot 0.0625\right)\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-86}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-203}:\\ \;\;\;\;c\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-13}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z \cdot 0.0625\right)\\ \end{array} \]

Alternative 15: 59.2% accurate, 1.3× speedup?

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

\mathbf{elif}\;z \leq -7.2 \cdot 10^{-8}:\\
\;\;\;\;c + x \cdot y\\

\mathbf{elif}\;z \leq 9.8 \cdot 10^{-8}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.5999999999999998e122 or 9.8000000000000004e-8 < z

    1. Initial program 97.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 79.6%

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

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

    if -6.5999999999999998e122 < z < -7.19999999999999962e-8

    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 a around 0 75.3%

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

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

    if -7.19999999999999962e-8 < z < 9.8000000000000004e-8

    1. Initial program 99.1%

      \[\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 65.3%

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

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

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

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

      \[\leadsto \color{blue}{b \cdot \left(a \cdot -0.25\right)} + c \]
  3. Recombined 3 regimes into one program.
  4. Final simplification63.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+122}:\\ \;\;\;\;c + \left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-8}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{-8}:\\ \;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\ \mathbf{else}:\\ \;\;\;\;c + \left(z \cdot t\right) \cdot 0.0625\\ \end{array} \]

Alternative 16: 35.8% accurate, 2.4× speedup?

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

\mathbf{elif}\;x \leq 2.3 \cdot 10^{-79}:\\
\;\;\;\;c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.29999999999999998e92 or 2.30000000000000012e-79 < x

    1. Initial program 96.2%

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

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

        \[\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-196.2%

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

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

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

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

        \[\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*98.4%

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

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

        \[\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*98.4%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, \frac{z}{\frac{16}{t}}\right) - \left(\frac{a}{\frac{4}{b}} - c\right)} \]
    4. Step-by-step derivation
      1. fma-udef96.1%

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

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

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

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

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

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

      \[\leadsto \left(\left(z \cdot t\right) \cdot 0.0625 + x \cdot y\right) - \color{blue}{0.25 \cdot \left(a \cdot b\right)} \]
    7. Taylor expanded in x around inf 42.3%

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

    if -2.29999999999999998e92 < x < 2.30000000000000012e-79

    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 c around inf 25.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+92}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-79}:\\ \;\;\;\;c\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 17: 22.5% accurate, 17.0× speedup?

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

    \[\leadsto \color{blue}{c} \]
  3. Final simplification20.0%

    \[\leadsto c \]

Reproduce

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