Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1

Percentage Accurate: 92.3% → 99.2%
Time: 12.6s
Alternatives: 18
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 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: 92.3% accurate, 1.0× speedup?

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

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

Alternative 1: 99.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.1 \cdot 10^{+28} \lor \neg \left(z \leq 0.0002\right):\\
\;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.1000000000000002e28 or 2.0000000000000001e-4 < z

    1. Initial program 75.2%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+75.2%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified79.4%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 93.4%

      \[\leadsto \color{blue}{z \cdot \left(y + \left(a \cdot b + \left(\frac{x}{z} + \frac{a \cdot t}{z}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. +-commutative93.4%

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

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

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

        \[\leadsto z \cdot \left(y + \left(\frac{x}{z} + \left(a \cdot b + \color{blue}{a \cdot \frac{t}{z}}\right)\right)\right) \]
      5. distribute-lft-out99.9%

        \[\leadsto z \cdot \left(y + \left(\frac{x}{z} + \color{blue}{a \cdot \left(b + \frac{t}{z}\right)}\right)\right) \]
    7. Simplified99.9%

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

    if -6.1000000000000002e28 < z < 2.0000000000000001e-4

    1. Initial program 100.0%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification99.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.1 \cdot 10^{+28} \lor \neg \left(z \leq 0.0002\right):\\ \;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t \cdot a + \left(x + y \cdot z\right)\right) + \left(z \cdot a\right) \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 98.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t \cdot a + \left(x + y \cdot z\right)\right) + \left(z \cdot a\right) \cdot b\\ \mathbf{if}\;t\_1 \leq 4 \cdot 10^{+303}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 + \frac{z \cdot \left(y + a \cdot \left(b + \frac{t}{z}\right)\right)}{x}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (+ (* t a) (+ x (* y z))) (* (* z a) b))))
   (if (<= t_1 4e+303)
     t_1
     (* x (+ 1.0 (/ (* z (+ y (* a (+ b (/ t z))))) x))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((t * a) + (x + (y * z))) + ((z * a) * b);
	double tmp;
	if (t_1 <= 4e+303) {
		tmp = t_1;
	} else {
		tmp = x * (1.0 + ((z * (y + (a * (b + (t / z))))) / x));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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) :: t_1
    real(8) :: tmp
    t_1 = ((t * a) + (x + (y * z))) + ((z * a) * b)
    if (t_1 <= 4d+303) then
        tmp = t_1
    else
        tmp = x * (1.0d0 + ((z * (y + (a * (b + (t / z))))) / x))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((t * a) + (x + (y * z))) + ((z * a) * b);
	double tmp;
	if (t_1 <= 4e+303) {
		tmp = t_1;
	} else {
		tmp = x * (1.0 + ((z * (y + (a * (b + (t / z))))) / x));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((t * a) + (x + (y * z))) + ((z * a) * b)
	tmp = 0
	if t_1 <= 4e+303:
		tmp = t_1
	else:
		tmp = x * (1.0 + ((z * (y + (a * (b + (t / z))))) / x))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(t * a) + Float64(x + Float64(y * z))) + Float64(Float64(z * a) * b))
	tmp = 0.0
	if (t_1 <= 4e+303)
		tmp = t_1;
	else
		tmp = Float64(x * Float64(1.0 + Float64(Float64(z * Float64(y + Float64(a * Float64(b + Float64(t / z))))) / x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((t * a) + (x + (y * z))) + ((z * a) * b);
	tmp = 0.0;
	if (t_1 <= 4e+303)
		tmp = t_1;
	else
		tmp = x * (1.0 + ((z * (y + (a * (b + (t / z))))) / x));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t * a), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 4e+303], t$95$1, N[(x * N[(1.0 + N[(N[(z * N[(y + N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(t \cdot a + \left(x + y \cdot z\right)\right) + \left(z \cdot a\right) \cdot b\\
\mathbf{if}\;t\_1 \leq 4 \cdot 10^{+303}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + \frac{z \cdot \left(y + a \cdot \left(b + \frac{t}{z}\right)\right)}{x}\right)\\


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

    1. Initial program 98.5%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Add Preprocessing

    if 4e303 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b))

    1. Initial program 56.5%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+56.5%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified71.9%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 79.7%

      \[\leadsto \color{blue}{z \cdot \left(y + \left(a \cdot b + \left(\frac{x}{z} + \frac{a \cdot t}{z}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. +-commutative79.7%

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

        \[\leadsto z \cdot \left(y + \color{blue}{\left(\frac{x}{z} + \left(\frac{a \cdot t}{z} + a \cdot b\right)\right)}\right) \]
      3. +-commutative79.7%

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

        \[\leadsto z \cdot \left(y + \left(\frac{x}{z} + \left(a \cdot b + \color{blue}{a \cdot \frac{t}{z}}\right)\right)\right) \]
      5. distribute-lft-out95.3%

        \[\leadsto z \cdot \left(y + \left(\frac{x}{z} + \color{blue}{a \cdot \left(b + \frac{t}{z}\right)}\right)\right) \]
    7. Simplified95.3%

      \[\leadsto \color{blue}{z \cdot \left(y + \left(\frac{x}{z} + a \cdot \left(b + \frac{t}{z}\right)\right)\right)} \]
    8. Taylor expanded in x around inf 100.0%

      \[\leadsto \color{blue}{x \cdot \left(1 + \frac{z \cdot \left(y + a \cdot \left(b + \frac{t}{z}\right)\right)}{x}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(t \cdot a + \left(x + y \cdot z\right)\right) + \left(z \cdot a\right) \cdot b \leq 4 \cdot 10^{+303}:\\ \;\;\;\;\left(t \cdot a + \left(x + y \cdot z\right)\right) + \left(z \cdot a\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 + \frac{z \cdot \left(y + a \cdot \left(b + \frac{t}{z}\right)\right)}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 83.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(t \cdot a + y \cdot z\right)\\ t_2 := x + z \cdot \left(y + a \cdot b\right)\\ \mathbf{if}\;b \leq -4.5 \cdot 10^{+61}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq -3.5 \cdot 10^{-22}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -2 \cdot 10^{-91}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq 3 \cdot 10^{-305}:\\ \;\;\;\;x + z \cdot \left(y + \frac{t \cdot a}{z}\right)\\ \mathbf{elif}\;b \leq 1.55 \cdot 10^{+103}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (+ (* t a) (* y z)))) (t_2 (+ x (* z (+ y (* a b))))))
   (if (<= b -4.5e+61)
     t_2
     (if (<= b -3.5e-22)
       t_1
       (if (<= b -2e-91)
         t_2
         (if (<= b 3e-305)
           (+ x (* z (+ y (/ (* t a) z))))
           (if (<= b 1.55e+103) t_1 (+ x (* a (+ t (* z b)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + ((t * a) + (y * z));
	double t_2 = x + (z * (y + (a * b)));
	double tmp;
	if (b <= -4.5e+61) {
		tmp = t_2;
	} else if (b <= -3.5e-22) {
		tmp = t_1;
	} else if (b <= -2e-91) {
		tmp = t_2;
	} else if (b <= 3e-305) {
		tmp = x + (z * (y + ((t * a) / z)));
	} else if (b <= 1.55e+103) {
		tmp = t_1;
	} else {
		tmp = x + (a * (t + (z * b)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + ((t * a) + (y * z))
    t_2 = x + (z * (y + (a * b)))
    if (b <= (-4.5d+61)) then
        tmp = t_2
    else if (b <= (-3.5d-22)) then
        tmp = t_1
    else if (b <= (-2d-91)) then
        tmp = t_2
    else if (b <= 3d-305) then
        tmp = x + (z * (y + ((t * a) / z)))
    else if (b <= 1.55d+103) then
        tmp = t_1
    else
        tmp = x + (a * (t + (z * b)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + ((t * a) + (y * z));
	double t_2 = x + (z * (y + (a * b)));
	double tmp;
	if (b <= -4.5e+61) {
		tmp = t_2;
	} else if (b <= -3.5e-22) {
		tmp = t_1;
	} else if (b <= -2e-91) {
		tmp = t_2;
	} else if (b <= 3e-305) {
		tmp = x + (z * (y + ((t * a) / z)));
	} else if (b <= 1.55e+103) {
		tmp = t_1;
	} else {
		tmp = x + (a * (t + (z * b)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + ((t * a) + (y * z))
	t_2 = x + (z * (y + (a * b)))
	tmp = 0
	if b <= -4.5e+61:
		tmp = t_2
	elif b <= -3.5e-22:
		tmp = t_1
	elif b <= -2e-91:
		tmp = t_2
	elif b <= 3e-305:
		tmp = x + (z * (y + ((t * a) / z)))
	elif b <= 1.55e+103:
		tmp = t_1
	else:
		tmp = x + (a * (t + (z * b)))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(Float64(t * a) + Float64(y * z)))
	t_2 = Float64(x + Float64(z * Float64(y + Float64(a * b))))
	tmp = 0.0
	if (b <= -4.5e+61)
		tmp = t_2;
	elseif (b <= -3.5e-22)
		tmp = t_1;
	elseif (b <= -2e-91)
		tmp = t_2;
	elseif (b <= 3e-305)
		tmp = Float64(x + Float64(z * Float64(y + Float64(Float64(t * a) / z))));
	elseif (b <= 1.55e+103)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(a * Float64(t + Float64(z * b))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + ((t * a) + (y * z));
	t_2 = x + (z * (y + (a * b)));
	tmp = 0.0;
	if (b <= -4.5e+61)
		tmp = t_2;
	elseif (b <= -3.5e-22)
		tmp = t_1;
	elseif (b <= -2e-91)
		tmp = t_2;
	elseif (b <= 3e-305)
		tmp = x + (z * (y + ((t * a) / z)));
	elseif (b <= 1.55e+103)
		tmp = t_1;
	else
		tmp = x + (a * (t + (z * b)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(t * a), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.5e+61], t$95$2, If[LessEqual[b, -3.5e-22], t$95$1, If[LessEqual[b, -2e-91], t$95$2, If[LessEqual[b, 3e-305], N[(x + N[(z * N[(y + N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.55e+103], t$95$1, N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -3.5 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -2 \cdot 10^{-91}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq 3 \cdot 10^{-305}:\\
\;\;\;\;x + z \cdot \left(y + \frac{t \cdot a}{z}\right)\\

\mathbf{elif}\;b \leq 1.55 \cdot 10^{+103}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -4.5e61 or -3.50000000000000005e-22 < b < -2.00000000000000004e-91

    1. Initial program 90.5%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+90.5%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified83.4%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 74.4%

      \[\leadsto \color{blue}{x + \left(a \cdot \left(b \cdot z\right) + y \cdot z\right)} \]
    6. Step-by-step derivation
      1. +-commutative74.4%

        \[\leadsto \color{blue}{\left(a \cdot \left(b \cdot z\right) + y \cdot z\right) + x} \]
      2. +-commutative74.4%

        \[\leadsto \color{blue}{\left(y \cdot z + a \cdot \left(b \cdot z\right)\right)} + x \]
      3. associate-*r*81.6%

        \[\leadsto \left(y \cdot z + \color{blue}{\left(a \cdot b\right) \cdot z}\right) + x \]
      4. distribute-rgt-in89.4%

        \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} + x \]
    7. Simplified89.4%

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

    if -4.5e61 < b < -3.50000000000000005e-22 or 3.0000000000000001e-305 < b < 1.5500000000000001e103

    1. Initial program 91.9%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+91.9%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified96.3%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in b around 0 95.5%

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

    if -2.00000000000000004e-91 < b < 3.0000000000000001e-305

    1. Initial program 78.8%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+78.8%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified97.8%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in b around 0 97.7%

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

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

    if 1.5500000000000001e103 < b

    1. Initial program 83.7%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+83.7%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified73.3%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 76.2%

      \[\leadsto \color{blue}{x + \left(a \cdot t + z \cdot \left(y + a \cdot b\right)\right)} \]
    6. Taylor expanded in y around 0 73.5%

      \[\leadsto \color{blue}{x + \left(a \cdot t + a \cdot \left(b \cdot z\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutative73.5%

        \[\leadsto \color{blue}{\left(a \cdot t + a \cdot \left(b \cdot z\right)\right) + x} \]
      2. distribute-lft-in87.0%

        \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right)} + x \]
      3. +-commutative87.0%

        \[\leadsto a \cdot \color{blue}{\left(b \cdot z + t\right)} + x \]
    8. Simplified87.0%

      \[\leadsto \color{blue}{a \cdot \left(b \cdot z + t\right) + x} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification93.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.5 \cdot 10^{+61}:\\ \;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\ \mathbf{elif}\;b \leq -3.5 \cdot 10^{-22}:\\ \;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\ \mathbf{elif}\;b \leq -2 \cdot 10^{-91}:\\ \;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\ \mathbf{elif}\;b \leq 3 \cdot 10^{-305}:\\ \;\;\;\;x + z \cdot \left(y + \frac{t \cdot a}{z}\right)\\ \mathbf{elif}\;b \leq 1.55 \cdot 10^{+103}:\\ \;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 39.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -920:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-293}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;t \leq 1.72 \cdot 10^{-43}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-9} \lor \neg \left(t \leq 1.12 \cdot 10^{+55}\right) \land t \leq 1.7 \cdot 10^{+117}:\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t \cdot a\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -920.0)
   (* t a)
   (if (<= t 4e-293)
     (* y z)
     (if (<= t 1.72e-43)
       x
       (if (or (<= t 2.3e-9) (and (not (<= t 1.12e+55)) (<= t 1.7e+117)))
         (* y z)
         (* t a))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -920.0) {
		tmp = t * a;
	} else if (t <= 4e-293) {
		tmp = y * z;
	} else if (t <= 1.72e-43) {
		tmp = x;
	} else if ((t <= 2.3e-9) || (!(t <= 1.12e+55) && (t <= 1.7e+117))) {
		tmp = y * z;
	} else {
		tmp = t * a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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) :: tmp
    if (t <= (-920.0d0)) then
        tmp = t * a
    else if (t <= 4d-293) then
        tmp = y * z
    else if (t <= 1.72d-43) then
        tmp = x
    else if ((t <= 2.3d-9) .or. (.not. (t <= 1.12d+55)) .and. (t <= 1.7d+117)) then
        tmp = y * z
    else
        tmp = t * a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -920.0) {
		tmp = t * a;
	} else if (t <= 4e-293) {
		tmp = y * z;
	} else if (t <= 1.72e-43) {
		tmp = x;
	} else if ((t <= 2.3e-9) || (!(t <= 1.12e+55) && (t <= 1.7e+117))) {
		tmp = y * z;
	} else {
		tmp = t * a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= -920.0:
		tmp = t * a
	elif t <= 4e-293:
		tmp = y * z
	elif t <= 1.72e-43:
		tmp = x
	elif (t <= 2.3e-9) or (not (t <= 1.12e+55) and (t <= 1.7e+117)):
		tmp = y * z
	else:
		tmp = t * a
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -920.0)
		tmp = Float64(t * a);
	elseif (t <= 4e-293)
		tmp = Float64(y * z);
	elseif (t <= 1.72e-43)
		tmp = x;
	elseif ((t <= 2.3e-9) || (!(t <= 1.12e+55) && (t <= 1.7e+117)))
		tmp = Float64(y * z);
	else
		tmp = Float64(t * a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= -920.0)
		tmp = t * a;
	elseif (t <= 4e-293)
		tmp = y * z;
	elseif (t <= 1.72e-43)
		tmp = x;
	elseif ((t <= 2.3e-9) || (~((t <= 1.12e+55)) && (t <= 1.7e+117)))
		tmp = y * z;
	else
		tmp = t * a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -920.0], N[(t * a), $MachinePrecision], If[LessEqual[t, 4e-293], N[(y * z), $MachinePrecision], If[LessEqual[t, 1.72e-43], x, If[Or[LessEqual[t, 2.3e-9], And[N[Not[LessEqual[t, 1.12e+55]], $MachinePrecision], LessEqual[t, 1.7e+117]]], N[(y * z), $MachinePrecision], N[(t * a), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -920:\\
\;\;\;\;t \cdot a\\

\mathbf{elif}\;t \leq 4 \cdot 10^{-293}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;t \leq 1.72 \cdot 10^{-43}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 2.3 \cdot 10^{-9} \lor \neg \left(t \leq 1.12 \cdot 10^{+55}\right) \land t \leq 1.7 \cdot 10^{+117}:\\
\;\;\;\;y \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -920 or 2.2999999999999999e-9 < t < 1.12000000000000006e55 or 1.7e117 < t

    1. Initial program 87.1%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+87.1%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified89.1%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 60.1%

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

    if -920 < t < 4.0000000000000002e-293 or 1.72000000000000005e-43 < t < 2.2999999999999999e-9 or 1.12000000000000006e55 < t < 1.7e117

    1. Initial program 88.2%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+88.2%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified91.1%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 50.4%

      \[\leadsto \color{blue}{y \cdot z} \]
    6. Step-by-step derivation
      1. *-commutative50.4%

        \[\leadsto \color{blue}{z \cdot y} \]
    7. Simplified50.4%

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

    if 4.0000000000000002e-293 < t < 1.72000000000000005e-43

    1. Initial program 89.6%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+89.6%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified89.8%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 47.1%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification53.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -920:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-293}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;t \leq 1.72 \cdot 10^{-43}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-9} \lor \neg \left(t \leq 1.12 \cdot 10^{+55}\right) \land t \leq 1.7 \cdot 10^{+117}:\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 39.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.1:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-291}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;t \leq 7.4 \cdot 10^{-140}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.26 \cdot 10^{-114}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-45}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+115}:\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t \cdot a\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -2.1)
   (* t a)
   (if (<= t 2.2e-291)
     (* y z)
     (if (<= t 7.4e-140)
       x
       (if (<= t 1.26e-114)
         (* a (* z b))
         (if (<= t 2.1e-45) x (if (<= t 4.6e+115) (* y z) (* t a))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -2.1) {
		tmp = t * a;
	} else if (t <= 2.2e-291) {
		tmp = y * z;
	} else if (t <= 7.4e-140) {
		tmp = x;
	} else if (t <= 1.26e-114) {
		tmp = a * (z * b);
	} else if (t <= 2.1e-45) {
		tmp = x;
	} else if (t <= 4.6e+115) {
		tmp = y * z;
	} else {
		tmp = t * a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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) :: tmp
    if (t <= (-2.1d0)) then
        tmp = t * a
    else if (t <= 2.2d-291) then
        tmp = y * z
    else if (t <= 7.4d-140) then
        tmp = x
    else if (t <= 1.26d-114) then
        tmp = a * (z * b)
    else if (t <= 2.1d-45) then
        tmp = x
    else if (t <= 4.6d+115) then
        tmp = y * z
    else
        tmp = t * a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -2.1) {
		tmp = t * a;
	} else if (t <= 2.2e-291) {
		tmp = y * z;
	} else if (t <= 7.4e-140) {
		tmp = x;
	} else if (t <= 1.26e-114) {
		tmp = a * (z * b);
	} else if (t <= 2.1e-45) {
		tmp = x;
	} else if (t <= 4.6e+115) {
		tmp = y * z;
	} else {
		tmp = t * a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= -2.1:
		tmp = t * a
	elif t <= 2.2e-291:
		tmp = y * z
	elif t <= 7.4e-140:
		tmp = x
	elif t <= 1.26e-114:
		tmp = a * (z * b)
	elif t <= 2.1e-45:
		tmp = x
	elif t <= 4.6e+115:
		tmp = y * z
	else:
		tmp = t * a
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -2.1)
		tmp = Float64(t * a);
	elseif (t <= 2.2e-291)
		tmp = Float64(y * z);
	elseif (t <= 7.4e-140)
		tmp = x;
	elseif (t <= 1.26e-114)
		tmp = Float64(a * Float64(z * b));
	elseif (t <= 2.1e-45)
		tmp = x;
	elseif (t <= 4.6e+115)
		tmp = Float64(y * z);
	else
		tmp = Float64(t * a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= -2.1)
		tmp = t * a;
	elseif (t <= 2.2e-291)
		tmp = y * z;
	elseif (t <= 7.4e-140)
		tmp = x;
	elseif (t <= 1.26e-114)
		tmp = a * (z * b);
	elseif (t <= 2.1e-45)
		tmp = x;
	elseif (t <= 4.6e+115)
		tmp = y * z;
	else
		tmp = t * a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.1], N[(t * a), $MachinePrecision], If[LessEqual[t, 2.2e-291], N[(y * z), $MachinePrecision], If[LessEqual[t, 7.4e-140], x, If[LessEqual[t, 1.26e-114], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e-45], x, If[LessEqual[t, 4.6e+115], N[(y * z), $MachinePrecision], N[(t * a), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1:\\
\;\;\;\;t \cdot a\\

\mathbf{elif}\;t \leq 2.2 \cdot 10^{-291}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;t \leq 7.4 \cdot 10^{-140}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;t \leq 2.1 \cdot 10^{-45}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 4.6 \cdot 10^{+115}:\\
\;\;\;\;y \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.10000000000000009 or 4.60000000000000007e115 < t

    1. Initial program 87.0%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+87.0%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified88.3%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 63.1%

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

    if -2.10000000000000009 < t < 2.20000000000000002e-291 or 2.09999999999999995e-45 < t < 4.60000000000000007e115

    1. Initial program 88.1%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+88.1%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified91.5%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 45.4%

      \[\leadsto \color{blue}{y \cdot z} \]
    6. Step-by-step derivation
      1. *-commutative45.4%

        \[\leadsto \color{blue}{z \cdot y} \]
    7. Simplified45.4%

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

    if 2.20000000000000002e-291 < t < 7.39999999999999955e-140 or 1.25999999999999992e-114 < t < 2.09999999999999995e-45

    1. Initial program 92.5%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+92.5%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified92.6%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 55.0%

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

    if 7.39999999999999955e-140 < t < 1.25999999999999992e-114

    1. Initial program 77.3%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+77.3%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified77.4%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 88.7%

      \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
    6. Taylor expanded in t around 0 88.7%

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

        \[\leadsto a \cdot \color{blue}{\left(z \cdot b\right)} \]
    8. Simplified88.7%

      \[\leadsto a \cdot \color{blue}{\left(z \cdot b\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification54.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.1:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-291}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;t \leq 7.4 \cdot 10^{-140}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 1.26 \cdot 10^{-114}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-45}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+115}:\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 62.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot z\\ t_2 := x + t \cdot a\\ \mathbf{if}\;t \leq -850:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-139}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-115}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+115}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* y z))) (t_2 (+ x (* t a))))
   (if (<= t -850.0)
     t_2
     (if (<= t 4.5e-139)
       t_1
       (if (<= t 3.1e-115) (* a (* z b)) (if (<= t 8.2e+115) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * z);
	double t_2 = x + (t * a);
	double tmp;
	if (t <= -850.0) {
		tmp = t_2;
	} else if (t <= 4.5e-139) {
		tmp = t_1;
	} else if (t <= 3.1e-115) {
		tmp = a * (z * b);
	} else if (t <= 8.2e+115) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + (y * z)
    t_2 = x + (t * a)
    if (t <= (-850.0d0)) then
        tmp = t_2
    else if (t <= 4.5d-139) then
        tmp = t_1
    else if (t <= 3.1d-115) then
        tmp = a * (z * b)
    else if (t <= 8.2d+115) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * z);
	double t_2 = x + (t * a);
	double tmp;
	if (t <= -850.0) {
		tmp = t_2;
	} else if (t <= 4.5e-139) {
		tmp = t_1;
	} else if (t <= 3.1e-115) {
		tmp = a * (z * b);
	} else if (t <= 8.2e+115) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (y * z)
	t_2 = x + (t * a)
	tmp = 0
	if t <= -850.0:
		tmp = t_2
	elif t <= 4.5e-139:
		tmp = t_1
	elif t <= 3.1e-115:
		tmp = a * (z * b)
	elif t <= 8.2e+115:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(y * z))
	t_2 = Float64(x + Float64(t * a))
	tmp = 0.0
	if (t <= -850.0)
		tmp = t_2;
	elseif (t <= 4.5e-139)
		tmp = t_1;
	elseif (t <= 3.1e-115)
		tmp = Float64(a * Float64(z * b));
	elseif (t <= 8.2e+115)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (y * z);
	t_2 = x + (t * a);
	tmp = 0.0;
	if (t <= -850.0)
		tmp = t_2;
	elseif (t <= 4.5e-139)
		tmp = t_1;
	elseif (t <= 3.1e-115)
		tmp = a * (z * b);
	elseif (t <= 8.2e+115)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -850.0], t$95$2, If[LessEqual[t, 4.5e-139], t$95$1, If[LessEqual[t, 3.1e-115], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.2e+115], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + y \cdot z\\
t_2 := x + t \cdot a\\
\mathbf{if}\;t \leq -850:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 4.5 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 8.2 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -850 or 8.19999999999999925e115 < t

    1. Initial program 87.0%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+87.0%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified88.3%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 73.6%

      \[\leadsto \color{blue}{x + a \cdot t} \]
    6. Step-by-step derivation
      1. +-commutative73.6%

        \[\leadsto \color{blue}{a \cdot t + x} \]
    7. Simplified73.6%

      \[\leadsto \color{blue}{a \cdot t + x} \]

    if -850 < t < 4.50000000000000023e-139 or 3.10000000000000007e-115 < t < 8.19999999999999925e115

    1. Initial program 89.2%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+89.2%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified91.7%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 96.2%

      \[\leadsto \color{blue}{x + \left(a \cdot t + z \cdot \left(y + a \cdot b\right)\right)} \]
    6. Taylor expanded in a around 0 69.7%

      \[\leadsto \color{blue}{x + y \cdot z} \]
    7. Step-by-step derivation
      1. *-commutative69.7%

        \[\leadsto x + \color{blue}{z \cdot y} \]
    8. Simplified69.7%

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

    if 4.50000000000000023e-139 < t < 3.10000000000000007e-115

    1. Initial program 77.3%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+77.3%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified77.4%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 88.7%

      \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
    6. Taylor expanded in t around 0 88.7%

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

        \[\leadsto a \cdot \color{blue}{\left(z \cdot b\right)} \]
    8. Simplified88.7%

      \[\leadsto a \cdot \color{blue}{\left(z \cdot b\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification71.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -850:\\ \;\;\;\;x + t \cdot a\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-139}:\\ \;\;\;\;x + y \cdot z\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-115}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+115}:\\ \;\;\;\;x + y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 55.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot z\\ \mathbf{if}\;t \leq -5200:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-139}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-115}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+116}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot a\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* y z))))
   (if (<= t -5200.0)
     (* t a)
     (if (<= t 4.8e-139)
       t_1
       (if (<= t 2.9e-115) (* a (* z b)) (if (<= t 3.5e+116) t_1 (* t a)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * z);
	double tmp;
	if (t <= -5200.0) {
		tmp = t * a;
	} else if (t <= 4.8e-139) {
		tmp = t_1;
	} else if (t <= 2.9e-115) {
		tmp = a * (z * b);
	} else if (t <= 3.5e+116) {
		tmp = t_1;
	} else {
		tmp = t * a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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) :: t_1
    real(8) :: tmp
    t_1 = x + (y * z)
    if (t <= (-5200.0d0)) then
        tmp = t * a
    else if (t <= 4.8d-139) then
        tmp = t_1
    else if (t <= 2.9d-115) then
        tmp = a * (z * b)
    else if (t <= 3.5d+116) then
        tmp = t_1
    else
        tmp = t * a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * z);
	double tmp;
	if (t <= -5200.0) {
		tmp = t * a;
	} else if (t <= 4.8e-139) {
		tmp = t_1;
	} else if (t <= 2.9e-115) {
		tmp = a * (z * b);
	} else if (t <= 3.5e+116) {
		tmp = t_1;
	} else {
		tmp = t * a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (y * z)
	tmp = 0
	if t <= -5200.0:
		tmp = t * a
	elif t <= 4.8e-139:
		tmp = t_1
	elif t <= 2.9e-115:
		tmp = a * (z * b)
	elif t <= 3.5e+116:
		tmp = t_1
	else:
		tmp = t * a
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(y * z))
	tmp = 0.0
	if (t <= -5200.0)
		tmp = Float64(t * a);
	elseif (t <= 4.8e-139)
		tmp = t_1;
	elseif (t <= 2.9e-115)
		tmp = Float64(a * Float64(z * b));
	elseif (t <= 3.5e+116)
		tmp = t_1;
	else
		tmp = Float64(t * a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (y * z);
	tmp = 0.0;
	if (t <= -5200.0)
		tmp = t * a;
	elseif (t <= 4.8e-139)
		tmp = t_1;
	elseif (t <= 2.9e-115)
		tmp = a * (z * b);
	elseif (t <= 3.5e+116)
		tmp = t_1;
	else
		tmp = t * a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5200.0], N[(t * a), $MachinePrecision], If[LessEqual[t, 4.8e-139], t$95$1, If[LessEqual[t, 2.9e-115], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e+116], t$95$1, N[(t * a), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + y \cdot z\\
\mathbf{if}\;t \leq -5200:\\
\;\;\;\;t \cdot a\\

\mathbf{elif}\;t \leq 4.8 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 3.5 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5200 or 3.49999999999999997e116 < t

    1. Initial program 86.9%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+86.9%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified88.2%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 63.8%

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

    if -5200 < t < 4.80000000000000029e-139 or 2.8999999999999998e-115 < t < 3.49999999999999997e116

    1. Initial program 89.2%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+89.2%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified91.8%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 96.2%

      \[\leadsto \color{blue}{x + \left(a \cdot t + z \cdot \left(y + a \cdot b\right)\right)} \]
    6. Taylor expanded in a around 0 69.9%

      \[\leadsto \color{blue}{x + y \cdot z} \]
    7. Step-by-step derivation
      1. *-commutative69.9%

        \[\leadsto x + \color{blue}{z \cdot y} \]
    8. Simplified69.9%

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

    if 4.80000000000000029e-139 < t < 2.8999999999999998e-115

    1. Initial program 77.3%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+77.3%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified77.4%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 88.7%

      \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
    6. Taylor expanded in t around 0 88.7%

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

        \[\leadsto a \cdot \color{blue}{\left(z \cdot b\right)} \]
    8. Simplified88.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5200:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-139}:\\ \;\;\;\;x + y \cdot z\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-115}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+116}:\\ \;\;\;\;x + y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 55.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot z\\ \mathbf{if}\;t \leq -5200:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-139}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-115}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{+128}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot a\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* y z))))
   (if (<= t -5200.0)
     (* t a)
     (if (<= t 4.8e-139)
       t_1
       (if (<= t 2.9e-115) (* a (* z b)) (if (<= t 6.8e+128) t_1 (* t a)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * z);
	double tmp;
	if (t <= -5200.0) {
		tmp = t * a;
	} else if (t <= 4.8e-139) {
		tmp = t_1;
	} else if (t <= 2.9e-115) {
		tmp = a * (z * b);
	} else if (t <= 6.8e+128) {
		tmp = t_1;
	} else {
		tmp = t * a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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) :: t_1
    real(8) :: tmp
    t_1 = x + (y * z)
    if (t <= (-5200.0d0)) then
        tmp = t * a
    else if (t <= 4.8d-139) then
        tmp = t_1
    else if (t <= 2.9d-115) then
        tmp = a * (z * b)
    else if (t <= 6.8d+128) then
        tmp = t_1
    else
        tmp = t * a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (y * z);
	double tmp;
	if (t <= -5200.0) {
		tmp = t * a;
	} else if (t <= 4.8e-139) {
		tmp = t_1;
	} else if (t <= 2.9e-115) {
		tmp = a * (z * b);
	} else if (t <= 6.8e+128) {
		tmp = t_1;
	} else {
		tmp = t * a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (y * z)
	tmp = 0
	if t <= -5200.0:
		tmp = t * a
	elif t <= 4.8e-139:
		tmp = t_1
	elif t <= 2.9e-115:
		tmp = a * (z * b)
	elif t <= 6.8e+128:
		tmp = t_1
	else:
		tmp = t * a
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(y * z))
	tmp = 0.0
	if (t <= -5200.0)
		tmp = Float64(t * a);
	elseif (t <= 4.8e-139)
		tmp = t_1;
	elseif (t <= 2.9e-115)
		tmp = Float64(a * Float64(z * b));
	elseif (t <= 6.8e+128)
		tmp = t_1;
	else
		tmp = Float64(t * a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (y * z);
	tmp = 0.0;
	if (t <= -5200.0)
		tmp = t * a;
	elseif (t <= 4.8e-139)
		tmp = t_1;
	elseif (t <= 2.9e-115)
		tmp = a * (z * b);
	elseif (t <= 6.8e+128)
		tmp = t_1;
	else
		tmp = t * a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5200.0], N[(t * a), $MachinePrecision], If[LessEqual[t, 4.8e-139], t$95$1, If[LessEqual[t, 2.9e-115], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e+128], t$95$1, N[(t * a), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + y \cdot z\\
\mathbf{if}\;t \leq -5200:\\
\;\;\;\;t \cdot a\\

\mathbf{elif}\;t \leq 4.8 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 6.8 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5200 or 6.7999999999999997e128 < t

    1. Initial program 86.9%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+86.9%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified88.2%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 63.8%

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

    if -5200 < t < 4.80000000000000029e-139 or 2.8999999999999998e-115 < t < 6.7999999999999997e128

    1. Initial program 89.2%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+89.2%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified91.8%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 69.9%

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

    if 4.80000000000000029e-139 < t < 2.8999999999999998e-115

    1. Initial program 77.3%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+77.3%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified77.4%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 88.7%

      \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
    6. Taylor expanded in t around 0 88.7%

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

        \[\leadsto a \cdot \color{blue}{\left(z \cdot b\right)} \]
    8. Simplified88.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5200:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-139}:\\ \;\;\;\;x + y \cdot z\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-115}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{+128}:\\ \;\;\;\;x + y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 99.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+34} \lor \neg \left(z \leq 10^{-6}\right):\\
\;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.00000000000000037e34 or 9.99999999999999955e-7 < z

    1. Initial program 75.0%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+75.0%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified79.3%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 93.4%

      \[\leadsto \color{blue}{z \cdot \left(y + \left(a \cdot b + \left(\frac{x}{z} + \frac{a \cdot t}{z}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. +-commutative93.4%

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

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

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

        \[\leadsto z \cdot \left(y + \left(\frac{x}{z} + \left(a \cdot b + \color{blue}{a \cdot \frac{t}{z}}\right)\right)\right) \]
      5. distribute-lft-out99.9%

        \[\leadsto z \cdot \left(y + \left(\frac{x}{z} + \color{blue}{a \cdot \left(b + \frac{t}{z}\right)}\right)\right) \]
    7. Simplified99.9%

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

    if -6.00000000000000037e34 < z < 9.99999999999999955e-7

    1. Initial program 100.0%

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

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification99.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+34} \lor \neg \left(z \leq 10^{-6}\right):\\ \;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot \left(z \cdot b\right) + t \cdot a\right) + \left(x + y \cdot z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 96.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.7 \cdot 10^{+215} \lor \neg \left(a \leq 1.45 \cdot 10^{+166}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.7e215

    1. Initial program 58.3%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+58.3%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. +-commutative58.3%

        \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      3. fma-define58.3%

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

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

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{\left(b \cdot z\right) \cdot a}\right) \]
      7. distribute-rgt-out89.5%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. *-commutative89.5%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{z \cdot b}\right) \]
    3. Simplified89.5%

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

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

    if -2.7e215 < a < 1.4500000000000001e166

    1. Initial program 91.9%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+91.9%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified92.1%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 98.5%

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

    if 1.4500000000000001e166 < a

    1. Initial program 78.8%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+78.8%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified89.2%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 79.2%

      \[\leadsto \color{blue}{x + \left(a \cdot t + z \cdot \left(y + a \cdot b\right)\right)} \]
    6. Taylor expanded in y around 0 89.5%

      \[\leadsto \color{blue}{x + \left(a \cdot t + a \cdot \left(b \cdot z\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutative89.5%

        \[\leadsto \color{blue}{\left(a \cdot t + a \cdot \left(b \cdot z\right)\right) + x} \]
      2. distribute-lft-in96.7%

        \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right)} + x \]
      3. +-commutative96.7%

        \[\leadsto a \cdot \color{blue}{\left(b \cdot z + t\right)} + x \]
    8. Simplified96.7%

      \[\leadsto \color{blue}{a \cdot \left(b \cdot z + t\right) + x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification98.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.7 \cdot 10^{+215} \lor \neg \left(a \leq 1.45 \cdot 10^{+166}\right):\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(t \cdot a + z \cdot \left(y + a \cdot b\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 95.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{+207}:\\ \;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{+164}:\\ \;\;\;\;x + \left(t \cdot a + z \cdot \left(y + a \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a -2.5e+207)
   (* z (+ y (+ (* a (+ b (/ t z))) (/ x z))))
   (if (<= a 9.2e+164)
     (+ x (+ (* t a) (* z (+ y (* a b)))))
     (+ x (* a (+ t (* z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -2.5e+207) {
		tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
	} else if (a <= 9.2e+164) {
		tmp = x + ((t * a) + (z * (y + (a * b))));
	} else {
		tmp = x + (a * (t + (z * b)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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) :: tmp
    if (a <= (-2.5d+207)) then
        tmp = z * (y + ((a * (b + (t / z))) + (x / z)))
    else if (a <= 9.2d+164) then
        tmp = x + ((t * a) + (z * (y + (a * b))))
    else
        tmp = x + (a * (t + (z * b)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -2.5e+207) {
		tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
	} else if (a <= 9.2e+164) {
		tmp = x + ((t * a) + (z * (y + (a * b))));
	} else {
		tmp = x + (a * (t + (z * b)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= -2.5e+207:
		tmp = z * (y + ((a * (b + (t / z))) + (x / z)))
	elif a <= 9.2e+164:
		tmp = x + ((t * a) + (z * (y + (a * b))))
	else:
		tmp = x + (a * (t + (z * b)))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= -2.5e+207)
		tmp = Float64(z * Float64(y + Float64(Float64(a * Float64(b + Float64(t / z))) + Float64(x / z))));
	elseif (a <= 9.2e+164)
		tmp = Float64(x + Float64(Float64(t * a) + Float64(z * Float64(y + Float64(a * b)))));
	else
		tmp = Float64(x + Float64(a * Float64(t + Float64(z * b))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (a <= -2.5e+207)
		tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
	elseif (a <= 9.2e+164)
		tmp = x + ((t * a) + (z * (y + (a * b))));
	else
		tmp = x + (a * (t + (z * b)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2.5e+207], N[(z * N[(y + N[(N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.2e+164], N[(x + N[(N[(t * a), $MachinePrecision] + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{+207}:\\
\;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\

\mathbf{elif}\;a \leq 9.2 \cdot 10^{+164}:\\
\;\;\;\;x + \left(t \cdot a + z \cdot \left(y + a \cdot b\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.5e207

    1. Initial program 54.9%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+54.9%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified68.2%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 59.1%

      \[\leadsto \color{blue}{z \cdot \left(y + \left(a \cdot b + \left(\frac{x}{z} + \frac{a \cdot t}{z}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. +-commutative59.1%

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

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

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

        \[\leadsto z \cdot \left(y + \left(\frac{x}{z} + \left(a \cdot b + \color{blue}{a \cdot \frac{t}{z}}\right)\right)\right) \]
      5. distribute-lft-out95.7%

        \[\leadsto z \cdot \left(y + \left(\frac{x}{z} + \color{blue}{a \cdot \left(b + \frac{t}{z}\right)}\right)\right) \]
    7. Simplified95.7%

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

    if -2.5e207 < a < 9.1999999999999998e164

    1. Initial program 92.8%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+92.8%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified92.5%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 98.5%

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

    if 9.1999999999999998e164 < a

    1. Initial program 78.8%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+78.8%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified89.2%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 79.2%

      \[\leadsto \color{blue}{x + \left(a \cdot t + z \cdot \left(y + a \cdot b\right)\right)} \]
    6. Taylor expanded in y around 0 89.5%

      \[\leadsto \color{blue}{x + \left(a \cdot t + a \cdot \left(b \cdot z\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutative89.5%

        \[\leadsto \color{blue}{\left(a \cdot t + a \cdot \left(b \cdot z\right)\right) + x} \]
      2. distribute-lft-in96.7%

        \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right)} + x \]
      3. +-commutative96.7%

        \[\leadsto a \cdot \color{blue}{\left(b \cdot z + t\right)} + x \]
    8. Simplified96.7%

      \[\leadsto \color{blue}{a \cdot \left(b \cdot z + t\right) + x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification98.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{+207}:\\ \;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{+164}:\\ \;\;\;\;x + \left(t \cdot a + z \cdot \left(y + a \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 85.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.16 \cdot 10^{+35} \lor \neg \left(b \leq 6.2 \cdot 10^{+100}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.1600000000000001e35

    1. Initial program 91.2%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+91.2%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. +-commutative91.2%

        \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      3. fma-define91.2%

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

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

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{\left(b \cdot z\right) \cdot a}\right) \]
      7. distribute-rgt-out85.1%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. *-commutative85.1%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{z \cdot b}\right) \]
    3. Simplified85.1%

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

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

    if -1.1600000000000001e35 < b < 6.20000000000000014e100

    1. Initial program 87.8%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+87.8%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified96.2%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in b around 0 93.9%

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

    if 6.20000000000000014e100 < b

    1. Initial program 83.7%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+83.7%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified73.3%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 76.2%

      \[\leadsto \color{blue}{x + \left(a \cdot t + z \cdot \left(y + a \cdot b\right)\right)} \]
    6. Taylor expanded in y around 0 73.5%

      \[\leadsto \color{blue}{x + \left(a \cdot t + a \cdot \left(b \cdot z\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutative73.5%

        \[\leadsto \color{blue}{\left(a \cdot t + a \cdot \left(b \cdot z\right)\right) + x} \]
      2. distribute-lft-in87.0%

        \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right)} + x \]
      3. +-commutative87.0%

        \[\leadsto a \cdot \color{blue}{\left(b \cdot z + t\right)} + x \]
    8. Simplified87.0%

      \[\leadsto \color{blue}{a \cdot \left(b \cdot z + t\right) + x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification90.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.16 \cdot 10^{+35} \lor \neg \left(b \leq 6.2 \cdot 10^{+100}\right):\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 85.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.65 \cdot 10^{+32} \lor \neg \left(b \leq 7 \cdot 10^{+100}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.6500000000000001e32 or 6.99999999999999953e100 < b

    1. Initial program 88.3%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+88.3%

        \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right)} \]
      2. +-commutative88.3%

        \[\leadsto \color{blue}{\left(y \cdot z + x\right)} + \left(t \cdot a + \left(a \cdot z\right) \cdot b\right) \]
      3. fma-define88.3%

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

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      6. *-commutative79.5%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{\left(b \cdot z\right) \cdot a}\right) \]
      7. distribute-rgt-out84.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. *-commutative84.7%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{z \cdot b}\right) \]
    3. Simplified84.7%

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

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

    if -1.6500000000000001e32 < b < 6.99999999999999953e100

    1. Initial program 87.8%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+87.8%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified96.2%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in b around 0 93.9%

      \[\leadsto \color{blue}{x + \left(a \cdot t + y \cdot z\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification90.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.65 \cdot 10^{+32} \lor \neg \left(b \leq 7 \cdot 10^{+100}\right):\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 82.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.65 \cdot 10^{-129} \lor \neg \left(a \leq 5.8 \cdot 10^{-61}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.64999999999999987e-129 or 5.7999999999999999e-61 < a

    1. Initial program 82.4%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+82.4%

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

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

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
      5. *-commutative88.6%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      6. *-commutative88.6%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + \color{blue}{\left(b \cdot z\right) \cdot a}\right) \]
      7. distribute-rgt-out92.1%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. *-commutative92.1%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{z \cdot b}\right) \]
    3. Simplified92.1%

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

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

    if -2.64999999999999987e-129 < a < 5.7999999999999999e-61

    1. Initial program 99.9%

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

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified93.0%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 99.9%

      \[\leadsto \color{blue}{x + \left(a \cdot t + z \cdot \left(y + a \cdot b\right)\right)} \]
    6. Taylor expanded in a around 0 82.4%

      \[\leadsto \color{blue}{x + y \cdot z} \]
    7. Step-by-step derivation
      1. *-commutative82.4%

        \[\leadsto x + \color{blue}{z \cdot y} \]
    8. Simplified82.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.65 \cdot 10^{-129} \lor \neg \left(a \leq 5.8 \cdot 10^{-61}\right):\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot z\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 85.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.6 \cdot 10^{+60}:\\ \;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\ \mathbf{elif}\;b \leq 9.2 \cdot 10^{+101}:\\ \;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= b -3.6e+60)
   (+ x (* z (+ y (* a b))))
   (if (<= b 9.2e+101) (+ x (+ (* t a) (* y z))) (+ x (* a (+ t (* z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -3.6e+60) {
		tmp = x + (z * (y + (a * b)));
	} else if (b <= 9.2e+101) {
		tmp = x + ((t * a) + (y * z));
	} else {
		tmp = x + (a * (t + (z * b)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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) :: tmp
    if (b <= (-3.6d+60)) then
        tmp = x + (z * (y + (a * b)))
    else if (b <= 9.2d+101) then
        tmp = x + ((t * a) + (y * z))
    else
        tmp = x + (a * (t + (z * b)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -3.6e+60) {
		tmp = x + (z * (y + (a * b)));
	} else if (b <= 9.2e+101) {
		tmp = x + ((t * a) + (y * z));
	} else {
		tmp = x + (a * (t + (z * b)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if b <= -3.6e+60:
		tmp = x + (z * (y + (a * b)))
	elif b <= 9.2e+101:
		tmp = x + ((t * a) + (y * z))
	else:
		tmp = x + (a * (t + (z * b)))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (b <= -3.6e+60)
		tmp = Float64(x + Float64(z * Float64(y + Float64(a * b))));
	elseif (b <= 9.2e+101)
		tmp = Float64(x + Float64(Float64(t * a) + Float64(y * z)));
	else
		tmp = Float64(x + Float64(a * Float64(t + Float64(z * b))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (b <= -3.6e+60)
		tmp = x + (z * (y + (a * b)));
	elseif (b <= 9.2e+101)
		tmp = x + ((t * a) + (y * z));
	else
		tmp = x + (a * (t + (z * b)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.6e+60], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.2e+101], N[(x + N[(N[(t * a), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq 9.2 \cdot 10^{+101}:\\
\;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\

\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.59999999999999968e60

    1. Initial program 90.2%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+90.2%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified81.4%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 70.5%

      \[\leadsto \color{blue}{x + \left(a \cdot \left(b \cdot z\right) + y \cdot z\right)} \]
    6. Step-by-step derivation
      1. +-commutative70.5%

        \[\leadsto \color{blue}{\left(a \cdot \left(b \cdot z\right) + y \cdot z\right) + x} \]
      2. +-commutative70.5%

        \[\leadsto \color{blue}{\left(y \cdot z + a \cdot \left(b \cdot z\right)\right)} + x \]
      3. associate-*r*79.3%

        \[\leadsto \left(y \cdot z + \color{blue}{\left(a \cdot b\right) \cdot z}\right) + x \]
      4. distribute-rgt-in87.0%

        \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} + x \]
    7. Simplified87.0%

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

    if -3.59999999999999968e60 < b < 9.2000000000000005e101

    1. Initial program 88.3%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+88.3%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified96.4%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in b around 0 94.1%

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

    if 9.2000000000000005e101 < b

    1. Initial program 83.7%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+83.7%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified73.3%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 76.2%

      \[\leadsto \color{blue}{x + \left(a \cdot t + z \cdot \left(y + a \cdot b\right)\right)} \]
    6. Taylor expanded in y around 0 73.5%

      \[\leadsto \color{blue}{x + \left(a \cdot t + a \cdot \left(b \cdot z\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutative73.5%

        \[\leadsto \color{blue}{\left(a \cdot t + a \cdot \left(b \cdot z\right)\right) + x} \]
      2. distribute-lft-in87.0%

        \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right)} + x \]
      3. +-commutative87.0%

        \[\leadsto a \cdot \color{blue}{\left(b \cdot z + t\right)} + x \]
    8. Simplified87.0%

      \[\leadsto \color{blue}{a \cdot \left(b \cdot z + t\right) + x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification91.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.6 \cdot 10^{+60}:\\ \;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\ \mathbf{elif}\;b \leq 9.2 \cdot 10^{+101}:\\ \;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 74.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.7 \cdot 10^{+71} \lor \neg \left(a \leq 1.05 \cdot 10^{+29}\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.7e71 or 1.0500000000000001e29 < a

    1. Initial program 75.1%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+75.1%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified86.9%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 79.1%

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

    if -3.7e71 < a < 1.0500000000000001e29

    1. Initial program 98.5%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+98.5%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified92.5%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 99.9%

      \[\leadsto \color{blue}{x + \left(a \cdot t + z \cdot \left(y + a \cdot b\right)\right)} \]
    6. Taylor expanded in a around 0 72.0%

      \[\leadsto \color{blue}{x + y \cdot z} \]
    7. Step-by-step derivation
      1. *-commutative72.0%

        \[\leadsto x + \color{blue}{z \cdot y} \]
    8. Simplified72.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.7 \cdot 10^{+71} \lor \neg \left(a \leq 1.05 \cdot 10^{+29}\right):\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot z\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 38.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3700 \lor \neg \left(t \leq 2.5 \cdot 10^{-31}\right):\\
\;\;\;\;t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3700 or 2.5e-31 < t

    1. Initial program 87.9%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+87.9%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified88.9%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 51.8%

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

    if -3700 < t < 2.5e-31

    1. Initial program 88.1%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. associate-+l+88.1%

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified91.2%

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 37.1%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification44.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3700 \lor \neg \left(t \leq 2.5 \cdot 10^{-31}\right):\\ \;\;\;\;t \cdot a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 25.7% accurate, 15.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
real(8) function code(x, y, z, t, a, b)
    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
    code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
def code(x, y, z, t, a, b):
	return x
function code(x, y, z, t, a, b)
	return x
end
function tmp = code(x, y, z, t, a, b)
	tmp = x;
end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 88.0%

    \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
  2. Step-by-step derivation
    1. associate-+l+88.0%

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

      \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
  3. Simplified90.0%

    \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in x around inf 24.9%

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer target: 97.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(b \cdot a + y\right) + \left(x + t \cdot a\right)\\ \mathbf{if}\;z < -11820553527347888000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z < 4.7589743188364287 \cdot 10^{-122}:\\ \;\;\;\;\left(b \cdot z + t\right) \cdot a + \left(z \cdot y + x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (* z (+ (* b a) y)) (+ x (* t a)))))
   (if (< z -11820553527347888000.0)
     t_1
     (if (< z 4.7589743188364287e-122)
       (+ (* (+ (* b z) t) a) (+ (* z y) x))
       t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z * ((b * a) + y)) + (x + (t * a));
	double tmp;
	if (z < -11820553527347888000.0) {
		tmp = t_1;
	} else if (z < 4.7589743188364287e-122) {
		tmp = (((b * z) + t) * a) + ((z * y) + x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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) :: t_1
    real(8) :: tmp
    t_1 = (z * ((b * a) + y)) + (x + (t * a))
    if (z < (-11820553527347888000.0d0)) then
        tmp = t_1
    else if (z < 4.7589743188364287d-122) then
        tmp = (((b * z) + t) * a) + ((z * y) + x)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z * ((b * a) + y)) + (x + (t * a));
	double tmp;
	if (z < -11820553527347888000.0) {
		tmp = t_1;
	} else if (z < 4.7589743188364287e-122) {
		tmp = (((b * z) + t) * a) + ((z * y) + x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z * ((b * a) + y)) + (x + (t * a))
	tmp = 0
	if z < -11820553527347888000.0:
		tmp = t_1
	elif z < 4.7589743188364287e-122:
		tmp = (((b * z) + t) * a) + ((z * y) + x)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z * Float64(Float64(b * a) + y)) + Float64(x + Float64(t * a)))
	tmp = 0.0
	if (z < -11820553527347888000.0)
		tmp = t_1;
	elseif (z < 4.7589743188364287e-122)
		tmp = Float64(Float64(Float64(Float64(b * z) + t) * a) + Float64(Float64(z * y) + x));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z * ((b * a) + y)) + (x + (t * a));
	tmp = 0.0;
	if (z < -11820553527347888000.0)
		tmp = t_1;
	elseif (z < 4.7589743188364287e-122)
		tmp = (((b * z) + t) * a) + ((z * y) + x);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(N[(b * a), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -11820553527347888000.0], t$95$1, If[Less[z, 4.7589743188364287e-122], N[(N[(N[(N[(b * z), $MachinePrecision] + t), $MachinePrecision] * a), $MachinePrecision] + N[(N[(z * y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z \cdot \left(b \cdot a + y\right) + \left(x + t \cdot a\right)\\
\mathbf{if}\;z < -11820553527347888000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z < 4.7589743188364287 \cdot 10^{-122}:\\
\;\;\;\;\left(b \cdot z + t\right) \cdot a + \left(z \cdot y + x\right)\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024103 
(FPCore (x y z t a b)
  :name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
  :precision binary64

  :alt
  (if (< z -11820553527347888000.0) (+ (* z (+ (* b a) y)) (+ x (* t a))) (if (< z 4.7589743188364287e-122) (+ (* (+ (* b z) t) a) (+ (* z y) x)) (+ (* z (+ (* b a) y)) (+ x (* t a)))))

  (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))