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

Percentage Accurate: 97.8% → 98.8%
Time: 16.7s
Alternatives: 17
Speedup: 0.8×

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

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\\ \mathbf{if}\;t_1 \leq \infty:\\ \;\;\;\;c + t_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, x, \left(a \cdot b\right) \cdot -0.25\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0))))
   (if (<= t_1 INFINITY) (+ c t_1) (fma y x (* (* a b) -0.25)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0);
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = c + t_1;
	} else {
		tmp = fma(y, x, ((a * b) * -0.25));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = Float64(c + t_1);
	else
		tmp = fma(y, x, Float64(Float64(a * b) * -0.25));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(c + t$95$1), $MachinePrecision], N[(y * x + N[(N[(a * b), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, x, \left(a \cdot b\right) \cdot -0.25\right)\\


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

    1. Initial program 100.0%

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

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

    1. Initial program 0.0%

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

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

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

        \[\leadsto \color{blue}{y \cdot x} - 0.25 \cdot \left(a \cdot b\right) \]
      2. fma-neg63.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, -0.25 \cdot \left(a \cdot b\right)\right)} \]
      3. *-commutative63.6%

        \[\leadsto \mathsf{fma}\left(y, x, -\color{blue}{\left(a \cdot b\right) \cdot 0.25}\right) \]
      4. distribute-rgt-neg-in63.6%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(a \cdot b\right) \cdot \left(-0.25\right)}\right) \]
      5. metadata-eval63.6%

        \[\leadsto \mathsf{fma}\left(y, x, \left(a \cdot b\right) \cdot \color{blue}{-0.25}\right) \]
    5. Applied egg-rr63.6%

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

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

Alternative 2: 98.9% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(x, y, \mathsf{fma}\left(\frac{z}{16}, t, \mathsf{fma}\left(\frac{a}{-4}, b, c\right)\right)\right) \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (fma x y (fma (/ z 16.0) t (fma (/ a -4.0) b c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	return fma(x, y, fma((z / 16.0), t, fma((a / -4.0), b, c)));
}
function code(x, y, z, t, a, b, c)
	return fma(x, y, fma(Float64(z / 16.0), t, fma(Float64(a / -4.0), b, c)))
end
code[x_, y_, z_, t_, a_, b_, c_] := N[(x * y + N[(N[(z / 16.0), $MachinePrecision] * t + N[(N[(a / -4.0), $MachinePrecision] * b + c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(x, y, \mathsf{fma}\left(\frac{z}{16}, t, \mathsf{fma}\left(\frac{a}{-4}, b, c\right)\right)\right)
\end{array}
Derivation
  1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 64.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c + 0.0625 \cdot \left(z \cdot t\right)\\ t_2 := c + x \cdot y\\ t_3 := c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{if}\;x \cdot y \leq -5.2 \cdot 10^{+204}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \cdot y \leq -6.2 \cdot 10^{+165}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq -2.2 \cdot 10^{+81}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \cdot y \leq -0.00044:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \cdot y \leq -4.4 \cdot 10^{-304}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq 2.05 \cdot 10^{-196}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \cdot y \leq 4.3 \cdot 10^{-83}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq 1.9 \cdot 10^{+14}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \cdot y \leq 10^{+80}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq 3.8 \cdot 10^{+119}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (+ c (* 0.0625 (* z t))))
        (t_2 (+ c (* x y)))
        (t_3 (+ c (* a (* b -0.25)))))
   (if (<= (* x y) -5.2e+204)
     t_2
     (if (<= (* x y) -6.2e+165)
       t_1
       (if (<= (* x y) -2.2e+81)
         t_2
         (if (<= (* x y) -0.00044)
           t_3
           (if (<= (* x y) -4.4e-304)
             t_1
             (if (<= (* x y) 2.05e-196)
               t_3
               (if (<= (* x y) 4.3e-83)
                 t_1
                 (if (<= (* x y) 1.9e+14)
                   t_3
                   (if (<= (* x y) 1e+80)
                     t_1
                     (if (<= (* x y) 3.8e+119) t_3 t_2))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = c + (0.0625 * (z * t));
	double t_2 = c + (x * y);
	double t_3 = c + (a * (b * -0.25));
	double tmp;
	if ((x * y) <= -5.2e+204) {
		tmp = t_2;
	} else if ((x * y) <= -6.2e+165) {
		tmp = t_1;
	} else if ((x * y) <= -2.2e+81) {
		tmp = t_2;
	} else if ((x * y) <= -0.00044) {
		tmp = t_3;
	} else if ((x * y) <= -4.4e-304) {
		tmp = t_1;
	} else if ((x * y) <= 2.05e-196) {
		tmp = t_3;
	} else if ((x * y) <= 4.3e-83) {
		tmp = t_1;
	} else if ((x * y) <= 1.9e+14) {
		tmp = t_3;
	} else if ((x * y) <= 1e+80) {
		tmp = t_1;
	} else if ((x * y) <= 3.8e+119) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = c + (0.0625d0 * (z * t))
    t_2 = c + (x * y)
    t_3 = c + (a * (b * (-0.25d0)))
    if ((x * y) <= (-5.2d+204)) then
        tmp = t_2
    else if ((x * y) <= (-6.2d+165)) then
        tmp = t_1
    else if ((x * y) <= (-2.2d+81)) then
        tmp = t_2
    else if ((x * y) <= (-0.00044d0)) then
        tmp = t_3
    else if ((x * y) <= (-4.4d-304)) then
        tmp = t_1
    else if ((x * y) <= 2.05d-196) then
        tmp = t_3
    else if ((x * y) <= 4.3d-83) then
        tmp = t_1
    else if ((x * y) <= 1.9d+14) then
        tmp = t_3
    else if ((x * y) <= 1d+80) then
        tmp = t_1
    else if ((x * y) <= 3.8d+119) then
        tmp = t_3
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = c + (0.0625 * (z * t));
	double t_2 = c + (x * y);
	double t_3 = c + (a * (b * -0.25));
	double tmp;
	if ((x * y) <= -5.2e+204) {
		tmp = t_2;
	} else if ((x * y) <= -6.2e+165) {
		tmp = t_1;
	} else if ((x * y) <= -2.2e+81) {
		tmp = t_2;
	} else if ((x * y) <= -0.00044) {
		tmp = t_3;
	} else if ((x * y) <= -4.4e-304) {
		tmp = t_1;
	} else if ((x * y) <= 2.05e-196) {
		tmp = t_3;
	} else if ((x * y) <= 4.3e-83) {
		tmp = t_1;
	} else if ((x * y) <= 1.9e+14) {
		tmp = t_3;
	} else if ((x * y) <= 1e+80) {
		tmp = t_1;
	} else if ((x * y) <= 3.8e+119) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = c + (0.0625 * (z * t))
	t_2 = c + (x * y)
	t_3 = c + (a * (b * -0.25))
	tmp = 0
	if (x * y) <= -5.2e+204:
		tmp = t_2
	elif (x * y) <= -6.2e+165:
		tmp = t_1
	elif (x * y) <= -2.2e+81:
		tmp = t_2
	elif (x * y) <= -0.00044:
		tmp = t_3
	elif (x * y) <= -4.4e-304:
		tmp = t_1
	elif (x * y) <= 2.05e-196:
		tmp = t_3
	elif (x * y) <= 4.3e-83:
		tmp = t_1
	elif (x * y) <= 1.9e+14:
		tmp = t_3
	elif (x * y) <= 1e+80:
		tmp = t_1
	elif (x * y) <= 3.8e+119:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(c + Float64(0.0625 * Float64(z * t)))
	t_2 = Float64(c + Float64(x * y))
	t_3 = Float64(c + Float64(a * Float64(b * -0.25)))
	tmp = 0.0
	if (Float64(x * y) <= -5.2e+204)
		tmp = t_2;
	elseif (Float64(x * y) <= -6.2e+165)
		tmp = t_1;
	elseif (Float64(x * y) <= -2.2e+81)
		tmp = t_2;
	elseif (Float64(x * y) <= -0.00044)
		tmp = t_3;
	elseif (Float64(x * y) <= -4.4e-304)
		tmp = t_1;
	elseif (Float64(x * y) <= 2.05e-196)
		tmp = t_3;
	elseif (Float64(x * y) <= 4.3e-83)
		tmp = t_1;
	elseif (Float64(x * y) <= 1.9e+14)
		tmp = t_3;
	elseif (Float64(x * y) <= 1e+80)
		tmp = t_1;
	elseif (Float64(x * y) <= 3.8e+119)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = c + (0.0625 * (z * t));
	t_2 = c + (x * y);
	t_3 = c + (a * (b * -0.25));
	tmp = 0.0;
	if ((x * y) <= -5.2e+204)
		tmp = t_2;
	elseif ((x * y) <= -6.2e+165)
		tmp = t_1;
	elseif ((x * y) <= -2.2e+81)
		tmp = t_2;
	elseif ((x * y) <= -0.00044)
		tmp = t_3;
	elseif ((x * y) <= -4.4e-304)
		tmp = t_1;
	elseif ((x * y) <= 2.05e-196)
		tmp = t_3;
	elseif ((x * y) <= 4.3e-83)
		tmp = t_1;
	elseif ((x * y) <= 1.9e+14)
		tmp = t_3;
	elseif ((x * y) <= 1e+80)
		tmp = t_1;
	elseif ((x * y) <= 3.8e+119)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -5.2e+204], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -6.2e+165], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -2.2e+81], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -0.00044], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], -4.4e-304], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2.05e-196], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], 4.3e-83], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1.9e+14], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], 1e+80], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 3.8e+119], t$95$3, t$95$2]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := c + 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := c + x \cdot y\\
t_3 := c + a \cdot \left(b \cdot -0.25\right)\\
\mathbf{if}\;x \cdot y \leq -5.2 \cdot 10^{+204}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \cdot y \leq -6.2 \cdot 10^{+165}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq -2.2 \cdot 10^{+81}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \cdot y \leq -0.00044:\\
\;\;\;\;t_3\\

\mathbf{elif}\;x \cdot y \leq -4.4 \cdot 10^{-304}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq 2.05 \cdot 10^{-196}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;x \cdot y \leq 4.3 \cdot 10^{-83}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq 1.9 \cdot 10^{+14}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;x \cdot y \leq 10^{+80}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq 3.8 \cdot 10^{+119}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -5.2000000000000002e204 or -6.2000000000000003e165 < (*.f64 x y) < -2.19999999999999987e81 or 3.7999999999999999e119 < (*.f64 x y)

    1. Initial program 90.1%

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

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

    if -5.2000000000000002e204 < (*.f64 x y) < -6.2000000000000003e165 or -4.40000000000000016e-4 < (*.f64 x y) < -4.4e-304 or 2.05000000000000011e-196 < (*.f64 x y) < 4.30000000000000033e-83 or 1.9e14 < (*.f64 x y) < 1e80

    1. Initial program 100.0%

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

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

    if -2.19999999999999987e81 < (*.f64 x y) < -4.40000000000000016e-4 or -4.4e-304 < (*.f64 x y) < 2.05000000000000011e-196 or 4.30000000000000033e-83 < (*.f64 x y) < 1.9e14 or 1e80 < (*.f64 x y) < 3.7999999999999999e119

    1. Initial program 95.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -5.2 \cdot 10^{+204}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;x \cdot y \leq -6.2 \cdot 10^{+165}:\\ \;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq -2.2 \cdot 10^{+81}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;x \cdot y \leq -0.00044:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;x \cdot y \leq -4.4 \cdot 10^{-304}:\\ \;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 2.05 \cdot 10^{-196}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;x \cdot y \leq 4.3 \cdot 10^{-83}:\\ \;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 1.9 \cdot 10^{+14}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;x \cdot y \leq 10^{+80}:\\ \;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 3.8 \cdot 10^{+119}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{else}:\\ \;\;\;\;c + x \cdot y\\ \end{array} \]

Alternative 4: 65.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c + a \cdot \left(b \cdot -0.25\right)\\ t_2 := 0.0625 \cdot \left(z \cdot t\right)\\ t_3 := c + t_2\\ t_4 := x \cdot y + t_2\\ \mathbf{if}\;x \cdot y \leq -1.55 \cdot 10^{+80}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x \cdot y \leq -5.3 \cdot 10^{-5}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq -7.8 \cdot 10^{-299}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \cdot y \leq 6.5 \cdot 10^{-202}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq 2.35 \cdot 10^{-82}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x \cdot y \leq 2.9 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq 9.6 \cdot 10^{+79}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x \cdot y \leq 2.6 \cdot 10^{+123}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;c + x \cdot y\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (+ c (* a (* b -0.25))))
        (t_2 (* 0.0625 (* z t)))
        (t_3 (+ c t_2))
        (t_4 (+ (* x y) t_2)))
   (if (<= (* x y) -1.55e+80)
     t_4
     (if (<= (* x y) -5.3e-5)
       t_1
       (if (<= (* x y) -7.8e-299)
         t_3
         (if (<= (* x y) 6.5e-202)
           t_1
           (if (<= (* x y) 2.35e-82)
             t_3
             (if (<= (* x y) 2.9e+21)
               t_1
               (if (<= (* x y) 9.6e+79)
                 t_4
                 (if (<= (* x y) 2.6e+123) t_1 (+ c (* x y))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = c + (a * (b * -0.25));
	double t_2 = 0.0625 * (z * t);
	double t_3 = c + t_2;
	double t_4 = (x * y) + t_2;
	double tmp;
	if ((x * y) <= -1.55e+80) {
		tmp = t_4;
	} else if ((x * y) <= -5.3e-5) {
		tmp = t_1;
	} else if ((x * y) <= -7.8e-299) {
		tmp = t_3;
	} else if ((x * y) <= 6.5e-202) {
		tmp = t_1;
	} else if ((x * y) <= 2.35e-82) {
		tmp = t_3;
	} else if ((x * y) <= 2.9e+21) {
		tmp = t_1;
	} else if ((x * y) <= 9.6e+79) {
		tmp = t_4;
	} else if ((x * y) <= 2.6e+123) {
		tmp = t_1;
	} else {
		tmp = c + (x * y);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = c + (a * (b * (-0.25d0)))
    t_2 = 0.0625d0 * (z * t)
    t_3 = c + t_2
    t_4 = (x * y) + t_2
    if ((x * y) <= (-1.55d+80)) then
        tmp = t_4
    else if ((x * y) <= (-5.3d-5)) then
        tmp = t_1
    else if ((x * y) <= (-7.8d-299)) then
        tmp = t_3
    else if ((x * y) <= 6.5d-202) then
        tmp = t_1
    else if ((x * y) <= 2.35d-82) then
        tmp = t_3
    else if ((x * y) <= 2.9d+21) then
        tmp = t_1
    else if ((x * y) <= 9.6d+79) then
        tmp = t_4
    else if ((x * y) <= 2.6d+123) then
        tmp = t_1
    else
        tmp = c + (x * y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = c + (a * (b * -0.25));
	double t_2 = 0.0625 * (z * t);
	double t_3 = c + t_2;
	double t_4 = (x * y) + t_2;
	double tmp;
	if ((x * y) <= -1.55e+80) {
		tmp = t_4;
	} else if ((x * y) <= -5.3e-5) {
		tmp = t_1;
	} else if ((x * y) <= -7.8e-299) {
		tmp = t_3;
	} else if ((x * y) <= 6.5e-202) {
		tmp = t_1;
	} else if ((x * y) <= 2.35e-82) {
		tmp = t_3;
	} else if ((x * y) <= 2.9e+21) {
		tmp = t_1;
	} else if ((x * y) <= 9.6e+79) {
		tmp = t_4;
	} else if ((x * y) <= 2.6e+123) {
		tmp = t_1;
	} else {
		tmp = c + (x * y);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = c + (a * (b * -0.25))
	t_2 = 0.0625 * (z * t)
	t_3 = c + t_2
	t_4 = (x * y) + t_2
	tmp = 0
	if (x * y) <= -1.55e+80:
		tmp = t_4
	elif (x * y) <= -5.3e-5:
		tmp = t_1
	elif (x * y) <= -7.8e-299:
		tmp = t_3
	elif (x * y) <= 6.5e-202:
		tmp = t_1
	elif (x * y) <= 2.35e-82:
		tmp = t_3
	elif (x * y) <= 2.9e+21:
		tmp = t_1
	elif (x * y) <= 9.6e+79:
		tmp = t_4
	elif (x * y) <= 2.6e+123:
		tmp = t_1
	else:
		tmp = c + (x * y)
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(c + Float64(a * Float64(b * -0.25)))
	t_2 = Float64(0.0625 * Float64(z * t))
	t_3 = Float64(c + t_2)
	t_4 = Float64(Float64(x * y) + t_2)
	tmp = 0.0
	if (Float64(x * y) <= -1.55e+80)
		tmp = t_4;
	elseif (Float64(x * y) <= -5.3e-5)
		tmp = t_1;
	elseif (Float64(x * y) <= -7.8e-299)
		tmp = t_3;
	elseif (Float64(x * y) <= 6.5e-202)
		tmp = t_1;
	elseif (Float64(x * y) <= 2.35e-82)
		tmp = t_3;
	elseif (Float64(x * y) <= 2.9e+21)
		tmp = t_1;
	elseif (Float64(x * y) <= 9.6e+79)
		tmp = t_4;
	elseif (Float64(x * y) <= 2.6e+123)
		tmp = t_1;
	else
		tmp = Float64(c + Float64(x * y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = c + (a * (b * -0.25));
	t_2 = 0.0625 * (z * t);
	t_3 = c + t_2;
	t_4 = (x * y) + t_2;
	tmp = 0.0;
	if ((x * y) <= -1.55e+80)
		tmp = t_4;
	elseif ((x * y) <= -5.3e-5)
		tmp = t_1;
	elseif ((x * y) <= -7.8e-299)
		tmp = t_3;
	elseif ((x * y) <= 6.5e-202)
		tmp = t_1;
	elseif ((x * y) <= 2.35e-82)
		tmp = t_3;
	elseif ((x * y) <= 2.9e+21)
		tmp = t_1;
	elseif ((x * y) <= 9.6e+79)
		tmp = t_4;
	elseif ((x * y) <= 2.6e+123)
		tmp = t_1;
	else
		tmp = c + (x * y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.55e+80], t$95$4, If[LessEqual[N[(x * y), $MachinePrecision], -5.3e-5], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -7.8e-299], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], 6.5e-202], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2.35e-82], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], 2.9e+21], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 9.6e+79], t$95$4, If[LessEqual[N[(x * y), $MachinePrecision], 2.6e+123], t$95$1, N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := c + a \cdot \left(b \cdot -0.25\right)\\
t_2 := 0.0625 \cdot \left(z \cdot t\right)\\
t_3 := c + t_2\\
t_4 := x \cdot y + t_2\\
\mathbf{if}\;x \cdot y \leq -1.55 \cdot 10^{+80}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;x \cdot y \leq -5.3 \cdot 10^{-5}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq -7.8 \cdot 10^{-299}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;x \cdot y \leq 6.5 \cdot 10^{-202}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq 2.35 \cdot 10^{-82}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;x \cdot y \leq 2.9 \cdot 10^{+21}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq 9.6 \cdot 10^{+79}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;x \cdot y \leq 2.6 \cdot 10^{+123}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 x y) < -1.54999999999999994e80 or 2.9e21 < (*.f64 x y) < 9.59999999999999942e79

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, y, \mathsf{fma}\left(\frac{z}{16}, t, \color{blue}{\left(-\frac{a \cdot b}{4}\right) + \left(-\left(-c\right)\right)}\right)\right) \]
      8. remove-double-neg94.9%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(x, y, \color{blue}{c + 0.0625 \cdot \left(t \cdot z\right)}\right) \]
    5. Step-by-step derivation
      1. +-commutative85.3%

        \[\leadsto \mathsf{fma}\left(x, y, \color{blue}{0.0625 \cdot \left(t \cdot z\right) + c}\right) \]
      2. *-commutative85.3%

        \[\leadsto \mathsf{fma}\left(x, y, \color{blue}{\left(t \cdot z\right) \cdot 0.0625} + c\right) \]
      3. associate-*r*85.3%

        \[\leadsto \mathsf{fma}\left(x, y, \color{blue}{t \cdot \left(z \cdot 0.0625\right)} + c\right) \]
      4. fma-def85.3%

        \[\leadsto \mathsf{fma}\left(x, y, \color{blue}{\mathsf{fma}\left(t, z \cdot 0.0625, c\right)}\right) \]
      5. *-commutative85.3%

        \[\leadsto \mathsf{fma}\left(x, y, \mathsf{fma}\left(t, \color{blue}{0.0625 \cdot z}, c\right)\right) \]
    6. Simplified85.3%

      \[\leadsto \mathsf{fma}\left(x, y, \color{blue}{\mathsf{fma}\left(t, 0.0625 \cdot z, c\right)}\right) \]
    7. Taylor expanded in c around 0 77.9%

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

    if -1.54999999999999994e80 < (*.f64 x y) < -5.3000000000000001e-5 or -7.7999999999999997e-299 < (*.f64 x y) < 6.49999999999999956e-202 or 2.35e-82 < (*.f64 x y) < 2.9e21 or 9.59999999999999942e79 < (*.f64 x y) < 2.59999999999999985e123

    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 a around inf 77.2%

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

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

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

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

    if -5.3000000000000001e-5 < (*.f64 x y) < -7.7999999999999997e-299 or 6.49999999999999956e-202 < (*.f64 x y) < 2.35e-82

    1. Initial program 100.0%

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

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

    if 2.59999999999999985e123 < (*.f64 x y)

    1. Initial program 88.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -1.55 \cdot 10^{+80}:\\ \;\;\;\;x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq -5.3 \cdot 10^{-5}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;x \cdot y \leq -7.8 \cdot 10^{-299}:\\ \;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 6.5 \cdot 10^{-202}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;x \cdot y \leq 2.35 \cdot 10^{-82}:\\ \;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 2.9 \cdot 10^{+21}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;x \cdot y \leq 9.6 \cdot 10^{+79}:\\ \;\;\;\;x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;x \cdot y \leq 2.6 \cdot 10^{+123}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{else}:\\ \;\;\;\;c + x \cdot y\\ \end{array} \]

Alternative 5: 98.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\\ \mathbf{if}\;t_1 \leq \infty:\\ \;\;\;\;c + t_1\\ \mathbf{else}:\\ \;\;\;\;\left(c + x \cdot y\right) - \left(a \cdot b\right) \cdot 0.25\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0))))
   (if (<= t_1 INFINITY) (+ c t_1) (- (+ c (* x y)) (* (* a b) 0.25)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0);
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = c + t_1;
	} else {
		tmp = (c + (x * y)) - ((a * b) * 0.25);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0);
	double tmp;
	if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = c + t_1;
	} else {
		tmp = (c + (x * y)) - ((a * b) * 0.25);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)
	tmp = 0
	if t_1 <= math.inf:
		tmp = c + t_1
	else:
		tmp = (c + (x * y)) - ((a * b) * 0.25)
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = Float64(c + t_1);
	else
		tmp = Float64(Float64(c + Float64(x * y)) - Float64(Float64(a * b) * 0.25));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = ((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0);
	tmp = 0.0;
	if (t_1 <= Inf)
		tmp = c + t_1;
	else
		tmp = (c + (x * y)) - ((a * b) * 0.25);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(c + t$95$1), $MachinePrecision], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


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

    1. Initial program 100.0%

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

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

    1. Initial program 0.0%

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

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

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

Alternative 6: 66.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 0.0625 \cdot \left(z \cdot t\right)\\ t_2 := x \cdot y - \left(a \cdot b\right) \cdot 0.25\\ \mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+143}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \cdot b \leq -2 \cdot 10^{+90}:\\ \;\;\;\;c + t_1\\ \mathbf{elif}\;a \cdot b \leq -1 \cdot 10^{+49}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \cdot b \leq 10^{-92}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+84}:\\ \;\;\;\;x \cdot y + t_1\\ \mathbf{else}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* 0.0625 (* z t))) (t_2 (- (* x y) (* (* a b) 0.25))))
   (if (<= (* a b) -2e+143)
     t_2
     (if (<= (* a b) -2e+90)
       (+ c t_1)
       (if (<= (* a b) -1e+49)
         t_2
         (if (<= (* a b) 1e-92)
           (+ c (* x y))
           (if (<= (* a b) 5e+84)
             (+ (* x y) t_1)
             (+ c (* a (* b -0.25))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = 0.0625 * (z * t);
	double t_2 = (x * y) - ((a * b) * 0.25);
	double tmp;
	if ((a * b) <= -2e+143) {
		tmp = t_2;
	} else if ((a * b) <= -2e+90) {
		tmp = c + t_1;
	} else if ((a * b) <= -1e+49) {
		tmp = t_2;
	} else if ((a * b) <= 1e-92) {
		tmp = c + (x * y);
	} else if ((a * b) <= 5e+84) {
		tmp = (x * y) + t_1;
	} else {
		tmp = c + (a * (b * -0.25));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 0.0625d0 * (z * t)
    t_2 = (x * y) - ((a * b) * 0.25d0)
    if ((a * b) <= (-2d+143)) then
        tmp = t_2
    else if ((a * b) <= (-2d+90)) then
        tmp = c + t_1
    else if ((a * b) <= (-1d+49)) then
        tmp = t_2
    else if ((a * b) <= 1d-92) then
        tmp = c + (x * y)
    else if ((a * b) <= 5d+84) then
        tmp = (x * y) + t_1
    else
        tmp = c + (a * (b * (-0.25d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = 0.0625 * (z * t);
	double t_2 = (x * y) - ((a * b) * 0.25);
	double tmp;
	if ((a * b) <= -2e+143) {
		tmp = t_2;
	} else if ((a * b) <= -2e+90) {
		tmp = c + t_1;
	} else if ((a * b) <= -1e+49) {
		tmp = t_2;
	} else if ((a * b) <= 1e-92) {
		tmp = c + (x * y);
	} else if ((a * b) <= 5e+84) {
		tmp = (x * y) + t_1;
	} else {
		tmp = c + (a * (b * -0.25));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = 0.0625 * (z * t)
	t_2 = (x * y) - ((a * b) * 0.25)
	tmp = 0
	if (a * b) <= -2e+143:
		tmp = t_2
	elif (a * b) <= -2e+90:
		tmp = c + t_1
	elif (a * b) <= -1e+49:
		tmp = t_2
	elif (a * b) <= 1e-92:
		tmp = c + (x * y)
	elif (a * b) <= 5e+84:
		tmp = (x * y) + t_1
	else:
		tmp = c + (a * (b * -0.25))
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(0.0625 * Float64(z * t))
	t_2 = Float64(Float64(x * y) - Float64(Float64(a * b) * 0.25))
	tmp = 0.0
	if (Float64(a * b) <= -2e+143)
		tmp = t_2;
	elseif (Float64(a * b) <= -2e+90)
		tmp = Float64(c + t_1);
	elseif (Float64(a * b) <= -1e+49)
		tmp = t_2;
	elseif (Float64(a * b) <= 1e-92)
		tmp = Float64(c + Float64(x * y));
	elseif (Float64(a * b) <= 5e+84)
		tmp = Float64(Float64(x * y) + t_1);
	else
		tmp = Float64(c + Float64(a * Float64(b * -0.25)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = 0.0625 * (z * t);
	t_2 = (x * y) - ((a * b) * 0.25);
	tmp = 0.0;
	if ((a * b) <= -2e+143)
		tmp = t_2;
	elseif ((a * b) <= -2e+90)
		tmp = c + t_1;
	elseif ((a * b) <= -1e+49)
		tmp = t_2;
	elseif ((a * b) <= 1e-92)
		tmp = c + (x * y);
	elseif ((a * b) <= 5e+84)
		tmp = (x * y) + t_1;
	else
		tmp = c + (a * (b * -0.25));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -2e+143], t$95$2, If[LessEqual[N[(a * b), $MachinePrecision], -2e+90], N[(c + t$95$1), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], -1e+49], t$95$2, If[LessEqual[N[(a * b), $MachinePrecision], 1e-92], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e+84], N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := x \cdot y - \left(a \cdot b\right) \cdot 0.25\\
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+143}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \cdot b \leq -2 \cdot 10^{+90}:\\
\;\;\;\;c + t_1\\

\mathbf{elif}\;a \cdot b \leq -1 \cdot 10^{+49}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+84}:\\
\;\;\;\;x \cdot y + t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 a b) < -2e143 or -1.99999999999999993e90 < (*.f64 a b) < -9.99999999999999946e48

    1. Initial program 91.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 80.2%

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

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

    if -2e143 < (*.f64 a b) < -1.99999999999999993e90

    1. Initial program 100.0%

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

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

    if -9.99999999999999946e48 < (*.f64 a b) < 9.99999999999999988e-93

    1. Initial program 98.3%

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

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

    if 9.99999999999999988e-93 < (*.f64 a b) < 5.0000000000000001e84

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, y, \mathsf{fma}\left(\frac{z}{16}, t, \color{blue}{\left(-\frac{a \cdot b}{4}\right) + \left(-\left(-c\right)\right)}\right)\right) \]
      8. remove-double-neg97.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(x, y, \color{blue}{c + 0.0625 \cdot \left(t \cdot z\right)}\right) \]
    5. Step-by-step derivation
      1. +-commutative85.8%

        \[\leadsto \mathsf{fma}\left(x, y, \color{blue}{0.0625 \cdot \left(t \cdot z\right) + c}\right) \]
      2. *-commutative85.8%

        \[\leadsto \mathsf{fma}\left(x, y, \color{blue}{\left(t \cdot z\right) \cdot 0.0625} + c\right) \]
      3. associate-*r*85.8%

        \[\leadsto \mathsf{fma}\left(x, y, \color{blue}{t \cdot \left(z \cdot 0.0625\right)} + c\right) \]
      4. fma-def85.8%

        \[\leadsto \mathsf{fma}\left(x, y, \color{blue}{\mathsf{fma}\left(t, z \cdot 0.0625, c\right)}\right) \]
      5. *-commutative85.8%

        \[\leadsto \mathsf{fma}\left(x, y, \mathsf{fma}\left(t, \color{blue}{0.0625 \cdot z}, c\right)\right) \]
    6. Simplified85.8%

      \[\leadsto \mathsf{fma}\left(x, y, \color{blue}{\mathsf{fma}\left(t, 0.0625 \cdot z, c\right)}\right) \]
    7. Taylor expanded in c around 0 76.6%

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

    if 5.0000000000000001e84 < (*.f64 a b)

    1. Initial program 89.6%

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

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

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

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

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

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

Alternative 7: 98.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot b \leq 5 \cdot 10^{+293}:\\ \;\;\;\;\left(x \cdot y + t \cdot \left(z \cdot 0.0625\right)\right) + \left(c + \frac{a}{\frac{-4}{b}}\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (if (<= (* a b) 5e+293)
   (+ (+ (* x y) (* t (* z 0.0625))) (+ c (/ a (/ -4.0 b))))
   (* a (* b -0.25))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((a * b) <= 5e+293) {
		tmp = ((x * y) + (t * (z * 0.0625))) + (c + (a / (-4.0 / b)));
	} else {
		tmp = a * (b * -0.25);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if ((a * b) <= 5d+293) then
        tmp = ((x * y) + (t * (z * 0.0625d0))) + (c + (a / ((-4.0d0) / b)))
    else
        tmp = a * (b * (-0.25d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((a * b) <= 5e+293) {
		tmp = ((x * y) + (t * (z * 0.0625))) + (c + (a / (-4.0 / b)));
	} else {
		tmp = a * (b * -0.25);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	tmp = 0
	if (a * b) <= 5e+293:
		tmp = ((x * y) + (t * (z * 0.0625))) + (c + (a / (-4.0 / b)))
	else:
		tmp = a * (b * -0.25)
	return tmp
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (Float64(a * b) <= 5e+293)
		tmp = Float64(Float64(Float64(x * y) + Float64(t * Float64(z * 0.0625))) + Float64(c + Float64(a / Float64(-4.0 / b))));
	else
		tmp = Float64(a * Float64(b * -0.25));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	tmp = 0.0;
	if ((a * b) <= 5e+293)
		tmp = ((x * y) + (t * (z * 0.0625))) + (c + (a / (-4.0 / b)));
	else
		tmp = a * (b * -0.25);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(a * b), $MachinePrecision], 5e+293], N[(N[(N[(x * y), $MachinePrecision] + N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c + N[(a / N[(-4.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq 5 \cdot 10^{+293}:\\
\;\;\;\;\left(x \cdot y + t \cdot \left(z \cdot 0.0625\right)\right) + \left(c + \frac{a}{\frac{-4}{b}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a b) < 5.00000000000000033e293

    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. sub-neg97.5%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, y, \frac{z}{16} \cdot t\right) + \left(\color{blue}{\frac{-a \cdot b}{4}} + c\right) \]
      6. distribute-rgt-neg-out97.9%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, y, \frac{z}{16} \cdot 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}{16} \cdot t\right)} + \left(\frac{a}{\frac{-4}{b}} + c\right) \]
      2. *-commutative97.4%

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

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

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

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

    if 5.00000000000000033e293 < (*.f64 a b)

    1. Initial program 68.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. sub-neg68.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 89.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+45} \lor \neg \left(a \cdot b \leq 5 \cdot 10^{+110}\right):\\ \;\;\;\;\left(c + x \cdot y\right) - \left(a \cdot b\right) \cdot 0.25\\ \mathbf{else}:\\ \;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (if (or (<= (* a b) -2e+45) (not (<= (* a b) 5e+110)))
   (- (+ c (* x y)) (* (* a b) 0.25))
   (+ c (+ (* x y) (* 0.0625 (* z t))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (((a * b) <= -2e+45) || !((a * b) <= 5e+110)) {
		tmp = (c + (x * y)) - ((a * b) * 0.25);
	} else {
		tmp = c + ((x * y) + (0.0625 * (z * t)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (((a * b) <= (-2d+45)) .or. (.not. ((a * b) <= 5d+110))) then
        tmp = (c + (x * y)) - ((a * b) * 0.25d0)
    else
        tmp = c + ((x * y) + (0.0625d0 * (z * t)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (((a * b) <= -2e+45) || !((a * b) <= 5e+110)) {
		tmp = (c + (x * y)) - ((a * b) * 0.25);
	} else {
		tmp = c + ((x * y) + (0.0625 * (z * t)));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	tmp = 0
	if ((a * b) <= -2e+45) or not ((a * b) <= 5e+110):
		tmp = (c + (x * y)) - ((a * b) * 0.25)
	else:
		tmp = c + ((x * y) + (0.0625 * (z * t)))
	return tmp
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if ((Float64(a * b) <= -2e+45) || !(Float64(a * b) <= 5e+110))
		tmp = Float64(Float64(c + Float64(x * y)) - Float64(Float64(a * b) * 0.25));
	else
		tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	tmp = 0.0;
	if (((a * b) <= -2e+45) || ~(((a * b) <= 5e+110)))
		tmp = (c + (x * y)) - ((a * b) * 0.25);
	else
		tmp = c + ((x * y) + (0.0625 * (z * t)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(a * b), $MachinePrecision], -2e+45], N[Not[LessEqual[N[(a * b), $MachinePrecision], 5e+110]], $MachinePrecision]], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+45} \lor \neg \left(a \cdot b \leq 5 \cdot 10^{+110}\right):\\
\;\;\;\;\left(c + x \cdot y\right) - \left(a \cdot b\right) \cdot 0.25\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a b) < -1.9999999999999999e45 or 4.99999999999999978e110 < (*.f64 a b)

    1. Initial program 91.2%

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

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

    if -1.9999999999999999e45 < (*.f64 a b) < 4.99999999999999978e110

    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 92.9%

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

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

Alternative 9: 86.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+143}:\\ \;\;\;\;x \cdot y - \left(a \cdot b\right) \cdot 0.25\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+110}:\\ \;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (if (<= (* a b) -2e+143)
   (- (* x y) (* (* a b) 0.25))
   (if (<= (* a b) 5e+110)
     (+ c (+ (* x y) (* 0.0625 (* z t))))
     (+ c (* a (* b -0.25))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((a * b) <= -2e+143) {
		tmp = (x * y) - ((a * b) * 0.25);
	} else if ((a * b) <= 5e+110) {
		tmp = c + ((x * y) + (0.0625 * (z * t)));
	} else {
		tmp = c + (a * (b * -0.25));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if ((a * b) <= (-2d+143)) then
        tmp = (x * y) - ((a * b) * 0.25d0)
    else if ((a * b) <= 5d+110) then
        tmp = c + ((x * y) + (0.0625d0 * (z * t)))
    else
        tmp = c + (a * (b * (-0.25d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((a * b) <= -2e+143) {
		tmp = (x * y) - ((a * b) * 0.25);
	} else if ((a * b) <= 5e+110) {
		tmp = c + ((x * y) + (0.0625 * (z * t)));
	} else {
		tmp = c + (a * (b * -0.25));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	tmp = 0
	if (a * b) <= -2e+143:
		tmp = (x * y) - ((a * b) * 0.25)
	elif (a * b) <= 5e+110:
		tmp = c + ((x * y) + (0.0625 * (z * t)))
	else:
		tmp = c + (a * (b * -0.25))
	return tmp
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (Float64(a * b) <= -2e+143)
		tmp = Float64(Float64(x * y) - Float64(Float64(a * b) * 0.25));
	elseif (Float64(a * b) <= 5e+110)
		tmp = Float64(c + Float64(Float64(x * y) + Float64(0.0625 * Float64(z * t))));
	else
		tmp = Float64(c + Float64(a * Float64(b * -0.25)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	tmp = 0.0;
	if ((a * b) <= -2e+143)
		tmp = (x * y) - ((a * b) * 0.25);
	elseif ((a * b) <= 5e+110)
		tmp = c + ((x * y) + (0.0625 * (z * t)));
	else
		tmp = c + (a * (b * -0.25));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(a * b), $MachinePrecision], -2e+143], N[(N[(x * y), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e+110], N[(c + N[(N[(x * y), $MachinePrecision] + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+143}:\\
\;\;\;\;x \cdot y - \left(a \cdot b\right) \cdot 0.25\\

\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+110}:\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\

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


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

    1. Initial program 89.2%

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

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

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

    if -2e143 < (*.f64 a b) < 4.99999999999999978e110

    1. Initial program 98.4%

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

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

    if 4.99999999999999978e110 < (*.f64 a b)

    1. Initial program 88.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 inf 83.8%

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

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

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

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

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

Alternative 10: 86.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 0.0625 \cdot \left(z \cdot t\right)\\ \mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+144}:\\ \;\;\;\;t_1 - \left(a \cdot b\right) \cdot 0.25\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+110}:\\ \;\;\;\;c + \left(x \cdot y + t_1\right)\\ \mathbf{else}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* 0.0625 (* z t))))
   (if (<= (* a b) -1e+144)
     (- t_1 (* (* a b) 0.25))
     (if (<= (* a b) 5e+110) (+ c (+ (* x y) t_1)) (+ c (* a (* b -0.25)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = 0.0625 * (z * t);
	double tmp;
	if ((a * b) <= -1e+144) {
		tmp = t_1 - ((a * b) * 0.25);
	} else if ((a * b) <= 5e+110) {
		tmp = c + ((x * y) + t_1);
	} else {
		tmp = c + (a * (b * -0.25));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 0.0625d0 * (z * t)
    if ((a * b) <= (-1d+144)) then
        tmp = t_1 - ((a * b) * 0.25d0)
    else if ((a * b) <= 5d+110) then
        tmp = c + ((x * y) + t_1)
    else
        tmp = c + (a * (b * (-0.25d0)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = 0.0625 * (z * t);
	double tmp;
	if ((a * b) <= -1e+144) {
		tmp = t_1 - ((a * b) * 0.25);
	} else if ((a * b) <= 5e+110) {
		tmp = c + ((x * y) + t_1);
	} else {
		tmp = c + (a * (b * -0.25));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = 0.0625 * (z * t)
	tmp = 0
	if (a * b) <= -1e+144:
		tmp = t_1 - ((a * b) * 0.25)
	elif (a * b) <= 5e+110:
		tmp = c + ((x * y) + t_1)
	else:
		tmp = c + (a * (b * -0.25))
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(0.0625 * Float64(z * t))
	tmp = 0.0
	if (Float64(a * b) <= -1e+144)
		tmp = Float64(t_1 - Float64(Float64(a * b) * 0.25));
	elseif (Float64(a * b) <= 5e+110)
		tmp = Float64(c + Float64(Float64(x * y) + t_1));
	else
		tmp = Float64(c + Float64(a * Float64(b * -0.25)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = 0.0625 * (z * t);
	tmp = 0.0;
	if ((a * b) <= -1e+144)
		tmp = t_1 - ((a * b) * 0.25);
	elseif ((a * b) <= 5e+110)
		tmp = c + ((x * y) + t_1);
	else
		tmp = c + (a * (b * -0.25));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -1e+144], N[(t$95$1 - N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e+110], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(c + N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+144}:\\
\;\;\;\;t_1 - \left(a \cdot b\right) \cdot 0.25\\

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

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


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

    1. Initial program 88.8%

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

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

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

    if -1.00000000000000002e144 < (*.f64 a b) < 4.99999999999999978e110

    1. Initial program 98.4%

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

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

    if 4.99999999999999978e110 < (*.f64 a b)

    1. Initial program 88.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 inf 83.8%

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

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

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

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

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

Alternative 11: 89.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 0.0625 \cdot \left(z \cdot t\right)\\ t_2 := \left(a \cdot b\right) \cdot 0.25\\ \mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+144}:\\ \;\;\;\;c + \left(t_1 - t_2\right)\\ \mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+110}:\\ \;\;\;\;c + \left(x \cdot y + t_1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(c + x \cdot y\right) - t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* 0.0625 (* z t))) (t_2 (* (* a b) 0.25)))
   (if (<= (* a b) -1e+144)
     (+ c (- t_1 t_2))
     (if (<= (* a b) 5e+110) (+ c (+ (* x y) t_1)) (- (+ c (* x y)) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = 0.0625 * (z * t);
	double t_2 = (a * b) * 0.25;
	double tmp;
	if ((a * b) <= -1e+144) {
		tmp = c + (t_1 - t_2);
	} else if ((a * b) <= 5e+110) {
		tmp = c + ((x * y) + t_1);
	} else {
		tmp = (c + (x * y)) - t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 0.0625d0 * (z * t)
    t_2 = (a * b) * 0.25d0
    if ((a * b) <= (-1d+144)) then
        tmp = c + (t_1 - t_2)
    else if ((a * b) <= 5d+110) then
        tmp = c + ((x * y) + t_1)
    else
        tmp = (c + (x * y)) - t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = 0.0625 * (z * t);
	double t_2 = (a * b) * 0.25;
	double tmp;
	if ((a * b) <= -1e+144) {
		tmp = c + (t_1 - t_2);
	} else if ((a * b) <= 5e+110) {
		tmp = c + ((x * y) + t_1);
	} else {
		tmp = (c + (x * y)) - t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = 0.0625 * (z * t)
	t_2 = (a * b) * 0.25
	tmp = 0
	if (a * b) <= -1e+144:
		tmp = c + (t_1 - t_2)
	elif (a * b) <= 5e+110:
		tmp = c + ((x * y) + t_1)
	else:
		tmp = (c + (x * y)) - t_2
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(0.0625 * Float64(z * t))
	t_2 = Float64(Float64(a * b) * 0.25)
	tmp = 0.0
	if (Float64(a * b) <= -1e+144)
		tmp = Float64(c + Float64(t_1 - t_2));
	elseif (Float64(a * b) <= 5e+110)
		tmp = Float64(c + Float64(Float64(x * y) + t_1));
	else
		tmp = Float64(Float64(c + Float64(x * y)) - t_2);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = 0.0625 * (z * t);
	t_2 = (a * b) * 0.25;
	tmp = 0.0;
	if ((a * b) <= -1e+144)
		tmp = c + (t_1 - t_2);
	elseif ((a * b) <= 5e+110)
		tmp = c + ((x * y) + t_1);
	else
		tmp = (c + (x * y)) - t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] * 0.25), $MachinePrecision]}, If[LessEqual[N[(a * b), $MachinePrecision], -1e+144], N[(c + N[(t$95$1 - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 5e+110], 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}

\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
t_2 := \left(a \cdot b\right) \cdot 0.25\\
\mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+144}:\\
\;\;\;\;c + \left(t_1 - t_2\right)\\

\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{+110}:\\
\;\;\;\;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) < -1.00000000000000002e144

    1. Initial program 88.8%

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

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

    if -1.00000000000000002e144 < (*.f64 a b) < 4.99999999999999978e110

    1. Initial program 98.4%

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

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

    if 4.99999999999999978e110 < (*.f64 a b)

    1. Initial program 88.9%

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

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

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

Alternative 12: 37.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(b \cdot -0.25\right)\\ \mathbf{if}\;y \leq -2.2 \cdot 10^{-88}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-243}:\\ \;\;\;\;c\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{-187}:\\ \;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-88}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-49}:\\ \;\;\;\;c\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-36}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* a (* b -0.25))))
   (if (<= y -2.2e-88)
     (* x y)
     (if (<= y -1.7e-243)
       c
       (if (<= y 1.12e-187)
         (* z (* t 0.0625))
         (if (<= y 5.8e-88)
           t_1
           (if (<= y 2.6e-49) c (if (<= y 8e-36) t_1 (* x y)))))))))
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 (y <= -2.2e-88) {
		tmp = x * y;
	} else if (y <= -1.7e-243) {
		tmp = c;
	} else if (y <= 1.12e-187) {
		tmp = z * (t * 0.0625);
	} else if (y <= 5.8e-88) {
		tmp = t_1;
	} else if (y <= 2.6e-49) {
		tmp = c;
	} else if (y <= 8e-36) {
		tmp = t_1;
	} else {
		tmp = x * y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: t_1
    real(8) :: tmp
    t_1 = a * (b * (-0.25d0))
    if (y <= (-2.2d-88)) then
        tmp = x * y
    else if (y <= (-1.7d-243)) then
        tmp = c
    else if (y <= 1.12d-187) then
        tmp = z * (t * 0.0625d0)
    else if (y <= 5.8d-88) then
        tmp = t_1
    else if (y <= 2.6d-49) then
        tmp = c
    else if (y <= 8d-36) then
        tmp = t_1
    else
        tmp = x * y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = a * (b * -0.25);
	double tmp;
	if (y <= -2.2e-88) {
		tmp = x * y;
	} else if (y <= -1.7e-243) {
		tmp = c;
	} else if (y <= 1.12e-187) {
		tmp = z * (t * 0.0625);
	} else if (y <= 5.8e-88) {
		tmp = t_1;
	} else if (y <= 2.6e-49) {
		tmp = c;
	} else if (y <= 8e-36) {
		tmp = t_1;
	} else {
		tmp = x * y;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = a * (b * -0.25)
	tmp = 0
	if y <= -2.2e-88:
		tmp = x * y
	elif y <= -1.7e-243:
		tmp = c
	elif y <= 1.12e-187:
		tmp = z * (t * 0.0625)
	elif y <= 5.8e-88:
		tmp = t_1
	elif y <= 2.6e-49:
		tmp = c
	elif y <= 8e-36:
		tmp = t_1
	else:
		tmp = x * y
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(a * Float64(b * -0.25))
	tmp = 0.0
	if (y <= -2.2e-88)
		tmp = Float64(x * y);
	elseif (y <= -1.7e-243)
		tmp = c;
	elseif (y <= 1.12e-187)
		tmp = Float64(z * Float64(t * 0.0625));
	elseif (y <= 5.8e-88)
		tmp = t_1;
	elseif (y <= 2.6e-49)
		tmp = c;
	elseif (y <= 8e-36)
		tmp = t_1;
	else
		tmp = Float64(x * y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = a * (b * -0.25);
	tmp = 0.0;
	if (y <= -2.2e-88)
		tmp = x * y;
	elseif (y <= -1.7e-243)
		tmp = c;
	elseif (y <= 1.12e-187)
		tmp = z * (t * 0.0625);
	elseif (y <= 5.8e-88)
		tmp = t_1;
	elseif (y <= 2.6e-49)
		tmp = c;
	elseif (y <= 8e-36)
		tmp = t_1;
	else
		tmp = x * y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.2e-88], N[(x * y), $MachinePrecision], If[LessEqual[y, -1.7e-243], c, If[LessEqual[y, 1.12e-187], N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.8e-88], t$95$1, If[LessEqual[y, 2.6e-49], c, If[LessEqual[y, 8e-36], t$95$1, N[(x * y), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(b \cdot -0.25\right)\\
\mathbf{if}\;y \leq -2.2 \cdot 10^{-88}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;y \leq -1.7 \cdot 10^{-243}:\\
\;\;\;\;c\\

\mathbf{elif}\;y \leq 1.12 \cdot 10^{-187}:\\
\;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\

\mathbf{elif}\;y \leq 5.8 \cdot 10^{-88}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 2.6 \cdot 10^{-49}:\\
\;\;\;\;c\\

\mathbf{elif}\;y \leq 8 \cdot 10^{-36}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.20000000000000005e-88 or 7.9999999999999995e-36 < y

    1. Initial program 94.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. sub-neg94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.20000000000000005e-88 < y < -1.69999999999999998e-243 or 5.8000000000000003e-88 < y < 2.59999999999999995e-49

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

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

    if -1.69999999999999998e-243 < y < 1.12e-187

    1. Initial program 97.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. sub-neg97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot \left(0.0625 \cdot t\right)} \]
    8. Simplified35.4%

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

    if 1.12e-187 < y < 5.8000000000000003e-88 or 2.59999999999999995e-49 < y < 7.9999999999999995e-36

    1. Initial program 92.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. sub-neg92.9%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, y, \frac{z}{16} \cdot t\right) + \left(\color{blue}{\frac{-a \cdot b}{4}} + c\right) \]
      6. distribute-rgt-neg-out92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{-88}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-243}:\\ \;\;\;\;c\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{-187}:\\ \;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{-88}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-49}:\\ \;\;\;\;c\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-36}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 13: 38.5% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(b \cdot -0.25\right)\\ \mathbf{if}\;b \leq -1.95 \cdot 10^{-57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -7 \cdot 10^{-305}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;b \leq 8.2 \cdot 10^{-164}:\\ \;\;\;\;c\\ \mathbf{elif}\;b \leq 3.7 \cdot 10^{+98}:\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* a (* b -0.25))))
   (if (<= b -1.95e-57)
     t_1
     (if (<= b -7e-305)
       (* x y)
       (if (<= b 8.2e-164) c (if (<= b 3.7e+98) (* x y) t_1))))))
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 <= -1.95e-57) {
		tmp = t_1;
	} else if (b <= -7e-305) {
		tmp = x * y;
	} else if (b <= 8.2e-164) {
		tmp = c;
	} else if (b <= 3.7e+98) {
		tmp = x * y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: t_1
    real(8) :: tmp
    t_1 = a * (b * (-0.25d0))
    if (b <= (-1.95d-57)) then
        tmp = t_1
    else if (b <= (-7d-305)) then
        tmp = x * y
    else if (b <= 8.2d-164) then
        tmp = c
    else if (b <= 3.7d+98) then
        tmp = x * y
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = a * (b * -0.25);
	double tmp;
	if (b <= -1.95e-57) {
		tmp = t_1;
	} else if (b <= -7e-305) {
		tmp = x * y;
	} else if (b <= 8.2e-164) {
		tmp = c;
	} else if (b <= 3.7e+98) {
		tmp = x * y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = a * (b * -0.25)
	tmp = 0
	if b <= -1.95e-57:
		tmp = t_1
	elif b <= -7e-305:
		tmp = x * y
	elif b <= 8.2e-164:
		tmp = c
	elif b <= 3.7e+98:
		tmp = x * y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(a * Float64(b * -0.25))
	tmp = 0.0
	if (b <= -1.95e-57)
		tmp = t_1;
	elseif (b <= -7e-305)
		tmp = Float64(x * y);
	elseif (b <= 8.2e-164)
		tmp = c;
	elseif (b <= 3.7e+98)
		tmp = Float64(x * y);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = a * (b * -0.25);
	tmp = 0.0;
	if (b <= -1.95e-57)
		tmp = t_1;
	elseif (b <= -7e-305)
		tmp = x * y;
	elseif (b <= 8.2e-164)
		tmp = c;
	elseif (b <= 3.7e+98)
		tmp = x * y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.95e-57], t$95$1, If[LessEqual[b, -7e-305], N[(x * y), $MachinePrecision], If[LessEqual[b, 8.2e-164], c, If[LessEqual[b, 3.7e+98], N[(x * y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(b \cdot -0.25\right)\\
\mathbf{if}\;b \leq -1.95 \cdot 10^{-57}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq -7 \cdot 10^{-305}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;b \leq 8.2 \cdot 10^{-164}:\\
\;\;\;\;c\\

\mathbf{elif}\;b \leq 3.7 \cdot 10^{+98}:\\
\;\;\;\;x \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.95000000000000003e-57 or 3.6999999999999999e98 < b

    1. Initial program 91.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. sub-neg91.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.95000000000000003e-57 < b < -6.9999999999999996e-305 or 8.1999999999999996e-164 < b < 3.6999999999999999e98

    1. Initial program 98.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.9999999999999996e-305 < b < 8.1999999999999996e-164

    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 38.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.95 \cdot 10^{-57}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;b \leq -7 \cdot 10^{-305}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;b \leq 8.2 \cdot 10^{-164}:\\ \;\;\;\;c\\ \mathbf{elif}\;b \leq 3.7 \cdot 10^{+98}:\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \end{array} \]

Alternative 14: 53.7% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c + x \cdot y\\ t_2 := z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{if}\;t \leq -3.8 \cdot 10^{+24}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-213}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 8.6 \cdot 10^{-175}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+163}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (+ c (* x y))) (t_2 (* z (* t 0.0625))))
   (if (<= t -3.8e+24)
     t_2
     (if (<= t 4.4e-213)
       t_1
       (if (<= t 8.6e-175) (* a (* b -0.25)) (if (<= t 1.15e+163) t_1 t_2))))))
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 = z * (t * 0.0625);
	double tmp;
	if (t <= -3.8e+24) {
		tmp = t_2;
	} else if (t <= 4.4e-213) {
		tmp = t_1;
	} else if (t <= 8.6e-175) {
		tmp = a * (b * -0.25);
	} else if (t <= 1.15e+163) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = c + (x * y)
    t_2 = z * (t * 0.0625d0)
    if (t <= (-3.8d+24)) then
        tmp = t_2
    else if (t <= 4.4d-213) then
        tmp = t_1
    else if (t <= 8.6d-175) then
        tmp = a * (b * (-0.25d0))
    else if (t <= 1.15d+163) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = c + (x * y);
	double t_2 = z * (t * 0.0625);
	double tmp;
	if (t <= -3.8e+24) {
		tmp = t_2;
	} else if (t <= 4.4e-213) {
		tmp = t_1;
	} else if (t <= 8.6e-175) {
		tmp = a * (b * -0.25);
	} else if (t <= 1.15e+163) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = c + (x * y)
	t_2 = z * (t * 0.0625)
	tmp = 0
	if t <= -3.8e+24:
		tmp = t_2
	elif t <= 4.4e-213:
		tmp = t_1
	elif t <= 8.6e-175:
		tmp = a * (b * -0.25)
	elif t <= 1.15e+163:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(c + Float64(x * y))
	t_2 = Float64(z * Float64(t * 0.0625))
	tmp = 0.0
	if (t <= -3.8e+24)
		tmp = t_2;
	elseif (t <= 4.4e-213)
		tmp = t_1;
	elseif (t <= 8.6e-175)
		tmp = Float64(a * Float64(b * -0.25));
	elseif (t <= 1.15e+163)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = c + (x * y);
	t_2 = z * (t * 0.0625);
	tmp = 0.0;
	if (t <= -3.8e+24)
		tmp = t_2;
	elseif (t <= 4.4e-213)
		tmp = t_1;
	elseif (t <= 8.6e-175)
		tmp = a * (b * -0.25);
	elseif (t <= 1.15e+163)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.8e+24], t$95$2, If[LessEqual[t, 4.4e-213], t$95$1, If[LessEqual[t, 8.6e-175], N[(a * N[(b * -0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+163], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := z \cdot \left(t \cdot 0.0625\right)\\
\mathbf{if}\;t \leq -3.8 \cdot 10^{+24}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 4.4 \cdot 10^{-213}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 8.6 \cdot 10^{-175}:\\
\;\;\;\;a \cdot \left(b \cdot -0.25\right)\\

\mathbf{elif}\;t \leq 1.15 \cdot 10^{+163}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.80000000000000015e24 or 1.15000000000000001e163 < t

    1. Initial program 89.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. sub-neg89.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{z \cdot \left(0.0625 \cdot t\right)} \]
    8. Simplified56.1%

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

    if -3.80000000000000015e24 < t < 4.40000000000000019e-213 or 8.59999999999999996e-175 < t < 1.15000000000000001e163

    1. Initial program 98.8%

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

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

    if 4.40000000000000019e-213 < t < 8.59999999999999996e-175

    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. sub-neg100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.8 \cdot 10^{+24}:\\ \;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-213}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;t \leq 8.6 \cdot 10^{-175}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+163}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\ \end{array} \]

Alternative 15: 41.9% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq -1.75 \cdot 10^{+80} \lor \neg \left(x \cdot y \leq 7.5 \cdot 10^{+118}\right):\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (if (or (<= (* x y) -1.75e+80) (not (<= (* x y) 7.5e+118))) (* x y) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (((x * y) <= -1.75e+80) || !((x * y) <= 7.5e+118)) {
		tmp = x * y;
	} else {
		tmp = c;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (((x * y) <= (-1.75d+80)) .or. (.not. ((x * y) <= 7.5d+118))) then
        tmp = x * y
    else
        tmp = c
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (((x * y) <= -1.75e+80) || !((x * y) <= 7.5e+118)) {
		tmp = x * y;
	} else {
		tmp = c;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	tmp = 0
	if ((x * y) <= -1.75e+80) or not ((x * y) <= 7.5e+118):
		tmp = x * y
	else:
		tmp = c
	return tmp
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if ((Float64(x * y) <= -1.75e+80) || !(Float64(x * y) <= 7.5e+118))
		tmp = Float64(x * y);
	else
		tmp = c;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	tmp = 0.0;
	if (((x * y) <= -1.75e+80) || ~(((x * y) <= 7.5e+118)))
		tmp = x * y;
	else
		tmp = c;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -1.75e+80], N[Not[LessEqual[N[(x * y), $MachinePrecision], 7.5e+118]], $MachinePrecision]], N[(x * y), $MachinePrecision], c]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.75 \cdot 10^{+80} \lor \neg \left(x \cdot y \leq 7.5 \cdot 10^{+118}\right):\\
\;\;\;\;x \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -1.74999999999999997e80 or 7.50000000000000003e118 < (*.f64 x y)

    1. Initial program 91.1%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, y, \frac{z}{16} \cdot t\right) + \left(\color{blue}{\frac{-a \cdot b}{4}} + c\right) \]
      6. distribute-rgt-neg-out93.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.74999999999999997e80 < (*.f64 x y) < 7.50000000000000003e118

    1. Initial program 97.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -1.75 \cdot 10^{+80} \lor \neg \left(x \cdot y \leq 7.5 \cdot 10^{+118}\right):\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array} \]

Alternative 16: 59.6% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+51} \lor \neg \left(z \leq 38000000\right):\\ \;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;c + x \cdot y\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (if (or (<= z -1.3e+51) (not (<= z 38000000.0)))
   (+ c (* 0.0625 (* z t)))
   (+ c (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((z <= -1.3e+51) || !(z <= 38000000.0)) {
		tmp = c + (0.0625 * (z * t));
	} else {
		tmp = c + (x * y);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if ((z <= (-1.3d+51)) .or. (.not. (z <= 38000000.0d0))) then
        tmp = c + (0.0625d0 * (z * t))
    else
        tmp = c + (x * y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((z <= -1.3e+51) || !(z <= 38000000.0)) {
		tmp = c + (0.0625 * (z * t));
	} else {
		tmp = c + (x * y);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	tmp = 0
	if (z <= -1.3e+51) or not (z <= 38000000.0):
		tmp = c + (0.0625 * (z * t))
	else:
		tmp = c + (x * y)
	return tmp
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if ((z <= -1.3e+51) || !(z <= 38000000.0))
		tmp = Float64(c + Float64(0.0625 * Float64(z * t)));
	else
		tmp = Float64(c + Float64(x * y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	tmp = 0.0;
	if ((z <= -1.3e+51) || ~((z <= 38000000.0)))
		tmp = c + (0.0625 * (z * t));
	else
		tmp = c + (x * y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.3e+51], N[Not[LessEqual[z, 38000000.0]], $MachinePrecision]], N[(c + N[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+51} \lor \neg \left(z \leq 38000000\right):\\
\;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.3000000000000001e51 or 3.8e7 < z

    1. Initial program 91.9%

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

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

    if -1.3000000000000001e51 < z < 3.8e7

    1. Initial program 98.6%

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

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

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

Alternative 17: 22.4% accurate, 17.0× speedup?

\[\begin{array}{l} \\ c \end{array} \]
(FPCore (x y z t a b c) :precision binary64 c)
double code(double x, double y, double z, double t, double a, double b, double c) {
	return 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 = c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	return c;
}
def code(x, y, z, t, a, b, c):
	return c
function code(x, y, z, t, a, b, c)
	return c
end
function tmp = code(x, y, z, t, a, b, c)
	tmp = c;
end
code[x_, y_, z_, t_, a_, b_, c_] := c
\begin{array}{l}

\\
c
\end{array}
Derivation
  1. Initial program 95.7%

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

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

    \[\leadsto c \]

Reproduce

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