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

Percentage Accurate: 97.7% → 98.8%
Time: 8.3s
Alternatives: 15
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 97.7% accurate, 1.0× speedup?

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

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

Alternative 1: 98.8% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.7% accurate, 0.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) < +inf.0

    1. Initial program 100.0%

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, c - b \cdot \left(a \cdot 0.25\right)\right)} \]
      9. sub-neg85.7%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{c + \left(-b \cdot \left(a \cdot 0.25\right)\right)}\right) \]
      10. +-commutative85.7%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(-b \cdot \left(a \cdot 0.25\right)\right) + c}\right) \]
      11. distribute-rgt-neg-in85.7%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{b \cdot \left(-a \cdot 0.25\right)} + c\right) \]
      12. fma-def85.7%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(b, -a \cdot 0.25, c\right)}\right) \]
      13. distribute-rgt-neg-in85.7%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, \color{blue}{a \cdot \left(-0.25\right)}, c\right)\right) \]
      14. metadata-eval85.7%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, a \cdot \color{blue}{-0.25}, c\right)\right) \]
    4. Simplified85.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, \mathsf{fma}\left(b, a \cdot -0.25, c\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.6%

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

Alternative 3: 98.1% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 98.4% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (+.f64 (*.f64 x y) (/.f64 (*.f64 z t) 16)) (/.f64 (*.f64 a b) 4)) < +inf.0

    1. Initial program 100.0%

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

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

    1. Initial program 0.0%

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

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

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

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

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

Alternative 5: 62.4% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;b \cdot a \leq 7.3 \cdot 10^{-38}:\\
\;\;\;\;c + x \cdot y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a b) < -8.00000000000000047e140 or 3.09999999999999972e272 < (*.f64 a b)

    1. Initial program 89.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot x} + \left(c - b \cdot \left(a \cdot 0.25\right)\right) \]
      8. fma-def92.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, c - b \cdot \left(a \cdot 0.25\right)\right)} \]
      9. sub-neg92.2%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{c + \left(-b \cdot \left(a \cdot 0.25\right)\right)}\right) \]
      10. +-commutative92.2%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(-b \cdot \left(a \cdot 0.25\right)\right) + c}\right) \]
      11. distribute-rgt-neg-in92.2%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{b \cdot \left(-a \cdot 0.25\right)} + c\right) \]
      12. fma-def92.2%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(b, -a \cdot 0.25, c\right)}\right) \]
      13. distribute-rgt-neg-in92.2%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, \color{blue}{a \cdot \left(-0.25\right)}, c\right)\right) \]
      14. metadata-eval92.2%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, a \cdot \color{blue}{-0.25}, c\right)\right) \]
    4. Simplified92.2%

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

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

    if -8.00000000000000047e140 < (*.f64 a b) < 7.3000000000000001e-38

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

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

    if 7.3000000000000001e-38 < (*.f64 a b) < 3.09999999999999972e272

    1. Initial program 100.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot a \leq -8 \cdot 10^{+140}:\\ \;\;\;\;\left(b \cdot a\right) \cdot -0.25\\ \mathbf{elif}\;b \cdot a \leq 7.3 \cdot 10^{-38}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{elif}\;b \cdot a \leq 3.1 \cdot 10^{+272}:\\ \;\;\;\;c + t \cdot \left(z \cdot 0.0625\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot a\right) \cdot -0.25\\ \end{array} \]

Alternative 6: 85.8% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 90.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, c - b \cdot \left(a \cdot 0.25\right)\right)} \]
      9. sub-neg88.5%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{c + \left(-b \cdot \left(a \cdot 0.25\right)\right)}\right) \]
      10. +-commutative88.5%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(-b \cdot \left(a \cdot 0.25\right)\right) + c}\right) \]
      11. distribute-rgt-neg-in88.5%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{b \cdot \left(-a \cdot 0.25\right)} + c\right) \]
      12. fma-def88.5%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(b, -a \cdot 0.25, c\right)}\right) \]
      13. distribute-rgt-neg-in88.5%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, \color{blue}{a \cdot \left(-0.25\right)}, c\right)\right) \]
      14. metadata-eval88.5%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, a \cdot \color{blue}{-0.25}, c\right)\right) \]
    4. Simplified88.5%

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

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

    if -5.2000000000000002e84 < (*.f64 a b) < 5.30000000000000011e272

    1. Initial program 99.0%

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

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

    if 5.30000000000000011e272 < (*.f64 a b)

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot x} + \left(c - b \cdot \left(a \cdot 0.25\right)\right) \]
      8. fma-def100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, c - b \cdot \left(a \cdot 0.25\right)\right)} \]
      9. sub-neg100.0%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{c + \left(-b \cdot \left(a \cdot 0.25\right)\right)}\right) \]
      10. +-commutative100.0%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(-b \cdot \left(a \cdot 0.25\right)\right) + c}\right) \]
      11. distribute-rgt-neg-in100.0%

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

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(b, -a \cdot 0.25, c\right)}\right) \]
      13. distribute-rgt-neg-in100.0%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, \color{blue}{a \cdot \left(-0.25\right)}, c\right)\right) \]
      14. metadata-eval100.0%

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

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

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

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

Alternative 7: 86.1% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 88.2%

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

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

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

    if -2.9999999999999999e141 < (*.f64 a b) < 8.0000000000000005e272

    1. Initial program 99.0%

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

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

    if 8.0000000000000005e272 < (*.f64 a b)

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot x} + \left(c - b \cdot \left(a \cdot 0.25\right)\right) \]
      8. fma-def100.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, c - b \cdot \left(a \cdot 0.25\right)\right)} \]
      9. sub-neg100.0%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{c + \left(-b \cdot \left(a \cdot 0.25\right)\right)}\right) \]
      10. +-commutative100.0%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(-b \cdot \left(a \cdot 0.25\right)\right) + c}\right) \]
      11. distribute-rgt-neg-in100.0%

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

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(b, -a \cdot 0.25, c\right)}\right) \]
      13. distribute-rgt-neg-in100.0%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, \color{blue}{a \cdot \left(-0.25\right)}, c\right)\right) \]
      14. metadata-eval100.0%

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

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

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

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

Alternative 8: 36.6% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;x \leq -1.05 \cdot 10^{+18}:\\
\;\;\;\;c\\

\mathbf{elif}\;x \leq -8 \cdot 10^{-134}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -4.5 \cdot 10^{-205}:\\
\;\;\;\;c\\

\mathbf{elif}\;x \leq -5.4 \cdot 10^{-252}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 3.9 \cdot 10^{-37}:\\
\;\;\;\;c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -3.10000000000000014e150 or 3.8999999999999999e-37 < x

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, c - b \cdot \left(a \cdot 0.25\right)\right)} \]
      9. sub-neg79.9%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{c + \left(-b \cdot \left(a \cdot 0.25\right)\right)}\right) \]
      10. +-commutative79.9%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(-b \cdot \left(a \cdot 0.25\right)\right) + c}\right) \]
      11. distribute-rgt-neg-in79.9%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{b \cdot \left(-a \cdot 0.25\right)} + c\right) \]
      12. fma-def79.9%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(b, -a \cdot 0.25, c\right)}\right) \]
      13. distribute-rgt-neg-in79.9%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, \color{blue}{a \cdot \left(-0.25\right)}, c\right)\right) \]
      14. metadata-eval79.9%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, a \cdot \color{blue}{-0.25}, c\right)\right) \]
    4. Simplified79.9%

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

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

    if -3.10000000000000014e150 < x < -6.19999999999999975e45

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot x} + \left(c - b \cdot \left(a \cdot 0.25\right)\right) \]
      8. fma-def79.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, c - b \cdot \left(a \cdot 0.25\right)\right)} \]
      9. sub-neg79.1%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{c + \left(-b \cdot \left(a \cdot 0.25\right)\right)}\right) \]
      10. +-commutative79.1%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(-b \cdot \left(a \cdot 0.25\right)\right) + c}\right) \]
      11. distribute-rgt-neg-in79.1%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{b \cdot \left(-a \cdot 0.25\right)} + c\right) \]
      12. fma-def79.1%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(b, -a \cdot 0.25, c\right)}\right) \]
      13. distribute-rgt-neg-in79.1%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, \color{blue}{a \cdot \left(-0.25\right)}, c\right)\right) \]
      14. metadata-eval79.1%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, a \cdot \color{blue}{-0.25}, c\right)\right) \]
    4. Simplified79.1%

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

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

    if -6.19999999999999975e45 < x < -1.05e18 or -8.00000000000000032e-134 < x < -4.49999999999999956e-205 or -5.39999999999999962e-252 < x < 3.8999999999999999e-37

    1. Initial program 100.0%

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

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

    if -1.05e18 < x < -8.00000000000000032e-134 or -4.49999999999999956e-205 < x < -5.39999999999999962e-252

    1. Initial program 98.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.1 \cdot 10^{+150}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \leq -6.2 \cdot 10^{+45}:\\ \;\;\;\;\left(b \cdot a\right) \cdot -0.25\\ \mathbf{elif}\;x \leq -1.05 \cdot 10^{+18}:\\ \;\;\;\;c\\ \mathbf{elif}\;x \leq -8 \cdot 10^{-134}:\\ \;\;\;\;0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;x \leq -4.5 \cdot 10^{-205}:\\ \;\;\;\;c\\ \mathbf{elif}\;x \leq -5.4 \cdot 10^{-252}:\\ \;\;\;\;0.0625 \cdot \left(t \cdot z\right)\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{-37}:\\ \;\;\;\;c\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 9: 35.9% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;x \leq -1.35 \cdot 10^{+42}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq -1.82 \cdot 10^{+37}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;x \leq -4 \cdot 10^{-18}:\\
\;\;\;\;c\\

\mathbf{elif}\;x \leq -5.8 \cdot 10^{-182}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 2.55 \cdot 10^{-36}:\\
\;\;\;\;c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.10000000000000014e150 or -1.35e42 < x < -1.81999999999999998e37 or 2.54999999999999987e-36 < x

    1. Initial program 94.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 77.8%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, c - b \cdot \left(a \cdot 0.25\right)\right)} \]
      9. sub-neg80.5%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{c + \left(-b \cdot \left(a \cdot 0.25\right)\right)}\right) \]
      10. +-commutative80.5%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(-b \cdot \left(a \cdot 0.25\right)\right) + c}\right) \]
      11. distribute-rgt-neg-in80.5%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{b \cdot \left(-a \cdot 0.25\right)} + c\right) \]
      12. fma-def80.5%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(b, -a \cdot 0.25, c\right)}\right) \]
      13. distribute-rgt-neg-in80.5%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, \color{blue}{a \cdot \left(-0.25\right)}, c\right)\right) \]
      14. metadata-eval80.5%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, a \cdot \color{blue}{-0.25}, c\right)\right) \]
    4. Simplified80.5%

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

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

    if -3.10000000000000014e150 < x < -1.35e42 or -4.0000000000000003e-18 < x < -5.79999999999999974e-182

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, c - b \cdot \left(a \cdot 0.25\right)\right)} \]
      9. sub-neg71.3%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{c + \left(-b \cdot \left(a \cdot 0.25\right)\right)}\right) \]
      10. +-commutative71.3%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(-b \cdot \left(a \cdot 0.25\right)\right) + c}\right) \]
      11. distribute-rgt-neg-in71.3%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{b \cdot \left(-a \cdot 0.25\right)} + c\right) \]
      12. fma-def71.3%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(b, -a \cdot 0.25, c\right)}\right) \]
      13. distribute-rgt-neg-in71.3%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, \color{blue}{a \cdot \left(-0.25\right)}, c\right)\right) \]
      14. metadata-eval71.3%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, a \cdot \color{blue}{-0.25}, c\right)\right) \]
    4. Simplified71.3%

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

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

    if -1.81999999999999998e37 < x < -4.0000000000000003e-18 or -5.79999999999999974e-182 < x < 2.54999999999999987e-36

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.1 \cdot 10^{+150}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \leq -1.35 \cdot 10^{+42}:\\ \;\;\;\;\left(b \cdot a\right) \cdot -0.25\\ \mathbf{elif}\;x \leq -1.82 \cdot 10^{+37}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \leq -4 \cdot 10^{-18}:\\ \;\;\;\;c\\ \mathbf{elif}\;x \leq -5.8 \cdot 10^{-182}:\\ \;\;\;\;\left(b \cdot a\right) \cdot -0.25\\ \mathbf{elif}\;x \leq 2.55 \cdot 10^{-36}:\\ \;\;\;\;c\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array} \]

Alternative 10: 65.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \cdot a \leq -1.55 \cdot 10^{+119} \lor \neg \left(b \cdot a \leq 1.15 \cdot 10^{+64}\right):\\
\;\;\;\;c + \left(b \cdot a\right) \cdot -0.25\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a b) < -1.54999999999999998e119 or 1.15e64 < (*.f64 a b)

    1. Initial program 93.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 73.0%

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

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

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

    if -1.54999999999999998e119 < (*.f64 a b) < 1.15e64

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

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

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

Alternative 11: 84.0% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+83} \lor \neg \left(z \leq 5.6 \cdot 10^{-64}\right):\\
\;\;\;\;c + \left(x \cdot y + 0.0625 \cdot \left(t \cdot z\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.1000000000000001e83 or 5.60000000000000008e-64 < z

    1. Initial program 95.4%

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

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

    if -4.1000000000000001e83 < z < 5.60000000000000008e-64

    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 0 91.0%

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

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

Alternative 12: 66.2% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 91.1%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot x} + \left(c - b \cdot \left(a \cdot 0.25\right)\right) \]
      8. fma-def85.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, c - b \cdot \left(a \cdot 0.25\right)\right)} \]
      9. sub-neg85.0%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{c + \left(-b \cdot \left(a \cdot 0.25\right)\right)}\right) \]
      10. +-commutative85.0%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(-b \cdot \left(a \cdot 0.25\right)\right) + c}\right) \]
      11. distribute-rgt-neg-in85.0%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{b \cdot \left(-a \cdot 0.25\right)} + c\right) \]
      12. fma-def85.1%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(b, -a \cdot 0.25, c\right)}\right) \]
      13. distribute-rgt-neg-in85.1%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, \color{blue}{a \cdot \left(-0.25\right)}, c\right)\right) \]
      14. metadata-eval85.1%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, a \cdot \color{blue}{-0.25}, c\right)\right) \]
    4. Simplified85.1%

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

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

    if -3.59999999999999999e63 < (*.f64 a b) < 1.15e64

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

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

    if 1.15e64 < (*.f64 a b)

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot a \leq -3.6 \cdot 10^{+63}:\\ \;\;\;\;x \cdot y + \left(b \cdot a\right) \cdot -0.25\\ \mathbf{elif}\;b \cdot a \leq 1.15 \cdot 10^{+64}:\\ \;\;\;\;c + x \cdot y\\ \mathbf{else}:\\ \;\;\;\;c + \left(b \cdot a\right) \cdot -0.25\\ \end{array} \]

Alternative 13: 62.5% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \cdot a \leq -1.6 \cdot 10^{+141} \lor \neg \left(b \cdot a \leq 3.1 \cdot 10^{+272}\right):\\
\;\;\;\;\left(b \cdot a\right) \cdot -0.25\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a b) < -1.60000000000000009e141 or 3.09999999999999972e272 < (*.f64 a b)

    1. Initial program 89.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot x} + \left(c - b \cdot \left(a \cdot 0.25\right)\right) \]
      8. fma-def92.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, c - b \cdot \left(a \cdot 0.25\right)\right)} \]
      9. sub-neg92.2%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{c + \left(-b \cdot \left(a \cdot 0.25\right)\right)}\right) \]
      10. +-commutative92.2%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(-b \cdot \left(a \cdot 0.25\right)\right) + c}\right) \]
      11. distribute-rgt-neg-in92.2%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{b \cdot \left(-a \cdot 0.25\right)} + c\right) \]
      12. fma-def92.2%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(b, -a \cdot 0.25, c\right)}\right) \]
      13. distribute-rgt-neg-in92.2%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, \color{blue}{a \cdot \left(-0.25\right)}, c\right)\right) \]
      14. metadata-eval92.2%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, a \cdot \color{blue}{-0.25}, c\right)\right) \]
    4. Simplified92.2%

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

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

    if -1.60000000000000009e141 < (*.f64 a b) < 3.09999999999999972e272

    1. Initial program 99.0%

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

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

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

Alternative 14: 37.0% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;x \leq 10^{-36}:\\
\;\;\;\;c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.9499999999999999e37 or 9.9999999999999994e-37 < x

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, c - b \cdot \left(a \cdot 0.25\right)\right)} \]
      9. sub-neg80.4%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{c + \left(-b \cdot \left(a \cdot 0.25\right)\right)}\right) \]
      10. +-commutative80.4%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\left(-b \cdot \left(a \cdot 0.25\right)\right) + c}\right) \]
      11. distribute-rgt-neg-in80.4%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{b \cdot \left(-a \cdot 0.25\right)} + c\right) \]
      12. fma-def80.4%

        \[\leadsto \mathsf{fma}\left(y, x, \color{blue}{\mathsf{fma}\left(b, -a \cdot 0.25, c\right)}\right) \]
      13. distribute-rgt-neg-in80.4%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, \color{blue}{a \cdot \left(-0.25\right)}, c\right)\right) \]
      14. metadata-eval80.4%

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{fma}\left(b, a \cdot \color{blue}{-0.25}, c\right)\right) \]
    4. Simplified80.4%

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

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

    if -1.9499999999999999e37 < x < 9.9999999999999994e-37

    1. Initial program 99.1%

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

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

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

Alternative 15: 22.2% accurate, 17.0× speedup?

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

\\
c
\end{array}
Derivation
  1. Initial program 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 27.1%

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

    \[\leadsto c \]

Reproduce

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