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

Percentage Accurate: 97.6% → 98.9%
Time: 13.0s
Alternatives: 14
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 14 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.6% accurate, 1.0× speedup?

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

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

Alternative 1: 98.9% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

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

Alternative 2: 98.2% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 66.6% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c + b \cdot \left(a \cdot -0.25\right)\\ t_2 := c + z \cdot \left(t \cdot 0.0625\right)\\ t_3 := y \cdot \left(x + \left(b \cdot -0.25\right) \cdot \frac{a}{y}\right)\\ \mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+189}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{+122}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{+90}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-135}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq 0:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \cdot y \leq 10^{-180}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{-69}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \cdot y \leq 10^{-14}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+102}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (+ c (* b (* a -0.25))))
        (t_2 (+ c (* z (* t 0.0625))))
        (t_3 (* y (+ x (* (* b -0.25) (/ a y))))))
   (if (<= (* x y) -2e+189)
     t_3
     (if (<= (* x y) -2e+122)
       t_2
       (if (<= (* x y) -5e+90)
         t_3
         (if (<= (* x y) -5e-135)
           t_1
           (if (<= (* x y) 0.0)
             t_2
             (if (<= (* x y) 1e-180)
               t_1
               (if (<= (* x y) 5e-69)
                 t_2
                 (if (<= (* x y) 1e-14)
                   t_1
                   (if (<= (* x y) 5e+102) t_2 t_3)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = c + (b * (a * -0.25));
	double t_2 = c + (z * (t * 0.0625));
	double t_3 = y * (x + ((b * -0.25) * (a / y)));
	double tmp;
	if ((x * y) <= -2e+189) {
		tmp = t_3;
	} else if ((x * y) <= -2e+122) {
		tmp = t_2;
	} else if ((x * y) <= -5e+90) {
		tmp = t_3;
	} else if ((x * y) <= -5e-135) {
		tmp = t_1;
	} else if ((x * y) <= 0.0) {
		tmp = t_2;
	} else if ((x * y) <= 1e-180) {
		tmp = t_1;
	} else if ((x * y) <= 5e-69) {
		tmp = t_2;
	} else if ((x * y) <= 1e-14) {
		tmp = t_1;
	} else if ((x * y) <= 5e+102) {
		tmp = t_2;
	} 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 * (a * (-0.25d0)))
    t_2 = c + (z * (t * 0.0625d0))
    t_3 = y * (x + ((b * (-0.25d0)) * (a / y)))
    if ((x * y) <= (-2d+189)) then
        tmp = t_3
    else if ((x * y) <= (-2d+122)) then
        tmp = t_2
    else if ((x * y) <= (-5d+90)) then
        tmp = t_3
    else if ((x * y) <= (-5d-135)) then
        tmp = t_1
    else if ((x * y) <= 0.0d0) then
        tmp = t_2
    else if ((x * y) <= 1d-180) then
        tmp = t_1
    else if ((x * y) <= 5d-69) then
        tmp = t_2
    else if ((x * y) <= 1d-14) then
        tmp = t_1
    else if ((x * y) <= 5d+102) then
        tmp = t_2
    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 * (a * -0.25));
	double t_2 = c + (z * (t * 0.0625));
	double t_3 = y * (x + ((b * -0.25) * (a / y)));
	double tmp;
	if ((x * y) <= -2e+189) {
		tmp = t_3;
	} else if ((x * y) <= -2e+122) {
		tmp = t_2;
	} else if ((x * y) <= -5e+90) {
		tmp = t_3;
	} else if ((x * y) <= -5e-135) {
		tmp = t_1;
	} else if ((x * y) <= 0.0) {
		tmp = t_2;
	} else if ((x * y) <= 1e-180) {
		tmp = t_1;
	} else if ((x * y) <= 5e-69) {
		tmp = t_2;
	} else if ((x * y) <= 1e-14) {
		tmp = t_1;
	} else if ((x * y) <= 5e+102) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = c + (b * (a * -0.25))
	t_2 = c + (z * (t * 0.0625))
	t_3 = y * (x + ((b * -0.25) * (a / y)))
	tmp = 0
	if (x * y) <= -2e+189:
		tmp = t_3
	elif (x * y) <= -2e+122:
		tmp = t_2
	elif (x * y) <= -5e+90:
		tmp = t_3
	elif (x * y) <= -5e-135:
		tmp = t_1
	elif (x * y) <= 0.0:
		tmp = t_2
	elif (x * y) <= 1e-180:
		tmp = t_1
	elif (x * y) <= 5e-69:
		tmp = t_2
	elif (x * y) <= 1e-14:
		tmp = t_1
	elif (x * y) <= 5e+102:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(c + Float64(b * Float64(a * -0.25)))
	t_2 = Float64(c + Float64(z * Float64(t * 0.0625)))
	t_3 = Float64(y * Float64(x + Float64(Float64(b * -0.25) * Float64(a / y))))
	tmp = 0.0
	if (Float64(x * y) <= -2e+189)
		tmp = t_3;
	elseif (Float64(x * y) <= -2e+122)
		tmp = t_2;
	elseif (Float64(x * y) <= -5e+90)
		tmp = t_3;
	elseif (Float64(x * y) <= -5e-135)
		tmp = t_1;
	elseif (Float64(x * y) <= 0.0)
		tmp = t_2;
	elseif (Float64(x * y) <= 1e-180)
		tmp = t_1;
	elseif (Float64(x * y) <= 5e-69)
		tmp = t_2;
	elseif (Float64(x * y) <= 1e-14)
		tmp = t_1;
	elseif (Float64(x * y) <= 5e+102)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = c + (b * (a * -0.25));
	t_2 = c + (z * (t * 0.0625));
	t_3 = y * (x + ((b * -0.25) * (a / y)));
	tmp = 0.0;
	if ((x * y) <= -2e+189)
		tmp = t_3;
	elseif ((x * y) <= -2e+122)
		tmp = t_2;
	elseif ((x * y) <= -5e+90)
		tmp = t_3;
	elseif ((x * y) <= -5e-135)
		tmp = t_1;
	elseif ((x * y) <= 0.0)
		tmp = t_2;
	elseif ((x * y) <= 1e-180)
		tmp = t_1;
	elseif ((x * y) <= 5e-69)
		tmp = t_2;
	elseif ((x * y) <= 1e-14)
		tmp = t_1;
	elseif ((x * y) <= 5e+102)
		tmp = t_2;
	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[(a * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(z * N[(t * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(x + N[(N[(b * -0.25), $MachinePrecision] * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2e+189], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], -2e+122], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -5e+90], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], -5e-135], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 0.0], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 1e-180], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 5e-69], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 1e-14], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 5e+102], t$95$2, t$95$3]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{+122}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{+90}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-135}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \cdot y \leq 0:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \cdot y \leq 10^{-180}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \cdot y \leq 10^{-14}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+102}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;t\_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -2e189 or -2.00000000000000003e122 < (*.f64 x y) < -5.0000000000000004e90 or 5e102 < (*.f64 x y)

    1. Initial program 96.5%

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

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

      \[\leadsto \color{blue}{y \cdot \left(\left(x + \frac{c}{y}\right) - 0.25 \cdot \frac{a \cdot b}{y}\right)} \]
    5. Step-by-step derivation
      1. associate--l+91.7%

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

        \[\leadsto y \cdot \left(x + \left(\frac{c}{y} - \color{blue}{\frac{0.25 \cdot \left(a \cdot b\right)}{y}}\right)\right) \]
      3. div-sub91.7%

        \[\leadsto y \cdot \left(x + \color{blue}{\frac{c - 0.25 \cdot \left(a \cdot b\right)}{y}}\right) \]
      4. *-commutative91.7%

        \[\leadsto y \cdot \left(x + \frac{c - \color{blue}{\left(a \cdot b\right) \cdot 0.25}}{y}\right) \]
      5. associate-*r*91.7%

        \[\leadsto y \cdot \left(x + \frac{c - \color{blue}{a \cdot \left(b \cdot 0.25\right)}}{y}\right) \]
      6. sub-neg91.7%

        \[\leadsto y \cdot \left(x + \frac{\color{blue}{c + \left(-a \cdot \left(b \cdot 0.25\right)\right)}}{y}\right) \]
      7. distribute-rgt-neg-in91.7%

        \[\leadsto y \cdot \left(x + \frac{c + \color{blue}{a \cdot \left(-b \cdot 0.25\right)}}{y}\right) \]
      8. distribute-rgt-neg-in91.7%

        \[\leadsto y \cdot \left(x + \frac{c + a \cdot \color{blue}{\left(b \cdot \left(-0.25\right)\right)}}{y}\right) \]
      9. metadata-eval91.7%

        \[\leadsto y \cdot \left(x + \frac{c + a \cdot \left(b \cdot \color{blue}{-0.25}\right)}{y}\right) \]
    6. Simplified91.7%

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

      \[\leadsto y \cdot \left(x + \color{blue}{-0.25 \cdot \frac{a \cdot b}{y}}\right) \]
    8. Step-by-step derivation
      1. associate-*r/88.1%

        \[\leadsto y \cdot \left(x + \color{blue}{\frac{-0.25 \cdot \left(a \cdot b\right)}{y}}\right) \]
      2. *-commutative88.1%

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

        \[\leadsto y \cdot \left(x + \frac{\color{blue}{a \cdot \left(b \cdot -0.25\right)}}{y}\right) \]
      4. *-commutative88.1%

        \[\leadsto y \cdot \left(x + \frac{\color{blue}{\left(b \cdot -0.25\right) \cdot a}}{y}\right) \]
      5. associate-/l*87.0%

        \[\leadsto y \cdot \left(x + \color{blue}{\left(b \cdot -0.25\right) \cdot \frac{a}{y}}\right) \]
      6. *-commutative87.0%

        \[\leadsto y \cdot \left(x + \color{blue}{\left(-0.25 \cdot b\right)} \cdot \frac{a}{y}\right) \]
    9. Simplified87.0%

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

    if -2e189 < (*.f64 x y) < -2.00000000000000003e122 or -5.0000000000000002e-135 < (*.f64 x y) < 0.0 or 1e-180 < (*.f64 x y) < 5.00000000000000033e-69 or 9.99999999999999999e-15 < (*.f64 x y) < 5e102

    1. Initial program 99.9%

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\left(0.0625 \cdot t\right)} + c \]
    5. Simplified75.4%

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

    if -5.0000000000000004e90 < (*.f64 x y) < -5.0000000000000002e-135 or 0.0 < (*.f64 x y) < 1e-180 or 5.00000000000000033e-69 < (*.f64 x y) < 9.99999999999999999e-15

    1. Initial program 98.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+189}:\\ \;\;\;\;y \cdot \left(x + \left(b \cdot -0.25\right) \cdot \frac{a}{y}\right)\\ \mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{+122}:\\ \;\;\;\;c + z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{+90}:\\ \;\;\;\;y \cdot \left(x + \left(b \cdot -0.25\right) \cdot \frac{a}{y}\right)\\ \mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-135}:\\ \;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\ \mathbf{elif}\;x \cdot y \leq 0:\\ \;\;\;\;c + z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;x \cdot y \leq 10^{-180}:\\ \;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\ \mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{-69}:\\ \;\;\;\;c + z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;x \cdot y \leq 10^{-14}:\\ \;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\ \mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+102}:\\ \;\;\;\;c + z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x + \left(b \cdot -0.25\right) \cdot \frac{a}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 42.6% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;x \cdot y \leq -9 \cdot 10^{-209}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \cdot y \leq 1.55 \cdot 10^{-190}:\\
\;\;\;\;c\\

\mathbf{elif}\;x \cdot y \leq 1.25 \cdot 10^{-53}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \cdot y \leq 7.5 \cdot 10^{+105}:\\
\;\;\;\;c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -3.1e197 or 7.5000000000000002e105 < (*.f64 x y)

    1. Initial program 96.1%

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

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

      \[\leadsto \color{blue}{c \cdot \left(1 + \frac{x \cdot y}{c}\right)} \]
    5. Taylor expanded in c around 0 71.9%

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

    if -3.1e197 < (*.f64 x y) < -8.9999999999999996e-209 or 1.54999999999999997e-190 < (*.f64 x y) < 1.25e-53

    1. Initial program 99.0%

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

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

      \[\leadsto \color{blue}{y \cdot \left(\left(x + \frac{c}{y}\right) - 0.25 \cdot \frac{a \cdot b}{y}\right)} \]
    5. Step-by-step derivation
      1. associate--l+49.8%

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

        \[\leadsto y \cdot \left(x + \left(\frac{c}{y} - \color{blue}{\frac{0.25 \cdot \left(a \cdot b\right)}{y}}\right)\right) \]
      3. div-sub51.9%

        \[\leadsto y \cdot \left(x + \color{blue}{\frac{c - 0.25 \cdot \left(a \cdot b\right)}{y}}\right) \]
      4. *-commutative51.9%

        \[\leadsto y \cdot \left(x + \frac{c - \color{blue}{\left(a \cdot b\right) \cdot 0.25}}{y}\right) \]
      5. associate-*r*51.9%

        \[\leadsto y \cdot \left(x + \frac{c - \color{blue}{a \cdot \left(b \cdot 0.25\right)}}{y}\right) \]
      6. sub-neg51.9%

        \[\leadsto y \cdot \left(x + \frac{\color{blue}{c + \left(-a \cdot \left(b \cdot 0.25\right)\right)}}{y}\right) \]
      7. distribute-rgt-neg-in51.9%

        \[\leadsto y \cdot \left(x + \frac{c + \color{blue}{a \cdot \left(-b \cdot 0.25\right)}}{y}\right) \]
      8. distribute-rgt-neg-in51.9%

        \[\leadsto y \cdot \left(x + \frac{c + a \cdot \color{blue}{\left(b \cdot \left(-0.25\right)\right)}}{y}\right) \]
      9. metadata-eval51.9%

        \[\leadsto y \cdot \left(x + \frac{c + a \cdot \left(b \cdot \color{blue}{-0.25}\right)}{y}\right) \]
    6. Simplified51.9%

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

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

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

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

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

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

    if -8.9999999999999996e-209 < (*.f64 x y) < 1.54999999999999997e-190 or 1.25e-53 < (*.f64 x y) < 7.5000000000000002e105

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -3.1 \cdot 10^{+197}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \cdot y \leq -9 \cdot 10^{-209}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;x \cdot y \leq 1.55 \cdot 10^{-190}:\\ \;\;\;\;c\\ \mathbf{elif}\;x \cdot y \leq 1.25 \cdot 10^{-53}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;x \cdot y \leq 7.5 \cdot 10^{+105}:\\ \;\;\;\;c\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 57.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -9.2 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -2.6 \cdot 10^{+84}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq -1.35 \cdot 10^{-235}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;a \leq -2.3 \cdot 10^{-292}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 6 \cdot 10^{-33}:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.00000000000000041e142 or -9.20000000000000008e111 < a < -2.6000000000000001e84 or 6.0000000000000003e-33 < a

    1. Initial program 97.1%

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

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

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

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

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

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

    if -8.00000000000000041e142 < a < -9.20000000000000008e111 or -1.3500000000000001e-235 < a < -2.2999999999999999e-292

    1. Initial program 100.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{z \cdot \left(0.0625 \cdot t\right)} + c \]
    6. Taylor expanded in z around inf 70.5%

      \[\leadsto \color{blue}{z \cdot \left(0.0625 \cdot t + \frac{c}{z}\right)} \]
    7. Taylor expanded in t around inf 64.8%

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

    if -2.6000000000000001e84 < a < -1.3500000000000001e-235 or -2.2999999999999999e-292 < a < 6.0000000000000003e-33

    1. Initial program 99.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8 \cdot 10^{+142}:\\ \;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{+111}:\\ \;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{+84}:\\ \;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{-235}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;a \leq -2.3 \cdot 10^{-292}:\\ \;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-33}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 37.8% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;b \leq -2.5 \cdot 10^{-141}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -2.05 \cdot 10^{-271}:\\
\;\;\;\;c\\

\mathbf{elif}\;b \leq 1.5 \cdot 10^{-49}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 3.7 \cdot 10^{+42}:\\
\;\;\;\;c\\

\mathbf{elif}\;b \leq 4.5 \cdot 10^{+95}:\\
\;\;\;\;x \cdot y\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -6.80000000000000013e-60 or 4.50000000000000017e95 < b

    1. Initial program 96.9%

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

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

      \[\leadsto \color{blue}{y \cdot \left(\left(x + \frac{c}{y}\right) - 0.25 \cdot \frac{a \cdot b}{y}\right)} \]
    5. Step-by-step derivation
      1. associate--l+65.4%

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

        \[\leadsto y \cdot \left(x + \left(\frac{c}{y} - \color{blue}{\frac{0.25 \cdot \left(a \cdot b\right)}{y}}\right)\right) \]
      3. div-sub68.5%

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

        \[\leadsto y \cdot \left(x + \frac{c - \color{blue}{\left(a \cdot b\right) \cdot 0.25}}{y}\right) \]
      5. associate-*r*68.5%

        \[\leadsto y \cdot \left(x + \frac{c - \color{blue}{a \cdot \left(b \cdot 0.25\right)}}{y}\right) \]
      6. sub-neg68.5%

        \[\leadsto y \cdot \left(x + \frac{\color{blue}{c + \left(-a \cdot \left(b \cdot 0.25\right)\right)}}{y}\right) \]
      7. distribute-rgt-neg-in68.5%

        \[\leadsto y \cdot \left(x + \frac{c + \color{blue}{a \cdot \left(-b \cdot 0.25\right)}}{y}\right) \]
      8. distribute-rgt-neg-in68.5%

        \[\leadsto y \cdot \left(x + \frac{c + a \cdot \color{blue}{\left(b \cdot \left(-0.25\right)\right)}}{y}\right) \]
      9. metadata-eval68.5%

        \[\leadsto y \cdot \left(x + \frac{c + a \cdot \left(b \cdot \color{blue}{-0.25}\right)}{y}\right) \]
    6. Simplified68.5%

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

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

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

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

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

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

    if -6.80000000000000013e-60 < b < -2.5e-141 or -2.0500000000000001e-271 < b < 1.5e-49

    1. Initial program 99.9%

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\left(0.0625 \cdot t\right)} + c \]
    5. Simplified65.2%

      \[\leadsto \color{blue}{z \cdot \left(0.0625 \cdot t\right)} + c \]
    6. Taylor expanded in z around inf 58.5%

      \[\leadsto \color{blue}{z \cdot \left(0.0625 \cdot t + \frac{c}{z}\right)} \]
    7. Taylor expanded in t around inf 38.9%

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

    if -2.5e-141 < b < -2.0500000000000001e-271 or 1.5e-49 < b < 3.69999999999999996e42

    1. Initial program 100.0%

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

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

    if 3.69999999999999996e42 < b < 4.50000000000000017e95

    1. Initial program 99.9%

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

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

      \[\leadsto \color{blue}{c \cdot \left(1 + \frac{x \cdot y}{c}\right)} \]
    5. Taylor expanded in c around 0 58.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.8 \cdot 10^{-60}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;b \leq -2.5 \cdot 10^{-141}:\\ \;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;b \leq -2.05 \cdot 10^{-271}:\\ \;\;\;\;c\\ \mathbf{elif}\;b \leq 1.5 \cdot 10^{-49}:\\ \;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;b \leq 3.7 \cdot 10^{+42}:\\ \;\;\;\;c\\ \mathbf{elif}\;b \leq 4.5 \cdot 10^{+95}:\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 59.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;b \leq -5.3 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -2.8 \cdot 10^{-270}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \leq 1.8 \cdot 10^{-50}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 2.3 \cdot 10^{+95}:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -5.8999999999999999e-46 or 2.29999999999999997e95 < b

    1. Initial program 96.7%

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

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

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

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

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

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

    if -5.8999999999999999e-46 < b < -5.3e-169 or -2.7999999999999999e-270 < b < 1.7999999999999999e-50

    1. Initial program 99.9%

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

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

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

        \[\leadsto \color{blue}{\left(t \cdot 0.0625\right)} \cdot z + c \]
      3. *-commutative62.3%

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

        \[\leadsto z \cdot \color{blue}{\left(0.0625 \cdot t\right)} + c \]
    5. Simplified62.3%

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

    if -5.3e-169 < b < -2.7999999999999999e-270 or 1.7999999999999999e-50 < b < 2.29999999999999997e95

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.9 \cdot 10^{-46}:\\ \;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\ \mathbf{elif}\;b \leq -5.3 \cdot 10^{-169}:\\ \;\;\;\;c + z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;b \leq -2.8 \cdot 10^{-270}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;b \leq 1.8 \cdot 10^{-50}:\\ \;\;\;\;c + z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{+95}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 88.7% accurate, 0.6× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\left(c + t\_2\right) - t\_1\\


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

    1. Initial program 94.7%

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

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

    if -5.00000000000000003e40 < (*.f64 a b) < 2e110

    1. Initial program 100.0%

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

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

    if 2e110 < (*.f64 a b)

    1. Initial program 97.4%

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

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

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

Alternative 9: 52.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -1 \cdot 10^{+138}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -6.5 \cdot 10^{+112}:\\
\;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\

\mathbf{elif}\;a \leq 6 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.4e198 or 6.0000000000000003e-33 < a

    1. Initial program 96.6%

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

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

      \[\leadsto \color{blue}{y \cdot \left(\left(x + \frac{c}{y}\right) - 0.25 \cdot \frac{a \cdot b}{y}\right)} \]
    5. Step-by-step derivation
      1. associate--l+74.0%

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

        \[\leadsto y \cdot \left(x + \left(\frac{c}{y} - \color{blue}{\frac{0.25 \cdot \left(a \cdot b\right)}{y}}\right)\right) \]
      3. div-sub76.3%

        \[\leadsto y \cdot \left(x + \color{blue}{\frac{c - 0.25 \cdot \left(a \cdot b\right)}{y}}\right) \]
      4. *-commutative76.3%

        \[\leadsto y \cdot \left(x + \frac{c - \color{blue}{\left(a \cdot b\right) \cdot 0.25}}{y}\right) \]
      5. associate-*r*76.3%

        \[\leadsto y \cdot \left(x + \frac{c - \color{blue}{a \cdot \left(b \cdot 0.25\right)}}{y}\right) \]
      6. sub-neg76.3%

        \[\leadsto y \cdot \left(x + \frac{\color{blue}{c + \left(-a \cdot \left(b \cdot 0.25\right)\right)}}{y}\right) \]
      7. distribute-rgt-neg-in76.3%

        \[\leadsto y \cdot \left(x + \frac{c + \color{blue}{a \cdot \left(-b \cdot 0.25\right)}}{y}\right) \]
      8. distribute-rgt-neg-in76.3%

        \[\leadsto y \cdot \left(x + \frac{c + a \cdot \color{blue}{\left(b \cdot \left(-0.25\right)\right)}}{y}\right) \]
      9. metadata-eval76.3%

        \[\leadsto y \cdot \left(x + \frac{c + a \cdot \left(b \cdot \color{blue}{-0.25}\right)}{y}\right) \]
    6. Simplified76.3%

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

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

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

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

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

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

    if -1.4e198 < a < -1e138 or -6.4999999999999998e112 < a < 6.0000000000000003e-33

    1. Initial program 99.3%

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

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

    if -1e138 < a < -6.4999999999999998e112

    1. Initial program 100.0%

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

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

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

        \[\leadsto \color{blue}{\left(t \cdot 0.0625\right)} \cdot z + c \]
      3. *-commutative33.9%

        \[\leadsto \color{blue}{z \cdot \left(t \cdot 0.0625\right)} + c \]
      4. *-commutative33.9%

        \[\leadsto z \cdot \color{blue}{\left(0.0625 \cdot t\right)} + c \]
    5. Simplified33.9%

      \[\leadsto \color{blue}{z \cdot \left(0.0625 \cdot t\right)} + c \]
    6. Taylor expanded in z around inf 33.9%

      \[\leadsto \color{blue}{z \cdot \left(0.0625 \cdot t + \frac{c}{z}\right)} \]
    7. Taylor expanded in t around inf 34.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{+198}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;a \leq -1 \cdot 10^{+138}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{+112}:\\ \;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-33}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(b \cdot -0.25\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 89.1% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a b) < -5.00000000000000003e40 or 5.0000000000000004e90 < (*.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. Add Preprocessing
    3. Taylor expanded in z around 0 87.8%

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

    if -5.00000000000000003e40 < (*.f64 a b) < 5.0000000000000004e90

    1. Initial program 100.0%

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

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

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

Alternative 11: 76.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{+197}:\\
\;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.9000000000000001e197

    1. Initial program 95.0%

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

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

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

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

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

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

    if -1.9000000000000001e197 < a < 1.1500000000000001e29

    1. Initial program 99.4%

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

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

    if 1.1500000000000001e29 < a

    1. Initial program 96.8%

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

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

      \[\leadsto \color{blue}{y \cdot \left(\left(x + \frac{c}{y}\right) - 0.25 \cdot \frac{a \cdot b}{y}\right)} \]
    5. Step-by-step derivation
      1. associate--l+75.0%

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

        \[\leadsto y \cdot \left(x + \left(\frac{c}{y} - \color{blue}{\frac{0.25 \cdot \left(a \cdot b\right)}{y}}\right)\right) \]
      3. div-sub78.3%

        \[\leadsto y \cdot \left(x + \color{blue}{\frac{c - 0.25 \cdot \left(a \cdot b\right)}{y}}\right) \]
      4. *-commutative78.3%

        \[\leadsto y \cdot \left(x + \frac{c - \color{blue}{\left(a \cdot b\right) \cdot 0.25}}{y}\right) \]
      5. associate-*r*78.3%

        \[\leadsto y \cdot \left(x + \frac{c - \color{blue}{a \cdot \left(b \cdot 0.25\right)}}{y}\right) \]
      6. sub-neg78.3%

        \[\leadsto y \cdot \left(x + \frac{\color{blue}{c + \left(-a \cdot \left(b \cdot 0.25\right)\right)}}{y}\right) \]
      7. distribute-rgt-neg-in78.3%

        \[\leadsto y \cdot \left(x + \frac{c + \color{blue}{a \cdot \left(-b \cdot 0.25\right)}}{y}\right) \]
      8. distribute-rgt-neg-in78.3%

        \[\leadsto y \cdot \left(x + \frac{c + a \cdot \color{blue}{\left(b \cdot \left(-0.25\right)\right)}}{y}\right) \]
      9. metadata-eval78.3%

        \[\leadsto y \cdot \left(x + \frac{c + a \cdot \left(b \cdot \color{blue}{-0.25}\right)}{y}\right) \]
    6. Simplified78.3%

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

      \[\leadsto y \cdot \left(x + \color{blue}{-0.25 \cdot \frac{a \cdot b}{y}}\right) \]
    8. Step-by-step derivation
      1. associate-*r/68.9%

        \[\leadsto y \cdot \left(x + \color{blue}{\frac{-0.25 \cdot \left(a \cdot b\right)}{y}}\right) \]
      2. *-commutative68.9%

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

        \[\leadsto y \cdot \left(x + \frac{\color{blue}{a \cdot \left(b \cdot -0.25\right)}}{y}\right) \]
      4. *-commutative68.9%

        \[\leadsto y \cdot \left(x + \frac{\color{blue}{\left(b \cdot -0.25\right) \cdot a}}{y}\right) \]
      5. associate-/l*67.3%

        \[\leadsto y \cdot \left(x + \color{blue}{\left(b \cdot -0.25\right) \cdot \frac{a}{y}}\right) \]
      6. *-commutative67.3%

        \[\leadsto y \cdot \left(x + \color{blue}{\left(-0.25 \cdot b\right)} \cdot \frac{a}{y}\right) \]
    9. Simplified67.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.9 \cdot 10^{+197}:\\ \;\;\;\;c + b \cdot \left(a \cdot -0.25\right)\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+29}:\\ \;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x + \left(b \cdot -0.25\right) \cdot \frac{a}{y}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 42.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2.4 \cdot 10^{+24} \lor \neg \left(x \cdot y \leq 2.9 \cdot 10^{+104}\right):\\
\;\;\;\;x \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -2.4000000000000001e24 or 2.8999999999999998e104 < (*.f64 x y)

    1. Initial program 97.1%

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

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

      \[\leadsto \color{blue}{c \cdot \left(1 + \frac{x \cdot y}{c}\right)} \]
    5. Taylor expanded in c around 0 60.0%

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

    if -2.4000000000000001e24 < (*.f64 x y) < 2.8999999999999998e104

    1. Initial program 99.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -2.4 \cdot 10^{+24} \lor \neg \left(x \cdot y \leq 2.9 \cdot 10^{+104}\right):\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 97.6% accurate, 1.0× speedup?

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

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

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

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

Alternative 14: 22.6% 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.4%

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

    \[\leadsto \color{blue}{c} \]
  4. Add Preprocessing

Reproduce

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