Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1

Percentage Accurate: 92.2% → 99.4%
Time: 14.9s
Alternatives: 14
Speedup: 0.6×

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 14 alternatives:

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

Initial Program: 92.2% 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.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5e19 or 7.0000000000000001e-12 < z

    1. Initial program 81.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+81.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 z around inf 92.5%

      \[\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. +-commutative92.5%

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

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

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

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

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

    if -5e19 < z < 7.0000000000000001e-12

    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*99.9%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified99.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
  3. Recombined 2 regimes into one program.
  4. Final simplification99.9%

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

Alternative 2: 97.8% accurate, 0.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;z \cdot \left(y + a \cdot \left(b + \frac{t}{z}\right)\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)) < +inf.0

    1. Initial program 98.3%

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

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

    1. Initial program 0.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+0.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*5.3%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified5.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 57.9%

      \[\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. +-commutative57.9%

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

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

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

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

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

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

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

Alternative 3: 64.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + t \cdot a\\ \mathbf{if}\;a \leq -2.6 \cdot 10^{+142}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{+110}:\\ \;\;\;\;\left(z \cdot a\right) \cdot b\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-31} \lor \neg \left(a \leq 2.5 \cdot 10^{+15}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* t a))))
   (if (<= a -2.6e+142)
     t_1
     (if (<= a -3.8e+110)
       (* (* z a) b)
       (if (or (<= a -6.5e-31) (not (<= a 2.5e+15))) t_1 (+ x (* y z)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (t * a);
	double tmp;
	if (a <= -2.6e+142) {
		tmp = t_1;
	} else if (a <= -3.8e+110) {
		tmp = (z * a) * b;
	} else if ((a <= -6.5e-31) || !(a <= 2.5e+15)) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = x + (t * a)
    if (a <= (-2.6d+142)) then
        tmp = t_1
    else if (a <= (-3.8d+110)) then
        tmp = (z * a) * b
    else if ((a <= (-6.5d-31)) .or. (.not. (a <= 2.5d+15))) then
        tmp = t_1
    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 t_1 = x + (t * a);
	double tmp;
	if (a <= -2.6e+142) {
		tmp = t_1;
	} else if (a <= -3.8e+110) {
		tmp = (z * a) * b;
	} else if ((a <= -6.5e-31) || !(a <= 2.5e+15)) {
		tmp = t_1;
	} else {
		tmp = x + (y * z);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (t * a)
	tmp = 0
	if a <= -2.6e+142:
		tmp = t_1
	elif a <= -3.8e+110:
		tmp = (z * a) * b
	elif (a <= -6.5e-31) or not (a <= 2.5e+15):
		tmp = t_1
	else:
		tmp = x + (y * z)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(t * a))
	tmp = 0.0
	if (a <= -2.6e+142)
		tmp = t_1;
	elseif (a <= -3.8e+110)
		tmp = Float64(Float64(z * a) * b);
	elseif ((a <= -6.5e-31) || !(a <= 2.5e+15))
		tmp = t_1;
	else
		tmp = Float64(x + Float64(y * z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (t * a);
	tmp = 0.0;
	if (a <= -2.6e+142)
		tmp = t_1;
	elseif (a <= -3.8e+110)
		tmp = (z * a) * b;
	elseif ((a <= -6.5e-31) || ~((a <= 2.5e+15)))
		tmp = t_1;
	else
		tmp = x + (y * z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.6e+142], t$95$1, If[LessEqual[a, -3.8e+110], N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision], If[Or[LessEqual[a, -6.5e-31], N[Not[LessEqual[a, 2.5e+15]], $MachinePrecision]], t$95$1, N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + t \cdot a\\
\mathbf{if}\;a \leq -2.6 \cdot 10^{+142}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -3.8 \cdot 10^{+110}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\

\mathbf{elif}\;a \leq -6.5 \cdot 10^{-31} \lor \neg \left(a \leq 2.5 \cdot 10^{+15}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.60000000000000021e142 or -3.79999999999999989e110 < a < -6.49999999999999967e-31 or 2.5e15 < a

    1. Initial program 82.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+82.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*86.8%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified86.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 61.4%

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

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

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

    if -2.60000000000000021e142 < a < -3.79999999999999989e110

    1. Initial program 90.0%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 61.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(a \cdot b\right) \cdot z} \]
      2. *-commutative80.3%

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

        \[\leadsto \color{blue}{b \cdot \left(a \cdot z\right)} \]
    9. Simplified80.3%

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

    if -6.49999999999999967e-31 < a < 2.5e15

    1. Initial program 99.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+99.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.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 a around 0 83.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.6 \cdot 10^{+142}:\\ \;\;\;\;x + t \cdot a\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{+110}:\\ \;\;\;\;\left(z \cdot a\right) \cdot b\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-31} \lor \neg \left(a \leq 2.5 \cdot 10^{+15}\right):\\ \;\;\;\;x + t \cdot a\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot z\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 38.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{-32}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\

\mathbf{elif}\;z \leq 9 \cdot 10^{-291}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 3.7 \cdot 10^{-122}:\\
\;\;\;\;t \cdot a\\

\mathbf{elif}\;z \leq 2.4 \cdot 10^{+122}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.49999999999999988e-32

    1. Initial program 86.3%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 77.7%

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(a \cdot \frac{t}{x} + \color{blue}{a \cdot \frac{b \cdot z}{x}}\right) + \left(\frac{y \cdot z}{x} + 1\right)\right) \]
      6. distribute-lft-out70.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{b \cdot \left(a \cdot z\right)} \]
    9. Simplified45.6%

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

    if -6.49999999999999988e-32 < z < 8.99999999999999948e-291 or 3.6999999999999997e-122 < z < 2.4000000000000002e122

    1. Initial program 99.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+99.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*97.5%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified97.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 x around inf 49.1%

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

    if 8.99999999999999948e-291 < z < 3.6999999999999997e-122

    1. Initial program 99.8%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 89.8%

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

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

    if 2.4000000000000002e122 < z

    1. Initial program 62.3%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 56.7%

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(a \cdot \frac{t}{x} + \color{blue}{a \cdot \frac{b \cdot z}{x}}\right) + \left(\frac{y \cdot z}{x} + 1\right)\right) \]
      6. distribute-lft-out68.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{-32}:\\ \;\;\;\;\left(z \cdot a\right) \cdot b\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-291}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-122}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+122}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 37.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(z \cdot b\right)\\
\mathbf{if}\;z \leq -8 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.45 \cdot 10^{-289}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 3.9 \cdot 10^{-122}:\\
\;\;\;\;t \cdot a\\

\mathbf{elif}\;z \leq 2.4 \cdot 10^{+122}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.000000000000001e-31 or 2.4000000000000002e122 < z

    1. Initial program 78.2%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 70.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.000000000000001e-31 < z < 1.45000000000000003e-289 or 3.8999999999999999e-122 < z < 2.4000000000000002e122

    1. Initial program 99.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+99.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*97.5%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified97.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 x around inf 49.1%

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

    if 1.45000000000000003e-289 < z < 3.8999999999999999e-122

    1. Initial program 99.8%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 89.8%

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

      \[\leadsto \color{blue}{a \cdot t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification50.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{-31}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-289}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-122}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+122}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 94.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.50000000000000014e-59 or 5.4999999999999998e-82 < z

    1. Initial program 84.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+84.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*81.7%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified81.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 inf 91.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. +-commutative91.4%

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

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

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

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

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

    if -5.50000000000000014e-59 < z < 5.4999999999999998e-82

    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*99.9%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified99.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 94.0%

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

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

Alternative 7: 87.9% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.45e-12

    1. Initial program 85.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+85.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*75.1%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified75.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 inf 95.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. +-commutative95.1%

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

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

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

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

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

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

    if -3.45e-12 < z < 1.35e9

    1. Initial program 99.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+99.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*99.2%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified99.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 90.0%

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

    if 1.35e9 < z

    1. Initial program 77.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+77.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*81.2%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified81.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 93.0%

      \[\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.0%

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

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

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

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

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

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

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

Alternative 8: 59.4% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -9.2 \cdot 10^{+36}:\\
\;\;\;\;t \cdot a\\

\mathbf{elif}\;a \leq 4.6 \cdot 10^{+129}:\\
\;\;\;\;x + y \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.99999999999999991e108 or 4.59999999999999981e129 < a

    1. Initial program 78.5%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 65.1%

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(a \cdot \frac{t}{x} + \color{blue}{a \cdot \frac{b \cdot z}{x}}\right) + \left(\frac{y \cdot z}{x} + 1\right)\right) \]
      6. distribute-lft-out77.4%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(a \cdot b\right) \cdot z} \]
      2. *-commutative53.2%

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

        \[\leadsto \color{blue}{b \cdot \left(a \cdot z\right)} \]
    9. Simplified55.1%

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

    if -4.99999999999999991e108 < a < -9.19999999999999986e36

    1. Initial program 83.7%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 73.0%

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

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

    if -9.19999999999999986e36 < a < 4.59999999999999981e129

    1. Initial program 98.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+98.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*92.7%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified92.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 a around 0 74.1%

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

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

Alternative 9: 87.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.5 \cdot 10^{+59} \lor \neg \left(a \leq 9.8 \cdot 10^{+14}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.50000000000000023e59 or 9.8e14 < a

    1. Initial program 80.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+80.0%

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

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

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

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

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

        \[\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.3%

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

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

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

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

    if -9.50000000000000023e59 < a < 9.8e14

    1. Initial program 98.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+98.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*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 t around inf 89.8%

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

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

Alternative 10: 83.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.7 \cdot 10^{-86} \lor \neg \left(a \leq 3.2 \cdot 10^{-51}\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.7e-86) (not (<= a 3.2e-51)))
   (+ 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.7e-86) || !(a <= 3.2e-51)) {
		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.7d-86)) .or. (.not. (a <= 3.2d-51))) 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.7e-86) || !(a <= 3.2e-51)) {
		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.7e-86) or not (a <= 3.2e-51):
		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.7e-86) || !(a <= 3.2e-51))
		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.7e-86) || ~((a <= 3.2e-51)))
		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.7e-86], N[Not[LessEqual[a, 3.2e-51]], $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.7 \cdot 10^{-86} \lor \neg \left(a \leq 3.2 \cdot 10^{-51}\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.69999999999999992e-86 or 3.2e-51 < a

    1. Initial program 85.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+85.9%

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

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

        \[\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.4%

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \left(t \cdot a + a \cdot \color{blue}{\left(b \cdot z\right)}\right) \]
      6. *-commutative88.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-out94.2%

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

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

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

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

    if -2.69999999999999992e-86 < a < 3.2e-51

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified90.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 0 90.1%

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

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

Alternative 11: 39.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -5.2 \cdot 10^{+34}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.62 \cdot 10^{-257}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;x \leq 880000000000:\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= x -5.2e+34)
   x
   (if (<= x -1.62e-257) (* t a) (if (<= x 880000000000.0) (* y z) x))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -5.2e+34) {
		tmp = x;
	} else if (x <= -1.62e-257) {
		tmp = t * a;
	} else if (x <= 880000000000.0) {
		tmp = y * z;
	} 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 (x <= (-5.2d+34)) then
        tmp = x
    else if (x <= (-1.62d-257)) then
        tmp = t * a
    else if (x <= 880000000000.0d0) then
        tmp = y * z
    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 (x <= -5.2e+34) {
		tmp = x;
	} else if (x <= -1.62e-257) {
		tmp = t * a;
	} else if (x <= 880000000000.0) {
		tmp = y * z;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if x <= -5.2e+34:
		tmp = x
	elif x <= -1.62e-257:
		tmp = t * a
	elif x <= 880000000000.0:
		tmp = y * z
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (x <= -5.2e+34)
		tmp = x;
	elseif (x <= -1.62e-257)
		tmp = Float64(t * a);
	elseif (x <= 880000000000.0)
		tmp = Float64(y * z);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (x <= -5.2e+34)
		tmp = x;
	elseif (x <= -1.62e-257)
		tmp = t * a;
	elseif (x <= 880000000000.0)
		tmp = y * z;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -5.2e+34], x, If[LessEqual[x, -1.62e-257], N[(t * a), $MachinePrecision], If[LessEqual[x, 880000000000.0], N[(y * z), $MachinePrecision], x]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{+34}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq -1.62 \cdot 10^{-257}:\\
\;\;\;\;t \cdot a\\

\mathbf{elif}\;x \leq 880000000000:\\
\;\;\;\;y \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -5.19999999999999995e34 or 8.8e11 < x

    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*87.4%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified87.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 x around inf 51.6%

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

    if -5.19999999999999995e34 < x < -1.6200000000000001e-257

    1. Initial program 94.5%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 94.5%

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

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

    if -1.6200000000000001e-257 < x < 8.8e11

    1. Initial program 90.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+90.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*90.9%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified90.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 y around inf 41.6%

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

        \[\leadsto \color{blue}{z \cdot y} \]
    7. Simplified41.6%

      \[\leadsto \color{blue}{z \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification46.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.2 \cdot 10^{+34}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.62 \cdot 10^{-257}:\\ \;\;\;\;t \cdot a\\ \mathbf{elif}\;x \leq 880000000000:\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 75.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -5.6 \cdot 10^{-40} \lor \neg \left(a \leq 1.2 \cdot 10^{-38}\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 -5.6e-40) (not (<= a 1.2e-38)))
   (* 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 <= -5.6e-40) || !(a <= 1.2e-38)) {
		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 <= (-5.6d-40)) .or. (.not. (a <= 1.2d-38))) 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 <= -5.6e-40) || !(a <= 1.2e-38)) {
		tmp = a * (t + (z * b));
	} else {
		tmp = x + (y * z);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (a <= -5.6e-40) or not (a <= 1.2e-38):
		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 <= -5.6e-40) || !(a <= 1.2e-38))
		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 <= -5.6e-40) || ~((a <= 1.2e-38)))
		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, -5.6e-40], N[Not[LessEqual[a, 1.2e-38]], $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 -5.6 \cdot 10^{-40} \lor \neg \left(a \leq 1.2 \cdot 10^{-38}\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 < -5.5999999999999999e-40 or 1.20000000000000011e-38 < a

    1. Initial program 84.8%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 75.5%

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

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

        \[\leadsto a \cdot \color{blue}{\left(b \cdot z + t\right)} \]
      2. *-commutative75.8%

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

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

    if -5.5999999999999999e-40 < a < 1.20000000000000011e-38

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

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified91.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 0 88.2%

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

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

Alternative 13: 39.9% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{+73} \lor \neg \left(t \leq 13.6\right):\\
\;\;\;\;t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.00000000000000004e73 or 13.5999999999999996 < t

    1. Initial program 85.9%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 77.8%

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

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

    if -7.00000000000000004e73 < t < 13.5999999999999996

    1. Initial program 94.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+94.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*92.8%

        \[\leadsto \left(x + y \cdot z\right) + \left(t \cdot a + \color{blue}{a \cdot \left(z \cdot b\right)}\right) \]
    3. Simplified92.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 40.7%

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

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

Alternative 14: 27.1% 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 91.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+91.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*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 x around inf 31.8%

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

Developer target: 97.1% 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 2024110 
(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)))