Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1

Percentage Accurate: 92.6% → 99.7%
Time: 12.2s
Alternatives: 15
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 15 alternatives:

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

Initial Program: 92.6% 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.7% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{+67} \lor \neg \left(z \leq 4 \cdot 10^{+46}\right):\\ \;\;\;\;z \cdot \left(y + \left(\frac{x}{z} + a \cdot \left(b + \frac{t}{z}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= z -5e+67) (not (<= z 4e+46)))
   (* z (+ y (+ (/ x z) (* a (+ b (/ t z))))))
   (+ (fma y z x) (* a (+ t (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((z <= -5e+67) || !(z <= 4e+46)) {
		tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
	} else {
		tmp = fma(y, z, x) + (a * (t + (z * b)));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((z <= -5e+67) || !(z <= 4e+46))
		tmp = Float64(z * Float64(y + Float64(Float64(x / z) + Float64(a * Float64(b + Float64(t / z))))));
	else
		tmp = Float64(fma(y, z, x) + Float64(a * Float64(t + Float64(z * b))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5e+67], N[Not[LessEqual[z, 4e+46]], $MachinePrecision]], N[(z * N[(y + N[(N[(x / z), $MachinePrecision] + N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * z + x), $MachinePrecision] + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.99999999999999976e67 or 4e46 < z

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999976e67 < z < 4e46

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
      8. remove-double-neg100.0%

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{z \cdot b}\right)\right)\right) \]
      10. distribute-lft-neg-out100.0%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\color{blue}{\left(-z\right) \cdot b}\right)\right) \]
      11. sub-neg100.0%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t - \left(-z\right) \cdot b\right)} \]
      12. sub-neg100.0%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t + \left(-\left(-z\right) \cdot b\right)\right)} \]
      13. distribute-lft-neg-out100.0%

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \left(-\left(-\color{blue}{b \cdot z}\right)\right)\right) \]
      15. remove-double-neg100.0%

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

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

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

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

Alternative 2: 38.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(z \cdot a\right)\\ \mathbf{if}\;b \leq -1.05 \cdot 10^{+75}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -3.8 \cdot 10^{-144}:\\ \;\;\;\;x\\ \mathbf{elif}\;b \leq -4.5 \cdot 10^{-249}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;b \leq -1.28 \cdot 10^{-307}:\\ \;\;\;\;x\\ \mathbf{elif}\;b \leq 1.1 \cdot 10^{-86}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{+121}:\\ \;\;\;\;a \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (* z a))))
   (if (<= b -1.05e+75)
     t_1
     (if (<= b -3.8e-144)
       x
       (if (<= b -4.5e-249)
         (* z y)
         (if (<= b -1.28e-307)
           x
           (if (<= b 1.1e-86) (* z y) (if (<= b 2.2e+121) (* a t) t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (z * a);
	double tmp;
	if (b <= -1.05e+75) {
		tmp = t_1;
	} else if (b <= -3.8e-144) {
		tmp = x;
	} else if (b <= -4.5e-249) {
		tmp = z * y;
	} else if (b <= -1.28e-307) {
		tmp = x;
	} else if (b <= 1.1e-86) {
		tmp = z * y;
	} else if (b <= 2.2e+121) {
		tmp = a * t;
	} 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 = b * (z * a)
    if (b <= (-1.05d+75)) then
        tmp = t_1
    else if (b <= (-3.8d-144)) then
        tmp = x
    else if (b <= (-4.5d-249)) then
        tmp = z * y
    else if (b <= (-1.28d-307)) then
        tmp = x
    else if (b <= 1.1d-86) then
        tmp = z * y
    else if (b <= 2.2d+121) then
        tmp = a * t
    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 = b * (z * a);
	double tmp;
	if (b <= -1.05e+75) {
		tmp = t_1;
	} else if (b <= -3.8e-144) {
		tmp = x;
	} else if (b <= -4.5e-249) {
		tmp = z * y;
	} else if (b <= -1.28e-307) {
		tmp = x;
	} else if (b <= 1.1e-86) {
		tmp = z * y;
	} else if (b <= 2.2e+121) {
		tmp = a * t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b * (z * a)
	tmp = 0
	if b <= -1.05e+75:
		tmp = t_1
	elif b <= -3.8e-144:
		tmp = x
	elif b <= -4.5e-249:
		tmp = z * y
	elif b <= -1.28e-307:
		tmp = x
	elif b <= 1.1e-86:
		tmp = z * y
	elif b <= 2.2e+121:
		tmp = a * t
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(z * a))
	tmp = 0.0
	if (b <= -1.05e+75)
		tmp = t_1;
	elseif (b <= -3.8e-144)
		tmp = x;
	elseif (b <= -4.5e-249)
		tmp = Float64(z * y);
	elseif (b <= -1.28e-307)
		tmp = x;
	elseif (b <= 1.1e-86)
		tmp = Float64(z * y);
	elseif (b <= 2.2e+121)
		tmp = Float64(a * t);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = b * (z * a);
	tmp = 0.0;
	if (b <= -1.05e+75)
		tmp = t_1;
	elseif (b <= -3.8e-144)
		tmp = x;
	elseif (b <= -4.5e-249)
		tmp = z * y;
	elseif (b <= -1.28e-307)
		tmp = x;
	elseif (b <= 1.1e-86)
		tmp = z * y;
	elseif (b <= 2.2e+121)
		tmp = a * t;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.05e+75], t$95$1, If[LessEqual[b, -3.8e-144], x, If[LessEqual[b, -4.5e-249], N[(z * y), $MachinePrecision], If[LessEqual[b, -1.28e-307], x, If[LessEqual[b, 1.1e-86], N[(z * y), $MachinePrecision], If[LessEqual[b, 2.2e+121], N[(a * t), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -3.8 \cdot 10^{-144}:\\
\;\;\;\;x\\

\mathbf{elif}\;b \leq -4.5 \cdot 10^{-249}:\\
\;\;\;\;z \cdot y\\

\mathbf{elif}\;b \leq -1.28 \cdot 10^{-307}:\\
\;\;\;\;x\\

\mathbf{elif}\;b \leq 1.1 \cdot 10^{-86}:\\
\;\;\;\;z \cdot y\\

\mathbf{elif}\;b \leq 2.2 \cdot 10^{+121}:\\
\;\;\;\;a \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.04999999999999999e75 or 2.20000000000000001e121 < b

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

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

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

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

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

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

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

    if -1.04999999999999999e75 < b < -3.79999999999999993e-144 or -4.49999999999999981e-249 < b < -1.28e-307

    1. Initial program 90.2%

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

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

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

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

    if -3.79999999999999993e-144 < b < -4.49999999999999981e-249 or -1.28e-307 < b < 1.1000000000000001e-86

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

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

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

        \[\leadsto \color{blue}{z \cdot y} \]
    7. Simplified57.1%

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

    if 1.1000000000000001e-86 < b < 2.20000000000000001e121

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.05 \cdot 10^{+75}:\\ \;\;\;\;b \cdot \left(z \cdot a\right)\\ \mathbf{elif}\;b \leq -3.8 \cdot 10^{-144}:\\ \;\;\;\;x\\ \mathbf{elif}\;b \leq -4.5 \cdot 10^{-249}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;b \leq -1.28 \cdot 10^{-307}:\\ \;\;\;\;x\\ \mathbf{elif}\;b \leq 1.1 \cdot 10^{-86}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{+121}:\\ \;\;\;\;a \cdot t\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(z \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 98.2% accurate, 0.4× speedup?

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

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

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

    1. Initial program 98.5%

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

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

    1. Initial program 62.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+62.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*70.2%

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

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

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

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

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

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

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

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

Alternative 4: 39.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4.2 \cdot 10^{+64}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -2 \cdot 10^{-225}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;x \leq -2 \cdot 10^{-298}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{-188}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;x \leq 2.45 \cdot 10^{-141}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;x \leq 2.35 \cdot 10^{+154}:\\ \;\;\;\;z \cdot y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= x -4.2e+64)
   x
   (if (<= x -2e-225)
     (* z y)
     (if (<= x -2e-298)
       (* a t)
       (if (<= x 1.6e-188)
         (* z y)
         (if (<= x 2.45e-141) (* a t) (if (<= x 2.35e+154) (* z y) x)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -4.2e+64) {
		tmp = x;
	} else if (x <= -2e-225) {
		tmp = z * y;
	} else if (x <= -2e-298) {
		tmp = a * t;
	} else if (x <= 1.6e-188) {
		tmp = z * y;
	} else if (x <= 2.45e-141) {
		tmp = a * t;
	} else if (x <= 2.35e+154) {
		tmp = z * y;
	} 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 <= (-4.2d+64)) then
        tmp = x
    else if (x <= (-2d-225)) then
        tmp = z * y
    else if (x <= (-2d-298)) then
        tmp = a * t
    else if (x <= 1.6d-188) then
        tmp = z * y
    else if (x <= 2.45d-141) then
        tmp = a * t
    else if (x <= 2.35d+154) then
        tmp = z * y
    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 <= -4.2e+64) {
		tmp = x;
	} else if (x <= -2e-225) {
		tmp = z * y;
	} else if (x <= -2e-298) {
		tmp = a * t;
	} else if (x <= 1.6e-188) {
		tmp = z * y;
	} else if (x <= 2.45e-141) {
		tmp = a * t;
	} else if (x <= 2.35e+154) {
		tmp = z * y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if x <= -4.2e+64:
		tmp = x
	elif x <= -2e-225:
		tmp = z * y
	elif x <= -2e-298:
		tmp = a * t
	elif x <= 1.6e-188:
		tmp = z * y
	elif x <= 2.45e-141:
		tmp = a * t
	elif x <= 2.35e+154:
		tmp = z * y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (x <= -4.2e+64)
		tmp = x;
	elseif (x <= -2e-225)
		tmp = Float64(z * y);
	elseif (x <= -2e-298)
		tmp = Float64(a * t);
	elseif (x <= 1.6e-188)
		tmp = Float64(z * y);
	elseif (x <= 2.45e-141)
		tmp = Float64(a * t);
	elseif (x <= 2.35e+154)
		tmp = Float64(z * y);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (x <= -4.2e+64)
		tmp = x;
	elseif (x <= -2e-225)
		tmp = z * y;
	elseif (x <= -2e-298)
		tmp = a * t;
	elseif (x <= 1.6e-188)
		tmp = z * y;
	elseif (x <= 2.45e-141)
		tmp = a * t;
	elseif (x <= 2.35e+154)
		tmp = z * y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -4.2e+64], x, If[LessEqual[x, -2e-225], N[(z * y), $MachinePrecision], If[LessEqual[x, -2e-298], N[(a * t), $MachinePrecision], If[LessEqual[x, 1.6e-188], N[(z * y), $MachinePrecision], If[LessEqual[x, 2.45e-141], N[(a * t), $MachinePrecision], If[LessEqual[x, 2.35e+154], N[(z * y), $MachinePrecision], x]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -2 \cdot 10^{-225}:\\
\;\;\;\;z \cdot y\\

\mathbf{elif}\;x \leq -2 \cdot 10^{-298}:\\
\;\;\;\;a \cdot t\\

\mathbf{elif}\;x \leq 1.6 \cdot 10^{-188}:\\
\;\;\;\;z \cdot y\\

\mathbf{elif}\;x \leq 2.45 \cdot 10^{-141}:\\
\;\;\;\;a \cdot t\\

\mathbf{elif}\;x \leq 2.35 \cdot 10^{+154}:\\
\;\;\;\;z \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.2000000000000001e64 or 2.34999999999999992e154 < x

    1. Initial program 96.4%

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

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

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

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

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

    if -4.2000000000000001e64 < x < -1.9999999999999999e-225 or -1.99999999999999982e-298 < x < 1.60000000000000011e-188 or 2.45000000000000003e-141 < x < 2.34999999999999992e154

    1. Initial program 89.2%

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

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

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

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

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

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

    if -1.9999999999999999e-225 < x < -1.99999999999999982e-298 or 1.60000000000000011e-188 < x < 2.45000000000000003e-141

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.2 \cdot 10^{+64}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -2 \cdot 10^{-225}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;x \leq -2 \cdot 10^{-298}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{-188}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;x \leq 2.45 \cdot 10^{-141}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;x \leq 2.35 \cdot 10^{+154}:\\ \;\;\;\;z \cdot y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 38.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{+139}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.22 \cdot 10^{+103}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;x \leq -2.2 \cdot 10^{+55}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;x \leq -1 \cdot 10^{-225}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;x \leq -2.05 \cdot 10^{-296}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;x \leq 2.05 \cdot 10^{+155}:\\ \;\;\;\;z \cdot y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= x -2.9e+139)
   x
   (if (<= x -1.22e+103)
     (* a (* z b))
     (if (<= x -2.2e+55)
       (* a t)
       (if (<= x -1e-225)
         (* z y)
         (if (<= x -2.05e-296) (* a t) (if (<= x 2.05e+155) (* z y) x)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -2.9e+139) {
		tmp = x;
	} else if (x <= -1.22e+103) {
		tmp = a * (z * b);
	} else if (x <= -2.2e+55) {
		tmp = a * t;
	} else if (x <= -1e-225) {
		tmp = z * y;
	} else if (x <= -2.05e-296) {
		tmp = a * t;
	} else if (x <= 2.05e+155) {
		tmp = z * y;
	} 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 <= (-2.9d+139)) then
        tmp = x
    else if (x <= (-1.22d+103)) then
        tmp = a * (z * b)
    else if (x <= (-2.2d+55)) then
        tmp = a * t
    else if (x <= (-1d-225)) then
        tmp = z * y
    else if (x <= (-2.05d-296)) then
        tmp = a * t
    else if (x <= 2.05d+155) then
        tmp = z * y
    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 <= -2.9e+139) {
		tmp = x;
	} else if (x <= -1.22e+103) {
		tmp = a * (z * b);
	} else if (x <= -2.2e+55) {
		tmp = a * t;
	} else if (x <= -1e-225) {
		tmp = z * y;
	} else if (x <= -2.05e-296) {
		tmp = a * t;
	} else if (x <= 2.05e+155) {
		tmp = z * y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if x <= -2.9e+139:
		tmp = x
	elif x <= -1.22e+103:
		tmp = a * (z * b)
	elif x <= -2.2e+55:
		tmp = a * t
	elif x <= -1e-225:
		tmp = z * y
	elif x <= -2.05e-296:
		tmp = a * t
	elif x <= 2.05e+155:
		tmp = z * y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (x <= -2.9e+139)
		tmp = x;
	elseif (x <= -1.22e+103)
		tmp = Float64(a * Float64(z * b));
	elseif (x <= -2.2e+55)
		tmp = Float64(a * t);
	elseif (x <= -1e-225)
		tmp = Float64(z * y);
	elseif (x <= -2.05e-296)
		tmp = Float64(a * t);
	elseif (x <= 2.05e+155)
		tmp = Float64(z * y);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (x <= -2.9e+139)
		tmp = x;
	elseif (x <= -1.22e+103)
		tmp = a * (z * b);
	elseif (x <= -2.2e+55)
		tmp = a * t;
	elseif (x <= -1e-225)
		tmp = z * y;
	elseif (x <= -2.05e-296)
		tmp = a * t;
	elseif (x <= 2.05e+155)
		tmp = z * y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.9e+139], x, If[LessEqual[x, -1.22e+103], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.2e+55], N[(a * t), $MachinePrecision], If[LessEqual[x, -1e-225], N[(z * y), $MachinePrecision], If[LessEqual[x, -2.05e-296], N[(a * t), $MachinePrecision], If[LessEqual[x, 2.05e+155], N[(z * y), $MachinePrecision], x]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;x \leq -2.2 \cdot 10^{+55}:\\
\;\;\;\;a \cdot t\\

\mathbf{elif}\;x \leq -1 \cdot 10^{-225}:\\
\;\;\;\;z \cdot y\\

\mathbf{elif}\;x \leq -2.05 \cdot 10^{-296}:\\
\;\;\;\;a \cdot t\\

\mathbf{elif}\;x \leq 2.05 \cdot 10^{+155}:\\
\;\;\;\;z \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.8999999999999999e139 or 2.0499999999999999e155 < x

    1. Initial program 96.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+96.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*93.7%

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

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

    if -2.8999999999999999e139 < x < -1.22e103

    1. Initial program 87.5%

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

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

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

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

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

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

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

    if -1.22e103 < x < -2.2000000000000001e55 or -9.9999999999999996e-226 < x < -2.04999999999999997e-296

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

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

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

    if -2.2000000000000001e55 < x < -9.9999999999999996e-226 or -2.04999999999999997e-296 < x < 2.0499999999999999e155

    1. Initial program 88.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{+139}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.22 \cdot 10^{+103}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;x \leq -2.2 \cdot 10^{+55}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;x \leq -1 \cdot 10^{-225}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;x \leq -2.05 \cdot 10^{-296}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;x \leq 2.05 \cdot 10^{+155}:\\ \;\;\;\;z \cdot y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 72.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{+148} \lor \neg \left(a \leq -1.3 \cdot 10^{+81}\right) \land \left(a \leq -2 \cdot 10^{-33} \lor \neg \left(a \leq 6.2 \cdot 10^{-63}\right)\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.80000000000000003e148 or -1.29999999999999996e81 < a < -2.0000000000000001e-33 or 6.19999999999999968e-63 < a

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

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

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

    if -1.80000000000000003e148 < a < -1.29999999999999996e81 or -2.0000000000000001e-33 < a < 6.19999999999999968e-63

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{+148} \lor \neg \left(a \leq -1.3 \cdot 10^{+81}\right) \land \left(a \leq -2 \cdot 10^{-33} \lor \neg \left(a \leq 6.2 \cdot 10^{-63}\right)\right):\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot y\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 58.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{+164}:\\
\;\;\;\;a \cdot t\\

\mathbf{elif}\;a \leq 10^{+21} \lor \neg \left(a \leq 3.5 \cdot 10^{+122}\right) \land a \leq 8.5 \cdot 10^{+163}:\\
\;\;\;\;x + z \cdot y\\

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


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

    1. Initial program 71.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+71.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*80.6%

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

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

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

    if -5.4999999999999998e164 < a < 1e21 or 3.50000000000000014e122 < a < 8.5000000000000003e163

    1. Initial program 97.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+97.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*91.9%

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

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

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

    if 1e21 < a < 3.50000000000000014e122 or 8.5000000000000003e163 < a

    1. Initial program 74.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+74.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*86.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.5 \cdot 10^{+164}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;a \leq 10^{+21} \lor \neg \left(a \leq 3.5 \cdot 10^{+122}\right) \land a \leq 8.5 \cdot 10^{+163}:\\ \;\;\;\;x + z \cdot y\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 94.7% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.25e-60 or 1.79999999999999999e-82 < z

    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. associate-*l*84.7%

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

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

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

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

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

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

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

    if -2.25e-60 < z < 1.79999999999999999e-82

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

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

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

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

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

Alternative 9: 99.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.65000000000000012e65 or 7.9999999999999999e46 < z

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

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

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

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

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

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

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

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

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

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

    if -1.65000000000000012e65 < z < 7.9999999999999999e46

    1. Initial program 97.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+97.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*98.6%

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

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

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

Alternative 10: 62.3% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;a \leq 4.8 \cdot 10^{+204}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.5000000000000001e57 or 1.5e117 < a < 4.7999999999999999e204

    1. Initial program 83.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+83.8%

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

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

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

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

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

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

    if -8.5000000000000001e57 < a < 1.5e117

    1. Initial program 97.4%

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

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

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

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

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

    if 4.7999999999999999e204 < a

    1. Initial program 65.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+65.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*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 a around inf 95.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.5 \cdot 10^{+57}:\\ \;\;\;\;x + a \cdot t\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+117}:\\ \;\;\;\;x + z \cdot y\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{+204}:\\ \;\;\;\;x + a \cdot t\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 82.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{+148} \lor \neg \left(a \leq 1.4 \cdot 10^{+159}\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.0000000000000002e148 or 1.4000000000000001e159 < a

    1. Initial program 70.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+70.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*82.5%

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

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

    if -4.0000000000000002e148 < a < 1.4000000000000001e159

    1. Initial program 96.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+96.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*91.9%

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

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

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

Alternative 12: 86.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{+60} \lor \neg \left(t \leq 3.7 \cdot 10^{+98}\right):\\
\;\;\;\;x + \left(a \cdot t + z \cdot y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8.2e60 or 3.6999999999999999e98 < t

    1. Initial program 89.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+89.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*85.3%

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

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

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

    if -8.2e60 < t < 3.6999999999999999e98

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

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

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

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

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

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

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

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

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

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

Alternative 13: 74.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-54} \lor \neg \left(z \leq 8.7 \cdot 10^{-66}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1e-54 or 8.6999999999999998e-66 < z

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

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

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

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

    if -1e-54 < z < 8.6999999999999998e-66

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

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

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

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

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

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

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

Alternative 14: 39.9% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.55 \cdot 10^{+82} \lor \neg \left(t \leq 3.7 \cdot 10^{+98}\right):\\
\;\;\;\;a \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.5500000000000001e82 or 3.6999999999999999e98 < t

    1. Initial program 88.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+88.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*84.3%

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

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

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

    if -2.5500000000000001e82 < t < 3.6999999999999999e98

    1. Initial program 91.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+91.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*92.4%

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

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

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

Alternative 15: 26.7% accurate, 15.0× speedup?

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification27.5%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 97.4% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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