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

Percentage Accurate: 97.8% → 98.9%
Time: 7.7s
Alternatives: 15
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 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.9% accurate, 0.1× speedup?

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

\\
\mathsf{fma}\left(t, \frac{z}{16}, \mathsf{fma}\left(x, y, c - b \cdot \frac{a}{4}\right)\right)
\end{array}
Derivation
  1. Initial program 96.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-96.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.6% accurate, 0.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;0.0625 \cdot \left(t \cdot z\right) - \left(b \cdot a\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 99.3%

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

Alternative 3: 64.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c + 0.0625 \cdot \left(t \cdot z\right)\\ t_2 := c + b \cdot \left(a \cdot -0.25\right)\\ t_3 := c + x \cdot y\\ \mathbf{if}\;b \cdot a \leq -1 \cdot 10^{+148}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \cdot a \leq -2 \cdot 10^{+15}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \cdot a \leq -1 \cdot 10^{-141}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \cdot a \leq -1 \cdot 10^{-305}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{-48}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \cdot a \leq 4 \cdot 10^{+62}:\\ \;\;\;\;x \cdot y - \left(b \cdot a\right) \cdot 0.25\\ \mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{+139}:\\ \;\;\;\;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 (* t z))))
        (t_2 (+ c (* b (* a -0.25))))
        (t_3 (+ c (* x y))))
   (if (<= (* b a) -1e+148)
     t_2
     (if (<= (* b a) -2e+15)
       t_1
       (if (<= (* b a) -1e-141)
         t_3
         (if (<= (* b a) -1e-305)
           t_1
           (if (<= (* b a) 5e-48)
             t_3
             (if (<= (* b a) 4e+62)
               (- (* x y) (* (* b a) 0.25))
               (if (<= (* b a) 5e+139) 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 * (t * z));
	double t_2 = c + (b * (a * -0.25));
	double t_3 = c + (x * y);
	double tmp;
	if ((b * a) <= -1e+148) {
		tmp = t_2;
	} else if ((b * a) <= -2e+15) {
		tmp = t_1;
	} else if ((b * a) <= -1e-141) {
		tmp = t_3;
	} else if ((b * a) <= -1e-305) {
		tmp = t_1;
	} else if ((b * a) <= 5e-48) {
		tmp = t_3;
	} else if ((b * a) <= 4e+62) {
		tmp = (x * y) - ((b * a) * 0.25);
	} else if ((b * a) <= 5e+139) {
		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 * (t * z))
    t_2 = c + (b * (a * (-0.25d0)))
    t_3 = c + (x * y)
    if ((b * a) <= (-1d+148)) then
        tmp = t_2
    else if ((b * a) <= (-2d+15)) then
        tmp = t_1
    else if ((b * a) <= (-1d-141)) then
        tmp = t_3
    else if ((b * a) <= (-1d-305)) then
        tmp = t_1
    else if ((b * a) <= 5d-48) then
        tmp = t_3
    else if ((b * a) <= 4d+62) then
        tmp = (x * y) - ((b * a) * 0.25d0)
    else if ((b * a) <= 5d+139) 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 * (t * z));
	double t_2 = c + (b * (a * -0.25));
	double t_3 = c + (x * y);
	double tmp;
	if ((b * a) <= -1e+148) {
		tmp = t_2;
	} else if ((b * a) <= -2e+15) {
		tmp = t_1;
	} else if ((b * a) <= -1e-141) {
		tmp = t_3;
	} else if ((b * a) <= -1e-305) {
		tmp = t_1;
	} else if ((b * a) <= 5e-48) {
		tmp = t_3;
	} else if ((b * a) <= 4e+62) {
		tmp = (x * y) - ((b * a) * 0.25);
	} else if ((b * a) <= 5e+139) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = c + (0.0625 * (t * z))
	t_2 = c + (b * (a * -0.25))
	t_3 = c + (x * y)
	tmp = 0
	if (b * a) <= -1e+148:
		tmp = t_2
	elif (b * a) <= -2e+15:
		tmp = t_1
	elif (b * a) <= -1e-141:
		tmp = t_3
	elif (b * a) <= -1e-305:
		tmp = t_1
	elif (b * a) <= 5e-48:
		tmp = t_3
	elif (b * a) <= 4e+62:
		tmp = (x * y) - ((b * a) * 0.25)
	elif (b * a) <= 5e+139:
		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(t * z)))
	t_2 = Float64(c + Float64(b * Float64(a * -0.25)))
	t_3 = Float64(c + Float64(x * y))
	tmp = 0.0
	if (Float64(b * a) <= -1e+148)
		tmp = t_2;
	elseif (Float64(b * a) <= -2e+15)
		tmp = t_1;
	elseif (Float64(b * a) <= -1e-141)
		tmp = t_3;
	elseif (Float64(b * a) <= -1e-305)
		tmp = t_1;
	elseif (Float64(b * a) <= 5e-48)
		tmp = t_3;
	elseif (Float64(b * a) <= 4e+62)
		tmp = Float64(Float64(x * y) - Float64(Float64(b * a) * 0.25));
	elseif (Float64(b * a) <= 5e+139)
		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 * (t * z));
	t_2 = c + (b * (a * -0.25));
	t_3 = c + (x * y);
	tmp = 0.0;
	if ((b * a) <= -1e+148)
		tmp = t_2;
	elseif ((b * a) <= -2e+15)
		tmp = t_1;
	elseif ((b * a) <= -1e-141)
		tmp = t_3;
	elseif ((b * a) <= -1e-305)
		tmp = t_1;
	elseif ((b * a) <= 5e-48)
		tmp = t_3;
	elseif ((b * a) <= 4e+62)
		tmp = (x * y) - ((b * a) * 0.25);
	elseif ((b * a) <= 5e+139)
		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[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -1e+148], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], -2e+15], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], -1e-141], t$95$3, If[LessEqual[N[(b * a), $MachinePrecision], -1e-305], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 5e-48], t$95$3, If[LessEqual[N[(b * a), $MachinePrecision], 4e+62], N[(N[(x * y), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 5e+139], t$95$3, t$95$2]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;b \cdot a \leq -1 \cdot 10^{-141}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \cdot a \leq -1 \cdot 10^{-305}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \cdot a \leq 4 \cdot 10^{+62}:\\
\;\;\;\;x \cdot y - \left(b \cdot a\right) \cdot 0.25\\

\mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{+139}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 a b) < -1e148 or 5.0000000000000003e139 < (*.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 a around inf 83.6%

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

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

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

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

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

    if -1e148 < (*.f64 a b) < -2e15 or -1e-141 < (*.f64 a b) < -9.99999999999999996e-306

    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 z around inf 78.9%

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

    if -2e15 < (*.f64 a b) < -1e-141 or -9.99999999999999996e-306 < (*.f64 a b) < 4.9999999999999999e-48 or 4.00000000000000014e62 < (*.f64 a b) < 5.0000000000000003e139

    1. Initial program 99.2%

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

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

    if 4.9999999999999999e-48 < (*.f64 a b) < 4.00000000000000014e62

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot a \leq -1 \cdot 10^{+148}:\\ \;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\ \mathbf{elif}\;b \cdot a \leq -2 \cdot 10^{+15}:\\ \;\;\;\;c + 0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;b \cdot a \leq -1 \cdot 10^{-141}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;b \cdot a \leq -1 \cdot 10^{-305}:\\ \;\;\;\;c + 0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{-48}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;b \cdot a \leq 4 \cdot 10^{+62}:\\ \;\;\;\;x \cdot y - \left(b \cdot a\right) \cdot 0.25\\ \mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{+139}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\ \end{array} \]

Alternative 4: 98.5% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;0.0625 \cdot \left(t \cdot z\right) - \left(b \cdot a\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 99.3%

      \[\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. Step-by-step derivation
      1. associate-+l-0.0%

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

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

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

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

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

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

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

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

Alternative 5: 88.5% accurate, 0.6× speedup?

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

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

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

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

\mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{+139}:\\
\;\;\;\;t_3\\

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


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

    1. Initial program 92.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. associate-+l-92.1%

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

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

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

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

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

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

    if -5e102 < (*.f64 a b) < 4.99999999999999972e-30 or 4.00000000000000014e62 < (*.f64 a b) < 5.0000000000000003e139

    1. Initial program 98.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 0 96.3%

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

    if 4.99999999999999972e-30 < (*.f64 a b) < 4.00000000000000014e62

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

Alternative 6: 83.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c + \left(0.0625 \cdot \left(t \cdot z\right) + x \cdot y\right)\\ t_2 := c + b \cdot \left(a \cdot -0.25\right)\\ \mathbf{if}\;b \cdot a \leq -1 \cdot 10^{+191}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{-30}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \cdot a \leq 4 \cdot 10^{+62}:\\ \;\;\;\;x \cdot y - \left(b \cdot a\right) \cdot 0.25\\ \mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{+139}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (+ c (+ (* 0.0625 (* t z)) (* x y))))
        (t_2 (+ c (* b (* a -0.25)))))
   (if (<= (* b a) -1e+191)
     t_2
     (if (<= (* b a) 5e-30)
       t_1
       (if (<= (* b a) 4e+62)
         (- (* x y) (* (* b a) 0.25))
         (if (<= (* b a) 5e+139) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = c + ((0.0625 * (t * z)) + (x * y));
	double t_2 = c + (b * (a * -0.25));
	double tmp;
	if ((b * a) <= -1e+191) {
		tmp = t_2;
	} else if ((b * a) <= 5e-30) {
		tmp = t_1;
	} else if ((b * a) <= 4e+62) {
		tmp = (x * y) - ((b * a) * 0.25);
	} else if ((b * a) <= 5e+139) {
		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 + ((0.0625d0 * (t * z)) + (x * y))
    t_2 = c + (b * (a * (-0.25d0)))
    if ((b * a) <= (-1d+191)) then
        tmp = t_2
    else if ((b * a) <= 5d-30) then
        tmp = t_1
    else if ((b * a) <= 4d+62) then
        tmp = (x * y) - ((b * a) * 0.25d0)
    else if ((b * a) <= 5d+139) 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 + ((0.0625 * (t * z)) + (x * y));
	double t_2 = c + (b * (a * -0.25));
	double tmp;
	if ((b * a) <= -1e+191) {
		tmp = t_2;
	} else if ((b * a) <= 5e-30) {
		tmp = t_1;
	} else if ((b * a) <= 4e+62) {
		tmp = (x * y) - ((b * a) * 0.25);
	} else if ((b * a) <= 5e+139) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = c + ((0.0625 * (t * z)) + (x * y))
	t_2 = c + (b * (a * -0.25))
	tmp = 0
	if (b * a) <= -1e+191:
		tmp = t_2
	elif (b * a) <= 5e-30:
		tmp = t_1
	elif (b * a) <= 4e+62:
		tmp = (x * y) - ((b * a) * 0.25)
	elif (b * a) <= 5e+139:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(c + Float64(Float64(0.0625 * Float64(t * z)) + Float64(x * y)))
	t_2 = Float64(c + Float64(b * Float64(a * -0.25)))
	tmp = 0.0
	if (Float64(b * a) <= -1e+191)
		tmp = t_2;
	elseif (Float64(b * a) <= 5e-30)
		tmp = t_1;
	elseif (Float64(b * a) <= 4e+62)
		tmp = Float64(Float64(x * y) - Float64(Float64(b * a) * 0.25));
	elseif (Float64(b * a) <= 5e+139)
		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 + ((0.0625 * (t * z)) + (x * y));
	t_2 = c + (b * (a * -0.25));
	tmp = 0.0;
	if ((b * a) <= -1e+191)
		tmp = t_2;
	elseif ((b * a) <= 5e-30)
		tmp = t_1;
	elseif ((b * a) <= 4e+62)
		tmp = (x * y) - ((b * a) * 0.25);
	elseif ((b * a) <= 5e+139)
		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[(N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -1e+191], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], 5e-30], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 4e+62], N[(N[(x * y), $MachinePrecision] - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 5e+139], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{-30}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \cdot a \leq 4 \cdot 10^{+62}:\\
\;\;\;\;x \cdot y - \left(b \cdot a\right) \cdot 0.25\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a b) < -1.00000000000000007e191 or 5.0000000000000003e139 < (*.f64 a b)

    1. Initial program 90.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 86.6%

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

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

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

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

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

    if -1.00000000000000007e191 < (*.f64 a b) < 4.99999999999999972e-30 or 4.00000000000000014e62 < (*.f64 a b) < 5.0000000000000003e139

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

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

    if 4.99999999999999972e-30 < (*.f64 a b) < 4.00000000000000014e62

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

Alternative 7: 83.9% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;b \cdot a \leq 4 \cdot 10^{+62}:\\
\;\;\;\;x \cdot y - t_1\\

\mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{+139}:\\
\;\;\;\;t_3\\

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


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

    1. Initial program 89.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. associate-+l-89.1%

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

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

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

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

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

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

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

    if -1.00000000000000007e191 < (*.f64 a b) < 4.99999999999999972e-30 or 4.00000000000000014e62 < (*.f64 a b) < 5.0000000000000003e139

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

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

    if 4.99999999999999972e-30 < (*.f64 a b) < 4.00000000000000014e62

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    if 5.0000000000000003e139 < (*.f64 a b)

    1. Initial program 92.1%

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

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

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

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

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

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

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

Alternative 8: 59.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c + x \cdot y\\ t_2 := c + b \cdot \left(a \cdot -0.25\right)\\ t_3 := c + 0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{if}\;b \leq -18500000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 4.4 \cdot 10^{-213}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 6.2 \cdot 10^{-99}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 1.25 \cdot 10^{-45}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.9 \cdot 10^{+34}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 5.6 \cdot 10^{+90}:\\ \;\;\;\;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 (+ c (* b (* a -0.25))))
        (t_3 (+ c (* 0.0625 (* t z)))))
   (if (<= b -18500000.0)
     t_2
     (if (<= b 4.4e-213)
       t_1
       (if (<= b 6.2e-99)
         t_3
         (if (<= b 1.25e-45)
           t_1
           (if (<= b 1.9e+34) t_3 (if (<= b 5.6e+90) 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 = c + (b * (a * -0.25));
	double t_3 = c + (0.0625 * (t * z));
	double tmp;
	if (b <= -18500000.0) {
		tmp = t_2;
	} else if (b <= 4.4e-213) {
		tmp = t_1;
	} else if (b <= 6.2e-99) {
		tmp = t_3;
	} else if (b <= 1.25e-45) {
		tmp = t_1;
	} else if (b <= 1.9e+34) {
		tmp = t_3;
	} else if (b <= 5.6e+90) {
		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) :: t_3
    real(8) :: tmp
    t_1 = c + (x * y)
    t_2 = c + (b * (a * (-0.25d0)))
    t_3 = c + (0.0625d0 * (t * z))
    if (b <= (-18500000.0d0)) then
        tmp = t_2
    else if (b <= 4.4d-213) then
        tmp = t_1
    else if (b <= 6.2d-99) then
        tmp = t_3
    else if (b <= 1.25d-45) then
        tmp = t_1
    else if (b <= 1.9d+34) then
        tmp = t_3
    else if (b <= 5.6d+90) 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 = c + (b * (a * -0.25));
	double t_3 = c + (0.0625 * (t * z));
	double tmp;
	if (b <= -18500000.0) {
		tmp = t_2;
	} else if (b <= 4.4e-213) {
		tmp = t_1;
	} else if (b <= 6.2e-99) {
		tmp = t_3;
	} else if (b <= 1.25e-45) {
		tmp = t_1;
	} else if (b <= 1.9e+34) {
		tmp = t_3;
	} else if (b <= 5.6e+90) {
		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 = c + (b * (a * -0.25))
	t_3 = c + (0.0625 * (t * z))
	tmp = 0
	if b <= -18500000.0:
		tmp = t_2
	elif b <= 4.4e-213:
		tmp = t_1
	elif b <= 6.2e-99:
		tmp = t_3
	elif b <= 1.25e-45:
		tmp = t_1
	elif b <= 1.9e+34:
		tmp = t_3
	elif b <= 5.6e+90:
		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(c + Float64(b * Float64(a * -0.25)))
	t_3 = Float64(c + Float64(0.0625 * Float64(t * z)))
	tmp = 0.0
	if (b <= -18500000.0)
		tmp = t_2;
	elseif (b <= 4.4e-213)
		tmp = t_1;
	elseif (b <= 6.2e-99)
		tmp = t_3;
	elseif (b <= 1.25e-45)
		tmp = t_1;
	elseif (b <= 1.9e+34)
		tmp = t_3;
	elseif (b <= 5.6e+90)
		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 = c + (b * (a * -0.25));
	t_3 = c + (0.0625 * (t * z));
	tmp = 0.0;
	if (b <= -18500000.0)
		tmp = t_2;
	elseif (b <= 4.4e-213)
		tmp = t_1;
	elseif (b <= 6.2e-99)
		tmp = t_3;
	elseif (b <= 1.25e-45)
		tmp = t_1;
	elseif (b <= 1.9e+34)
		tmp = t_3;
	elseif (b <= 5.6e+90)
		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[(c + N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c + N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -18500000.0], t$95$2, If[LessEqual[b, 4.4e-213], t$95$1, If[LessEqual[b, 6.2e-99], t$95$3, If[LessEqual[b, 1.25e-45], t$95$1, If[LessEqual[b, 1.9e+34], t$95$3, If[LessEqual[b, 5.6e+90], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;b \leq 6.2 \cdot 10^{-99}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 1.25 \cdot 10^{-45}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 1.9 \cdot 10^{+34}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 5.6 \cdot 10^{+90}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.85e7 or 5.6000000000000001e90 < b

    1. Initial program 93.4%

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

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

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

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

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

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

    if -1.85e7 < b < 4.40000000000000019e-213 or 6.1999999999999997e-99 < b < 1.24999999999999994e-45 or 1.9000000000000001e34 < b < 5.6000000000000001e90

    1. Initial program 99.0%

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

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

    if 4.40000000000000019e-213 < b < 6.1999999999999997e-99 or 1.24999999999999994e-45 < b < 1.9000000000000001e34

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -18500000:\\ \;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\ \mathbf{elif}\;b \leq 4.4 \cdot 10^{-213}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;b \leq 6.2 \cdot 10^{-99}:\\ \;\;\;\;c + 0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;b \leq 1.25 \cdot 10^{-45}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;b \leq 1.9 \cdot 10^{+34}:\\ \;\;\;\;c + 0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;b \leq 5.6 \cdot 10^{+90}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\ \end{array} \]

Alternative 9: 87.1% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 89.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. associate-+l-89.1%

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

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

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

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

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

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

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

    if -1.00000000000000007e191 < (*.f64 a b) < 4.99999999999999972e-30

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

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

    if 4.99999999999999972e-30 < (*.f64 a b)

    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. fma-def95.7%

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

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

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

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

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

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

Alternative 10: 39.0% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;b \leq 9 \cdot 10^{-190}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;b \leq 2.2 \cdot 10^{-146}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 3.9 \cdot 10^{-49}:\\
\;\;\;\;c\\

\mathbf{elif}\;b \leq 7 \cdot 10^{+34}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -3.99999999999999994e-45 or 3.7e90 < b

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.99999999999999994e-45 < b < 9.00000000000000042e-190 or 6.99999999999999996e34 < b < 3.7e90

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

    if 9.00000000000000042e-190 < b < 2.2e-146 or 3.90000000000000011e-49 < b < 6.99999999999999996e34

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    if 2.2e-146 < b < 3.90000000000000011e-49

    1. Initial program 100.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4 \cdot 10^{-45}:\\ \;\;\;\;b \cdot \left(a \cdot -0.25\right)\\ \mathbf{elif}\;b \leq 9 \cdot 10^{-190}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{-146}:\\ \;\;\;\;0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;b \leq 3.9 \cdot 10^{-49}:\\ \;\;\;\;c\\ \mathbf{elif}\;b \leq 7 \cdot 10^{+34}:\\ \;\;\;\;0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;b \leq 3.7 \cdot 10^{+90}:\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a \cdot -0.25\right)\\ \end{array} \]

Alternative 11: 52.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c + x \cdot y\\ t_2 := c + 0.0625 \cdot \left(t \cdot z\right)\\ t_3 := b \cdot \left(a \cdot -0.25\right)\\ \mathbf{if}\;b \leq -8600:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{-212}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 5 \cdot 10^{-99}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 1.5 \cdot 10^{-41}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 8.5 \cdot 10^{+34}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 9 \cdot 10^{+199}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (+ c (* x y)))
        (t_2 (+ c (* 0.0625 (* t z))))
        (t_3 (* b (* a -0.25))))
   (if (<= b -8600.0)
     t_3
     (if (<= b 1.15e-212)
       t_1
       (if (<= b 5e-99)
         t_2
         (if (<= b 1.5e-41)
           t_1
           (if (<= b 8.5e+34) t_2 (if (<= b 9e+199) t_1 t_3))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = c + (x * y);
	double t_2 = c + (0.0625 * (t * z));
	double t_3 = b * (a * -0.25);
	double tmp;
	if (b <= -8600.0) {
		tmp = t_3;
	} else if (b <= 1.15e-212) {
		tmp = t_1;
	} else if (b <= 5e-99) {
		tmp = t_2;
	} else if (b <= 1.5e-41) {
		tmp = t_1;
	} else if (b <= 8.5e+34) {
		tmp = t_2;
	} else if (b <= 9e+199) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	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 + (x * y)
    t_2 = c + (0.0625d0 * (t * z))
    t_3 = b * (a * (-0.25d0))
    if (b <= (-8600.0d0)) then
        tmp = t_3
    else if (b <= 1.15d-212) then
        tmp = t_1
    else if (b <= 5d-99) then
        tmp = t_2
    else if (b <= 1.5d-41) then
        tmp = t_1
    else if (b <= 8.5d+34) then
        tmp = t_2
    else if (b <= 9d+199) then
        tmp = t_1
    else
        tmp = t_3
    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 = c + (0.0625 * (t * z));
	double t_3 = b * (a * -0.25);
	double tmp;
	if (b <= -8600.0) {
		tmp = t_3;
	} else if (b <= 1.15e-212) {
		tmp = t_1;
	} else if (b <= 5e-99) {
		tmp = t_2;
	} else if (b <= 1.5e-41) {
		tmp = t_1;
	} else if (b <= 8.5e+34) {
		tmp = t_2;
	} else if (b <= 9e+199) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = c + (x * y)
	t_2 = c + (0.0625 * (t * z))
	t_3 = b * (a * -0.25)
	tmp = 0
	if b <= -8600.0:
		tmp = t_3
	elif b <= 1.15e-212:
		tmp = t_1
	elif b <= 5e-99:
		tmp = t_2
	elif b <= 1.5e-41:
		tmp = t_1
	elif b <= 8.5e+34:
		tmp = t_2
	elif b <= 9e+199:
		tmp = t_1
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(c + Float64(x * y))
	t_2 = Float64(c + Float64(0.0625 * Float64(t * z)))
	t_3 = Float64(b * Float64(a * -0.25))
	tmp = 0.0
	if (b <= -8600.0)
		tmp = t_3;
	elseif (b <= 1.15e-212)
		tmp = t_1;
	elseif (b <= 5e-99)
		tmp = t_2;
	elseif (b <= 1.5e-41)
		tmp = t_1;
	elseif (b <= 8.5e+34)
		tmp = t_2;
	elseif (b <= 9e+199)
		tmp = t_1;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = c + (x * y);
	t_2 = c + (0.0625 * (t * z));
	t_3 = b * (a * -0.25);
	tmp = 0.0;
	if (b <= -8600.0)
		tmp = t_3;
	elseif (b <= 1.15e-212)
		tmp = t_1;
	elseif (b <= 5e-99)
		tmp = t_2;
	elseif (b <= 1.5e-41)
		tmp = t_1;
	elseif (b <= 8.5e+34)
		tmp = t_2;
	elseif (b <= 9e+199)
		tmp = t_1;
	else
		tmp = t_3;
	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[(c + N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8600.0], t$95$3, If[LessEqual[b, 1.15e-212], t$95$1, If[LessEqual[b, 5e-99], t$95$2, If[LessEqual[b, 1.5e-41], t$95$1, If[LessEqual[b, 8.5e+34], t$95$2, If[LessEqual[b, 9e+199], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq 1.15 \cdot 10^{-212}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 5 \cdot 10^{-99}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 1.5 \cdot 10^{-41}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 8.5 \cdot 10^{+34}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 9 \cdot 10^{+199}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -8600 or 8.9999999999999994e199 < b

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -8600 < b < 1.15e-212 or 4.99999999999999969e-99 < b < 1.49999999999999994e-41 or 8.5000000000000003e34 < b < 8.9999999999999994e199

    1. Initial program 98.4%

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

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

    if 1.15e-212 < b < 4.99999999999999969e-99 or 1.49999999999999994e-41 < b < 8.5000000000000003e34

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8600:\\ \;\;\;\;b \cdot \left(a \cdot -0.25\right)\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{-212}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;b \leq 5 \cdot 10^{-99}:\\ \;\;\;\;c + 0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;b \leq 1.5 \cdot 10^{-41}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;b \leq 8.5 \cdot 10^{+34}:\\ \;\;\;\;c + 0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;b \leq 9 \cdot 10^{+199}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a \cdot -0.25\right)\\ \end{array} \]

Alternative 12: 52.3% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c + x \cdot y\\ t_2 := b \cdot \left(a \cdot -0.25\right)\\ \mathbf{if}\;b \leq -55000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 1.55 \cdot 10^{-41}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.56 \cdot 10^{+31}:\\ \;\;\;\;0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;b \leq 1.4 \cdot 10^{+200}:\\ \;\;\;\;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 (* b (* a -0.25))))
   (if (<= b -55000000.0)
     t_2
     (if (<= b 1.55e-41)
       t_1
       (if (<= b 1.56e+31) (* 0.0625 (* t z)) (if (<= b 1.4e+200) 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 = b * (a * -0.25);
	double tmp;
	if (b <= -55000000.0) {
		tmp = t_2;
	} else if (b <= 1.55e-41) {
		tmp = t_1;
	} else if (b <= 1.56e+31) {
		tmp = 0.0625 * (t * z);
	} else if (b <= 1.4e+200) {
		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 = b * (a * (-0.25d0))
    if (b <= (-55000000.0d0)) then
        tmp = t_2
    else if (b <= 1.55d-41) then
        tmp = t_1
    else if (b <= 1.56d+31) then
        tmp = 0.0625d0 * (t * z)
    else if (b <= 1.4d+200) 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 = b * (a * -0.25);
	double tmp;
	if (b <= -55000000.0) {
		tmp = t_2;
	} else if (b <= 1.55e-41) {
		tmp = t_1;
	} else if (b <= 1.56e+31) {
		tmp = 0.0625 * (t * z);
	} else if (b <= 1.4e+200) {
		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 = b * (a * -0.25)
	tmp = 0
	if b <= -55000000.0:
		tmp = t_2
	elif b <= 1.55e-41:
		tmp = t_1
	elif b <= 1.56e+31:
		tmp = 0.0625 * (t * z)
	elif b <= 1.4e+200:
		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(b * Float64(a * -0.25))
	tmp = 0.0
	if (b <= -55000000.0)
		tmp = t_2;
	elseif (b <= 1.55e-41)
		tmp = t_1;
	elseif (b <= 1.56e+31)
		tmp = Float64(0.0625 * Float64(t * z));
	elseif (b <= 1.4e+200)
		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 = b * (a * -0.25);
	tmp = 0.0;
	if (b <= -55000000.0)
		tmp = t_2;
	elseif (b <= 1.55e-41)
		tmp = t_1;
	elseif (b <= 1.56e+31)
		tmp = 0.0625 * (t * z);
	elseif (b <= 1.4e+200)
		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[(b * N[(a * -0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -55000000.0], t$95$2, If[LessEqual[b, 1.55e-41], t$95$1, If[LessEqual[b, 1.56e+31], N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.4e+200], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := c + x \cdot y\\
t_2 := b \cdot \left(a \cdot -0.25\right)\\
\mathbf{if}\;b \leq -55000000:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 1.55 \cdot 10^{-41}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 1.4 \cdot 10^{+200}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -5.5e7 or 1.39999999999999992e200 < b

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.5e7 < b < 1.55e-41 or 1.56000000000000004e31 < b < 1.39999999999999992e200

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

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

    if 1.55e-41 < b < 1.56000000000000004e31

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -55000000:\\ \;\;\;\;b \cdot \left(a \cdot -0.25\right)\\ \mathbf{elif}\;b \leq 1.55 \cdot 10^{-41}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;b \leq 1.56 \cdot 10^{+31}:\\ \;\;\;\;0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;b \leq 1.4 \cdot 10^{+200}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a \cdot -0.25\right)\\ \end{array} \]

Alternative 13: 35.7% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{-115}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;y \leq 7.7 \cdot 10^{-28}:\\ \;\;\;\;c\\ \mathbf{elif}\;y \leq 8.6 \cdot 10^{+148}:\\ \;\;\;\;0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (if (<= y -3.2e-115)
   (* x y)
   (if (<= y 7.7e-28) c (if (<= y 8.6e+148) (* 0.0625 (* t z)) (* x y)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (y <= -3.2e-115) {
		tmp = x * y;
	} else if (y <= 7.7e-28) {
		tmp = c;
	} else if (y <= 8.6e+148) {
		tmp = 0.0625 * (t * z);
	} 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) :: tmp
    if (y <= (-3.2d-115)) then
        tmp = x * y
    else if (y <= 7.7d-28) then
        tmp = c
    else if (y <= 8.6d+148) then
        tmp = 0.0625d0 * (t * z)
    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 tmp;
	if (y <= -3.2e-115) {
		tmp = x * y;
	} else if (y <= 7.7e-28) {
		tmp = c;
	} else if (y <= 8.6e+148) {
		tmp = 0.0625 * (t * z);
	} else {
		tmp = x * y;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	tmp = 0
	if y <= -3.2e-115:
		tmp = x * y
	elif y <= 7.7e-28:
		tmp = c
	elif y <= 8.6e+148:
		tmp = 0.0625 * (t * z)
	else:
		tmp = x * y
	return tmp
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (y <= -3.2e-115)
		tmp = Float64(x * y);
	elseif (y <= 7.7e-28)
		tmp = c;
	elseif (y <= 8.6e+148)
		tmp = Float64(0.0625 * Float64(t * z));
	else
		tmp = Float64(x * y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	tmp = 0.0;
	if (y <= -3.2e-115)
		tmp = x * y;
	elseif (y <= 7.7e-28)
		tmp = c;
	elseif (y <= 8.6e+148)
		tmp = 0.0625 * (t * z);
	else
		tmp = x * y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, -3.2e-115], N[(x * y), $MachinePrecision], If[LessEqual[y, 7.7e-28], c, If[LessEqual[y, 8.6e+148], N[(0.0625 * N[(t * z), $MachinePrecision]), $MachinePrecision], N[(x * y), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{-115}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;y \leq 7.7 \cdot 10^{-28}:\\
\;\;\;\;c\\

\mathbf{elif}\;y \leq 8.6 \cdot 10^{+148}:\\
\;\;\;\;0.0625 \cdot \left(t \cdot z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.2e-115 or 8.6000000000000003e148 < y

    1. Initial program 94.4%

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

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

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

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

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

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

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

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

    if -3.2e-115 < y < 7.7000000000000001e-28

    1. Initial program 99.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. associate-+l-99.1%

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

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

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

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

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

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

    if 7.7000000000000001e-28 < y < 8.6000000000000003e148

    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. associate-+l-97.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{-115}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;y \leq 7.7 \cdot 10^{-28}:\\ \;\;\;\;c\\ \mathbf{elif}\;y \leq 8.6 \cdot 10^{+148}:\\ \;\;\;\;0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 14: 37.7% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \leq -2.8 \cdot 10^{+86}:\\ \;\;\;\;c\\ \mathbf{elif}\;c \leq 56000000:\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (if (<= c -2.8e+86) c (if (<= c 56000000.0) (* x y) c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (c <= -2.8e+86) {
		tmp = c;
	} else if (c <= 56000000.0) {
		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 (c <= (-2.8d+86)) then
        tmp = c
    else if (c <= 56000000.0d0) 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 (c <= -2.8e+86) {
		tmp = c;
	} else if (c <= 56000000.0) {
		tmp = x * y;
	} else {
		tmp = c;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	tmp = 0
	if c <= -2.8e+86:
		tmp = c
	elif c <= 56000000.0:
		tmp = x * y
	else:
		tmp = c
	return tmp
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (c <= -2.8e+86)
		tmp = c;
	elseif (c <= 56000000.0)
		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 (c <= -2.8e+86)
		tmp = c;
	elseif (c <= 56000000.0)
		tmp = x * y;
	else
		tmp = c;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, -2.8e+86], c, If[LessEqual[c, 56000000.0], N[(x * y), $MachinePrecision], c]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.8 \cdot 10^{+86}:\\
\;\;\;\;c\\

\mathbf{elif}\;c \leq 56000000:\\
\;\;\;\;x \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -2.80000000000000004e86 or 5.6e7 < c

    1. Initial program 96.8%

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

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

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

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

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

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

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

    if -2.80000000000000004e86 < c < 5.6e7

    1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

Alternative 15: 22.2% 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 96.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-96.6%

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

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

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

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

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

    \[\leadsto \color{blue}{c} \]
  5. Final simplification26.1%

    \[\leadsto c \]

Reproduce

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