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

Percentage Accurate: 97.7% → 98.8%
Time: 9.4s
Alternatives: 17
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 97.7% accurate, 1.0× speedup?

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

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

Alternative 1: 98.8% accurate, 0.1× speedup?

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

\\
\mathsf{fma}\left(x, y, \mathsf{fma}\left(b, -0.25 \cdot a, \mathsf{fma}\left(z, \frac{t}{16}, c\right)\right)\right)
\end{array}
Derivation
  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. +-commutative98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.8% 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 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. +-commutative98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 65.6% accurate, 0.7× speedup?

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

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

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

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

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

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


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

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999994e162 < (*.f64 a b) < -4e-82

    1. Initial program 100.0%

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

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

    if -4e-82 < (*.f64 a b) < -9.99999999999999913e-215

    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. +-commutative100.0%

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{z}{16}} + \left(x \cdot y - \left(\frac{a \cdot b}{4} - c\right)\right) \]
      6. fma-def100.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-neg100.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-sub0100.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-100.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-sub0100.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. +-commutative100.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-neg100.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. *-commutative100.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/100.0%

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

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

      \[\leadsto \mathsf{fma}\left(t, \frac{z}{16}, \color{blue}{c + y \cdot x}\right) \]
    5. Taylor expanded in c around 0 89.6%

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

    if -9.99999999999999913e-215 < (*.f64 a b) < 2e94

    1. Initial program 100.0%

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

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

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

Alternative 4: 90.4% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999997e111 < (*.f64 a b) < 2e94

    1. Initial program 100.0%

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

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

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

Alternative 5: 86.3% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999994e162 < (*.f64 a b) < 2.00000000000000011e232

    1. Initial program 100.0%

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

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

    if 2.00000000000000011e232 < (*.f64 a b)

    1. Initial program 88.0%

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

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

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

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

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

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

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

Alternative 6: 86.3% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999997e111 < (*.f64 a b) < 2.00000000000000011e232

    1. Initial program 100.0%

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

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

    if 2.00000000000000011e232 < (*.f64 a b)

    1. Initial program 88.0%

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

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

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

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

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

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

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

Alternative 7: 87.6% 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(z \cdot t\right)\\ \mathbf{if}\;b \cdot a \leq -5 \cdot 10^{+111}:\\ \;\;\;\;t_2 - t_1\\ \mathbf{elif}\;b \cdot a \leq 10^{+192}:\\ \;\;\;\;c + \left(x \cdot y + t_2\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 (* z t))))
   (if (<= (* b a) -5e+111)
     (- t_2 t_1)
     (if (<= (* b a) 1e+192) (+ c (+ (* x y) t_2)) (- (+ 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 * (z * t);
	double tmp;
	if ((b * a) <= -5e+111) {
		tmp = t_2 - t_1;
	} else if ((b * a) <= 1e+192) {
		tmp = c + ((x * y) + t_2);
	} 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 * (z * t)
    if ((b * a) <= (-5d+111)) then
        tmp = t_2 - t_1
    else if ((b * a) <= 1d+192) then
        tmp = c + ((x * y) + t_2)
    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 * (z * t);
	double tmp;
	if ((b * a) <= -5e+111) {
		tmp = t_2 - t_1;
	} else if ((b * a) <= 1e+192) {
		tmp = c + ((x * y) + t_2);
	} 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 * (z * t)
	tmp = 0
	if (b * a) <= -5e+111:
		tmp = t_2 - t_1
	elif (b * a) <= 1e+192:
		tmp = c + ((x * y) + t_2)
	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(z * t))
	tmp = 0.0
	if (Float64(b * a) <= -5e+111)
		tmp = Float64(t_2 - t_1);
	elseif (Float64(b * a) <= 1e+192)
		tmp = Float64(c + Float64(Float64(x * y) + t_2));
	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 * (z * t);
	tmp = 0.0;
	if ((b * a) <= -5e+111)
		tmp = t_2 - t_1;
	elseif ((b * a) <= 1e+192)
		tmp = c + ((x * y) + t_2);
	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[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -5e+111], N[(t$95$2 - t$95$1), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 1e+192], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999997e111 < (*.f64 a b) < 1.00000000000000004e192

    1. Initial program 100.0%

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

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

    if 1.00000000000000004e192 < (*.f64 a b)

    1. Initial program 89.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-89.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 88.7% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999997e111 < (*.f64 a b) < 1.00000000000000004e192

    1. Initial program 100.0%

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

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

    if 1.00000000000000004e192 < (*.f64 a b)

    1. Initial program 89.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-89.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 53.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c + x \cdot y\\ t_2 := 0.0625 \cdot \left(z \cdot t\right)\\ t_3 := b \cdot \left(-0.25 \cdot a\right)\\ \mathbf{if}\;b \leq -255000000:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 4.5 \cdot 10^{-156}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.15 \cdot 10^{-122}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 4 \cdot 10^{+149}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.4 \cdot 10^{+159}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{+188}:\\ \;\;\;\;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 (* 0.0625 (* z t))) (t_3 (* b (* -0.25 a))))
   (if (<= b -255000000.0)
     t_3
     (if (<= b 4.5e-156)
       t_1
       (if (<= b 2.15e-122)
         t_2
         (if (<= b 4e+149)
           t_1
           (if (<= b 1.4e+159) t_2 (if (<= b 6.5e+188) 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 = 0.0625 * (z * t);
	double t_3 = b * (-0.25 * a);
	double tmp;
	if (b <= -255000000.0) {
		tmp = t_3;
	} else if (b <= 4.5e-156) {
		tmp = t_1;
	} else if (b <= 2.15e-122) {
		tmp = t_2;
	} else if (b <= 4e+149) {
		tmp = t_1;
	} else if (b <= 1.4e+159) {
		tmp = t_2;
	} else if (b <= 6.5e+188) {
		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 = 0.0625d0 * (z * t)
    t_3 = b * ((-0.25d0) * a)
    if (b <= (-255000000.0d0)) then
        tmp = t_3
    else if (b <= 4.5d-156) then
        tmp = t_1
    else if (b <= 2.15d-122) then
        tmp = t_2
    else if (b <= 4d+149) then
        tmp = t_1
    else if (b <= 1.4d+159) then
        tmp = t_2
    else if (b <= 6.5d+188) 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 = 0.0625 * (z * t);
	double t_3 = b * (-0.25 * a);
	double tmp;
	if (b <= -255000000.0) {
		tmp = t_3;
	} else if (b <= 4.5e-156) {
		tmp = t_1;
	} else if (b <= 2.15e-122) {
		tmp = t_2;
	} else if (b <= 4e+149) {
		tmp = t_1;
	} else if (b <= 1.4e+159) {
		tmp = t_2;
	} else if (b <= 6.5e+188) {
		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 = 0.0625 * (z * t)
	t_3 = b * (-0.25 * a)
	tmp = 0
	if b <= -255000000.0:
		tmp = t_3
	elif b <= 4.5e-156:
		tmp = t_1
	elif b <= 2.15e-122:
		tmp = t_2
	elif b <= 4e+149:
		tmp = t_1
	elif b <= 1.4e+159:
		tmp = t_2
	elif b <= 6.5e+188:
		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(0.0625 * Float64(z * t))
	t_3 = Float64(b * Float64(-0.25 * a))
	tmp = 0.0
	if (b <= -255000000.0)
		tmp = t_3;
	elseif (b <= 4.5e-156)
		tmp = t_1;
	elseif (b <= 2.15e-122)
		tmp = t_2;
	elseif (b <= 4e+149)
		tmp = t_1;
	elseif (b <= 1.4e+159)
		tmp = t_2;
	elseif (b <= 6.5e+188)
		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 = 0.0625 * (z * t);
	t_3 = b * (-0.25 * a);
	tmp = 0.0;
	if (b <= -255000000.0)
		tmp = t_3;
	elseif (b <= 4.5e-156)
		tmp = t_1;
	elseif (b <= 2.15e-122)
		tmp = t_2;
	elseif (b <= 4e+149)
		tmp = t_1;
	elseif (b <= 1.4e+159)
		tmp = t_2;
	elseif (b <= 6.5e+188)
		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[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(b * N[(-0.25 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -255000000.0], t$95$3, If[LessEqual[b, 4.5e-156], t$95$1, If[LessEqual[b, 2.15e-122], t$95$2, If[LessEqual[b, 4e+149], t$95$1, If[LessEqual[b, 1.4e+159], t$95$2, If[LessEqual[b, 6.5e+188], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq 4.5 \cdot 10^{-156}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 2.15 \cdot 10^{-122}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 4 \cdot 10^{+149}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 1.4 \cdot 10^{+159}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 6.5 \cdot 10^{+188}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.55e8 or 6.49999999999999953e188 < b

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.55e8 < b < 4.49999999999999986e-156 or 2.15000000000000009e-122 < b < 4.0000000000000002e149 or 1.4000000000000001e159 < b < 6.49999999999999953e188

    1. Initial program 100.0%

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

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

    if 4.49999999999999986e-156 < b < 2.15000000000000009e-122 or 4.0000000000000002e149 < b < 1.4000000000000001e159

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -255000000:\\ \;\;\;\;b \cdot \left(-0.25 \cdot a\right)\\ \mathbf{elif}\;b \leq 4.5 \cdot 10^{-156}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;b \leq 2.15 \cdot 10^{-122}:\\ \;\;\;\;0.0625 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;b \leq 4 \cdot 10^{+149}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;b \leq 1.4 \cdot 10^{+159}:\\ \;\;\;\;0.0625 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{+188}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(-0.25 \cdot a\right)\\ \end{array} \]

Alternative 10: 59.5% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq 3.5 \cdot 10^{-154}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 2.7 \cdot 10^{+87}:\\
\;\;\;\;c + t_2\\

\mathbf{elif}\;y \leq 5.2 \cdot 10^{+119}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.69999999999999988e-134 or 5.2e119 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(t, \frac{z}{16}, \color{blue}{c + y \cdot x}\right) \]
    5. Taylor expanded in c around 0 60.7%

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

    if -1.69999999999999988e-134 < y < 3.5000000000000001e-154 or 2.70000000000000007e87 < y < 5.2e119

    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 inf 67.7%

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

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

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

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

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

    if 3.5000000000000001e-154 < y < 2.70000000000000007e87

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{-134}:\\ \;\;\;\;x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-154}:\\ \;\;\;\;c + b \cdot \left(-0.25 \cdot a\right)\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{+87}:\\ \;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+119}:\\ \;\;\;\;c + b \cdot \left(-0.25 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\\ \end{array} \]

Alternative 11: 97.7% accurate, 1.0× speedup?

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

\\
c + \left(\left(\frac{z \cdot t}{16} + x \cdot y\right) - \frac{b \cdot a}{4}\right)
\end{array}
Derivation
  1. Initial program 98.8%

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

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

Alternative 12: 58.3% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c + x \cdot y\\ t_2 := 0.0625 \cdot \left(z \cdot t\right)\\ \mathbf{if}\;y \leq -5.8 \cdot 10^{-33}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{-154}:\\ \;\;\;\;c + b \cdot \left(-0.25 \cdot a\right)\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+83}:\\ \;\;\;\;c + t_2\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{+163} \lor \neg \left(y \leq 4.2 \cdot 10^{+190}\right):\\ \;\;\;\;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 (* 0.0625 (* z t))))
   (if (<= y -5.8e-33)
     t_1
     (if (<= y 2.4e-154)
       (+ c (* b (* -0.25 a)))
       (if (<= y 2.4e+83)
         (+ c t_2)
         (if (or (<= y 1.12e+163) (not (<= y 4.2e+190))) 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 = 0.0625 * (z * t);
	double tmp;
	if (y <= -5.8e-33) {
		tmp = t_1;
	} else if (y <= 2.4e-154) {
		tmp = c + (b * (-0.25 * a));
	} else if (y <= 2.4e+83) {
		tmp = c + t_2;
	} else if ((y <= 1.12e+163) || !(y <= 4.2e+190)) {
		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 = 0.0625d0 * (z * t)
    if (y <= (-5.8d-33)) then
        tmp = t_1
    else if (y <= 2.4d-154) then
        tmp = c + (b * ((-0.25d0) * a))
    else if (y <= 2.4d+83) then
        tmp = c + t_2
    else if ((y <= 1.12d+163) .or. (.not. (y <= 4.2d+190))) 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 = 0.0625 * (z * t);
	double tmp;
	if (y <= -5.8e-33) {
		tmp = t_1;
	} else if (y <= 2.4e-154) {
		tmp = c + (b * (-0.25 * a));
	} else if (y <= 2.4e+83) {
		tmp = c + t_2;
	} else if ((y <= 1.12e+163) || !(y <= 4.2e+190)) {
		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 = 0.0625 * (z * t)
	tmp = 0
	if y <= -5.8e-33:
		tmp = t_1
	elif y <= 2.4e-154:
		tmp = c + (b * (-0.25 * a))
	elif y <= 2.4e+83:
		tmp = c + t_2
	elif (y <= 1.12e+163) or not (y <= 4.2e+190):
		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(0.0625 * Float64(z * t))
	tmp = 0.0
	if (y <= -5.8e-33)
		tmp = t_1;
	elseif (y <= 2.4e-154)
		tmp = Float64(c + Float64(b * Float64(-0.25 * a)));
	elseif (y <= 2.4e+83)
		tmp = Float64(c + t_2);
	elseif ((y <= 1.12e+163) || !(y <= 4.2e+190))
		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 = 0.0625 * (z * t);
	tmp = 0.0;
	if (y <= -5.8e-33)
		tmp = t_1;
	elseif (y <= 2.4e-154)
		tmp = c + (b * (-0.25 * a));
	elseif (y <= 2.4e+83)
		tmp = c + t_2;
	elseif ((y <= 1.12e+163) || ~((y <= 4.2e+190)))
		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[(0.0625 * N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.8e-33], t$95$1, If[LessEqual[y, 2.4e-154], N[(c + N[(b * N[(-0.25 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+83], N[(c + t$95$2), $MachinePrecision], If[Or[LessEqual[y, 1.12e+163], N[Not[LessEqual[y, 4.2e+190]], $MachinePrecision]], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 2.4 \cdot 10^{-154}:\\
\;\;\;\;c + b \cdot \left(-0.25 \cdot a\right)\\

\mathbf{elif}\;y \leq 2.4 \cdot 10^{+83}:\\
\;\;\;\;c + t_2\\

\mathbf{elif}\;y \leq 1.12 \cdot 10^{+163} \lor \neg \left(y \leq 4.2 \cdot 10^{+190}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.80000000000000005e-33 or 2.39999999999999991e83 < y < 1.11999999999999996e163 or 4.2000000000000001e190 < y

    1. Initial program 97.4%

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

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

    if -5.80000000000000005e-33 < y < 2.39999999999999987e-154

    1. Initial program 100.0%

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

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

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

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

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

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

    if 2.39999999999999987e-154 < y < 2.39999999999999991e83

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

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

    if 1.11999999999999996e163 < y < 4.2000000000000001e190

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.8 \cdot 10^{-33}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{-154}:\\ \;\;\;\;c + b \cdot \left(-0.25 \cdot a\right)\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+83}:\\ \;\;\;\;c + 0.0625 \cdot \left(z \cdot t\right)\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{+163} \lor \neg \left(y \leq 4.2 \cdot 10^{+190}\right):\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;0.0625 \cdot \left(z \cdot t\right)\\ \end{array} \]

Alternative 13: 38.0% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.35 \cdot 10^{+163}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;x \leq -15000000:\\
\;\;\;\;b \cdot \left(-0.25 \cdot a\right)\\

\mathbf{elif}\;x \leq 6.5 \cdot 10^{-274}:\\
\;\;\;\;c\\

\mathbf{elif}\;x \leq 5.8 \cdot 10^{-28}:\\
\;\;\;\;0.0625 \cdot \left(z \cdot t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.35000000000000009e163 or 5.80000000000000026e-28 < x

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.35000000000000009e163 < x < -1.5e7

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.5e7 < x < 6.49999999999999959e-274

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.49999999999999959e-274 < x < 5.80000000000000026e-28

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.35 \cdot 10^{+163}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \leq -15000000:\\ \;\;\;\;b \cdot \left(-0.25 \cdot a\right)\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{-274}:\\ \;\;\;\;c\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{-28}:\\ \;\;\;\;0.0625 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 14: 53.9% accurate, 1.3× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3e8 or 6.49999999999999953e188 < b

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3e8 < b < 6.0000000000000005e-166

    1. Initial program 100.0%

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

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

    if 6.0000000000000005e-166 < b < 6.49999999999999953e188

    1. Initial program 99.9%

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

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

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

Alternative 15: 38.7% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+60}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;x \leq 2.8 \cdot 10^{-273}:\\
\;\;\;\;c\\

\mathbf{elif}\;x \leq 5.6 \cdot 10^{-31}:\\
\;\;\;\;0.0625 \cdot \left(z \cdot t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.79999999999999984e60 or 5.5999999999999998e-31 < x

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.79999999999999984e60 < x < 2.79999999999999985e-273

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.79999999999999985e-273 < x < 5.5999999999999998e-31

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.8 \cdot 10^{+60}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{-273}:\\ \;\;\;\;c\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{-31}:\\ \;\;\;\;0.0625 \cdot \left(z \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 16: 36.3% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;y \leq 7.2 \cdot 10^{+78}:\\
\;\;\;\;c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.39999999999999977e-111 or 7.20000000000000039e78 < y

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.39999999999999977e-111 < y < 7.20000000000000039e78

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.4 \cdot 10^{-111}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+78}:\\ \;\;\;\;c\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 17: 22.1% 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 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{c} \]
  5. Final simplification24.7%

    \[\leadsto c \]

Reproduce

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