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

Percentage Accurate: 95.8% → 97.8%
Time: 6.7s
Alternatives: 10
Speedup: 0.5×

Specification

?
\[\begin{array}{l} \\ \left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (+ (+ (* 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);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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]
\begin{array}{l}

\\
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\end{array}

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 10 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.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (+ (+ (* 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);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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]
\begin{array}{l}

\\
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\end{array}

Alternative 1: 97.8% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 100.0%

      \[\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i \]

    if +inf.0 < (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i))

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{x \cdot y} + c \cdot i \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto y \cdot \color{blue}{x} + c \cdot i \]
      2. lower-*.f6435.9

        \[\leadsto y \cdot \color{blue}{x} + c \cdot i \]
    4. Applied rewrites35.9%

      \[\leadsto \color{blue}{y \cdot x} + c \cdot i \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto y \cdot x + \color{blue}{c \cdot i} \]
      2. lift-+.f64N/A

        \[\leadsto \color{blue}{y \cdot x + c \cdot i} \]
      3. +-commutativeN/A

        \[\leadsto \color{blue}{c \cdot i + y \cdot x} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{i \cdot c} + y \cdot x \]
      5. lower-fma.f6446.8

        \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, y \cdot x\right)} \]
    6. Applied rewrites46.8%

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

Alternative 2: 89.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, b \cdot a\right)\right)\\ \mathbf{if}\;z \cdot t \leq -5 \cdot 10^{+96}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+27}:\\ \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(y, x, i \cdot c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (fma t z (fma y x (* b a)))))
   (if (<= (* z t) -5e+96)
     t_1
     (if (<= (* z t) 2e+27) (fma b a (fma y x (* i c))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = fma(t, z, fma(y, x, (b * a)));
	double tmp;
	if ((z * t) <= -5e+96) {
		tmp = t_1;
	} else if ((z * t) <= 2e+27) {
		tmp = fma(b, a, fma(y, x, (i * c)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = fma(t, z, fma(y, x, Float64(b * a)))
	tmp = 0.0
	if (Float64(z * t) <= -5e+96)
		tmp = t_1;
	elseif (Float64(z * t) <= 2e+27)
		tmp = fma(b, a, fma(y, x, Float64(i * c)));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(t * z + N[(y * x + N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z * t), $MachinePrecision], -5e+96], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], 2e+27], N[(b * a + N[(y * x + N[(i * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, b \cdot a\right)\right)\\
\mathbf{if}\;z \cdot t \leq -5 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z t) < -5.0000000000000004e96 or 2e27 < (*.f64 z t)

    1. Initial program 93.0%

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

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \left(t \cdot z + x \cdot y\right) + \color{blue}{a \cdot b} \]
      2. associate-+l+N/A

        \[\leadsto t \cdot z + \color{blue}{\left(x \cdot y + a \cdot b\right)} \]
      3. +-commutativeN/A

        \[\leadsto t \cdot z + \left(a \cdot b + \color{blue}{x \cdot y}\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{z}, a \cdot b + x \cdot y\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, x \cdot y + a \cdot b\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, y \cdot x + a \cdot b\right) \]
      7. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, a \cdot b\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, b \cdot a\right)\right) \]
      9. lower-*.f6484.3

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, b \cdot a\right)\right) \]
    4. Applied rewrites84.3%

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

    if -5.0000000000000004e96 < (*.f64 z t) < 2e27

    1. Initial program 97.8%

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

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto b \cdot a + \left(\color{blue}{c \cdot i} + x \cdot y\right) \]
      2. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(b, \color{blue}{a}, c \cdot i + x \cdot y\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, a, x \cdot y + c \cdot i\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, a, y \cdot x + c \cdot i\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(y, x, c \cdot i\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(y, x, i \cdot c\right)\right) \]
      7. lower-*.f6493.3

        \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(y, x, i \cdot c\right)\right) \]
    4. Applied rewrites93.3%

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

Alternative 3: 85.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot t \leq -5 \cdot 10^{+96}:\\ \;\;\;\;\mathsf{fma}\left(t, z, y \cdot x\right)\\ \mathbf{elif}\;z \cdot t \leq 10^{+207}:\\ \;\;\;\;\mathsf{fma}\left(b, a, \mathsf{fma}\left(y, x, i \cdot c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t, z, b \cdot a\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= (* z t) -5e+96)
   (fma t z (* y x))
   (if (<= (* z t) 1e+207) (fma b a (fma y x (* i c))) (fma t z (* b a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((z * t) <= -5e+96) {
		tmp = fma(t, z, (y * x));
	} else if ((z * t) <= 1e+207) {
		tmp = fma(b, a, fma(y, x, (i * c)));
	} else {
		tmp = fma(t, z, (b * a));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(z * t) <= -5e+96)
		tmp = fma(t, z, Float64(y * x));
	elseif (Float64(z * t) <= 1e+207)
		tmp = fma(b, a, fma(y, x, Float64(i * c)));
	else
		tmp = fma(t, z, Float64(b * a));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(z * t), $MachinePrecision], -5e+96], N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 1e+207], N[(b * a + N[(y * x + N[(i * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * z + N[(b * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -5 \cdot 10^{+96}:\\
\;\;\;\;\mathsf{fma}\left(t, z, y \cdot x\right)\\

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, z, b \cdot a\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 z t) < -5.0000000000000004e96

    1. Initial program 92.4%

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

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \left(t \cdot z + x \cdot y\right) + \color{blue}{a \cdot b} \]
      2. associate-+l+N/A

        \[\leadsto t \cdot z + \color{blue}{\left(x \cdot y + a \cdot b\right)} \]
      3. +-commutativeN/A

        \[\leadsto t \cdot z + \left(a \cdot b + \color{blue}{x \cdot y}\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{z}, a \cdot b + x \cdot y\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, x \cdot y + a \cdot b\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, y \cdot x + a \cdot b\right) \]
      7. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, a \cdot b\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, b \cdot a\right)\right) \]
      9. lower-*.f6485.5

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, b \cdot a\right)\right) \]
    4. Applied rewrites85.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, b \cdot a\right)\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto \mathsf{fma}\left(t, z, x \cdot y\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, y \cdot x\right) \]
      2. lift-*.f6474.7

        \[\leadsto \mathsf{fma}\left(t, z, y \cdot x\right) \]
    7. Applied rewrites74.7%

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

    if -5.0000000000000004e96 < (*.f64 z t) < 1e207

    1. Initial program 97.6%

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

      \[\leadsto \color{blue}{a \cdot b + \left(c \cdot i + x \cdot y\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto b \cdot a + \left(\color{blue}{c \cdot i} + x \cdot y\right) \]
      2. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(b, \color{blue}{a}, c \cdot i + x \cdot y\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, a, x \cdot y + c \cdot i\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, a, y \cdot x + c \cdot i\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(y, x, c \cdot i\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(y, x, i \cdot c\right)\right) \]
      7. lower-*.f6488.8

        \[\leadsto \mathsf{fma}\left(b, a, \mathsf{fma}\left(y, x, i \cdot c\right)\right) \]
    4. Applied rewrites88.8%

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

    if 1e207 < (*.f64 z t)

    1. Initial program 89.6%

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

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \left(t \cdot z + x \cdot y\right) + \color{blue}{a \cdot b} \]
      2. associate-+l+N/A

        \[\leadsto t \cdot z + \color{blue}{\left(x \cdot y + a \cdot b\right)} \]
      3. +-commutativeN/A

        \[\leadsto t \cdot z + \left(a \cdot b + \color{blue}{x \cdot y}\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{z}, a \cdot b + x \cdot y\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, x \cdot y + a \cdot b\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, y \cdot x + a \cdot b\right) \]
      7. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, a \cdot b\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, b \cdot a\right)\right) \]
      9. lower-*.f6490.0

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, b \cdot a\right)\right) \]
    4. Applied rewrites90.0%

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

      \[\leadsto \mathsf{fma}\left(t, z, a \cdot b\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, b \cdot a\right) \]
      2. lift-*.f6485.0

        \[\leadsto \mathsf{fma}\left(t, z, b \cdot a\right) \]
    7. Applied rewrites85.0%

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

Alternative 4: 75.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(t, z, y \cdot x\right)\\ t_2 := x \cdot y + z \cdot t\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+75}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 10^{+194}:\\ \;\;\;\;\mathsf{fma}\left(i, c, b \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (fma t z (* y x))) (t_2 (+ (* x y) (* z t))))
   (if (<= t_2 -2e+75) t_1 (if (<= t_2 1e+194) (fma i c (* b a)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = fma(t, z, (y * x));
	double t_2 = (x * y) + (z * t);
	double tmp;
	if (t_2 <= -2e+75) {
		tmp = t_1;
	} else if (t_2 <= 1e+194) {
		tmp = fma(i, c, (b * a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = fma(t, z, Float64(y * x))
	t_2 = Float64(Float64(x * y) + Float64(z * t))
	tmp = 0.0
	if (t_2 <= -2e+75)
		tmp = t_1;
	elseif (t_2 <= 1e+194)
		tmp = fma(i, c, Float64(b * a));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+75], t$95$1, If[LessEqual[t$95$2, 1e+194], N[(i * c + N[(b * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t, z, y \cdot x\right)\\
t_2 := x \cdot y + z \cdot t\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 10^{+194}:\\
\;\;\;\;\mathsf{fma}\left(i, c, b \cdot a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (*.f64 x y) (*.f64 z t)) < -1.99999999999999985e75 or 9.99999999999999945e193 < (+.f64 (*.f64 x y) (*.f64 z t))

    1. Initial program 92.9%

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

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \left(t \cdot z + x \cdot y\right) + \color{blue}{a \cdot b} \]
      2. associate-+l+N/A

        \[\leadsto t \cdot z + \color{blue}{\left(x \cdot y + a \cdot b\right)} \]
      3. +-commutativeN/A

        \[\leadsto t \cdot z + \left(a \cdot b + \color{blue}{x \cdot y}\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{z}, a \cdot b + x \cdot y\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, x \cdot y + a \cdot b\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, y \cdot x + a \cdot b\right) \]
      7. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, a \cdot b\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, b \cdot a\right)\right) \]
      9. lower-*.f6487.0

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, b \cdot a\right)\right) \]
    4. Applied rewrites87.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, b \cdot a\right)\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto \mathsf{fma}\left(t, z, x \cdot y\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, y \cdot x\right) \]
      2. lift-*.f6476.0

        \[\leadsto \mathsf{fma}\left(t, z, y \cdot x\right) \]
    7. Applied rewrites76.0%

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

    if -1.99999999999999985e75 < (+.f64 (*.f64 x y) (*.f64 z t)) < 9.99999999999999945e193

    1. Initial program 99.0%

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

      \[\leadsto \color{blue}{a \cdot b} + c \cdot i \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto b \cdot \color{blue}{a} + c \cdot i \]
      2. lower-*.f6474.1

        \[\leadsto b \cdot \color{blue}{a} + c \cdot i \]
    4. Applied rewrites74.1%

      \[\leadsto \color{blue}{b \cdot a} + c \cdot i \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto b \cdot a + \color{blue}{c \cdot i} \]
      2. lift-+.f64N/A

        \[\leadsto \color{blue}{b \cdot a + c \cdot i} \]
      3. +-commutativeN/A

        \[\leadsto \color{blue}{c \cdot i + b \cdot a} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{i \cdot c} + b \cdot a \]
      5. lower-fma.f6474.6

        \[\leadsto \color{blue}{\mathsf{fma}\left(i, c, b \cdot a\right)} \]
    6. Applied rewrites74.6%

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

Alternative 5: 66.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(t, z, y \cdot x\right)\\ \mathbf{if}\;x \cdot y \leq -5000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+41}:\\ \;\;\;\;\mathsf{fma}\left(t, z, b \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (fma t z (* y x))))
   (if (<= (* x y) -5000000.0)
     t_1
     (if (<= (* x y) 5e+41) (fma t z (* b a)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = fma(t, z, (y * x));
	double tmp;
	if ((x * y) <= -5000000.0) {
		tmp = t_1;
	} else if ((x * y) <= 5e+41) {
		tmp = fma(t, z, (b * a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = fma(t, z, Float64(y * x))
	tmp = 0.0
	if (Float64(x * y) <= -5000000.0)
		tmp = t_1;
	elseif (Float64(x * y) <= 5e+41)
		tmp = fma(t, z, Float64(b * a));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -5000000.0], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 5e+41], N[(t * z + N[(b * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t, z, y \cdot x\right)\\
\mathbf{if}\;x \cdot y \leq -5000000:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -5e6 or 5.00000000000000022e41 < (*.f64 x y)

    1. Initial program 93.4%

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

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \left(t \cdot z + x \cdot y\right) + \color{blue}{a \cdot b} \]
      2. associate-+l+N/A

        \[\leadsto t \cdot z + \color{blue}{\left(x \cdot y + a \cdot b\right)} \]
      3. +-commutativeN/A

        \[\leadsto t \cdot z + \left(a \cdot b + \color{blue}{x \cdot y}\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{z}, a \cdot b + x \cdot y\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, x \cdot y + a \cdot b\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, y \cdot x + a \cdot b\right) \]
      7. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, a \cdot b\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, b \cdot a\right)\right) \]
      9. lower-*.f6483.3

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, b \cdot a\right)\right) \]
    4. Applied rewrites83.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, b \cdot a\right)\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto \mathsf{fma}\left(t, z, x \cdot y\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, y \cdot x\right) \]
      2. lift-*.f6468.2

        \[\leadsto \mathsf{fma}\left(t, z, y \cdot x\right) \]
    7. Applied rewrites68.2%

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

    if -5e6 < (*.f64 x y) < 5.00000000000000022e41

    1. Initial program 97.9%

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

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \left(t \cdot z + x \cdot y\right) + \color{blue}{a \cdot b} \]
      2. associate-+l+N/A

        \[\leadsto t \cdot z + \color{blue}{\left(x \cdot y + a \cdot b\right)} \]
      3. +-commutativeN/A

        \[\leadsto t \cdot z + \left(a \cdot b + \color{blue}{x \cdot y}\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{z}, a \cdot b + x \cdot y\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, x \cdot y + a \cdot b\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, y \cdot x + a \cdot b\right) \]
      7. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, a \cdot b\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, b \cdot a\right)\right) \]
      9. lower-*.f6468.2

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, b \cdot a\right)\right) \]
    4. Applied rewrites68.2%

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

      \[\leadsto \mathsf{fma}\left(t, z, a \cdot b\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, b \cdot a\right) \]
      2. lift-*.f6464.9

        \[\leadsto \mathsf{fma}\left(t, z, b \cdot a\right) \]
    7. Applied rewrites64.9%

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

Alternative 6: 62.9% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+56}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{+169}:\\ \;\;\;\;\mathsf{fma}\left(t, z, b \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= (* x y) -2e+56)
   (* y x)
   (if (<= (* x y) 2e+169) (fma t z (* b a)) (* y x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((x * y) <= -2e+56) {
		tmp = y * x;
	} else if ((x * y) <= 2e+169) {
		tmp = fma(t, z, (b * a));
	} else {
		tmp = y * x;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(x * y) <= -2e+56)
		tmp = Float64(y * x);
	elseif (Float64(x * y) <= 2e+169)
		tmp = fma(t, z, Float64(b * a));
	else
		tmp = Float64(y * x);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+56], N[(y * x), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e+169], N[(t * z + N[(b * a), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 91.7%

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

      \[\leadsto \color{blue}{x \cdot y} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto y \cdot \color{blue}{x} \]
      2. lower-*.f6463.4

        \[\leadsto y \cdot \color{blue}{x} \]
    4. Applied rewrites63.4%

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

    if -2.00000000000000018e56 < (*.f64 x y) < 1.99999999999999987e169

    1. Initial program 97.9%

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

      \[\leadsto \color{blue}{a \cdot b + \left(t \cdot z + x \cdot y\right)} \]
    3. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \left(t \cdot z + x \cdot y\right) + \color{blue}{a \cdot b} \]
      2. associate-+l+N/A

        \[\leadsto t \cdot z + \color{blue}{\left(x \cdot y + a \cdot b\right)} \]
      3. +-commutativeN/A

        \[\leadsto t \cdot z + \left(a \cdot b + \color{blue}{x \cdot y}\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{z}, a \cdot b + x \cdot y\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, x \cdot y + a \cdot b\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, y \cdot x + a \cdot b\right) \]
      7. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, a \cdot b\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, b \cdot a\right)\right) \]
      9. lower-*.f6469.7

        \[\leadsto \mathsf{fma}\left(t, z, \mathsf{fma}\left(y, x, b \cdot a\right)\right) \]
    4. Applied rewrites69.7%

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

      \[\leadsto \mathsf{fma}\left(t, z, a \cdot b\right) \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, z, b \cdot a\right) \]
      2. lift-*.f6462.6

        \[\leadsto \mathsf{fma}\left(t, z, b \cdot a\right) \]
    7. Applied rewrites62.6%

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

Alternative 7: 43.1% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+20}:\\ \;\;\;\;y \cdot x\\ \mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+41}:\\ \;\;\;\;b \cdot a\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= (* x y) -1e+20) (* y x) (if (<= (* x y) 5e+41) (* b a) (* y x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((x * y) <= -1e+20) {
		tmp = y * x;
	} else if ((x * y) <= 5e+41) {
		tmp = b * a;
	} else {
		tmp = y * x;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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 ((x * y) <= (-1d+20)) then
        tmp = y * x
    else if ((x * y) <= 5d+41) then
        tmp = b * a
    else
        tmp = y * x
    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 ((x * y) <= -1e+20) {
		tmp = y * x;
	} else if ((x * y) <= 5e+41) {
		tmp = b * a;
	} else {
		tmp = y * x;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (x * y) <= -1e+20:
		tmp = y * x
	elif (x * y) <= 5e+41:
		tmp = b * a
	else:
		tmp = y * x
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(x * y) <= -1e+20)
		tmp = Float64(y * x);
	elseif (Float64(x * y) <= 5e+41)
		tmp = Float64(b * a);
	else
		tmp = Float64(y * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((x * y) <= -1e+20)
		tmp = y * x;
	elseif ((x * y) <= 5e+41)
		tmp = b * a;
	else
		tmp = y * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -1e+20], N[(y * x), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e+41], N[(b * a), $MachinePrecision], N[(y * x), $MachinePrecision]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < -1e20 or 5.00000000000000022e41 < (*.f64 x y)

    1. Initial program 93.3%

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

      \[\leadsto \color{blue}{x \cdot y} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto y \cdot \color{blue}{x} \]
      2. lower-*.f6454.1

        \[\leadsto y \cdot \color{blue}{x} \]
    4. Applied rewrites54.1%

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

    if -1e20 < (*.f64 x y) < 5.00000000000000022e41

    1. Initial program 97.9%

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

      \[\leadsto \color{blue}{a \cdot b} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto b \cdot \color{blue}{a} \]
      2. lower-*.f6433.1

        \[\leadsto b \cdot \color{blue}{a} \]
    4. Applied rewrites33.1%

      \[\leadsto \color{blue}{b \cdot a} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 8: 42.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot t \leq -1 \cdot 10^{+87}:\\ \;\;\;\;t \cdot z\\ \mathbf{elif}\;z \cdot t \leq -5 \cdot 10^{-134}:\\ \;\;\;\;i \cdot c\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{+210}:\\ \;\;\;\;b \cdot a\\ \mathbf{else}:\\ \;\;\;\;t \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= (* z t) -1e+87)
   (* t z)
   (if (<= (* z t) -5e-134) (* i c) (if (<= (* z t) 5e+210) (* b a) (* 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) <= -1e+87) {
		tmp = t * z;
	} else if ((z * t) <= -5e-134) {
		tmp = i * c;
	} else if ((z * t) <= 5e+210) {
		tmp = b * a;
	} else {
		tmp = t * z;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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 ((z * t) <= (-1d+87)) then
        tmp = t * z
    else if ((z * t) <= (-5d-134)) then
        tmp = i * c
    else if ((z * t) <= 5d+210) then
        tmp = b * a
    else
        tmp = t * z
    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 ((z * t) <= -1e+87) {
		tmp = t * z;
	} else if ((z * t) <= -5e-134) {
		tmp = i * c;
	} else if ((z * t) <= 5e+210) {
		tmp = b * a;
	} else {
		tmp = t * z;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (z * t) <= -1e+87:
		tmp = t * z
	elif (z * t) <= -5e-134:
		tmp = i * c
	elif (z * t) <= 5e+210:
		tmp = b * a
	else:
		tmp = t * z
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(z * t) <= -1e+87)
		tmp = Float64(t * z);
	elseif (Float64(z * t) <= -5e-134)
		tmp = Float64(i * c);
	elseif (Float64(z * t) <= 5e+210)
		tmp = Float64(b * a);
	else
		tmp = Float64(t * z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((z * t) <= -1e+87)
		tmp = t * z;
	elseif ((z * t) <= -5e-134)
		tmp = i * c;
	elseif ((z * t) <= 5e+210)
		tmp = b * a;
	else
		tmp = t * z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(z * t), $MachinePrecision], -1e+87], N[(t * z), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], -5e-134], N[(i * c), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 5e+210], N[(b * a), $MachinePrecision], N[(t * z), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -1 \cdot 10^{+87}:\\
\;\;\;\;t \cdot z\\

\mathbf{elif}\;z \cdot t \leq -5 \cdot 10^{-134}:\\
\;\;\;\;i \cdot c\\

\mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{+210}:\\
\;\;\;\;b \cdot a\\

\mathbf{else}:\\
\;\;\;\;t \cdot z\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 z t) < -9.9999999999999996e86 or 4.9999999999999998e210 < (*.f64 z t)

    1. Initial program 91.5%

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

      \[\leadsto \color{blue}{t \cdot z} \]
    3. Step-by-step derivation
      1. lower-*.f6468.5

        \[\leadsto t \cdot \color{blue}{z} \]
    4. Applied rewrites68.5%

      \[\leadsto \color{blue}{t \cdot z} \]

    if -9.9999999999999996e86 < (*.f64 z t) < -5.0000000000000003e-134

    1. Initial program 97.5%

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

      \[\leadsto \color{blue}{c \cdot i} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto i \cdot \color{blue}{c} \]
      2. lower-*.f6430.6

        \[\leadsto i \cdot \color{blue}{c} \]
    4. Applied rewrites30.6%

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

    if -5.0000000000000003e-134 < (*.f64 z t) < 4.9999999999999998e210

    1. Initial program 97.7%

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

      \[\leadsto \color{blue}{a \cdot b} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto b \cdot \color{blue}{a} \]
      2. lower-*.f6431.8

        \[\leadsto b \cdot \color{blue}{a} \]
    4. Applied rewrites31.8%

      \[\leadsto \color{blue}{b \cdot a} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 9: 42.2% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+80}:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;a \cdot b \leq 10^{+67}:\\ \;\;\;\;i \cdot c\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= (* a b) -5e+80) (* b a) (if (<= (* a b) 1e+67) (* i c) (* b a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((a * b) <= -5e+80) {
		tmp = b * a;
	} else if ((a * b) <= 1e+67) {
		tmp = i * c;
	} else {
		tmp = b * a;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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) <= (-5d+80)) then
        tmp = b * a
    else if ((a * b) <= 1d+67) then
        tmp = i * c
    else
        tmp = b * a
    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) <= -5e+80) {
		tmp = b * a;
	} else if ((a * b) <= 1e+67) {
		tmp = i * c;
	} else {
		tmp = b * a;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (a * b) <= -5e+80:
		tmp = b * a
	elif (a * b) <= 1e+67:
		tmp = i * c
	else:
		tmp = b * a
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(a * b) <= -5e+80)
		tmp = Float64(b * a);
	elseif (Float64(a * b) <= 1e+67)
		tmp = Float64(i * c);
	else
		tmp = Float64(b * a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((a * b) <= -5e+80)
		tmp = b * a;
	elseif ((a * b) <= 1e+67)
		tmp = i * c;
	else
		tmp = b * a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(a * b), $MachinePrecision], -5e+80], N[(b * a), $MachinePrecision], If[LessEqual[N[(a * b), $MachinePrecision], 1e+67], N[(i * c), $MachinePrecision], N[(b * a), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+80}:\\
\;\;\;\;b \cdot a\\

\mathbf{elif}\;a \cdot b \leq 10^{+67}:\\
\;\;\;\;i \cdot c\\

\mathbf{else}:\\
\;\;\;\;b \cdot a\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a b) < -4.99999999999999961e80 or 9.99999999999999983e66 < (*.f64 a b)

    1. Initial program 92.6%

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

      \[\leadsto \color{blue}{a \cdot b} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto b \cdot \color{blue}{a} \]
      2. lower-*.f6458.0

        \[\leadsto b \cdot \color{blue}{a} \]
    4. Applied rewrites58.0%

      \[\leadsto \color{blue}{b \cdot a} \]

    if -4.99999999999999961e80 < (*.f64 a b) < 9.99999999999999983e66

    1. Initial program 97.8%

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

      \[\leadsto \color{blue}{c \cdot i} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto i \cdot \color{blue}{c} \]
      2. lower-*.f6433.8

        \[\leadsto i \cdot \color{blue}{c} \]
    4. Applied rewrites33.8%

      \[\leadsto \color{blue}{i \cdot c} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 10: 27.1% accurate, 5.3× speedup?

\[\begin{array}{l} \\ b \cdot a \end{array} \]
(FPCore (x y z t a b c i) :precision binary64 (* b a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return b * a;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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 = b * a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return b * a;
}
def code(x, y, z, t, a, b, c, i):
	return b * a
function code(x, y, z, t, a, b, c, i)
	return Float64(b * a)
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = b * a;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(b * a), $MachinePrecision]
\begin{array}{l}

\\
b \cdot a
\end{array}
Derivation
  1. Initial program 95.8%

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

    \[\leadsto \color{blue}{a \cdot b} \]
  3. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto b \cdot \color{blue}{a} \]
    2. lower-*.f6427.1

      \[\leadsto b \cdot \color{blue}{a} \]
  4. Applied rewrites27.1%

    \[\leadsto \color{blue}{b \cdot a} \]
  5. Add Preprocessing

Reproduce

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