Linear.V4:$cdot from linear-1.19.1.3, C

Percentage Accurate: 95.9% → 97.9%
Time: 2.5s
Alternatives: 12
Speedup: 1.1×

Specification

?
\[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
(FPCore (x y z t a b c i)
  :precision binary64
  :pre TRUE
  (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
    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), intent (in) :: i
    code = (((x * y) + (z * t)) + (a * b)) + (c * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
def code(x, y, z, t, a, b, c, i):
	return (((x * y) + (z * t)) + (a * b)) + (c * i)
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = (((x * y) + (z * t)) + (a * b)) + (c * i);
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a, b, c, i):
	x in [-inf, +inf],
	y in [-inf, +inf],
	z in [-inf, +inf],
	t in [-inf, +inf],
	a in [-inf, +inf],
	b in [-inf, +inf],
	c in [-inf, +inf],
	i in [-inf, +inf]
code: THEORY
BEGIN
f(x, y, z, t, a, b, c, i: real): real =
	(((x * y) + (z * t)) + (a * b)) + (c * i)
END code
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i

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 12 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: 95.9% accurate, 1.0× speedup?

\[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
(FPCore (x y z t a b c i)
  :precision binary64
  :pre TRUE
  (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
    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), intent (in) :: i
    code = (((x * y) + (z * t)) + (a * b)) + (c * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((x * y) + (z * t)) + (a * b)) + (c * i);
}
def code(x, y, z, t, a, b, c, i):
	return (((x * y) + (z * t)) + (a * b)) + (c * i)
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = (((x * y) + (z * t)) + (a * b)) + (c * i);
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a, b, c, i):
	x in [-inf, +inf],
	y in [-inf, +inf],
	z in [-inf, +inf],
	t in [-inf, +inf],
	a in [-inf, +inf],
	b in [-inf, +inf],
	c in [-inf, +inf],
	i in [-inf, +inf]
code: THEORY
BEGIN
f(x, y, z, t, a, b, c, i: real): real =
	(((x * y) + (z * t)) + (a * b)) + (c * i)
END code
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i

Alternative 1: 97.9% accurate, 1.1× speedup?

\[\mathsf{fma}\left(x, y, \mathsf{fma}\left(i, c, \mathsf{fma}\left(b, a, t \cdot z\right)\right)\right) \]
(FPCore (x y z t a b c i)
  :precision binary64
  :pre TRUE
  (fma x y (fma i c (fma b a (* t z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return fma(x, y, fma(i, c, fma(b, a, (t * z))));
}
function code(x, y, z, t, a, b, c, i)
	return fma(x, y, fma(i, c, fma(b, a, Float64(t * z))))
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(x * y + N[(i * c + N[(b * a + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t, a, b, c, i):
	x in [-inf, +inf],
	y in [-inf, +inf],
	z in [-inf, +inf],
	t in [-inf, +inf],
	a in [-inf, +inf],
	b in [-inf, +inf],
	c in [-inf, +inf],
	i in [-inf, +inf]
code: THEORY
BEGIN
f(x, y, z, t, a, b, c, i: real): real =
	(x * y) + ((i * c) + ((b * a) + (t * z)))
END code
\mathsf{fma}\left(x, y, \mathsf{fma}\left(i, c, \mathsf{fma}\left(b, a, t \cdot z\right)\right)\right)
Derivation
  1. Initial program 95.9%

    \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
  2. Applied rewrites97.9%

    \[\leadsto \mathsf{fma}\left(x, y, \mathsf{fma}\left(i, c, \mathsf{fma}\left(b, a, t \cdot z\right)\right)\right) \]
  3. Add Preprocessing

Alternative 2: 89.9% accurate, 0.8× speedup?

\[\begin{array}{l} \mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+42}:\\ \;\;\;\;\mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+84}:\\ \;\;\;\;\mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, t \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, y, \mathsf{fma}\left(i, c, t \cdot z\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c i)
  :precision binary64
  :pre TRUE
  (if (<= (* x y) -2e+42)
  (fma a b (fma c i (* x y)))
  (if (<= (* x y) 5e+84)
    (fma a b (fma c i (* t z)))
    (fma x y (fma i c (* t z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((x * y) <= -2e+42) {
		tmp = fma(a, b, fma(c, i, (x * y)));
	} else if ((x * y) <= 5e+84) {
		tmp = fma(a, b, fma(c, i, (t * z)));
	} else {
		tmp = fma(x, y, fma(i, c, (t * z)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(x * y) <= -2e+42)
		tmp = fma(a, b, fma(c, i, Float64(x * y)));
	elseif (Float64(x * y) <= 5e+84)
		tmp = fma(a, b, fma(c, i, Float64(t * z)));
	else
		tmp = fma(x, y, fma(i, c, Float64(t * z)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+42], N[(a * b + N[(c * i + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e+84], N[(a * b + N[(c * i + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * y + N[(i * c + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
f(x, y, z, t, a, b, c, i):
	x in [-inf, +inf],
	y in [-inf, +inf],
	z in [-inf, +inf],
	t in [-inf, +inf],
	a in [-inf, +inf],
	b in [-inf, +inf],
	c in [-inf, +inf],
	i in [-inf, +inf]
code: THEORY
BEGIN
f(x, y, z, t, a, b, c, i: real): real =
	LET tmp_1 = IF ((x * y) <= (5000000000000000073153476153374365154850214939323275296393053935848981821255741079552)) THEN ((a * b) + ((c * i) + (t * z))) ELSE ((x * y) + ((i * c) + (t * z))) ENDIF IN
	LET tmp = IF ((x * y) <= (-2000000000000000089771425356151833571098624)) THEN ((a * b) + ((c * i) + (x * y))) ELSE tmp_1 ENDIF IN
	tmp
END code
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+42}:\\
\;\;\;\;\mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right)\\

\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+84}:\\
\;\;\;\;\mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, t \cdot z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, y, \mathsf{fma}\left(i, c, t \cdot z\right)\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -2.0000000000000001e42

    1. Initial program 95.9%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
    2. Taylor expanded in z around 0

      \[\leadsto a \cdot b + \left(c \cdot i + x \cdot y\right) \]
    3. Step-by-step derivation
      1. Applied rewrites75.2%

        \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]

      if -2.0000000000000001e42 < (*.f64 x y) < 5.0000000000000001e84

      1. Initial program 95.9%

        \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
      2. Taylor expanded in x around 0

        \[\leadsto a \cdot b + \left(c \cdot i + t \cdot z\right) \]
      3. Step-by-step derivation
        1. Applied rewrites75.4%

          \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, t \cdot z\right)\right) \]

        if 5.0000000000000001e84 < (*.f64 x y)

        1. Initial program 95.9%

          \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
        2. Taylor expanded in a around 0

          \[\leadsto c \cdot i + \left(t \cdot z + x \cdot y\right) \]
        3. Step-by-step derivation
          1. Applied rewrites74.6%

            \[\leadsto \mathsf{fma}\left(c, i, \mathsf{fma}\left(t, z, x \cdot y\right)\right) \]
          2. Step-by-step derivation
            1. Applied rewrites74.6%

              \[\leadsto \mathsf{fma}\left(x, y, \mathsf{fma}\left(i, c, t \cdot z\right)\right) \]
          3. Recombined 3 regimes into one program.
          4. Add Preprocessing

          Alternative 3: 89.6% accurate, 0.8× speedup?

          \[\begin{array}{l} \mathbf{if}\;x \cdot y \leq -3.1382117749624694 \cdot 10^{+42}:\\ \;\;\;\;\mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right)\\ \mathbf{elif}\;x \cdot y \leq 9.39991363007265 \cdot 10^{+97}:\\ \;\;\;\;\mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, t \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c, i, \mathsf{fma}\left(t, z, x \cdot y\right)\right)\\ \end{array} \]
          (FPCore (x y z t a b c i)
            :precision binary64
            :pre TRUE
            (if (<= (* x y) -3.1382117749624694e+42)
            (fma a b (fma c i (* x y)))
            (if (<= (* x y) 9.39991363007265e+97)
              (fma a b (fma c i (* t z)))
              (fma c i (fma t z (* x y))))))
          double code(double x, double y, double z, double t, double a, double b, double c, double i) {
          	double tmp;
          	if ((x * y) <= -3.1382117749624694e+42) {
          		tmp = fma(a, b, fma(c, i, (x * y)));
          	} else if ((x * y) <= 9.39991363007265e+97) {
          		tmp = fma(a, b, fma(c, i, (t * z)));
          	} else {
          		tmp = fma(c, i, fma(t, z, (x * y)));
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b, c, i)
          	tmp = 0.0
          	if (Float64(x * y) <= -3.1382117749624694e+42)
          		tmp = fma(a, b, fma(c, i, Float64(x * y)));
          	elseif (Float64(x * y) <= 9.39991363007265e+97)
          		tmp = fma(a, b, fma(c, i, Float64(t * z)));
          	else
          		tmp = fma(c, i, fma(t, z, Float64(x * y)));
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -3.1382117749624694e+42], N[(a * b + N[(c * i + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 9.39991363007265e+97], N[(a * b + N[(c * i + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * i + N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
          
          f(x, y, z, t, a, b, c, i):
          	x in [-inf, +inf],
          	y in [-inf, +inf],
          	z in [-inf, +inf],
          	t in [-inf, +inf],
          	a in [-inf, +inf],
          	b in [-inf, +inf],
          	c in [-inf, +inf],
          	i in [-inf, +inf]
          code: THEORY
          BEGIN
          f(x, y, z, t, a, b, c, i: real): real =
          	LET tmp_1 = IF ((x * y) <= (93999136300726496045263588239683999000219775412683399171711992468226925889669915361728257616510976)) THEN ((a * b) + ((c * i) + (t * z))) ELSE ((c * i) + ((t * z) + (x * y))) ENDIF IN
          	LET tmp = IF ((x * y) <= (-3138211774962469442935189429245078050701312)) THEN ((a * b) + ((c * i) + (x * y))) ELSE tmp_1 ENDIF IN
          	tmp
          END code
          \begin{array}{l}
          \mathbf{if}\;x \cdot y \leq -3.1382117749624694 \cdot 10^{+42}:\\
          \;\;\;\;\mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right)\\
          
          \mathbf{elif}\;x \cdot y \leq 9.39991363007265 \cdot 10^{+97}:\\
          \;\;\;\;\mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, t \cdot z\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(c, i, \mathsf{fma}\left(t, z, x \cdot y\right)\right)\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (*.f64 x y) < -3.1382117749624694e42

            1. Initial program 95.9%

              \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
            2. Taylor expanded in z around 0

              \[\leadsto a \cdot b + \left(c \cdot i + x \cdot y\right) \]
            3. Step-by-step derivation
              1. Applied rewrites75.2%

                \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]

              if -3.1382117749624694e42 < (*.f64 x y) < 9.3999136300726496e97

              1. Initial program 95.9%

                \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
              2. Taylor expanded in x around 0

                \[\leadsto a \cdot b + \left(c \cdot i + t \cdot z\right) \]
              3. Step-by-step derivation
                1. Applied rewrites75.4%

                  \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, t \cdot z\right)\right) \]

                if 9.3999136300726496e97 < (*.f64 x y)

                1. Initial program 95.9%

                  \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                2. Taylor expanded in a around 0

                  \[\leadsto c \cdot i + \left(t \cdot z + x \cdot y\right) \]
                3. Step-by-step derivation
                  1. Applied rewrites74.6%

                    \[\leadsto \mathsf{fma}\left(c, i, \mathsf{fma}\left(t, z, x \cdot y\right)\right) \]
                4. Recombined 3 regimes into one program.
                5. Add Preprocessing

                Alternative 4: 89.5% accurate, 0.8× speedup?

                \[\begin{array}{l} t_1 := \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right)\\ \mathbf{if}\;x \cdot y \leq -3.1382117749624694 \cdot 10^{+42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq 6.334657605915576 \cdot 10^{+58}:\\ \;\;\;\;\mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, t \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                (FPCore (x y z t a b c i)
                  :precision binary64
                  :pre TRUE
                  (let* ((t_1 (fma a b (fma c i (* x y)))))
                  (if (<= (* x y) -3.1382117749624694e+42)
                    t_1
                    (if (<= (* x y) 6.334657605915576e+58)
                      (fma a b (fma c i (* t z)))
                      t_1))))
                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                	double t_1 = fma(a, b, fma(c, i, (x * y)));
                	double tmp;
                	if ((x * y) <= -3.1382117749624694e+42) {
                		tmp = t_1;
                	} else if ((x * y) <= 6.334657605915576e+58) {
                		tmp = fma(a, b, fma(c, i, (t * z)));
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                function code(x, y, z, t, a, b, c, i)
                	t_1 = fma(a, b, fma(c, i, Float64(x * y)))
                	tmp = 0.0
                	if (Float64(x * y) <= -3.1382117749624694e+42)
                		tmp = t_1;
                	elseif (Float64(x * y) <= 6.334657605915576e+58)
                		tmp = fma(a, b, fma(c, i, Float64(t * z)));
                	else
                		tmp = t_1;
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a * b + N[(c * i + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -3.1382117749624694e+42], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 6.334657605915576e+58], N[(a * b + N[(c * i + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                
                f(x, y, z, t, a, b, c, i):
                	x in [-inf, +inf],
                	y in [-inf, +inf],
                	z in [-inf, +inf],
                	t in [-inf, +inf],
                	a in [-inf, +inf],
                	b in [-inf, +inf],
                	c in [-inf, +inf],
                	i in [-inf, +inf]
                code: THEORY
                BEGIN
                f(x, y, z, t, a, b, c, i: real): real =
                	LET t_1 = ((a * b) + ((c * i) + (x * y))) IN
                		LET tmp_1 = IF ((x * y) <= (63346576059155758991410536067508989763166509466962578374656)) THEN ((a * b) + ((c * i) + (t * z))) ELSE t_1 ENDIF IN
                		LET tmp = IF ((x * y) <= (-3138211774962469442935189429245078050701312)) THEN t_1 ELSE tmp_1 ENDIF IN
                	tmp
                END code
                \begin{array}{l}
                t_1 := \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right)\\
                \mathbf{if}\;x \cdot y \leq -3.1382117749624694 \cdot 10^{+42}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;x \cdot y \leq 6.334657605915576 \cdot 10^{+58}:\\
                \;\;\;\;\mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, t \cdot z\right)\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (*.f64 x y) < -3.1382117749624694e42 or 6.3346576059155759e58 < (*.f64 x y)

                  1. Initial program 95.9%

                    \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                  2. Taylor expanded in z around 0

                    \[\leadsto a \cdot b + \left(c \cdot i + x \cdot y\right) \]
                  3. Step-by-step derivation
                    1. Applied rewrites75.2%

                      \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]

                    if -3.1382117749624694e42 < (*.f64 x y) < 6.3346576059155759e58

                    1. Initial program 95.9%

                      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                    2. Taylor expanded in x around 0

                      \[\leadsto a \cdot b + \left(c \cdot i + t \cdot z\right) \]
                    3. Step-by-step derivation
                      1. Applied rewrites75.4%

                        \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, t \cdot z\right)\right) \]
                    4. Recombined 2 regimes into one program.
                    5. Add Preprocessing

                    Alternative 5: 85.9% accurate, 0.8× speedup?

                    \[\begin{array}{l} \mathbf{if}\;x \cdot y \leq -2.4310301300448993 \cdot 10^{+92}:\\ \;\;\;\;\mathsf{fma}\left(a, b, x \cdot y\right)\\ \mathbf{elif}\;x \cdot y \leq 9.39991363007265 \cdot 10^{+97}:\\ \;\;\;\;\mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, t \cdot z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c, i, x \cdot y\right)\\ \end{array} \]
                    (FPCore (x y z t a b c i)
                      :precision binary64
                      :pre TRUE
                      (if (<= (* x y) -2.4310301300448993e+92)
                      (fma a b (* x y))
                      (if (<= (* x y) 9.39991363007265e+97)
                        (fma a b (fma c i (* t z)))
                        (fma c i (* x y)))))
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double tmp;
                    	if ((x * y) <= -2.4310301300448993e+92) {
                    		tmp = fma(a, b, (x * y));
                    	} else if ((x * y) <= 9.39991363007265e+97) {
                    		tmp = fma(a, b, fma(c, i, (t * z)));
                    	} else {
                    		tmp = fma(c, i, (x * y));
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a, b, c, i)
                    	tmp = 0.0
                    	if (Float64(x * y) <= -2.4310301300448993e+92)
                    		tmp = fma(a, b, Float64(x * y));
                    	elseif (Float64(x * y) <= 9.39991363007265e+97)
                    		tmp = fma(a, b, fma(c, i, Float64(t * z)));
                    	else
                    		tmp = fma(c, i, Float64(x * y));
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -2.4310301300448993e+92], N[(a * b + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 9.39991363007265e+97], N[(a * b + N[(c * i + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * i + N[(x * y), $MachinePrecision]), $MachinePrecision]]]
                    
                    f(x, y, z, t, a, b, c, i):
                    	x in [-inf, +inf],
                    	y in [-inf, +inf],
                    	z in [-inf, +inf],
                    	t in [-inf, +inf],
                    	a in [-inf, +inf],
                    	b in [-inf, +inf],
                    	c in [-inf, +inf],
                    	i in [-inf, +inf]
                    code: THEORY
                    BEGIN
                    f(x, y, z, t, a, b, c, i: real): real =
                    	LET tmp_1 = IF ((x * y) <= (93999136300726496045263588239683999000219775412683399171711992468226925889669915361728257616510976)) THEN ((a * b) + ((c * i) + (t * z))) ELSE ((c * i) + (x * y)) ENDIF IN
                    	LET tmp = IF ((x * y) <= (-243103013004489926494550397719659858854683041112430769794729004330253462416167071178584752128)) THEN ((a * b) + (x * y)) ELSE tmp_1 ENDIF IN
                    	tmp
                    END code
                    \begin{array}{l}
                    \mathbf{if}\;x \cdot y \leq -2.4310301300448993 \cdot 10^{+92}:\\
                    \;\;\;\;\mathsf{fma}\left(a, b, x \cdot y\right)\\
                    
                    \mathbf{elif}\;x \cdot y \leq 9.39991363007265 \cdot 10^{+97}:\\
                    \;\;\;\;\mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, t \cdot z\right)\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\mathsf{fma}\left(c, i, x \cdot y\right)\\
                    
                    
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if (*.f64 x y) < -2.4310301300448993e92

                      1. Initial program 95.9%

                        \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                      2. Taylor expanded in z around 0

                        \[\leadsto a \cdot b + \left(c \cdot i + x \cdot y\right) \]
                      3. Step-by-step derivation
                        1. Applied rewrites75.2%

                          \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]
                        2. Taylor expanded in c around 0

                          \[\leadsto a \cdot b + x \cdot y \]
                        3. Step-by-step derivation
                          1. Applied rewrites52.2%

                            \[\leadsto \mathsf{fma}\left(a, b, x \cdot y\right) \]

                          if -2.4310301300448993e92 < (*.f64 x y) < 9.3999136300726496e97

                          1. Initial program 95.9%

                            \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                          2. Taylor expanded in x around 0

                            \[\leadsto a \cdot b + \left(c \cdot i + t \cdot z\right) \]
                          3. Step-by-step derivation
                            1. Applied rewrites75.4%

                              \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, t \cdot z\right)\right) \]

                            if 9.3999136300726496e97 < (*.f64 x y)

                            1. Initial program 95.9%

                              \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                            2. Taylor expanded in z around 0

                              \[\leadsto a \cdot b + \left(c \cdot i + x \cdot y\right) \]
                            3. Step-by-step derivation
                              1. Applied rewrites75.2%

                                \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]
                              2. Taylor expanded in c around 0

                                \[\leadsto a \cdot b + x \cdot y \]
                              3. Step-by-step derivation
                                1. Applied rewrites52.2%

                                  \[\leadsto \mathsf{fma}\left(a, b, x \cdot y\right) \]
                                2. Taylor expanded in x around 0

                                  \[\leadsto a \cdot b \]
                                3. Step-by-step derivation
                                  1. Applied rewrites28.0%

                                    \[\leadsto a \cdot b \]
                                  2. Taylor expanded in a around 0

                                    \[\leadsto c \cdot i + x \cdot y \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites51.1%

                                      \[\leadsto \mathsf{fma}\left(c, i, x \cdot y\right) \]
                                  4. Recombined 3 regimes into one program.
                                  5. Add Preprocessing

                                  Alternative 6: 67.5% accurate, 0.7× speedup?

                                  \[\begin{array}{l} t_1 := \mathsf{fma}\left(a, b, x \cdot y\right)\\ \mathbf{if}\;x \cdot y \leq -2.4310301300448993 \cdot 10^{+92}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq -1.0710483818950177 \cdot 10^{-139}:\\ \;\;\;\;\mathsf{fma}\left(a, b, c \cdot i\right)\\ \mathbf{elif}\;x \cdot y \leq 2.0945617706960675 \cdot 10^{+71}:\\ \;\;\;\;\mathsf{fma}\left(c, i, t \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                  (FPCore (x y z t a b c i)
                                    :precision binary64
                                    :pre TRUE
                                    (let* ((t_1 (fma a b (* x y))))
                                    (if (<= (* x y) -2.4310301300448993e+92)
                                      t_1
                                      (if (<= (* x y) -1.0710483818950177e-139)
                                        (fma a b (* c i))
                                        (if (<= (* x y) 2.0945617706960675e+71)
                                          (fma c i (* t z))
                                          t_1)))))
                                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                  	double t_1 = fma(a, b, (x * y));
                                  	double tmp;
                                  	if ((x * y) <= -2.4310301300448993e+92) {
                                  		tmp = t_1;
                                  	} else if ((x * y) <= -1.0710483818950177e-139) {
                                  		tmp = fma(a, b, (c * i));
                                  	} else if ((x * y) <= 2.0945617706960675e+71) {
                                  		tmp = fma(c, i, (t * z));
                                  	} else {
                                  		tmp = t_1;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  function code(x, y, z, t, a, b, c, i)
                                  	t_1 = fma(a, b, Float64(x * y))
                                  	tmp = 0.0
                                  	if (Float64(x * y) <= -2.4310301300448993e+92)
                                  		tmp = t_1;
                                  	elseif (Float64(x * y) <= -1.0710483818950177e-139)
                                  		tmp = fma(a, b, Float64(c * i));
                                  	elseif (Float64(x * y) <= 2.0945617706960675e+71)
                                  		tmp = fma(c, i, Float64(t * z));
                                  	else
                                  		tmp = t_1;
                                  	end
                                  	return tmp
                                  end
                                  
                                  code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a * b + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2.4310301300448993e+92], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -1.0710483818950177e-139], N[(a * b + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2.0945617706960675e+71], N[(c * i + N[(t * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                                  
                                  f(x, y, z, t, a, b, c, i):
                                  	x in [-inf, +inf],
                                  	y in [-inf, +inf],
                                  	z in [-inf, +inf],
                                  	t in [-inf, +inf],
                                  	a in [-inf, +inf],
                                  	b in [-inf, +inf],
                                  	c in [-inf, +inf],
                                  	i in [-inf, +inf]
                                  code: THEORY
                                  BEGIN
                                  f(x, y, z, t, a, b, c, i: real): real =
                                  	LET t_1 = ((a * b) + (x * y)) IN
                                  		LET tmp_2 = IF ((x * y) <= (209456177069606752178698508544923590488057895263761271119959979620040704)) THEN ((c * i) + (t * z)) ELSE t_1 ENDIF IN
                                  		LET tmp_1 = IF ((x * y) <= (-107104838189501766554745995275851255731985160615416250000722709665921879326123707863483014578860596749555539699001121875121062033618750874554338613557799004664033572357213644088861858746389876811579280891752445574204462531453812729847870665888073826689752541393267131659263832828851840074128472893231792503326728285470215802339274372041721949955217496608383953571319580078125e-513)) THEN ((a * b) + (c * i)) ELSE tmp_2 ENDIF IN
                                  		LET tmp = IF ((x * y) <= (-243103013004489926494550397719659858854683041112430769794729004330253462416167071178584752128)) THEN t_1 ELSE tmp_1 ENDIF IN
                                  	tmp
                                  END code
                                  \begin{array}{l}
                                  t_1 := \mathsf{fma}\left(a, b, x \cdot y\right)\\
                                  \mathbf{if}\;x \cdot y \leq -2.4310301300448993 \cdot 10^{+92}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  \mathbf{elif}\;x \cdot y \leq -1.0710483818950177 \cdot 10^{-139}:\\
                                  \;\;\;\;\mathsf{fma}\left(a, b, c \cdot i\right)\\
                                  
                                  \mathbf{elif}\;x \cdot y \leq 2.0945617706960675 \cdot 10^{+71}:\\
                                  \;\;\;\;\mathsf{fma}\left(c, i, t \cdot z\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 3 regimes
                                  2. if (*.f64 x y) < -2.4310301300448993e92 or 2.0945617706960675e71 < (*.f64 x y)

                                    1. Initial program 95.9%

                                      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                                    2. Taylor expanded in z around 0

                                      \[\leadsto a \cdot b + \left(c \cdot i + x \cdot y\right) \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites75.2%

                                        \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]
                                      2. Taylor expanded in c around 0

                                        \[\leadsto a \cdot b + x \cdot y \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites52.2%

                                          \[\leadsto \mathsf{fma}\left(a, b, x \cdot y\right) \]

                                        if -2.4310301300448993e92 < (*.f64 x y) < -1.0710483818950177e-139

                                        1. Initial program 95.9%

                                          \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                                        2. Taylor expanded in z around 0

                                          \[\leadsto a \cdot b + \left(c \cdot i + x \cdot y\right) \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites75.2%

                                            \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]
                                          2. Taylor expanded in x around 0

                                            \[\leadsto \mathsf{fma}\left(a, b, c \cdot i\right) \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites52.1%

                                              \[\leadsto \mathsf{fma}\left(a, b, c \cdot i\right) \]

                                            if -1.0710483818950177e-139 < (*.f64 x y) < 2.0945617706960675e71

                                            1. Initial program 95.9%

                                              \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                                            2. Taylor expanded in a around 0

                                              \[\leadsto c \cdot i + \left(t \cdot z + x \cdot y\right) \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites74.6%

                                                \[\leadsto \mathsf{fma}\left(c, i, \mathsf{fma}\left(t, z, x \cdot y\right)\right) \]
                                              2. Taylor expanded in x around 0

                                                \[\leadsto \mathsf{fma}\left(c, i, t \cdot z\right) \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites51.3%

                                                  \[\leadsto \mathsf{fma}\left(c, i, t \cdot z\right) \]
                                              4. Recombined 3 regimes into one program.
                                              5. Add Preprocessing

                                              Alternative 7: 67.0% accurate, 0.9× speedup?

                                              \[\begin{array}{l} \mathbf{if}\;x \cdot y \leq -2.4310301300448993 \cdot 10^{+92}:\\ \;\;\;\;\mathsf{fma}\left(a, b, x \cdot y\right)\\ \mathbf{elif}\;x \cdot y \leq 9.39991363007265 \cdot 10^{+97}:\\ \;\;\;\;\mathsf{fma}\left(a, b, c \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c, i, x \cdot y\right)\\ \end{array} \]
                                              (FPCore (x y z t a b c i)
                                                :precision binary64
                                                :pre TRUE
                                                (if (<= (* x y) -2.4310301300448993e+92)
                                                (fma a b (* x y))
                                                (if (<= (* x y) 9.39991363007265e+97)
                                                  (fma a b (* c i))
                                                  (fma c i (* x y)))))
                                              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                              	double tmp;
                                              	if ((x * y) <= -2.4310301300448993e+92) {
                                              		tmp = fma(a, b, (x * y));
                                              	} else if ((x * y) <= 9.39991363007265e+97) {
                                              		tmp = fma(a, b, (c * i));
                                              	} else {
                                              		tmp = fma(c, i, (x * y));
                                              	}
                                              	return tmp;
                                              }
                                              
                                              function code(x, y, z, t, a, b, c, i)
                                              	tmp = 0.0
                                              	if (Float64(x * y) <= -2.4310301300448993e+92)
                                              		tmp = fma(a, b, Float64(x * y));
                                              	elseif (Float64(x * y) <= 9.39991363007265e+97)
                                              		tmp = fma(a, b, Float64(c * i));
                                              	else
                                              		tmp = fma(c, i, Float64(x * y));
                                              	end
                                              	return tmp
                                              end
                                              
                                              code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -2.4310301300448993e+92], N[(a * b + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 9.39991363007265e+97], N[(a * b + N[(c * i), $MachinePrecision]), $MachinePrecision], N[(c * i + N[(x * y), $MachinePrecision]), $MachinePrecision]]]
                                              
                                              f(x, y, z, t, a, b, c, i):
                                              	x in [-inf, +inf],
                                              	y in [-inf, +inf],
                                              	z in [-inf, +inf],
                                              	t in [-inf, +inf],
                                              	a in [-inf, +inf],
                                              	b in [-inf, +inf],
                                              	c in [-inf, +inf],
                                              	i in [-inf, +inf]
                                              code: THEORY
                                              BEGIN
                                              f(x, y, z, t, a, b, c, i: real): real =
                                              	LET tmp_1 = IF ((x * y) <= (93999136300726496045263588239683999000219775412683399171711992468226925889669915361728257616510976)) THEN ((a * b) + (c * i)) ELSE ((c * i) + (x * y)) ENDIF IN
                                              	LET tmp = IF ((x * y) <= (-243103013004489926494550397719659858854683041112430769794729004330253462416167071178584752128)) THEN ((a * b) + (x * y)) ELSE tmp_1 ENDIF IN
                                              	tmp
                                              END code
                                              \begin{array}{l}
                                              \mathbf{if}\;x \cdot y \leq -2.4310301300448993 \cdot 10^{+92}:\\
                                              \;\;\;\;\mathsf{fma}\left(a, b, x \cdot y\right)\\
                                              
                                              \mathbf{elif}\;x \cdot y \leq 9.39991363007265 \cdot 10^{+97}:\\
                                              \;\;\;\;\mathsf{fma}\left(a, b, c \cdot i\right)\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;\mathsf{fma}\left(c, i, x \cdot y\right)\\
                                              
                                              
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 3 regimes
                                              2. if (*.f64 x y) < -2.4310301300448993e92

                                                1. Initial program 95.9%

                                                  \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                                                2. Taylor expanded in z around 0

                                                  \[\leadsto a \cdot b + \left(c \cdot i + x \cdot y\right) \]
                                                3. Step-by-step derivation
                                                  1. Applied rewrites75.2%

                                                    \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]
                                                  2. Taylor expanded in c around 0

                                                    \[\leadsto a \cdot b + x \cdot y \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites52.2%

                                                      \[\leadsto \mathsf{fma}\left(a, b, x \cdot y\right) \]

                                                    if -2.4310301300448993e92 < (*.f64 x y) < 9.3999136300726496e97

                                                    1. Initial program 95.9%

                                                      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                                                    2. Taylor expanded in z around 0

                                                      \[\leadsto a \cdot b + \left(c \cdot i + x \cdot y\right) \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites75.2%

                                                        \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]
                                                      2. Taylor expanded in x around 0

                                                        \[\leadsto \mathsf{fma}\left(a, b, c \cdot i\right) \]
                                                      3. Step-by-step derivation
                                                        1. Applied rewrites52.1%

                                                          \[\leadsto \mathsf{fma}\left(a, b, c \cdot i\right) \]

                                                        if 9.3999136300726496e97 < (*.f64 x y)

                                                        1. Initial program 95.9%

                                                          \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                                                        2. Taylor expanded in z around 0

                                                          \[\leadsto a \cdot b + \left(c \cdot i + x \cdot y\right) \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites75.2%

                                                            \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]
                                                          2. Taylor expanded in c around 0

                                                            \[\leadsto a \cdot b + x \cdot y \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites52.2%

                                                              \[\leadsto \mathsf{fma}\left(a, b, x \cdot y\right) \]
                                                            2. Taylor expanded in x around 0

                                                              \[\leadsto a \cdot b \]
                                                            3. Step-by-step derivation
                                                              1. Applied rewrites28.0%

                                                                \[\leadsto a \cdot b \]
                                                              2. Taylor expanded in a around 0

                                                                \[\leadsto c \cdot i + x \cdot y \]
                                                              3. Step-by-step derivation
                                                                1. Applied rewrites51.1%

                                                                  \[\leadsto \mathsf{fma}\left(c, i, x \cdot y\right) \]
                                                              4. Recombined 3 regimes into one program.
                                                              5. Add Preprocessing

                                                              Alternative 8: 66.8% accurate, 0.9× speedup?

                                                              \[\begin{array}{l} t_1 := \mathsf{fma}\left(c, i, x \cdot y\right)\\ \mathbf{if}\;c \cdot i \leq -4 \cdot 10^{+125}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \cdot i \leq 2 \cdot 10^{+37}:\\ \;\;\;\;\mathsf{fma}\left(a, b, x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                                              (FPCore (x y z t a b c i)
                                                                :precision binary64
                                                                :pre TRUE
                                                                (let* ((t_1 (fma c i (* x y))))
                                                                (if (<= (* c i) -4e+125)
                                                                  t_1
                                                                  (if (<= (* c i) 2e+37) (fma a b (* x y)) t_1))))
                                                              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                              	double t_1 = fma(c, i, (x * y));
                                                              	double tmp;
                                                              	if ((c * i) <= -4e+125) {
                                                              		tmp = t_1;
                                                              	} else if ((c * i) <= 2e+37) {
                                                              		tmp = fma(a, b, (x * y));
                                                              	} else {
                                                              		tmp = t_1;
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              function code(x, y, z, t, a, b, c, i)
                                                              	t_1 = fma(c, i, Float64(x * y))
                                                              	tmp = 0.0
                                                              	if (Float64(c * i) <= -4e+125)
                                                              		tmp = t_1;
                                                              	elseif (Float64(c * i) <= 2e+37)
                                                              		tmp = fma(a, b, Float64(x * y));
                                                              	else
                                                              		tmp = t_1;
                                                              	end
                                                              	return tmp
                                                              end
                                                              
                                                              code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * i + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -4e+125], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], 2e+37], N[(a * b + N[(x * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                                              
                                                              f(x, y, z, t, a, b, c, i):
                                                              	x in [-inf, +inf],
                                                              	y in [-inf, +inf],
                                                              	z in [-inf, +inf],
                                                              	t in [-inf, +inf],
                                                              	a in [-inf, +inf],
                                                              	b in [-inf, +inf],
                                                              	c in [-inf, +inf],
                                                              	i in [-inf, +inf]
                                                              code: THEORY
                                                              BEGIN
                                                              f(x, y, z, t, a, b, c, i: real): real =
                                                              	LET t_1 = ((c * i) + (x * y)) IN
                                                              		LET tmp_1 = IF ((c * i) <= (19999999999999999077525316404242284544)) THEN ((a * b) + (x * y)) ELSE t_1 ENDIF IN
                                                              		LET tmp = IF ((c * i) <= (-399999999999999969947104647597152817017868347933935384575690388890117679990317210641265397505127061500612023365462212913135616)) THEN t_1 ELSE tmp_1 ENDIF IN
                                                              	tmp
                                                              END code
                                                              \begin{array}{l}
                                                              t_1 := \mathsf{fma}\left(c, i, x \cdot y\right)\\
                                                              \mathbf{if}\;c \cdot i \leq -4 \cdot 10^{+125}:\\
                                                              \;\;\;\;t\_1\\
                                                              
                                                              \mathbf{elif}\;c \cdot i \leq 2 \cdot 10^{+37}:\\
                                                              \;\;\;\;\mathsf{fma}\left(a, b, x \cdot y\right)\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;t\_1\\
                                                              
                                                              
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 2 regimes
                                                              2. if (*.f64 c i) < -3.9999999999999997e125 or 1.9999999999999999e37 < (*.f64 c i)

                                                                1. Initial program 95.9%

                                                                  \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                                                                2. Taylor expanded in z around 0

                                                                  \[\leadsto a \cdot b + \left(c \cdot i + x \cdot y\right) \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites75.2%

                                                                    \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]
                                                                  2. Taylor expanded in c around 0

                                                                    \[\leadsto a \cdot b + x \cdot y \]
                                                                  3. Step-by-step derivation
                                                                    1. Applied rewrites52.2%

                                                                      \[\leadsto \mathsf{fma}\left(a, b, x \cdot y\right) \]
                                                                    2. Taylor expanded in x around 0

                                                                      \[\leadsto a \cdot b \]
                                                                    3. Step-by-step derivation
                                                                      1. Applied rewrites28.0%

                                                                        \[\leadsto a \cdot b \]
                                                                      2. Taylor expanded in a around 0

                                                                        \[\leadsto c \cdot i + x \cdot y \]
                                                                      3. Step-by-step derivation
                                                                        1. Applied rewrites51.1%

                                                                          \[\leadsto \mathsf{fma}\left(c, i, x \cdot y\right) \]

                                                                        if -3.9999999999999997e125 < (*.f64 c i) < 1.9999999999999999e37

                                                                        1. Initial program 95.9%

                                                                          \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                                                                        2. Taylor expanded in z around 0

                                                                          \[\leadsto a \cdot b + \left(c \cdot i + x \cdot y\right) \]
                                                                        3. Step-by-step derivation
                                                                          1. Applied rewrites75.2%

                                                                            \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]
                                                                          2. Taylor expanded in c around 0

                                                                            \[\leadsto a \cdot b + x \cdot y \]
                                                                          3. Step-by-step derivation
                                                                            1. Applied rewrites52.2%

                                                                              \[\leadsto \mathsf{fma}\left(a, b, x \cdot y\right) \]
                                                                          4. Recombined 2 regimes into one program.
                                                                          5. Add Preprocessing

                                                                          Alternative 9: 63.7% accurate, 0.9× speedup?

                                                                          \[\begin{array}{l} \mathbf{if}\;z \cdot t \leq -4 \cdot 10^{+150}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+152}:\\ \;\;\;\;\mathsf{fma}\left(a, b, x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot z\\ \end{array} \]
                                                                          (FPCore (x y z t a b c i)
                                                                            :precision binary64
                                                                            :pre TRUE
                                                                            (if (<= (* z t) -4e+150)
                                                                            (* t z)
                                                                            (if (<= (* z t) 2e+152) (fma a b (* x y)) (* t z))))
                                                                          double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                          	double tmp;
                                                                          	if ((z * t) <= -4e+150) {
                                                                          		tmp = t * z;
                                                                          	} else if ((z * t) <= 2e+152) {
                                                                          		tmp = fma(a, b, (x * y));
                                                                          	} else {
                                                                          		tmp = t * z;
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          function code(x, y, z, t, a, b, c, i)
                                                                          	tmp = 0.0
                                                                          	if (Float64(z * t) <= -4e+150)
                                                                          		tmp = Float64(t * z);
                                                                          	elseif (Float64(z * t) <= 2e+152)
                                                                          		tmp = fma(a, b, Float64(x * y));
                                                                          	else
                                                                          		tmp = Float64(t * z);
                                                                          	end
                                                                          	return tmp
                                                                          end
                                                                          
                                                                          code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(z * t), $MachinePrecision], -4e+150], N[(t * z), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 2e+152], N[(a * b + N[(x * y), $MachinePrecision]), $MachinePrecision], N[(t * z), $MachinePrecision]]]
                                                                          
                                                                          f(x, y, z, t, a, b, c, i):
                                                                          	x in [-inf, +inf],
                                                                          	y in [-inf, +inf],
                                                                          	z in [-inf, +inf],
                                                                          	t in [-inf, +inf],
                                                                          	a in [-inf, +inf],
                                                                          	b in [-inf, +inf],
                                                                          	c in [-inf, +inf],
                                                                          	i in [-inf, +inf]
                                                                          code: THEORY
                                                                          BEGIN
                                                                          f(x, y, z, t, a, b, c, i: real): real =
                                                                          	LET tmp_1 = IF ((z * t) <= (200000000000000009250216271808398948002452544790145376983777454402545107507559301846766839764406850263979324900979381181838795379032883593269504018219008)) THEN ((a * b) + (x * y)) ELSE (t * z) ENDIF IN
                                                                          	LET tmp = IF ((z * t) <= (-3999999999999999923342384689749498362292480056121275172364659240616400448814714331905193074464884607850808241064704021762268129324833615792933494063104)) THEN (t * z) ELSE tmp_1 ENDIF IN
                                                                          	tmp
                                                                          END code
                                                                          \begin{array}{l}
                                                                          \mathbf{if}\;z \cdot t \leq -4 \cdot 10^{+150}:\\
                                                                          \;\;\;\;t \cdot z\\
                                                                          
                                                                          \mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+152}:\\
                                                                          \;\;\;\;\mathsf{fma}\left(a, b, x \cdot y\right)\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;t \cdot z\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Split input into 2 regimes
                                                                          2. if (*.f64 z t) < -3.9999999999999999e150 or 2.0000000000000001e152 < (*.f64 z t)

                                                                            1. Initial program 95.9%

                                                                              \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                                                                            2. Taylor expanded in z around 0

                                                                              \[\leadsto a \cdot b + \left(c \cdot i + x \cdot y\right) \]
                                                                            3. Step-by-step derivation
                                                                              1. Applied rewrites75.2%

                                                                                \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]
                                                                              2. Taylor expanded in c around 0

                                                                                \[\leadsto a \cdot b + x \cdot y \]
                                                                              3. Step-by-step derivation
                                                                                1. Applied rewrites52.2%

                                                                                  \[\leadsto \mathsf{fma}\left(a, b, x \cdot y\right) \]
                                                                                2. Taylor expanded in x around 0

                                                                                  \[\leadsto a \cdot b \]
                                                                                3. Step-by-step derivation
                                                                                  1. Applied rewrites28.0%

                                                                                    \[\leadsto a \cdot b \]
                                                                                  2. Taylor expanded in z around inf

                                                                                    \[\leadsto t \cdot z \]
                                                                                  3. Step-by-step derivation
                                                                                    1. Applied rewrites27.3%

                                                                                      \[\leadsto t \cdot z \]

                                                                                    if -3.9999999999999999e150 < (*.f64 z t) < 2.0000000000000001e152

                                                                                    1. Initial program 95.9%

                                                                                      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                                                                                    2. Taylor expanded in z around 0

                                                                                      \[\leadsto a \cdot b + \left(c \cdot i + x \cdot y\right) \]
                                                                                    3. Step-by-step derivation
                                                                                      1. Applied rewrites75.2%

                                                                                        \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]
                                                                                      2. Taylor expanded in c around 0

                                                                                        \[\leadsto a \cdot b + x \cdot y \]
                                                                                      3. Step-by-step derivation
                                                                                        1. Applied rewrites52.2%

                                                                                          \[\leadsto \mathsf{fma}\left(a, b, x \cdot y\right) \]
                                                                                      4. Recombined 2 regimes into one program.
                                                                                      5. Add Preprocessing

                                                                                      Alternative 10: 43.4% accurate, 1.2× speedup?

                                                                                      \[\begin{array}{l} \mathbf{if}\;a \cdot b \leq -1.872718146010244 \cdot 10^{+82}:\\ \;\;\;\;a \cdot b\\ \mathbf{elif}\;a \cdot b \leq 2.2915198281696953 \cdot 10^{+27}:\\ \;\;\;\;t \cdot z\\ \mathbf{else}:\\ \;\;\;\;a \cdot b\\ \end{array} \]
                                                                                      (FPCore (x y z t a b c i)
                                                                                        :precision binary64
                                                                                        :pre TRUE
                                                                                        (if (<= (* a b) -1.872718146010244e+82)
                                                                                        (* a b)
                                                                                        (if (<= (* a b) 2.2915198281696953e+27) (* t z) (* a b))))
                                                                                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                                      	double tmp;
                                                                                      	if ((a * b) <= -1.872718146010244e+82) {
                                                                                      		tmp = a * b;
                                                                                      	} else if ((a * b) <= 2.2915198281696953e+27) {
                                                                                      		tmp = t * z;
                                                                                      	} else {
                                                                                      		tmp = a * b;
                                                                                      	}
                                                                                      	return tmp;
                                                                                      }
                                                                                      
                                                                                      real(8) function code(x, y, z, t, a, b, c, i)
                                                                                      use fmin_fmax_functions
                                                                                          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), intent (in) :: i
                                                                                          real(8) :: tmp
                                                                                          if ((a * b) <= (-1.872718146010244d+82)) then
                                                                                              tmp = a * b
                                                                                          else if ((a * b) <= 2.2915198281696953d+27) then
                                                                                              tmp = t * z
                                                                                          else
                                                                                              tmp = a * b
                                                                                          end if
                                                                                          code = tmp
                                                                                      end function
                                                                                      
                                                                                      public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                                      	double tmp;
                                                                                      	if ((a * b) <= -1.872718146010244e+82) {
                                                                                      		tmp = a * b;
                                                                                      	} else if ((a * b) <= 2.2915198281696953e+27) {
                                                                                      		tmp = t * z;
                                                                                      	} else {
                                                                                      		tmp = a * b;
                                                                                      	}
                                                                                      	return tmp;
                                                                                      }
                                                                                      
                                                                                      def code(x, y, z, t, a, b, c, i):
                                                                                      	tmp = 0
                                                                                      	if (a * b) <= -1.872718146010244e+82:
                                                                                      		tmp = a * b
                                                                                      	elif (a * b) <= 2.2915198281696953e+27:
                                                                                      		tmp = t * z
                                                                                      	else:
                                                                                      		tmp = a * b
                                                                                      	return tmp
                                                                                      
                                                                                      function code(x, y, z, t, a, b, c, i)
                                                                                      	tmp = 0.0
                                                                                      	if (Float64(a * b) <= -1.872718146010244e+82)
                                                                                      		tmp = Float64(a * b);
                                                                                      	elseif (Float64(a * b) <= 2.2915198281696953e+27)
                                                                                      		tmp = Float64(t * z);
                                                                                      	else
                                                                                      		tmp = Float64(a * b);
                                                                                      	end
                                                                                      	return tmp
                                                                                      end
                                                                                      
                                                                                      function tmp_2 = code(x, y, z, t, a, b, c, i)
                                                                                      	tmp = 0.0;
                                                                                      	if ((a * b) <= -1.872718146010244e+82)
                                                                                      		tmp = a * b;
                                                                                      	elseif ((a * b) <= 2.2915198281696953e+27)
                                                                                      		tmp = t * z;
                                                                                      	else
                                                                                      		tmp = a * b;
                                                                                      	end
                                                                                      	tmp_2 = tmp;
                                                                                      end
                                                                                      
                                                                                      code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(a * b), $MachinePrecision], -1.872718146010244e+82], N[(a * b), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 2.2915198281696953e+27], N[(t * z), $MachinePrecision], N[(a * b), $MachinePrecision]]]
                                                                                      
                                                                                      f(x, y, z, t, a, b, c, i):
                                                                                      	x in [-inf, +inf],
                                                                                      	y in [-inf, +inf],
                                                                                      	z in [-inf, +inf],
                                                                                      	t in [-inf, +inf],
                                                                                      	a in [-inf, +inf],
                                                                                      	b in [-inf, +inf],
                                                                                      	c in [-inf, +inf],
                                                                                      	i in [-inf, +inf]
                                                                                      code: THEORY
                                                                                      BEGIN
                                                                                      f(x, y, z, t, a, b, c, i: real): real =
                                                                                      	LET tmp_1 = IF ((a * b) <= (2291519828169695259242004480)) THEN (t * z) ELSE (a * b) ENDIF IN
                                                                                      	LET tmp = IF ((a * b) <= (-18727181460102439296841648963870213440793756189383544716934324050261809778630066176)) THEN (a * b) ELSE tmp_1 ENDIF IN
                                                                                      	tmp
                                                                                      END code
                                                                                      \begin{array}{l}
                                                                                      \mathbf{if}\;a \cdot b \leq -1.872718146010244 \cdot 10^{+82}:\\
                                                                                      \;\;\;\;a \cdot b\\
                                                                                      
                                                                                      \mathbf{elif}\;a \cdot b \leq 2.2915198281696953 \cdot 10^{+27}:\\
                                                                                      \;\;\;\;t \cdot z\\
                                                                                      
                                                                                      \mathbf{else}:\\
                                                                                      \;\;\;\;a \cdot b\\
                                                                                      
                                                                                      
                                                                                      \end{array}
                                                                                      
                                                                                      Derivation
                                                                                      1. Split input into 2 regimes
                                                                                      2. if (*.f64 a b) < -1.8727181460102439e82 or 2.2915198281696953e27 < (*.f64 a b)

                                                                                        1. Initial program 95.9%

                                                                                          \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                                                                                        2. Taylor expanded in z around 0

                                                                                          \[\leadsto a \cdot b + \left(c \cdot i + x \cdot y\right) \]
                                                                                        3. Step-by-step derivation
                                                                                          1. Applied rewrites75.2%

                                                                                            \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]
                                                                                          2. Taylor expanded in c around 0

                                                                                            \[\leadsto a \cdot b + x \cdot y \]
                                                                                          3. Step-by-step derivation
                                                                                            1. Applied rewrites52.2%

                                                                                              \[\leadsto \mathsf{fma}\left(a, b, x \cdot y\right) \]
                                                                                            2. Taylor expanded in x around 0

                                                                                              \[\leadsto a \cdot b \]
                                                                                            3. Step-by-step derivation
                                                                                              1. Applied rewrites28.0%

                                                                                                \[\leadsto a \cdot b \]

                                                                                              if -1.8727181460102439e82 < (*.f64 a b) < 2.2915198281696953e27

                                                                                              1. Initial program 95.9%

                                                                                                \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                                                                                              2. Taylor expanded in z around 0

                                                                                                \[\leadsto a \cdot b + \left(c \cdot i + x \cdot y\right) \]
                                                                                              3. Step-by-step derivation
                                                                                                1. Applied rewrites75.2%

                                                                                                  \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]
                                                                                                2. Taylor expanded in c around 0

                                                                                                  \[\leadsto a \cdot b + x \cdot y \]
                                                                                                3. Step-by-step derivation
                                                                                                  1. Applied rewrites52.2%

                                                                                                    \[\leadsto \mathsf{fma}\left(a, b, x \cdot y\right) \]
                                                                                                  2. Taylor expanded in x around 0

                                                                                                    \[\leadsto a \cdot b \]
                                                                                                  3. Step-by-step derivation
                                                                                                    1. Applied rewrites28.0%

                                                                                                      \[\leadsto a \cdot b \]
                                                                                                    2. Taylor expanded in z around inf

                                                                                                      \[\leadsto t \cdot z \]
                                                                                                    3. Step-by-step derivation
                                                                                                      1. Applied rewrites27.3%

                                                                                                        \[\leadsto t \cdot z \]
                                                                                                    4. Recombined 2 regimes into one program.
                                                                                                    5. Add Preprocessing

                                                                                                    Alternative 11: 43.3% accurate, 1.2× speedup?

                                                                                                    \[\begin{array}{l} \mathbf{if}\;c \cdot i \leq -4.503682490157631 \cdot 10^{+125}:\\ \;\;\;\;c \cdot i\\ \mathbf{elif}\;c \cdot i \leq 3.8261387039131425 \cdot 10^{+38}:\\ \;\;\;\;a \cdot b\\ \mathbf{else}:\\ \;\;\;\;c \cdot i\\ \end{array} \]
                                                                                                    (FPCore (x y z t a b c i)
                                                                                                      :precision binary64
                                                                                                      :pre TRUE
                                                                                                      (if (<= (* c i) -4.503682490157631e+125)
                                                                                                      (* c i)
                                                                                                      (if (<= (* c i) 3.8261387039131425e+38) (* a b) (* c i))))
                                                                                                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                                                    	double tmp;
                                                                                                    	if ((c * i) <= -4.503682490157631e+125) {
                                                                                                    		tmp = c * i;
                                                                                                    	} else if ((c * i) <= 3.8261387039131425e+38) {
                                                                                                    		tmp = a * b;
                                                                                                    	} else {
                                                                                                    		tmp = c * i;
                                                                                                    	}
                                                                                                    	return tmp;
                                                                                                    }
                                                                                                    
                                                                                                    real(8) function code(x, y, z, t, a, b, c, i)
                                                                                                    use fmin_fmax_functions
                                                                                                        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), intent (in) :: i
                                                                                                        real(8) :: tmp
                                                                                                        if ((c * i) <= (-4.503682490157631d+125)) then
                                                                                                            tmp = c * i
                                                                                                        else if ((c * i) <= 3.8261387039131425d+38) then
                                                                                                            tmp = a * b
                                                                                                        else
                                                                                                            tmp = c * i
                                                                                                        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 i) {
                                                                                                    	double tmp;
                                                                                                    	if ((c * i) <= -4.503682490157631e+125) {
                                                                                                    		tmp = c * i;
                                                                                                    	} else if ((c * i) <= 3.8261387039131425e+38) {
                                                                                                    		tmp = a * b;
                                                                                                    	} else {
                                                                                                    		tmp = c * i;
                                                                                                    	}
                                                                                                    	return tmp;
                                                                                                    }
                                                                                                    
                                                                                                    def code(x, y, z, t, a, b, c, i):
                                                                                                    	tmp = 0
                                                                                                    	if (c * i) <= -4.503682490157631e+125:
                                                                                                    		tmp = c * i
                                                                                                    	elif (c * i) <= 3.8261387039131425e+38:
                                                                                                    		tmp = a * b
                                                                                                    	else:
                                                                                                    		tmp = c * i
                                                                                                    	return tmp
                                                                                                    
                                                                                                    function code(x, y, z, t, a, b, c, i)
                                                                                                    	tmp = 0.0
                                                                                                    	if (Float64(c * i) <= -4.503682490157631e+125)
                                                                                                    		tmp = Float64(c * i);
                                                                                                    	elseif (Float64(c * i) <= 3.8261387039131425e+38)
                                                                                                    		tmp = Float64(a * b);
                                                                                                    	else
                                                                                                    		tmp = Float64(c * i);
                                                                                                    	end
                                                                                                    	return tmp
                                                                                                    end
                                                                                                    
                                                                                                    function tmp_2 = code(x, y, z, t, a, b, c, i)
                                                                                                    	tmp = 0.0;
                                                                                                    	if ((c * i) <= -4.503682490157631e+125)
                                                                                                    		tmp = c * i;
                                                                                                    	elseif ((c * i) <= 3.8261387039131425e+38)
                                                                                                    		tmp = a * b;
                                                                                                    	else
                                                                                                    		tmp = c * i;
                                                                                                    	end
                                                                                                    	tmp_2 = tmp;
                                                                                                    end
                                                                                                    
                                                                                                    code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -4.503682490157631e+125], N[(c * i), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 3.8261387039131425e+38], N[(a * b), $MachinePrecision], N[(c * i), $MachinePrecision]]]
                                                                                                    
                                                                                                    f(x, y, z, t, a, b, c, i):
                                                                                                    	x in [-inf, +inf],
                                                                                                    	y in [-inf, +inf],
                                                                                                    	z in [-inf, +inf],
                                                                                                    	t in [-inf, +inf],
                                                                                                    	a in [-inf, +inf],
                                                                                                    	b in [-inf, +inf],
                                                                                                    	c in [-inf, +inf],
                                                                                                    	i in [-inf, +inf]
                                                                                                    code: THEORY
                                                                                                    BEGIN
                                                                                                    f(x, y, z, t, a, b, c, i: real): real =
                                                                                                    	LET tmp_1 = IF ((c * i) <= (382613870391314253124613801303561207808)) THEN (a * b) ELSE (c * i) ENDIF IN
                                                                                                    	LET tmp = IF ((c * i) <= (-450368249015763130012492365230978570302056270030389531470603338831907784298328625971329005887457494838939231393676931761176576)) THEN (c * i) ELSE tmp_1 ENDIF IN
                                                                                                    	tmp
                                                                                                    END code
                                                                                                    \begin{array}{l}
                                                                                                    \mathbf{if}\;c \cdot i \leq -4.503682490157631 \cdot 10^{+125}:\\
                                                                                                    \;\;\;\;c \cdot i\\
                                                                                                    
                                                                                                    \mathbf{elif}\;c \cdot i \leq 3.8261387039131425 \cdot 10^{+38}:\\
                                                                                                    \;\;\;\;a \cdot b\\
                                                                                                    
                                                                                                    \mathbf{else}:\\
                                                                                                    \;\;\;\;c \cdot i\\
                                                                                                    
                                                                                                    
                                                                                                    \end{array}
                                                                                                    
                                                                                                    Derivation
                                                                                                    1. Split input into 2 regimes
                                                                                                    2. if (*.f64 c i) < -4.5036824901576313e125 or 3.8261387039131425e38 < (*.f64 c i)

                                                                                                      1. Initial program 95.9%

                                                                                                        \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                                                                                                      2. Taylor expanded in z around 0

                                                                                                        \[\leadsto a \cdot b + \left(c \cdot i + x \cdot y\right) \]
                                                                                                      3. Step-by-step derivation
                                                                                                        1. Applied rewrites75.2%

                                                                                                          \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]
                                                                                                        2. Taylor expanded in c around 0

                                                                                                          \[\leadsto a \cdot b + x \cdot y \]
                                                                                                        3. Step-by-step derivation
                                                                                                          1. Applied rewrites52.2%

                                                                                                            \[\leadsto \mathsf{fma}\left(a, b, x \cdot y\right) \]
                                                                                                          2. Taylor expanded in x around 0

                                                                                                            \[\leadsto a \cdot b \]
                                                                                                          3. Step-by-step derivation
                                                                                                            1. Applied rewrites28.0%

                                                                                                              \[\leadsto a \cdot b \]
                                                                                                            2. Taylor expanded in c around inf

                                                                                                              \[\leadsto c \cdot i \]
                                                                                                            3. Step-by-step derivation
                                                                                                              1. Applied rewrites27.1%

                                                                                                                \[\leadsto c \cdot i \]

                                                                                                              if -4.5036824901576313e125 < (*.f64 c i) < 3.8261387039131425e38

                                                                                                              1. Initial program 95.9%

                                                                                                                \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                                                                                                              2. Taylor expanded in z around 0

                                                                                                                \[\leadsto a \cdot b + \left(c \cdot i + x \cdot y\right) \]
                                                                                                              3. Step-by-step derivation
                                                                                                                1. Applied rewrites75.2%

                                                                                                                  \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]
                                                                                                                2. Taylor expanded in c around 0

                                                                                                                  \[\leadsto a \cdot b + x \cdot y \]
                                                                                                                3. Step-by-step derivation
                                                                                                                  1. Applied rewrites52.2%

                                                                                                                    \[\leadsto \mathsf{fma}\left(a, b, x \cdot y\right) \]
                                                                                                                  2. Taylor expanded in x around 0

                                                                                                                    \[\leadsto a \cdot b \]
                                                                                                                  3. Step-by-step derivation
                                                                                                                    1. Applied rewrites28.0%

                                                                                                                      \[\leadsto a \cdot b \]
                                                                                                                  4. Recombined 2 regimes into one program.
                                                                                                                  5. Add Preprocessing

                                                                                                                  Alternative 12: 28.0% accurate, 5.2× speedup?

                                                                                                                  \[a \cdot b \]
                                                                                                                  (FPCore (x y z t a b c i)
                                                                                                                    :precision binary64
                                                                                                                    :pre TRUE
                                                                                                                    (* a b))
                                                                                                                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                                                                  	return a * b;
                                                                                                                  }
                                                                                                                  
                                                                                                                  real(8) function code(x, y, z, t, a, b, c, i)
                                                                                                                  use fmin_fmax_functions
                                                                                                                      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), intent (in) :: i
                                                                                                                      code = a * b
                                                                                                                  end function
                                                                                                                  
                                                                                                                  public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                                                                  	return a * b;
                                                                                                                  }
                                                                                                                  
                                                                                                                  def code(x, y, z, t, a, b, c, i):
                                                                                                                  	return a * b
                                                                                                                  
                                                                                                                  function code(x, y, z, t, a, b, c, i)
                                                                                                                  	return Float64(a * b)
                                                                                                                  end
                                                                                                                  
                                                                                                                  function tmp = code(x, y, z, t, a, b, c, i)
                                                                                                                  	tmp = a * b;
                                                                                                                  end
                                                                                                                  
                                                                                                                  code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a * b), $MachinePrecision]
                                                                                                                  
                                                                                                                  f(x, y, z, t, a, b, c, i):
                                                                                                                  	x in [-inf, +inf],
                                                                                                                  	y in [-inf, +inf],
                                                                                                                  	z in [-inf, +inf],
                                                                                                                  	t in [-inf, +inf],
                                                                                                                  	a in [-inf, +inf],
                                                                                                                  	b in [-inf, +inf],
                                                                                                                  	c in [-inf, +inf],
                                                                                                                  	i in [-inf, +inf]
                                                                                                                  code: THEORY
                                                                                                                  BEGIN
                                                                                                                  f(x, y, z, t, a, b, c, i: real): real =
                                                                                                                  	a * b
                                                                                                                  END code
                                                                                                                  a \cdot b
                                                                                                                  
                                                                                                                  Derivation
                                                                                                                  1. Initial program 95.9%

                                                                                                                    \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]
                                                                                                                  2. Taylor expanded in z around 0

                                                                                                                    \[\leadsto a \cdot b + \left(c \cdot i + x \cdot y\right) \]
                                                                                                                  3. Step-by-step derivation
                                                                                                                    1. Applied rewrites75.2%

                                                                                                                      \[\leadsto \mathsf{fma}\left(a, b, \mathsf{fma}\left(c, i, x \cdot y\right)\right) \]
                                                                                                                    2. Taylor expanded in c around 0

                                                                                                                      \[\leadsto a \cdot b + x \cdot y \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. Applied rewrites52.2%

                                                                                                                        \[\leadsto \mathsf{fma}\left(a, b, x \cdot y\right) \]
                                                                                                                      2. Taylor expanded in x around 0

                                                                                                                        \[\leadsto a \cdot b \]
                                                                                                                      3. Step-by-step derivation
                                                                                                                        1. Applied rewrites28.0%

                                                                                                                          \[\leadsto a \cdot b \]
                                                                                                                        2. Add Preprocessing

                                                                                                                        Reproduce

                                                                                                                        ?
                                                                                                                        herbie shell --seed 2026092 
                                                                                                                        (FPCore (x y z t a b c i)
                                                                                                                          :name "Linear.V4:$cdot from linear-1.19.1.3, C"
                                                                                                                          :precision binary64
                                                                                                                          (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))