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

Percentage Accurate: 97.7% → 99.0%
Time: 12.4s
Alternatives: 14
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 97.7% accurate, 1.0× speedup?

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

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

Alternative 1: 99.0% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 97.9% accurate, 0.1× speedup?

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

\\
\left(\mathsf{fma}\left(a, b \cdot -0.25, c\right) + x \cdot y\right) + t \cdot \left(z \cdot 0.0625\right)
\end{array}
Derivation
  1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\left(\mathsf{fma}\left(a, b \cdot -0.25, c\right) + x \cdot y\right) + t \cdot \left(z \cdot 0.0625\right)} \]
  6. Final simplification97.7%

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

Alternative 3: 65.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-82}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq 6.2 \cdot 10^{-289}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x \cdot y \leq 3.1 \cdot 10^{-175}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq 7.2 \cdot 10^{-101}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -1.85e76 or 4.19999999999999963e156 < (*.f64 x y)

    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 x around inf 79.2%

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

    if -1.85e76 < (*.f64 x y) < -1e-82 or 6.2e-289 < (*.f64 x y) < 3.09999999999999999e-175 or 7.19999999999999999e-101 < (*.f64 x y) < 4.19999999999999963e156

    1. Initial program 99.2%

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

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

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

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

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

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

    if -1e-82 < (*.f64 x y) < 6.2e-289 or 3.09999999999999999e-175 < (*.f64 x y) < 7.19999999999999999e-101

    1. Initial program 98.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -1.85 \cdot 10^{+76}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-82}:\\ \;\;\;\;c + z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;x \cdot y \leq 6.2 \cdot 10^{-289}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;x \cdot y \leq 3.1 \cdot 10^{-175}:\\ \;\;\;\;c + z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;x \cdot y \leq 7.2 \cdot 10^{-101}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;x \cdot y \leq 4.2 \cdot 10^{+156}:\\ \;\;\;\;c + z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{else}:\\ \;\;\;\;c + x \cdot y\\ \end{array} \]

Alternative 4: 44.9% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;x \cdot y \leq -5.5 \cdot 10^{-87}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \cdot y \leq 3 \cdot 10^{-176}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq 14000000000:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -4.7000000000000002e86 or 7.9999999999999999e156 < (*.f64 x y)

    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 z around 0 82.8%

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

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

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

    if -4.7000000000000002e86 < (*.f64 x y) < -5.5000000000000004e-87 or 2.2e-287 < (*.f64 x y) < 3e-176 or 1.4e10 < (*.f64 x y) < 7.9999999999999999e156

    1. Initial program 99.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-99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(a, b \cdot -0.25, c\right) + x \cdot y\right) + t \cdot \left(z \cdot 0.0625\right)} \]
    6. Taylor expanded in t around inf 43.9%

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

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

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

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

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

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

    if -5.5000000000000004e-87 < (*.f64 x y) < 2.2e-287 or 3e-176 < (*.f64 x y) < 1.4e10

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(a, b \cdot -0.25, c\right) + x \cdot y\right) + t \cdot \left(z \cdot 0.0625\right)} \]
    6. Taylor expanded in x around 0 94.0%

      \[\leadsto \color{blue}{\left(c + -0.25 \cdot \left(a \cdot b\right)\right)} + t \cdot \left(z \cdot 0.0625\right) \]
    7. Step-by-step derivation
      1. +-commutative94.0%

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

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

        \[\leadsto \left(\color{blue}{a \cdot \left(b \cdot -0.25\right)} + c\right) + t \cdot \left(z \cdot 0.0625\right) \]
      4. fma-udef94.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, b \cdot -0.25, c\right)} + t \cdot \left(z \cdot 0.0625\right) \]
      5. *-commutative94.0%

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{-0.25 \cdot b}, c\right) + t \cdot \left(z \cdot 0.0625\right) \]
    8. Simplified94.0%

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

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

        \[\leadsto \color{blue}{\left(-0.25 \cdot a\right) \cdot b} \]
    11. Simplified48.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -4.7 \cdot 10^{+86}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \cdot y \leq -5.5 \cdot 10^{-87}:\\ \;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;x \cdot y \leq 2.2 \cdot 10^{-287}:\\ \;\;\;\;b \cdot \left(a \cdot -0.25\right)\\ \mathbf{elif}\;x \cdot y \leq 3 \cdot 10^{-176}:\\ \;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;x \cdot y \leq 14000000000:\\ \;\;\;\;b \cdot \left(a \cdot -0.25\right)\\ \mathbf{elif}\;x \cdot y \leq 8 \cdot 10^{+156}:\\ \;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 5: 65.4% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;x \cdot y \leq 3.2 \cdot 10^{-288}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;x \cdot y \leq 4.6 \cdot 10^{-175}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq 1.35 \cdot 10^{-80}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -4.10000000000000028e88 or 1.3500000000000001e-80 < (*.f64 x y)

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(a, b \cdot -0.25, c\right) + x \cdot y\right) + t \cdot \left(z \cdot 0.0625\right)} \]
    6. Taylor expanded in x around inf 76.5%

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

    if -4.10000000000000028e88 < (*.f64 x y) < -1.3e-80 or 3.2e-288 < (*.f64 x y) < 4.6e-175

    1. Initial program 98.6%

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

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

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

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

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

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

    if -1.3e-80 < (*.f64 x y) < 3.2e-288 or 4.6e-175 < (*.f64 x y) < 1.3500000000000001e-80

    1. Initial program 98.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -4.1 \cdot 10^{+88}:\\ \;\;\;\;x \cdot y + t \cdot \left(z \cdot 0.0625\right)\\ \mathbf{elif}\;x \cdot y \leq -1.3 \cdot 10^{-80}:\\ \;\;\;\;c + z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;x \cdot y \leq 3.2 \cdot 10^{-288}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{elif}\;x \cdot y \leq 4.6 \cdot 10^{-175}:\\ \;\;\;\;c + z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;x \cdot y \leq 1.35 \cdot 10^{-80}:\\ \;\;\;\;c + a \cdot \left(b \cdot -0.25\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y + t \cdot \left(z \cdot 0.0625\right)\\ \end{array} \]

Alternative 6: 42.2% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;x \cdot y \leq 1.9 \cdot 10^{-279}:\\
\;\;\;\;c\\

\mathbf{elif}\;x \cdot y \leq 5.6 \cdot 10^{-226}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \cdot y \leq 1.12 \cdot 10^{-85}:\\
\;\;\;\;c\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -2.8e83 or 4.50000000000000031e156 < (*.f64 x y)

    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 z around 0 82.8%

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

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

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

    if -2.8e83 < (*.f64 x y) < 1.90000000000000016e-279 or 5.60000000000000016e-226 < (*.f64 x y) < 1.12000000000000004e-85

    1. Initial program 98.6%

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

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

    if 1.90000000000000016e-279 < (*.f64 x y) < 5.60000000000000016e-226 or 1.12000000000000004e-85 < (*.f64 x y) < 4.50000000000000031e156

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -2.8 \cdot 10^{+83}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \cdot y \leq 1.9 \cdot 10^{-279}:\\ \;\;\;\;c\\ \mathbf{elif}\;x \cdot y \leq 5.6 \cdot 10^{-226}:\\ \;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;x \cdot y \leq 1.12 \cdot 10^{-85}:\\ \;\;\;\;c\\ \mathbf{elif}\;x \cdot y \leq 4.5 \cdot 10^{+156}:\\ \;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 7: 89.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := 0.0625 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;x \cdot y \leq -2.3 \cdot 10^{+74} \lor \neg \left(x \cdot y \leq 5.6 \cdot 10^{+56}\right):\\
\;\;\;\;c + \left(x \cdot y + t_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -2.2999999999999999e74 or 5.60000000000000017e56 < (*.f64 x y)

    1. Initial program 94.9%

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

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

    if -2.2999999999999999e74 < (*.f64 x y) < 5.60000000000000017e56

    1. Initial program 98.8%

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

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

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

Alternative 8: 87.2% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(a, b \cdot -0.25, c\right) + x \cdot y\right) + t \cdot \left(z \cdot 0.0625\right)} \]
    6. Taylor expanded in a around inf 82.8%

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

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

        \[\leadsto \color{blue}{a \cdot \left(b \cdot -0.25\right)} + t \cdot \left(z \cdot 0.0625\right) \]
      3. *-commutative82.8%

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

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

    if -1e137 < (*.f64 a b) < 4.9999999999999997e162

    1. Initial program 99.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 91.1%

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

    if 4.9999999999999997e162 < (*.f64 a b)

    1. Initial program 89.3%

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

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

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

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

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

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

Alternative 9: 97.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 65.0% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.5 \cdot 10^{+76} \lor \neg \left(x \cdot y \leq 1.02 \cdot 10^{+58}\right):\\
\;\;\;\;c + x \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -1.4999999999999999e76 or 1.02000000000000005e58 < (*.f64 x y)

    1. Initial program 94.9%

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

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

    if -1.4999999999999999e76 < (*.f64 x y) < 1.02000000000000005e58

    1. Initial program 98.8%

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

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

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

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

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

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

Alternative 11: 83.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+57} \lor \neg \left(z \leq 2.5 \cdot 10^{-84}\right):\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(z \cdot t\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.7999999999999999e57 or 2.5000000000000001e-84 < z

    1. Initial program 96.8%

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

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

    if -3.7999999999999999e57 < z < 2.5000000000000001e-84

    1. Initial program 97.8%

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

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

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

Alternative 12: 52.4% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;t \leq 0.03:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.4 \cdot 10^{+189}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.2e9 or 1.40000000000000003e189 < t

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(a, b \cdot -0.25, c\right) + x \cdot y\right) + t \cdot \left(z \cdot 0.0625\right)} \]
    6. Taylor expanded in t around inf 51.4%

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

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

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

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

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

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

    if -8.2e9 < t < 0.029999999999999999 or 3.19999999999999983e67 < t < 1.40000000000000003e189

    1. Initial program 98.1%

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

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

    if 0.029999999999999999 < t < 3.19999999999999983e67

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(a, b \cdot -0.25, c\right) + x \cdot y\right) + t \cdot \left(z \cdot 0.0625\right)} \]
    6. Taylor expanded in x around 0 86.7%

      \[\leadsto \color{blue}{\left(c + -0.25 \cdot \left(a \cdot b\right)\right)} + t \cdot \left(z \cdot 0.0625\right) \]
    7. Step-by-step derivation
      1. +-commutative86.7%

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

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

        \[\leadsto \left(\color{blue}{a \cdot \left(b \cdot -0.25\right)} + c\right) + t \cdot \left(z \cdot 0.0625\right) \]
      4. fma-udef86.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, b \cdot -0.25, c\right)} + t \cdot \left(z \cdot 0.0625\right) \]
      5. *-commutative86.8%

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{-0.25 \cdot b}, c\right) + t \cdot \left(z \cdot 0.0625\right) \]
    8. Simplified86.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8200000000:\\ \;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\ \mathbf{elif}\;t \leq 0.03:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+67}:\\ \;\;\;\;b \cdot \left(a \cdot -0.25\right)\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+189}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(t \cdot 0.0625\right)\\ \end{array} \]

Alternative 13: 41.3% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.3 \cdot 10^{+85} \lor \neg \left(x \cdot y \leq 2 \cdot 10^{+149}\right):\\
\;\;\;\;x \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -1.30000000000000005e85 or 2.0000000000000001e149 < (*.f64 x y)

    1. Initial program 94.0%

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

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

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

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

    if -1.30000000000000005e85 < (*.f64 x y) < 2.0000000000000001e149

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -1.3 \cdot 10^{+85} \lor \neg \left(x \cdot y \leq 2 \cdot 10^{+149}\right):\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c\\ \end{array} \]

Alternative 14: 22.4% accurate, 17.0× speedup?

\[\begin{array}{l} \\ c \end{array} \]
(FPCore (x y z t a b c) :precision binary64 c)
double code(double x, double y, double z, double t, double a, double b, double c) {
	return c;
}
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	return c;
}
def code(x, y, z, t, a, b, c):
	return c
function code(x, y, z, t, a, b, c)
	return c
end
function tmp = code(x, y, z, t, a, b, c)
	tmp = c;
end
code[x_, y_, z_, t_, a_, b_, c_] := c
\begin{array}{l}

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

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

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

    \[\leadsto c \]

Reproduce

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