Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1

Percentage Accurate: 92.4% → 97.0%
Time: 9.7s
Alternatives: 13
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 13 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.4% 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: 97.0% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq 1.36 \cdot 10^{+37}:\\ \;\;\;\;\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)\\ \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
 (if (<= z 1.36e+37)
   (+ (fma y z x) (* a (+ t (* z b))))
   (* z (+ y (+ (/ x z) (* a (+ b (/ t z))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (z <= 1.36e+37) {
		tmp = fma(y, z, x) + (a * (t + (z * b)));
	} else {
		tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (z <= 1.36e+37)
		tmp = Float64(fma(y, z, x) + Float64(a * Float64(t + Float64(z * b))));
	else
		tmp = Float64(z * Float64(y + Float64(Float64(x / z) + Float64(a * Float64(b + Float64(t / z))))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 1.36e+37], N[(N[(y * z + x), $MachinePrecision] + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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}
\mathbf{if}\;z \leq 1.36 \cdot 10^{+37}:\\
\;\;\;\;\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)\\

\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 z < 1.3599999999999999e37

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-b \cdot z\right)\right)}\right) \]
      9. *-commutative99.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-out99.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-neg99.0%

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \color{blue}{\left(t - \left(-z\right) \cdot b\right)} \]
      12. sub-neg99.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-in99.0%

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

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

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

    if 1.3599999999999999e37 < z

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

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

      \[\leadsto \color{blue}{\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 96.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. +-commutative96.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+96.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. +-commutative96.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*98.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-out99.8%

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

      \[\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. Add Preprocessing

Alternative 2: 96.6% accurate, 0.4× speedup?

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

\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)) < 1.99999999999999997e307

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

    if 1.99999999999999997e307 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b))

    1. Initial program 63.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+63.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*73.4%

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

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

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

        \[\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+87.8%

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

        \[\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*91.8%

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

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

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

    \[\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 2 \cdot 10^{+307}:\\ \;\;\;\;\left(x + z \cdot y\right) + \left(a \cdot \left(z \cdot b\right) + a \cdot t\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 3: 72.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + z \cdot y\\ t_2 := z \cdot \left(y + a \cdot b\right)\\ \mathbf{if}\;z \leq -1.02 \cdot 10^{+127}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -2.55 \cdot 10^{+51}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-68}:\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-43}:\\ \;\;\;\;x + a \cdot t\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+31}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (* z y))) (t_2 (* z (+ y (* a b)))))
   (if (<= z -1.02e+127)
     t_2
     (if (<= z -2.55e+51)
       t_1
       (if (<= z -1.16e-68)
         (* a (+ t (* z b)))
         (if (<= z 2.1e-43) (+ x (* a t)) (if (<= z 1.2e+31) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (z * y);
	double t_2 = z * (y + (a * b));
	double tmp;
	if (z <= -1.02e+127) {
		tmp = t_2;
	} else if (z <= -2.55e+51) {
		tmp = t_1;
	} else if (z <= -1.16e-68) {
		tmp = a * (t + (z * b));
	} else if (z <= 2.1e-43) {
		tmp = x + (a * t);
	} else if (z <= 1.2e+31) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + (z * y)
    t_2 = z * (y + (a * b))
    if (z <= (-1.02d+127)) then
        tmp = t_2
    else if (z <= (-2.55d+51)) then
        tmp = t_1
    else if (z <= (-1.16d-68)) then
        tmp = a * (t + (z * b))
    else if (z <= 2.1d-43) then
        tmp = x + (a * t)
    else if (z <= 1.2d+31) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (z * y);
	double t_2 = z * (y + (a * b));
	double tmp;
	if (z <= -1.02e+127) {
		tmp = t_2;
	} else if (z <= -2.55e+51) {
		tmp = t_1;
	} else if (z <= -1.16e-68) {
		tmp = a * (t + (z * b));
	} else if (z <= 2.1e-43) {
		tmp = x + (a * t);
	} else if (z <= 1.2e+31) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (z * y)
	t_2 = z * (y + (a * b))
	tmp = 0
	if z <= -1.02e+127:
		tmp = t_2
	elif z <= -2.55e+51:
		tmp = t_1
	elif z <= -1.16e-68:
		tmp = a * (t + (z * b))
	elif z <= 2.1e-43:
		tmp = x + (a * t)
	elif z <= 1.2e+31:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(z * y))
	t_2 = Float64(z * Float64(y + Float64(a * b)))
	tmp = 0.0
	if (z <= -1.02e+127)
		tmp = t_2;
	elseif (z <= -2.55e+51)
		tmp = t_1;
	elseif (z <= -1.16e-68)
		tmp = Float64(a * Float64(t + Float64(z * b)));
	elseif (z <= 2.1e-43)
		tmp = Float64(x + Float64(a * t));
	elseif (z <= 1.2e+31)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (z * y);
	t_2 = z * (y + (a * b));
	tmp = 0.0;
	if (z <= -1.02e+127)
		tmp = t_2;
	elseif (z <= -2.55e+51)
		tmp = t_1;
	elseif (z <= -1.16e-68)
		tmp = a * (t + (z * b));
	elseif (z <= 2.1e-43)
		tmp = x + (a * t);
	elseif (z <= 1.2e+31)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.02e+127], t$95$2, If[LessEqual[z, -2.55e+51], t$95$1, If[LessEqual[z, -1.16e-68], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-43], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e+31], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.55 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-43}:\\
\;\;\;\;x + a \cdot t\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.02e127 or 1.19999999999999991e31 < z

    1. Initial program 76.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+76.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*83.4%

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

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

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

    if -1.02e127 < z < -2.55000000000000005e51 or 2.1000000000000001e-43 < z < 1.19999999999999991e31

    1. Initial program 93.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+93.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*100.0%

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

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

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

    if -2.55000000000000005e51 < z < -1.1599999999999999e-68

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

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

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

    if -1.1599999999999999e-68 < z < 2.1000000000000001e-43

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.02 \cdot 10^{+127}:\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \mathbf{elif}\;z \leq -2.55 \cdot 10^{+51}:\\ \;\;\;\;x + z \cdot y\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-68}:\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-43}:\\ \;\;\;\;x + a \cdot t\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+31}:\\ \;\;\;\;x + z \cdot y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 39.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(z \cdot b\right)\\
\mathbf{if}\;x \leq -1.7 \cdot 10^{+17}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 7.6 \cdot 10^{-280}:\\
\;\;\;\;a \cdot t\\

\mathbf{elif}\;x \leq 3 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 0.00136:\\
\;\;\;\;a \cdot t\\

\mathbf{elif}\;x \leq 2.65 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.7e17 or 2.65e20 < x

    1. Initial program 92.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+92.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*94.7%

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

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

    if -1.7e17 < x < 7.6000000000000003e-280 or 3.0000000000000001e-100 < x < 0.00136

    1. Initial program 90.8%

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

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

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

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

    if 7.6000000000000003e-280 < x < 3.0000000000000001e-100 or 0.00136 < x < 2.65e20

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.7 \cdot 10^{+17}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 7.6 \cdot 10^{-280}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;x \leq 3 \cdot 10^{-100}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{elif}\;x \leq 0.00136:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;x \leq 2.65 \cdot 10^{+20}:\\ \;\;\;\;a \cdot \left(z \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 72.0% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq 2.3 \cdot 10^{-102}:\\
\;\;\;\;x + z \cdot y\\

\mathbf{elif}\;a \leq 2.6 \cdot 10^{+96} \lor \neg \left(a \leq 1.45 \cdot 10^{+134}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.40000000000000008e31 or 2.29999999999999987e-102 < a < 2.6e96 or 1.45000000000000006e134 < a

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

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

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

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

    if -1.40000000000000008e31 < a < 2.29999999999999987e-102

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

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

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

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

    if 2.6e96 < a < 1.45000000000000006e134

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{+31}:\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-102}:\\ \;\;\;\;x + z \cdot y\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+96} \lor \neg \left(a \leq 1.45 \cdot 10^{+134}\right):\\ \;\;\;\;a \cdot \left(t + z \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot t\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 56.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.04 \cdot 10^{+122} \lor \neg \left(t \leq 1.25 \cdot 10^{+21}\right) \land \left(t \leq 1.5 \cdot 10^{+206} \lor \neg \left(t \leq 1.2 \cdot 10^{+268}\right)\right):\\
\;\;\;\;a \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.04e122 or 1.25e21 < t < 1.5000000000000001e206 or 1.2e268 < t

    1. Initial program 92.5%

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

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

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

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

    if -1.04e122 < t < 1.25e21 or 1.5000000000000001e206 < t < 1.2e268

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.04 \cdot 10^{+122} \lor \neg \left(t \leq 1.25 \cdot 10^{+21}\right) \land \left(t \leq 1.5 \cdot 10^{+206} \lor \neg \left(t \leq 1.2 \cdot 10^{+268}\right)\right):\\ \;\;\;\;a \cdot t\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot y\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 93.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.0051999999999999998 or 6.00000000000000055e-39 < z

    1. Initial program 81.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+81.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*87.7%

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

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

        \[\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+96.8%

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

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

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

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

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

    if -0.0051999999999999998 < z < 6.00000000000000055e-39

    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. +-commutative99.2%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + \color{blue}{\left(-\left(-z\right)\right) \cdot b}\right) \]
      14. remove-double-neg100.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
    5. Taylor expanded in y around 0 91.5%

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

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

Alternative 8: 87.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.22 \cdot 10^{+44} \lor \neg \left(a \leq 2.3 \cdot 10^{-102}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.22e44 or 2.29999999999999987e-102 < a

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.22e44 < a < 2.29999999999999987e-102

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

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

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

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

Alternative 9: 80.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+185} \lor \neg \left(y \leq 1.7 \cdot 10^{+164}\right):\\
\;\;\;\;z \cdot y + a \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.24999999999999997e185 or 1.7000000000000001e164 < y

    1. Initial program 87.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+87.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*87.2%

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

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

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

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

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

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

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

    if -1.24999999999999997e185 < y < 1.7000000000000001e164

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 40.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq -3 \cdot 10^{-47}:\\
\;\;\;\;z \cdot y\\

\mathbf{elif}\;t \leq 1.15 \cdot 10^{+21}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.3999999999999997e57 or 1.15e21 < t

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

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

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

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

    if -5.3999999999999997e57 < t < -3.00000000000000017e-47

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

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

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

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

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

    if -3.00000000000000017e-47 < t < 1.15e21

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

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

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

Alternative 11: 63.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.9 \cdot 10^{+62} \lor \neg \left(t \leq 29\right):\\
\;\;\;\;x + a \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.8999999999999997e62 or 29 < t

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

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

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

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

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

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

    if -4.8999999999999997e62 < t < 29

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

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

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

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

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

Alternative 12: 39.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.55 \cdot 10^{+121} \lor \neg \left(t \leq 6.5 \cdot 10^{+19}\right):\\
\;\;\;\;a \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.55000000000000012e121 or 6.5e19 < t

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

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

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

    if -3.55000000000000012e121 < t < 6.5e19

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

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

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

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

Alternative 13: 26.4% 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*93.8%

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

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

Developer target: 97.4% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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