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

Percentage Accurate: 97.6% → 98.8%
Time: 11.5s
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.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.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.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 \color{blue}{\left(\frac{z \cdot t}{16} + x \cdot y\right)} - \left(\frac{a \cdot b}{4} - c\right) \]
    3. associate--l+98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\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: 99.0% 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.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 \color{blue}{\left(\frac{z \cdot t}{16} + x \cdot y\right)} - \left(\frac{a \cdot b}{4} - c\right) \]
    3. associate--l+98.4%

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

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

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

      \[\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: 97.9% accurate, 0.1× speedup?

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

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

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

Alternative 4: 44.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;b \cdot a \leq -2.15 \cdot 10^{-41}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;b \cdot a \leq -1.8 \cdot 10^{-70}:\\
\;\;\;\;c\\

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

\mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{-156}:\\
\;\;\;\;c\\

\mathbf{elif}\;b \cdot a \leq 1.32 \cdot 10^{+109}:\\
\;\;\;\;x \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 a b) < -8.9999999999999997e133 or 1.32000000000000008e109 < (*.f64 a b)

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, y, \frac{z}{\frac{16}{t}}\right) - \color{blue}{\left(\frac{a \cdot b}{4} - c\right)} \]
      11. associate-/l*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. Step-by-step derivation
      1. fma-udef95.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*96.0%

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

        \[\leadsto \left(\color{blue}{\frac{z}{\frac{16}{t}}} + x \cdot y\right) - \left(\frac{a}{\frac{4}{b}} - c\right) \]
      5. div-inv96.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-num96.0%

        \[\leadsto \left(z \cdot \color{blue}{\frac{t}{16}} + x \cdot y\right) - \left(\frac{a}{\frac{4}{b}} - c\right) \]
      7. div-inv96.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-eval96.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-rr96.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 a around inf 67.0%

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

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

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

    if -8.9999999999999997e133 < (*.f64 a b) < -2.1499999999999999e-41 or 5.00000000000000007e-156 < (*.f64 a b) < 1.32000000000000008e109

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

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

      \[\leadsto \color{blue}{y \cdot x + 0.0625 \cdot \left(t \cdot z\right)} \]
    4. Taylor expanded in y around inf 46.6%

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

    if -2.1499999999999999e-41 < (*.f64 a b) < -1.8000000000000001e-70 or 8.6000000000000004e-290 < (*.f64 a b) < 5.00000000000000007e-156

    1. Initial program 100.0%

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

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

    if -1.8000000000000001e-70 < (*.f64 a b) < 8.6000000000000004e-290

    1. Initial program 98.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot a \leq -9 \cdot 10^{+133}:\\ \;\;\;\;-0.25 \cdot \left(b \cdot a\right)\\ \mathbf{elif}\;b \cdot a \leq -2.15 \cdot 10^{-41}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;b \cdot a \leq -1.8 \cdot 10^{-70}:\\ \;\;\;\;c\\ \mathbf{elif}\;b \cdot a \leq 8.6 \cdot 10^{-290}:\\ \;\;\;\;\left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;b \cdot a \leq 5 \cdot 10^{-156}:\\ \;\;\;\;c\\ \mathbf{elif}\;b \cdot a \leq 1.32 \cdot 10^{+109}:\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;-0.25 \cdot \left(b \cdot a\right)\\ \end{array} \]

Alternative 5: 65.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;b \cdot a \leq -1.1 \cdot 10^{-43}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \cdot a \leq 7.8 \cdot 10^{-144}:\\
\;\;\;\;c + t \cdot \left(z \cdot 0.0625\right)\\

\mathbf{elif}\;b \cdot a \leq 1.22 \cdot 10^{+103}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a b) < -1.4500000000000001e133 or 1.22e103 < (*.f64 a b)

    1. Initial program 96.1%

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

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

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

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

    if -1.4500000000000001e133 < (*.f64 a b) < -1.09999999999999999e-43 or 7.8000000000000003e-144 < (*.f64 a b) < 1.22e103

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

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

    if -1.09999999999999999e-43 < (*.f64 a b) < 7.8000000000000003e-144

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

      \[\leadsto \color{blue}{0.0625 \cdot \left(t \cdot z\right)} + c \]
    3. Step-by-step derivation
      1. *-commutative76.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot a \leq -1.45 \cdot 10^{+133}:\\ \;\;\;\;c + -0.25 \cdot \left(b \cdot a\right)\\ \mathbf{elif}\;b \cdot a \leq -1.1 \cdot 10^{-43}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;b \cdot a \leq 7.8 \cdot 10^{-144}:\\ \;\;\;\;c + t \cdot \left(z \cdot 0.0625\right)\\ \mathbf{elif}\;b \cdot a \leq 1.22 \cdot 10^{+103}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c + -0.25 \cdot \left(b \cdot a\right)\\ \end{array} \]

Alternative 6: 63.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c + x \cdot y\\ t_2 := -0.25 \cdot \left(b \cdot a\right)\\ \mathbf{if}\;b \cdot a \leq -1.45 \cdot 10^{+171}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \cdot a \leq -1.65 \cdot 10^{-39}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \cdot a \leq 5.1 \cdot 10^{-144}:\\ \;\;\;\;c + t \cdot \left(z \cdot 0.0625\right)\\ \mathbf{elif}\;b \cdot a \leq 3.6 \cdot 10^{+183}:\\ \;\;\;\;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.25 (* b a))))
   (if (<= (* b a) -1.45e+171)
     t_2
     (if (<= (* b a) -1.65e-39)
       t_1
       (if (<= (* b a) 5.1e-144)
         (+ c (* t (* z 0.0625)))
         (if (<= (* b a) 3.6e+183) 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.25 * (b * a);
	double tmp;
	if ((b * a) <= -1.45e+171) {
		tmp = t_2;
	} else if ((b * a) <= -1.65e-39) {
		tmp = t_1;
	} else if ((b * a) <= 5.1e-144) {
		tmp = c + (t * (z * 0.0625));
	} else if ((b * a) <= 3.6e+183) {
		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.25d0) * (b * a)
    if ((b * a) <= (-1.45d+171)) then
        tmp = t_2
    else if ((b * a) <= (-1.65d-39)) then
        tmp = t_1
    else if ((b * a) <= 5.1d-144) then
        tmp = c + (t * (z * 0.0625d0))
    else if ((b * a) <= 3.6d+183) 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.25 * (b * a);
	double tmp;
	if ((b * a) <= -1.45e+171) {
		tmp = t_2;
	} else if ((b * a) <= -1.65e-39) {
		tmp = t_1;
	} else if ((b * a) <= 5.1e-144) {
		tmp = c + (t * (z * 0.0625));
	} else if ((b * a) <= 3.6e+183) {
		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.25 * (b * a)
	tmp = 0
	if (b * a) <= -1.45e+171:
		tmp = t_2
	elif (b * a) <= -1.65e-39:
		tmp = t_1
	elif (b * a) <= 5.1e-144:
		tmp = c + (t * (z * 0.0625))
	elif (b * a) <= 3.6e+183:
		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.25 * Float64(b * a))
	tmp = 0.0
	if (Float64(b * a) <= -1.45e+171)
		tmp = t_2;
	elseif (Float64(b * a) <= -1.65e-39)
		tmp = t_1;
	elseif (Float64(b * a) <= 5.1e-144)
		tmp = Float64(c + Float64(t * Float64(z * 0.0625)));
	elseif (Float64(b * a) <= 3.6e+183)
		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.25 * (b * a);
	tmp = 0.0;
	if ((b * a) <= -1.45e+171)
		tmp = t_2;
	elseif ((b * a) <= -1.65e-39)
		tmp = t_1;
	elseif ((b * a) <= 5.1e-144)
		tmp = c + (t * (z * 0.0625));
	elseif ((b * a) <= 3.6e+183)
		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.25 * N[(b * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * a), $MachinePrecision], -1.45e+171], t$95$2, If[LessEqual[N[(b * a), $MachinePrecision], -1.65e-39], t$95$1, If[LessEqual[N[(b * a), $MachinePrecision], 5.1e-144], N[(c + N[(t * N[(z * 0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * a), $MachinePrecision], 3.6e+183], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \cdot a \leq -1.65 \cdot 10^{-39}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \cdot a \leq 5.1 \cdot 10^{-144}:\\
\;\;\;\;c + t \cdot \left(z \cdot 0.0625\right)\\

\mathbf{elif}\;b \cdot a \leq 3.6 \cdot 10^{+183}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a b) < -1.44999999999999992e171 or 3.60000000000000023e183 < (*.f64 a b)

    1. Initial program 95.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-95.0%

        \[\leadsto \color{blue}{\left(x \cdot y + \frac{z \cdot t}{16}\right) - \left(\frac{a \cdot b}{4} - c\right)} \]
      2. sub-neg95.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-195.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-eval95.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-eval95.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-inv95.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-def95.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*94.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-eval94.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-identity94.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*94.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.44999999999999992e171 < (*.f64 a b) < -1.64999999999999992e-39 or 5.1e-144 < (*.f64 a b) < 3.60000000000000023e183

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

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

    if -1.64999999999999992e-39 < (*.f64 a b) < 5.1e-144

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

      \[\leadsto \color{blue}{0.0625 \cdot \left(t \cdot z\right)} + c \]
    3. Step-by-step derivation
      1. *-commutative76.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot a \leq -1.45 \cdot 10^{+171}:\\ \;\;\;\;-0.25 \cdot \left(b \cdot a\right)\\ \mathbf{elif}\;b \cdot a \leq -1.65 \cdot 10^{-39}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;b \cdot a \leq 5.1 \cdot 10^{-144}:\\ \;\;\;\;c + t \cdot \left(z \cdot 0.0625\right)\\ \mathbf{elif}\;b \cdot a \leq 3.6 \cdot 10^{+183}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;-0.25 \cdot \left(b \cdot a\right)\\ \end{array} \]

Alternative 7: 89.4% accurate, 0.8× speedup?

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

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

    1. Initial program 96.2%

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

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

    if -2.0000000000000001e71 < (*.f64 a b) < 5.0000000000000004e96

    1. Initial program 99.4%

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

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

    if 5.0000000000000004e96 < (*.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. Taylor expanded in x around 0 89.9%

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

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

Alternative 8: 87.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot t\right) \cdot 0.0625\\ \mathbf{if}\;b \cdot a \leq -1.75 \cdot 10^{+176} \lor \neg \left(b \cdot a \leq 1.8 \cdot 10^{+179}\right):\\ \;\;\;\;t_1 - \left(b \cdot a\right) \cdot 0.25\\ \mathbf{else}:\\ \;\;\;\;c + \left(x \cdot y + t_1\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* (* z t) 0.0625)))
   (if (or (<= (* b a) -1.75e+176) (not (<= (* b a) 1.8e+179)))
     (- t_1 (* (* b a) 0.25))
     (+ c (+ (* x y) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (z * t) * 0.0625;
	double tmp;
	if (((b * a) <= -1.75e+176) || !((b * a) <= 1.8e+179)) {
		tmp = t_1 - ((b * a) * 0.25);
	} 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) :: tmp
    t_1 = (z * t) * 0.0625d0
    if (((b * a) <= (-1.75d+176)) .or. (.not. ((b * a) <= 1.8d+179))) then
        tmp = t_1 - ((b * a) * 0.25d0)
    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 = (z * t) * 0.0625;
	double tmp;
	if (((b * a) <= -1.75e+176) || !((b * a) <= 1.8e+179)) {
		tmp = t_1 - ((b * a) * 0.25);
	} else {
		tmp = c + ((x * y) + t_1);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = (z * t) * 0.0625
	tmp = 0
	if ((b * a) <= -1.75e+176) or not ((b * a) <= 1.8e+179):
		tmp = t_1 - ((b * a) * 0.25)
	else:
		tmp = c + ((x * y) + t_1)
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(z * t) * 0.0625)
	tmp = 0.0
	if ((Float64(b * a) <= -1.75e+176) || !(Float64(b * a) <= 1.8e+179))
		tmp = Float64(t_1 - Float64(Float64(b * a) * 0.25));
	else
		tmp = Float64(c + Float64(Float64(x * y) + t_1));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = (z * t) * 0.0625;
	tmp = 0.0;
	if (((b * a) <= -1.75e+176) || ~(((b * a) <= 1.8e+179)))
		tmp = t_1 - ((b * a) * 0.25);
	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[(z * t), $MachinePrecision] * 0.0625), $MachinePrecision]}, If[Or[LessEqual[N[(b * a), $MachinePrecision], -1.75e+176], N[Not[LessEqual[N[(b * a), $MachinePrecision], 1.8e+179]], $MachinePrecision]], N[(t$95$1 - N[(N[(b * a), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], N[(c + N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(z \cdot t\right) \cdot 0.0625\\
\mathbf{if}\;b \cdot a \leq -1.75 \cdot 10^{+176} \lor \neg \left(b \cdot a \leq 1.8 \cdot 10^{+179}\right):\\
\;\;\;\;t_1 - \left(b \cdot a\right) \cdot 0.25\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a b) < -1.75000000000000001e176 or 1.7999999999999999e179 < (*.f64 a b)

    1. Initial program 95.0%

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

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

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

    if -1.75000000000000001e176 < (*.f64 a b) < 1.7999999999999999e179

    1. Initial program 99.5%

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

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

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

Alternative 9: 89.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \cdot a \leq -2 \cdot 10^{+71} \lor \neg \left(b \cdot a \leq 2 \cdot 10^{+111}\right):\\
\;\;\;\;x \cdot y + \left(c - \frac{a}{\frac{4}{b}}\right)\\

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


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

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000001e71 < (*.f64 a b) < 1.99999999999999991e111

    1. Initial program 99.4%

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

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

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

Alternative 10: 89.5% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 96.6%

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

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

    if -2.0000000000000001e71 < (*.f64 a b) < 1.99999999999999991e111

    1. Initial program 99.4%

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

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

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

Alternative 11: 86.6% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 93.8%

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

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

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

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

    if -1.35000000000000009e148 < (*.f64 a b) < 4.3000000000000003e172

    1. Initial program 99.5%

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

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

    if 4.3000000000000003e172 < (*.f64 a 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. Taylor expanded in z around 0 86.7%

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

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

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

Alternative 12: 38.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := \left(z \cdot t\right) \cdot 0.0625\\
\mathbf{if}\;t \leq -6.6 \cdot 10^{-6}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -4.4 \cdot 10^{-226}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;t \leq -1.85 \cdot 10^{-275}:\\
\;\;\;\;c\\

\mathbf{elif}\;t \leq 9.2 \cdot 10^{-236}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;t \leq 2.4 \cdot 10^{-112}:\\
\;\;\;\;c\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.60000000000000034e-6 or 4.99999999999999984e78 < t

    1. Initial program 97.0%

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

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

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

    if -6.60000000000000034e-6 < t < -4.4e-226 or -1.84999999999999985e-275 < t < 9.20000000000000024e-236 or 2.4000000000000001e-112 < t < 4.99999999999999984e78

    1. Initial program 99.1%

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

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

      \[\leadsto \color{blue}{y \cdot x + 0.0625 \cdot \left(t \cdot z\right)} \]
    4. Taylor expanded in y around inf 36.7%

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

    if -4.4e-226 < t < -1.84999999999999985e-275 or 9.20000000000000024e-236 < t < 2.4000000000000001e-112

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.6 \cdot 10^{-6}:\\ \;\;\;\;\left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-226}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;t \leq -1.85 \cdot 10^{-275}:\\ \;\;\;\;c\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{-236}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-112}:\\ \;\;\;\;c\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+78}:\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot t\right) \cdot 0.0625\\ \end{array} \]

Alternative 13: 61.7% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq -57000:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 8 \cdot 10^{-108}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.99999999999999998e89 or 8.00000000000000032e-108 < z

    1. Initial program 97.2%

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

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

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

    if -3.99999999999999998e89 < z < -57000 or -2.29999999999999996e-274 < z < 8.00000000000000032e-108

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

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

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

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

    if -57000 < z < -2.29999999999999996e-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. Taylor expanded in x around inf 67.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+89}:\\ \;\;\;\;x \cdot y + \left(z \cdot t\right) \cdot 0.0625\\ \mathbf{elif}\;z \leq -57000:\\ \;\;\;\;c + -0.25 \cdot \left(b \cdot a\right)\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-274}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-108}:\\ \;\;\;\;c + -0.25 \cdot \left(b \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y + \left(z \cdot t\right) \cdot 0.0625\\ \end{array} \]

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

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

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

Alternative 15: 63.1% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \cdot a \leq -5.1 \cdot 10^{+174} \lor \neg \left(b \cdot a \leq 1.35 \cdot 10^{+182}\right):\\
\;\;\;\;-0.25 \cdot \left(b \cdot a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a b) < -5.0999999999999997e174 or 1.3500000000000001e182 < (*.f64 a b)

    1. Initial program 95.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-95.0%

        \[\leadsto \color{blue}{\left(x \cdot y + \frac{z \cdot t}{16}\right) - \left(\frac{a \cdot b}{4} - c\right)} \]
      2. sub-neg95.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-195.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-eval95.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-eval95.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-inv95.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-def95.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*94.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-eval94.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-identity94.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*94.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0999999999999997e174 < (*.f64 a b) < 1.3500000000000001e182

    1. Initial program 99.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot a \leq -5.1 \cdot 10^{+174} \lor \neg \left(b \cdot a \leq 1.35 \cdot 10^{+182}\right):\\ \;\;\;\;-0.25 \cdot \left(b \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;c + x \cdot y\\ \end{array} \]

Alternative 16: 36.1% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9500000:\\
\;\;\;\;x \cdot y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.5e6 or 5.4999999999999996e83 < y

    1. Initial program 96.6%

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

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

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

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

    if -9.5e6 < y < 5.4999999999999996e83

    1. Initial program 99.4%

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

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

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

Alternative 17: 22.3% 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. Taylor expanded in c around inf 25.7%

    \[\leadsto \color{blue}{c} \]
  3. Final simplification25.7%

    \[\leadsto c \]

Reproduce

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