Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2

Percentage Accurate: 95.1% → 97.9%
Time: 16.1s
Alternatives: 24
Speedup: 0.5×

Specification

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

\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\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 24 alternatives:

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

Initial Program: 95.1% accurate, 1.0× speedup?

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

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

Alternative 1: 97.9% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;\left(\left(x + z \cdot \left(1 - y\right)\right) + t_1\right) + \left(\left(y + t\right) - 2\right) \cdot b \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(y + \left(t + -2\right), b, x + \mathsf{fma}\left(z, 1 - y, t_1\right)\right)\\

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x + \mathsf{fma}\left(z, 1 - y, \color{blue}{a \cdot \left(-\left(t - 1\right)\right)}\right)\right) \]
      19. neg-sub0100.0%

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

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

        \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x + \mathsf{fma}\left(z, 1 - y, a \cdot \left(0 - \color{blue}{\left(\left(-1\right) + t\right)}\right)\right)\right) \]
      22. associate--r+100.0%

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

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

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

    1. Initial program 0.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in y around inf 20.0%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. Step-by-step derivation
      1. mul-1-neg20.0%

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

        \[\leadsto \left(-\color{blue}{z \cdot y}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      3. distribute-rgt-neg-in20.0%

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

      \[\leadsto \color{blue}{z \cdot \left(-y\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    5. Taylor expanded in t around 0 20.5%

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

        \[\leadsto -1 \cdot \left(y \cdot z\right) + b \cdot \color{blue}{\left(y + \left(-2\right)\right)} \]
      2. metadata-eval20.5%

        \[\leadsto -1 \cdot \left(y \cdot z\right) + b \cdot \left(y + \color{blue}{-2}\right) \]
      3. distribute-lft-in20.5%

        \[\leadsto -1 \cdot \left(y \cdot z\right) + \color{blue}{\left(b \cdot y + b \cdot -2\right)} \]
      4. *-commutative20.5%

        \[\leadsto -1 \cdot \left(y \cdot z\right) + \left(b \cdot y + \color{blue}{-2 \cdot b}\right) \]
      5. associate-+r+20.5%

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot z\right) + b \cdot y\right) + -2 \cdot b} \]
      6. +-commutative20.5%

        \[\leadsto \color{blue}{\left(b \cdot y + -1 \cdot \left(y \cdot z\right)\right)} + -2 \cdot b \]
      7. *-commutative20.5%

        \[\leadsto \left(b \cdot y + -1 \cdot \color{blue}{\left(z \cdot y\right)}\right) + -2 \cdot b \]
      8. associate-*r*20.5%

        \[\leadsto \left(b \cdot y + \color{blue}{\left(-1 \cdot z\right) \cdot y}\right) + -2 \cdot b \]
      9. distribute-rgt-in87.1%

        \[\leadsto \color{blue}{y \cdot \left(b + -1 \cdot z\right)} + -2 \cdot b \]
      10. mul-1-neg87.1%

        \[\leadsto y \cdot \left(b + \color{blue}{\left(-z\right)}\right) + -2 \cdot b \]
      11. unsub-neg87.1%

        \[\leadsto y \cdot \color{blue}{\left(b - z\right)} + -2 \cdot b \]
      12. *-commutative87.1%

        \[\leadsto y \cdot \left(b - z\right) + \color{blue}{b \cdot -2} \]
    7. Simplified87.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(y + \left(t + -2\right), b, x + \mathsf{fma}\left(z, 1 - y, a \cdot \left(1 - t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right) + b \cdot -2\\ \end{array} \]

Alternative 2: 97.9% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]

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

    1. Initial program 0.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in y around inf 20.0%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. Step-by-step derivation
      1. mul-1-neg20.0%

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

        \[\leadsto \left(-\color{blue}{z \cdot y}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      3. distribute-rgt-neg-in20.0%

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

      \[\leadsto \color{blue}{z \cdot \left(-y\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    5. Taylor expanded in t around 0 20.5%

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

        \[\leadsto -1 \cdot \left(y \cdot z\right) + b \cdot \color{blue}{\left(y + \left(-2\right)\right)} \]
      2. metadata-eval20.5%

        \[\leadsto -1 \cdot \left(y \cdot z\right) + b \cdot \left(y + \color{blue}{-2}\right) \]
      3. distribute-lft-in20.5%

        \[\leadsto -1 \cdot \left(y \cdot z\right) + \color{blue}{\left(b \cdot y + b \cdot -2\right)} \]
      4. *-commutative20.5%

        \[\leadsto -1 \cdot \left(y \cdot z\right) + \left(b \cdot y + \color{blue}{-2 \cdot b}\right) \]
      5. associate-+r+20.5%

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot z\right) + b \cdot y\right) + -2 \cdot b} \]
      6. +-commutative20.5%

        \[\leadsto \color{blue}{\left(b \cdot y + -1 \cdot \left(y \cdot z\right)\right)} + -2 \cdot b \]
      7. *-commutative20.5%

        \[\leadsto \left(b \cdot y + -1 \cdot \color{blue}{\left(z \cdot y\right)}\right) + -2 \cdot b \]
      8. associate-*r*20.5%

        \[\leadsto \left(b \cdot y + \color{blue}{\left(-1 \cdot z\right) \cdot y}\right) + -2 \cdot b \]
      9. distribute-rgt-in87.1%

        \[\leadsto \color{blue}{y \cdot \left(b + -1 \cdot z\right)} + -2 \cdot b \]
      10. mul-1-neg87.1%

        \[\leadsto y \cdot \left(b + \color{blue}{\left(-z\right)}\right) + -2 \cdot b \]
      11. unsub-neg87.1%

        \[\leadsto y \cdot \color{blue}{\left(b - z\right)} + -2 \cdot b \]
      12. *-commutative87.1%

        \[\leadsto y \cdot \left(b - z\right) + \color{blue}{b \cdot -2} \]
    7. Simplified87.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b \leq \infty:\\ \;\;\;\;\left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right) + b \cdot -2\\ \end{array} \]

Alternative 3: 63.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \left(x + b \cdot \left(y + -2\right)\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -7.8 \cdot 10^{+30}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1 \cdot 10^{-137}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-253}:\\ \;\;\;\;y \cdot \left(b - z\right) + b \cdot -2\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+124}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ a (+ x (* b (+ y -2.0))))) (t_2 (* t (- b a))))
   (if (<= t -7.8e+30)
     t_2
     (if (<= t -1e-137)
       t_1
       (if (<= t -4.4e-253)
         (+ (* y (- b z)) (* b -2.0))
         (if (<= t 3e-8)
           t_1
           (if (<= t 1.55e+124) (- (* (- (+ y t) 2.0) b) (* y z)) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a + (x + (b * (y + -2.0)));
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -7.8e+30) {
		tmp = t_2;
	} else if (t <= -1e-137) {
		tmp = t_1;
	} else if (t <= -4.4e-253) {
		tmp = (y * (b - z)) + (b * -2.0);
	} else if (t <= 3e-8) {
		tmp = t_1;
	} else if (t <= 1.55e+124) {
		tmp = (((y + t) - 2.0) * b) - (y * z);
	} 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 = a + (x + (b * (y + (-2.0d0))))
    t_2 = t * (b - a)
    if (t <= (-7.8d+30)) then
        tmp = t_2
    else if (t <= (-1d-137)) then
        tmp = t_1
    else if (t <= (-4.4d-253)) then
        tmp = (y * (b - z)) + (b * (-2.0d0))
    else if (t <= 3d-8) then
        tmp = t_1
    else if (t <= 1.55d+124) then
        tmp = (((y + t) - 2.0d0) * b) - (y * z)
    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 = a + (x + (b * (y + -2.0)));
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -7.8e+30) {
		tmp = t_2;
	} else if (t <= -1e-137) {
		tmp = t_1;
	} else if (t <= -4.4e-253) {
		tmp = (y * (b - z)) + (b * -2.0);
	} else if (t <= 3e-8) {
		tmp = t_1;
	} else if (t <= 1.55e+124) {
		tmp = (((y + t) - 2.0) * b) - (y * z);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a + (x + (b * (y + -2.0)))
	t_2 = t * (b - a)
	tmp = 0
	if t <= -7.8e+30:
		tmp = t_2
	elif t <= -1e-137:
		tmp = t_1
	elif t <= -4.4e-253:
		tmp = (y * (b - z)) + (b * -2.0)
	elif t <= 3e-8:
		tmp = t_1
	elif t <= 1.55e+124:
		tmp = (((y + t) - 2.0) * b) - (y * z)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a + Float64(x + Float64(b * Float64(y + -2.0))))
	t_2 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -7.8e+30)
		tmp = t_2;
	elseif (t <= -1e-137)
		tmp = t_1;
	elseif (t <= -4.4e-253)
		tmp = Float64(Float64(y * Float64(b - z)) + Float64(b * -2.0));
	elseif (t <= 3e-8)
		tmp = t_1;
	elseif (t <= 1.55e+124)
		tmp = Float64(Float64(Float64(Float64(y + t) - 2.0) * b) - Float64(y * z));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a + (x + (b * (y + -2.0)));
	t_2 = t * (b - a);
	tmp = 0.0;
	if (t <= -7.8e+30)
		tmp = t_2;
	elseif (t <= -1e-137)
		tmp = t_1;
	elseif (t <= -4.4e-253)
		tmp = (y * (b - z)) + (b * -2.0);
	elseif (t <= 3e-8)
		tmp = t_1;
	elseif (t <= 1.55e+124)
		tmp = (((y + t) - 2.0) * b) - (y * z);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(x + N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.8e+30], t$95$2, If[LessEqual[t, -1e-137], t$95$1, If[LessEqual[t, -4.4e-253], N[(N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision] + N[(b * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e-8], t$95$1, If[LessEqual[t, 1.55e+124], N[(N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1 \cdot 10^{-137}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -4.4 \cdot 10^{-253}:\\
\;\;\;\;y \cdot \left(b - z\right) + b \cdot -2\\

\mathbf{elif}\;t \leq 3 \cdot 10^{-8}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.55 \cdot 10^{+124}:\\
\;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b - y \cdot z\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -7.80000000000000021e30 or 1.5500000000000001e124 < t

    1. Initial program 91.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in t around inf 68.0%

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

    if -7.80000000000000021e30 < t < -9.99999999999999978e-138 or -4.39999999999999992e-253 < t < 2.99999999999999973e-8

    1. Initial program 96.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in t around 0 96.3%

      \[\leadsto \color{blue}{\left(x + \left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)} \]
    3. Taylor expanded in z around 0 77.8%

      \[\leadsto \color{blue}{\left(x + \left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right)\right) - -1 \cdot a} \]
    4. Taylor expanded in t around 0 76.1%

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

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

        \[\leadsto \left(b \cdot \color{blue}{\left(y + \left(-2\right)\right)} + x\right) - -1 \cdot a \]
      3. metadata-eval76.1%

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

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

    if -9.99999999999999978e-138 < t < -4.39999999999999992e-253

    1. Initial program 85.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in y around inf 57.4%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. Step-by-step derivation
      1. mul-1-neg57.4%

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

        \[\leadsto \left(-\color{blue}{z \cdot y}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      3. distribute-rgt-neg-in57.4%

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

      \[\leadsto \color{blue}{z \cdot \left(-y\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    5. Taylor expanded in t around 0 57.4%

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

        \[\leadsto -1 \cdot \left(y \cdot z\right) + b \cdot \color{blue}{\left(y + \left(-2\right)\right)} \]
      2. metadata-eval57.4%

        \[\leadsto -1 \cdot \left(y \cdot z\right) + b \cdot \left(y + \color{blue}{-2}\right) \]
      3. distribute-lft-in57.4%

        \[\leadsto -1 \cdot \left(y \cdot z\right) + \color{blue}{\left(b \cdot y + b \cdot -2\right)} \]
      4. *-commutative57.4%

        \[\leadsto -1 \cdot \left(y \cdot z\right) + \left(b \cdot y + \color{blue}{-2 \cdot b}\right) \]
      5. associate-+r+57.4%

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot z\right) + b \cdot y\right) + -2 \cdot b} \]
      6. +-commutative57.4%

        \[\leadsto \color{blue}{\left(b \cdot y + -1 \cdot \left(y \cdot z\right)\right)} + -2 \cdot b \]
      7. *-commutative57.4%

        \[\leadsto \left(b \cdot y + -1 \cdot \color{blue}{\left(z \cdot y\right)}\right) + -2 \cdot b \]
      8. associate-*r*57.4%

        \[\leadsto \left(b \cdot y + \color{blue}{\left(-1 \cdot z\right) \cdot y}\right) + -2 \cdot b \]
      9. distribute-rgt-in71.6%

        \[\leadsto \color{blue}{y \cdot \left(b + -1 \cdot z\right)} + -2 \cdot b \]
      10. mul-1-neg71.6%

        \[\leadsto y \cdot \left(b + \color{blue}{\left(-z\right)}\right) + -2 \cdot b \]
      11. unsub-neg71.6%

        \[\leadsto y \cdot \color{blue}{\left(b - z\right)} + -2 \cdot b \]
      12. *-commutative71.6%

        \[\leadsto y \cdot \left(b - z\right) + \color{blue}{b \cdot -2} \]
    7. Simplified71.6%

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

    if 2.99999999999999973e-8 < t < 1.5500000000000001e124

    1. Initial program 99.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in y around inf 61.5%

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

        \[\leadsto \color{blue}{\left(-y \cdot z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. *-commutative61.5%

        \[\leadsto \left(-\color{blue}{z \cdot y}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      3. distribute-rgt-neg-in61.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.8 \cdot 10^{+30}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1 \cdot 10^{-137}:\\ \;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-253}:\\ \;\;\;\;y \cdot \left(b - z\right) + b \cdot -2\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-8}:\\ \;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+124}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 4: 64.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \left(x + b \cdot \left(y + -2\right)\right)\\ t_2 := \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{if}\;t \leq -1.9 \cdot 10^{+24}:\\ \;\;\;\;t_2 - t \cdot a\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-137}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-253}:\\ \;\;\;\;y \cdot \left(b - z\right) + b \cdot -2\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{+124}:\\ \;\;\;\;t_2 - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ a (+ x (* b (+ y -2.0))))) (t_2 (* (- (+ y t) 2.0) b)))
   (if (<= t -1.9e+24)
     (- t_2 (* t a))
     (if (<= t -1.25e-137)
       t_1
       (if (<= t -4.4e-253)
         (+ (* y (- b z)) (* b -2.0))
         (if (<= t 4.2e-8)
           t_1
           (if (<= t 1.5e+124) (- t_2 (* y z)) (* t (- b a)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a + (x + (b * (y + -2.0)));
	double t_2 = ((y + t) - 2.0) * b;
	double tmp;
	if (t <= -1.9e+24) {
		tmp = t_2 - (t * a);
	} else if (t <= -1.25e-137) {
		tmp = t_1;
	} else if (t <= -4.4e-253) {
		tmp = (y * (b - z)) + (b * -2.0);
	} else if (t <= 4.2e-8) {
		tmp = t_1;
	} else if (t <= 1.5e+124) {
		tmp = t_2 - (y * z);
	} else {
		tmp = t * (b - a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = a + (x + (b * (y + (-2.0d0))))
    t_2 = ((y + t) - 2.0d0) * b
    if (t <= (-1.9d+24)) then
        tmp = t_2 - (t * a)
    else if (t <= (-1.25d-137)) then
        tmp = t_1
    else if (t <= (-4.4d-253)) then
        tmp = (y * (b - z)) + (b * (-2.0d0))
    else if (t <= 4.2d-8) then
        tmp = t_1
    else if (t <= 1.5d+124) then
        tmp = t_2 - (y * z)
    else
        tmp = t * (b - a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a + (x + (b * (y + -2.0)));
	double t_2 = ((y + t) - 2.0) * b;
	double tmp;
	if (t <= -1.9e+24) {
		tmp = t_2 - (t * a);
	} else if (t <= -1.25e-137) {
		tmp = t_1;
	} else if (t <= -4.4e-253) {
		tmp = (y * (b - z)) + (b * -2.0);
	} else if (t <= 4.2e-8) {
		tmp = t_1;
	} else if (t <= 1.5e+124) {
		tmp = t_2 - (y * z);
	} else {
		tmp = t * (b - a);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a + (x + (b * (y + -2.0)))
	t_2 = ((y + t) - 2.0) * b
	tmp = 0
	if t <= -1.9e+24:
		tmp = t_2 - (t * a)
	elif t <= -1.25e-137:
		tmp = t_1
	elif t <= -4.4e-253:
		tmp = (y * (b - z)) + (b * -2.0)
	elif t <= 4.2e-8:
		tmp = t_1
	elif t <= 1.5e+124:
		tmp = t_2 - (y * z)
	else:
		tmp = t * (b - a)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a + Float64(x + Float64(b * Float64(y + -2.0))))
	t_2 = Float64(Float64(Float64(y + t) - 2.0) * b)
	tmp = 0.0
	if (t <= -1.9e+24)
		tmp = Float64(t_2 - Float64(t * a));
	elseif (t <= -1.25e-137)
		tmp = t_1;
	elseif (t <= -4.4e-253)
		tmp = Float64(Float64(y * Float64(b - z)) + Float64(b * -2.0));
	elseif (t <= 4.2e-8)
		tmp = t_1;
	elseif (t <= 1.5e+124)
		tmp = Float64(t_2 - Float64(y * z));
	else
		tmp = Float64(t * Float64(b - a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a + (x + (b * (y + -2.0)));
	t_2 = ((y + t) - 2.0) * b;
	tmp = 0.0;
	if (t <= -1.9e+24)
		tmp = t_2 - (t * a);
	elseif (t <= -1.25e-137)
		tmp = t_1;
	elseif (t <= -4.4e-253)
		tmp = (y * (b - z)) + (b * -2.0);
	elseif (t <= 4.2e-8)
		tmp = t_1;
	elseif (t <= 1.5e+124)
		tmp = t_2 - (y * z);
	else
		tmp = t * (b - a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(x + N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t, -1.9e+24], N[(t$95$2 - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.25e-137], t$95$1, If[LessEqual[t, -4.4e-253], N[(N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision] + N[(b * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e-8], t$95$1, If[LessEqual[t, 1.5e+124], N[(t$95$2 - N[(y * z), $MachinePrecision]), $MachinePrecision], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.25 \cdot 10^{-137}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -4.4 \cdot 10^{-253}:\\
\;\;\;\;y \cdot \left(b - z\right) + b \cdot -2\\

\mathbf{elif}\;t \leq 4.2 \cdot 10^{-8}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.5 \cdot 10^{+124}:\\
\;\;\;\;t_2 - y \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.90000000000000008e24

    1. Initial program 90.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in t around inf 62.9%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot t\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. Step-by-step derivation
      1. associate-*r*62.9%

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot t} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. neg-mul-162.9%

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

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

    if -1.90000000000000008e24 < t < -1.25e-137 or -4.39999999999999992e-253 < t < 4.19999999999999989e-8

    1. Initial program 97.1%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in t around 0 97.1%

      \[\leadsto \color{blue}{\left(x + \left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)} \]
    3. Taylor expanded in z around 0 77.2%

      \[\leadsto \color{blue}{\left(x + \left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right)\right) - -1 \cdot a} \]
    4. Taylor expanded in t around 0 76.3%

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

        \[\leadsto \color{blue}{\left(b \cdot \left(y - 2\right) + x\right)} - -1 \cdot a \]
      2. sub-neg76.3%

        \[\leadsto \left(b \cdot \color{blue}{\left(y + \left(-2\right)\right)} + x\right) - -1 \cdot a \]
      3. metadata-eval76.3%

        \[\leadsto \left(b \cdot \left(y + \color{blue}{-2}\right) + x\right) - -1 \cdot a \]
    6. Simplified76.3%

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

    if -1.25e-137 < t < -4.39999999999999992e-253

    1. Initial program 85.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in y around inf 57.4%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. Step-by-step derivation
      1. mul-1-neg57.4%

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

        \[\leadsto \left(-\color{blue}{z \cdot y}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      3. distribute-rgt-neg-in57.4%

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

      \[\leadsto \color{blue}{z \cdot \left(-y\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    5. Taylor expanded in t around 0 57.4%

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

        \[\leadsto -1 \cdot \left(y \cdot z\right) + b \cdot \color{blue}{\left(y + \left(-2\right)\right)} \]
      2. metadata-eval57.4%

        \[\leadsto -1 \cdot \left(y \cdot z\right) + b \cdot \left(y + \color{blue}{-2}\right) \]
      3. distribute-lft-in57.4%

        \[\leadsto -1 \cdot \left(y \cdot z\right) + \color{blue}{\left(b \cdot y + b \cdot -2\right)} \]
      4. *-commutative57.4%

        \[\leadsto -1 \cdot \left(y \cdot z\right) + \left(b \cdot y + \color{blue}{-2 \cdot b}\right) \]
      5. associate-+r+57.4%

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot z\right) + b \cdot y\right) + -2 \cdot b} \]
      6. +-commutative57.4%

        \[\leadsto \color{blue}{\left(b \cdot y + -1 \cdot \left(y \cdot z\right)\right)} + -2 \cdot b \]
      7. *-commutative57.4%

        \[\leadsto \left(b \cdot y + -1 \cdot \color{blue}{\left(z \cdot y\right)}\right) + -2 \cdot b \]
      8. associate-*r*57.4%

        \[\leadsto \left(b \cdot y + \color{blue}{\left(-1 \cdot z\right) \cdot y}\right) + -2 \cdot b \]
      9. distribute-rgt-in71.6%

        \[\leadsto \color{blue}{y \cdot \left(b + -1 \cdot z\right)} + -2 \cdot b \]
      10. mul-1-neg71.6%

        \[\leadsto y \cdot \left(b + \color{blue}{\left(-z\right)}\right) + -2 \cdot b \]
      11. unsub-neg71.6%

        \[\leadsto y \cdot \color{blue}{\left(b - z\right)} + -2 \cdot b \]
      12. *-commutative71.6%

        \[\leadsto y \cdot \left(b - z\right) + \color{blue}{b \cdot -2} \]
    7. Simplified71.6%

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

    if 4.19999999999999989e-8 < t < 1.5e124

    1. Initial program 99.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in y around inf 61.5%

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

        \[\leadsto \color{blue}{\left(-y \cdot z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. *-commutative61.5%

        \[\leadsto \left(-\color{blue}{z \cdot y}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      3. distribute-rgt-neg-in61.5%

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

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

    if 1.5e124 < t

    1. Initial program 91.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in t around inf 81.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{+24}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b - t \cdot a\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-137}:\\ \;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-253}:\\ \;\;\;\;y \cdot \left(b - z\right) + b \cdot -2\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-8}:\\ \;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{+124}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 5: 83.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ t_2 := \left(\left(y + t\right) - 2\right) \cdot b\\ t_3 := x + t_2\\ \mathbf{if}\;b \leq -2.2 \cdot 10^{+97}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 1.8 \cdot 10^{+47}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{+97}:\\ \;\;\;\;t_2 - t \cdot a\\ \mathbf{elif}\;b \leq 1.35 \cdot 10^{+134}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (+ (* a (- 1.0 t)) (* z (- 1.0 y)))))
        (t_2 (* (- (+ y t) 2.0) b))
        (t_3 (+ x t_2)))
   (if (<= b -2.2e+97)
     t_3
     (if (<= b 1.8e+47)
       t_1
       (if (<= b 2.3e+97) (- t_2 (* t a)) (if (<= b 1.35e+134) t_1 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + ((a * (1.0 - t)) + (z * (1.0 - y)));
	double t_2 = ((y + t) - 2.0) * b;
	double t_3 = x + t_2;
	double tmp;
	if (b <= -2.2e+97) {
		tmp = t_3;
	} else if (b <= 1.8e+47) {
		tmp = t_1;
	} else if (b <= 2.3e+97) {
		tmp = t_2 - (t * a);
	} else if (b <= 1.35e+134) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	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) :: t_3
    real(8) :: tmp
    t_1 = x + ((a * (1.0d0 - t)) + (z * (1.0d0 - y)))
    t_2 = ((y + t) - 2.0d0) * b
    t_3 = x + t_2
    if (b <= (-2.2d+97)) then
        tmp = t_3
    else if (b <= 1.8d+47) then
        tmp = t_1
    else if (b <= 2.3d+97) then
        tmp = t_2 - (t * a)
    else if (b <= 1.35d+134) then
        tmp = t_1
    else
        tmp = t_3
    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 * (1.0 - t)) + (z * (1.0 - y)));
	double t_2 = ((y + t) - 2.0) * b;
	double t_3 = x + t_2;
	double tmp;
	if (b <= -2.2e+97) {
		tmp = t_3;
	} else if (b <= 1.8e+47) {
		tmp = t_1;
	} else if (b <= 2.3e+97) {
		tmp = t_2 - (t * a);
	} else if (b <= 1.35e+134) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + ((a * (1.0 - t)) + (z * (1.0 - y)))
	t_2 = ((y + t) - 2.0) * b
	t_3 = x + t_2
	tmp = 0
	if b <= -2.2e+97:
		tmp = t_3
	elif b <= 1.8e+47:
		tmp = t_1
	elif b <= 2.3e+97:
		tmp = t_2 - (t * a)
	elif b <= 1.35e+134:
		tmp = t_1
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(Float64(a * Float64(1.0 - t)) + Float64(z * Float64(1.0 - y))))
	t_2 = Float64(Float64(Float64(y + t) - 2.0) * b)
	t_3 = Float64(x + t_2)
	tmp = 0.0
	if (b <= -2.2e+97)
		tmp = t_3;
	elseif (b <= 1.8e+47)
		tmp = t_1;
	elseif (b <= 2.3e+97)
		tmp = Float64(t_2 - Float64(t * a));
	elseif (b <= 1.35e+134)
		tmp = t_1;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + ((a * (1.0 - t)) + (z * (1.0 - y)));
	t_2 = ((y + t) - 2.0) * b;
	t_3 = x + t_2;
	tmp = 0.0;
	if (b <= -2.2e+97)
		tmp = t_3;
	elseif (b <= 1.8e+47)
		tmp = t_1;
	elseif (b <= 2.3e+97)
		tmp = t_2 - (t * a);
	elseif (b <= 1.35e+134)
		tmp = t_1;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$3 = N[(x + t$95$2), $MachinePrecision]}, If[LessEqual[b, -2.2e+97], t$95$3, If[LessEqual[b, 1.8e+47], t$95$1, If[LessEqual[b, 2.3e+97], N[(t$95$2 - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.35e+134], t$95$1, t$95$3]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\
t_2 := \left(\left(y + t\right) - 2\right) \cdot b\\
t_3 := x + t_2\\
\mathbf{if}\;b \leq -2.2 \cdot 10^{+97}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 1.8 \cdot 10^{+47}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 2.3 \cdot 10^{+97}:\\
\;\;\;\;t_2 - t \cdot a\\

\mathbf{elif}\;b \leq 1.35 \cdot 10^{+134}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.2000000000000001e97 or 1.35e134 < b

    1. Initial program 86.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around 0 85.5%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    3. Taylor expanded in z around 0 89.0%

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

    if -2.2000000000000001e97 < b < 1.80000000000000004e47 or 2.30000000000000006e97 < b < 1.35e134

    1. Initial program 97.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in b around 0 87.7%

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

    if 1.80000000000000004e47 < b < 2.30000000000000006e97

    1. Initial program 88.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in t around inf 98.2%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot t\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. Step-by-step derivation
      1. associate-*r*98.2%

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot t} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. neg-mul-198.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.2 \cdot 10^{+97}:\\ \;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq 1.8 \cdot 10^{+47}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{+97}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b - t \cdot a\\ \mathbf{elif}\;b \leq 1.35 \cdot 10^{+134}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]

Alternative 6: 45.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -2120000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-135}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{-241}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-124}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 10^{-54}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{-15}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;t \leq 5.3 \cdot 10^{+70}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* t (- b a))))
   (if (<= t -2120000000.0)
     t_1
     (if (<= t -2.5e-135)
       (+ x z)
       (if (<= t -3.4e-241)
         (* y (- z))
         (if (<= t 2.6e-124)
           (* b (- y 2.0))
           (if (<= t 1e-54)
             (+ x z)
             (if (<= t 5.4e-15)
               (* a (- 1.0 t))
               (if (<= t 5.3e+70) (+ x z) t_1)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * (b - a);
	double tmp;
	if (t <= -2120000000.0) {
		tmp = t_1;
	} else if (t <= -2.5e-135) {
		tmp = x + z;
	} else if (t <= -3.4e-241) {
		tmp = y * -z;
	} else if (t <= 2.6e-124) {
		tmp = b * (y - 2.0);
	} else if (t <= 1e-54) {
		tmp = x + z;
	} else if (t <= 5.4e-15) {
		tmp = a * (1.0 - t);
	} else if (t <= 5.3e+70) {
		tmp = x + z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (b - a)
    if (t <= (-2120000000.0d0)) then
        tmp = t_1
    else if (t <= (-2.5d-135)) then
        tmp = x + z
    else if (t <= (-3.4d-241)) then
        tmp = y * -z
    else if (t <= 2.6d-124) then
        tmp = b * (y - 2.0d0)
    else if (t <= 1d-54) then
        tmp = x + z
    else if (t <= 5.4d-15) then
        tmp = a * (1.0d0 - t)
    else if (t <= 5.3d+70) then
        tmp = x + z
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * (b - a);
	double tmp;
	if (t <= -2120000000.0) {
		tmp = t_1;
	} else if (t <= -2.5e-135) {
		tmp = x + z;
	} else if (t <= -3.4e-241) {
		tmp = y * -z;
	} else if (t <= 2.6e-124) {
		tmp = b * (y - 2.0);
	} else if (t <= 1e-54) {
		tmp = x + z;
	} else if (t <= 5.4e-15) {
		tmp = a * (1.0 - t);
	} else if (t <= 5.3e+70) {
		tmp = x + z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t * (b - a)
	tmp = 0
	if t <= -2120000000.0:
		tmp = t_1
	elif t <= -2.5e-135:
		tmp = x + z
	elif t <= -3.4e-241:
		tmp = y * -z
	elif t <= 2.6e-124:
		tmp = b * (y - 2.0)
	elif t <= 1e-54:
		tmp = x + z
	elif t <= 5.4e-15:
		tmp = a * (1.0 - t)
	elif t <= 5.3e+70:
		tmp = x + z
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -2120000000.0)
		tmp = t_1;
	elseif (t <= -2.5e-135)
		tmp = Float64(x + z);
	elseif (t <= -3.4e-241)
		tmp = Float64(y * Float64(-z));
	elseif (t <= 2.6e-124)
		tmp = Float64(b * Float64(y - 2.0));
	elseif (t <= 1e-54)
		tmp = Float64(x + z);
	elseif (t <= 5.4e-15)
		tmp = Float64(a * Float64(1.0 - t));
	elseif (t <= 5.3e+70)
		tmp = Float64(x + z);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t * (b - a);
	tmp = 0.0;
	if (t <= -2120000000.0)
		tmp = t_1;
	elseif (t <= -2.5e-135)
		tmp = x + z;
	elseif (t <= -3.4e-241)
		tmp = y * -z;
	elseif (t <= 2.6e-124)
		tmp = b * (y - 2.0);
	elseif (t <= 1e-54)
		tmp = x + z;
	elseif (t <= 5.4e-15)
		tmp = a * (1.0 - t);
	elseif (t <= 5.3e+70)
		tmp = x + z;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2120000000.0], t$95$1, If[LessEqual[t, -2.5e-135], N[(x + z), $MachinePrecision], If[LessEqual[t, -3.4e-241], N[(y * (-z)), $MachinePrecision], If[LessEqual[t, 2.6e-124], N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e-54], N[(x + z), $MachinePrecision], If[LessEqual[t, 5.4e-15], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.3e+70], N[(x + z), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -2120000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -2.5 \cdot 10^{-135}:\\
\;\;\;\;x + z\\

\mathbf{elif}\;t \leq -3.4 \cdot 10^{-241}:\\
\;\;\;\;y \cdot \left(-z\right)\\

\mathbf{elif}\;t \leq 2.6 \cdot 10^{-124}:\\
\;\;\;\;b \cdot \left(y - 2\right)\\

\mathbf{elif}\;t \leq 10^{-54}:\\
\;\;\;\;x + z\\

\mathbf{elif}\;t \leq 5.4 \cdot 10^{-15}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\

\mathbf{elif}\;t \leq 5.3 \cdot 10^{+70}:\\
\;\;\;\;x + z\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2.12e9 or 5.3e70 < t

    1. Initial program 92.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in t around inf 62.5%

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

    if -2.12e9 < t < -2.5000000000000001e-135 or 2.6e-124 < t < 1e-54 or 5.40000000000000018e-15 < t < 5.3e70

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around 0 81.5%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    3. Taylor expanded in y around 0 42.6%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    4. Step-by-step derivation
      1. associate--l+42.6%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - -1 \cdot z\right)} \]
      2. sub-neg42.6%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - -1 \cdot z\right) \]
      3. metadata-eval42.6%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - -1 \cdot z\right) \]
      4. neg-mul-142.6%

        \[\leadsto x + \left(b \cdot \left(t + -2\right) - \color{blue}{\left(-z\right)}\right) \]
    5. Simplified42.6%

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

      \[\leadsto \color{blue}{x + z} \]
    7. Step-by-step derivation
      1. +-commutative38.8%

        \[\leadsto \color{blue}{z + x} \]
    8. Simplified38.8%

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

    if -2.5000000000000001e-135 < t < -3.3999999999999999e-241

    1. Initial program 87.4%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in y around inf 50.5%

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

        \[\leadsto \color{blue}{\left(-y \cdot z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. *-commutative50.5%

        \[\leadsto \left(-\color{blue}{z \cdot y}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      3. distribute-rgt-neg-in50.5%

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

      \[\leadsto \color{blue}{z \cdot \left(-y\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    5. Taylor expanded in z around inf 46.2%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg46.2%

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. distribute-rgt-neg-in46.2%

        \[\leadsto \color{blue}{y \cdot \left(-z\right)} \]
    7. Simplified46.2%

      \[\leadsto \color{blue}{y \cdot \left(-z\right)} \]

    if -3.3999999999999999e-241 < t < 2.6e-124

    1. Initial program 92.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in t around inf 54.5%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot t\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. Step-by-step derivation
      1. associate-*r*54.5%

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot t} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. neg-mul-154.5%

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

      \[\leadsto \color{blue}{\left(-a\right) \cdot t} + \left(\left(y + t\right) - 2\right) \cdot b \]
    5. Taylor expanded in t around 0 54.6%

      \[\leadsto \color{blue}{b \cdot \left(y - 2\right)} \]

    if 1e-54 < t < 5.40000000000000018e-15

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around inf 75.4%

      \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification54.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2120000000:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-135}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{-241}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-124}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 10^{-54}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{-15}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;t \leq 5.3 \cdot 10^{+70}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 7: 86.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;b \leq -2.7 \cdot 10^{-18} \lor \neg \left(b \leq 2 \cdot 10^{-12}\right):\\
\;\;\;\;\left(x + \left(\left(y + t\right) - 2\right) \cdot b\right) + t_1\\

\mathbf{else}:\\
\;\;\;\;x + \left(t_1 + z \cdot \left(1 - y\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.69999999999999989e-18 or 1.99999999999999996e-12 < b

    1. Initial program 89.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in z around 0 87.8%

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

    if -2.69999999999999989e-18 < b < 1.99999999999999996e-12

    1. Initial program 98.4%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in b around 0 93.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.7 \cdot 10^{-18} \lor \neg \left(b \leq 2 \cdot 10^{-12}\right):\\ \;\;\;\;\left(x + \left(\left(y + t\right) - 2\right) \cdot b\right) + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \end{array} \]

Alternative 8: 86.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;b \leq -4.4 \cdot 10^{-18}:\\
\;\;\;\;\left(x + \left(\left(y + t\right) - 2\right) \cdot b\right) + t_1\\

\mathbf{elif}\;b \leq 1.15 \cdot 10^{-12}:\\
\;\;\;\;x + \left(t_1 + z \cdot \left(1 - y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -4.3999999999999997e-18

    1. Initial program 90.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in z around 0 88.4%

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

    if -4.3999999999999997e-18 < b < 1.14999999999999995e-12

    1. Initial program 98.4%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in b around 0 93.9%

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

    if 1.14999999999999995e-12 < b

    1. Initial program 88.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in t around 0 90.3%

      \[\leadsto \color{blue}{\left(x + \left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)} \]
    3. Taylor expanded in z around 0 88.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.4 \cdot 10^{-18}:\\ \;\;\;\;\left(x + \left(\left(y + t\right) - 2\right) \cdot b\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{-12}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(x + \left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right)\right)\\ \end{array} \]

Alternative 9: 49.9% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -6.8 \cdot 10^{-18}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-197}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 5.3 \cdot 10^{-132}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 9 \cdot 10^{-69}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 2.75 \cdot 10^{+73}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (- (+ y t) 2.0) b)))
   (if (<= b -6.8e-18)
     t_1
     (if (<= b 7.8e-197)
       (* z (- 1.0 y))
       (if (<= b 5.3e-132)
         (* a (- 1.0 t))
         (if (<= b 9e-69) (+ x z) (if (<= b 2.75e+73) (* t (- b a)) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((y + t) - 2.0) * b;
	double tmp;
	if (b <= -6.8e-18) {
		tmp = t_1;
	} else if (b <= 7.8e-197) {
		tmp = z * (1.0 - y);
	} else if (b <= 5.3e-132) {
		tmp = a * (1.0 - t);
	} else if (b <= 9e-69) {
		tmp = x + z;
	} else if (b <= 2.75e+73) {
		tmp = t * (b - a);
	} 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 = ((y + t) - 2.0d0) * b
    if (b <= (-6.8d-18)) then
        tmp = t_1
    else if (b <= 7.8d-197) then
        tmp = z * (1.0d0 - y)
    else if (b <= 5.3d-132) then
        tmp = a * (1.0d0 - t)
    else if (b <= 9d-69) then
        tmp = x + z
    else if (b <= 2.75d+73) then
        tmp = t * (b - a)
    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 = ((y + t) - 2.0) * b;
	double tmp;
	if (b <= -6.8e-18) {
		tmp = t_1;
	} else if (b <= 7.8e-197) {
		tmp = z * (1.0 - y);
	} else if (b <= 5.3e-132) {
		tmp = a * (1.0 - t);
	} else if (b <= 9e-69) {
		tmp = x + z;
	} else if (b <= 2.75e+73) {
		tmp = t * (b - a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = ((y + t) - 2.0) * b
	tmp = 0
	if b <= -6.8e-18:
		tmp = t_1
	elif b <= 7.8e-197:
		tmp = z * (1.0 - y)
	elif b <= 5.3e-132:
		tmp = a * (1.0 - t)
	elif b <= 9e-69:
		tmp = x + z
	elif b <= 2.75e+73:
		tmp = t * (b - a)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(y + t) - 2.0) * b)
	tmp = 0.0
	if (b <= -6.8e-18)
		tmp = t_1;
	elseif (b <= 7.8e-197)
		tmp = Float64(z * Float64(1.0 - y));
	elseif (b <= 5.3e-132)
		tmp = Float64(a * Float64(1.0 - t));
	elseif (b <= 9e-69)
		tmp = Float64(x + z);
	elseif (b <= 2.75e+73)
		tmp = Float64(t * Float64(b - a));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = ((y + t) - 2.0) * b;
	tmp = 0.0;
	if (b <= -6.8e-18)
		tmp = t_1;
	elseif (b <= 7.8e-197)
		tmp = z * (1.0 - y);
	elseif (b <= 5.3e-132)
		tmp = a * (1.0 - t);
	elseif (b <= 9e-69)
		tmp = x + z;
	elseif (b <= 2.75e+73)
		tmp = t * (b - a);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -6.8e-18], t$95$1, If[LessEqual[b, 7.8e-197], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.3e-132], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9e-69], N[(x + z), $MachinePrecision], If[LessEqual[b, 2.75e+73], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -6.8 \cdot 10^{-18}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 7.8 \cdot 10^{-197}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\

\mathbf{elif}\;b \leq 5.3 \cdot 10^{-132}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\

\mathbf{elif}\;b \leq 9 \cdot 10^{-69}:\\
\;\;\;\;x + z\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -6.80000000000000002e-18 or 2.7500000000000001e73 < b

    1. Initial program 87.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in b around inf 71.4%

      \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right)} \]

    if -6.80000000000000002e-18 < b < 7.7999999999999998e-197

    1. Initial program 98.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in z around inf 49.1%

      \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]

    if 7.7999999999999998e-197 < b < 5.3000000000000003e-132

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around inf 70.0%

      \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]

    if 5.3000000000000003e-132 < b < 9.00000000000000019e-69

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around 0 80.2%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    3. Taylor expanded in y around 0 64.0%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    4. Step-by-step derivation
      1. associate--l+64.0%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - -1 \cdot z\right)} \]
      2. sub-neg64.0%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - -1 \cdot z\right) \]
      3. metadata-eval64.0%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - -1 \cdot z\right) \]
      4. neg-mul-164.0%

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

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

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

        \[\leadsto \color{blue}{z + x} \]
    8. Simplified63.7%

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

    if 9.00000000000000019e-69 < b < 2.7500000000000001e73

    1. Initial program 96.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in t around inf 54.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.8 \cdot 10^{-18}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-197}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 5.3 \cdot 10^{-132}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 9 \cdot 10^{-69}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 2.75 \cdot 10^{+73}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]

Alternative 10: 62.7% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \left(x - t \cdot a\right)\\ t_2 := x + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -9.1 \cdot 10^{+42}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 1.95 \cdot 10^{-305}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 3.6 \cdot 10^{-221}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.32 \cdot 10^{+74}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ a (- x (* t a)))) (t_2 (+ x (* (- (+ y t) 2.0) b))))
   (if (<= b -9.1e+42)
     t_2
     (if (<= b 1.95e-305)
       t_1
       (if (<= b 3.6e-221) (* z (- 1.0 y)) (if (<= b 1.32e+74) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a + (x - (t * a));
	double t_2 = x + (((y + t) - 2.0) * b);
	double tmp;
	if (b <= -9.1e+42) {
		tmp = t_2;
	} else if (b <= 1.95e-305) {
		tmp = t_1;
	} else if (b <= 3.6e-221) {
		tmp = z * (1.0 - y);
	} else if (b <= 1.32e+74) {
		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 = a + (x - (t * a))
    t_2 = x + (((y + t) - 2.0d0) * b)
    if (b <= (-9.1d+42)) then
        tmp = t_2
    else if (b <= 1.95d-305) then
        tmp = t_1
    else if (b <= 3.6d-221) then
        tmp = z * (1.0d0 - y)
    else if (b <= 1.32d+74) 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 = a + (x - (t * a));
	double t_2 = x + (((y + t) - 2.0) * b);
	double tmp;
	if (b <= -9.1e+42) {
		tmp = t_2;
	} else if (b <= 1.95e-305) {
		tmp = t_1;
	} else if (b <= 3.6e-221) {
		tmp = z * (1.0 - y);
	} else if (b <= 1.32e+74) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a + (x - (t * a))
	t_2 = x + (((y + t) - 2.0) * b)
	tmp = 0
	if b <= -9.1e+42:
		tmp = t_2
	elif b <= 1.95e-305:
		tmp = t_1
	elif b <= 3.6e-221:
		tmp = z * (1.0 - y)
	elif b <= 1.32e+74:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a + Float64(x - Float64(t * a)))
	t_2 = Float64(x + Float64(Float64(Float64(y + t) - 2.0) * b))
	tmp = 0.0
	if (b <= -9.1e+42)
		tmp = t_2;
	elseif (b <= 1.95e-305)
		tmp = t_1;
	elseif (b <= 3.6e-221)
		tmp = Float64(z * Float64(1.0 - y));
	elseif (b <= 1.32e+74)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a + (x - (t * a));
	t_2 = x + (((y + t) - 2.0) * b);
	tmp = 0.0;
	if (b <= -9.1e+42)
		tmp = t_2;
	elseif (b <= 1.95e-305)
		tmp = t_1;
	elseif (b <= 3.6e-221)
		tmp = z * (1.0 - y);
	elseif (b <= 1.32e+74)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9.1e+42], t$95$2, If[LessEqual[b, 1.95e-305], t$95$1, If[LessEqual[b, 3.6e-221], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.32e+74], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq 1.95 \cdot 10^{-305}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 3.6 \cdot 10^{-221}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\

\mathbf{elif}\;b \leq 1.32 \cdot 10^{+74}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -9.0999999999999995e42 or 1.32000000000000012e74 < b

    1. Initial program 87.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around 0 81.2%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    3. Taylor expanded in z around 0 80.7%

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

    if -9.0999999999999995e42 < b < 1.95000000000000013e-305 or 3.60000000000000011e-221 < b < 1.32000000000000012e74

    1. Initial program 98.5%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in t around 0 98.6%

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

      \[\leadsto \color{blue}{\left(x + \left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right)\right) - -1 \cdot a} \]
    4. Taylor expanded in b around 0 59.7%

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

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

        \[\leadsto \left(x + \left(-\color{blue}{t \cdot a}\right)\right) - -1 \cdot a \]
      3. unsub-neg59.7%

        \[\leadsto \color{blue}{\left(x - t \cdot a\right)} - -1 \cdot a \]
    6. Simplified59.7%

      \[\leadsto \color{blue}{\left(x - t \cdot a\right)} - -1 \cdot a \]

    if 1.95000000000000013e-305 < b < 3.60000000000000011e-221

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in z around inf 74.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9.1 \cdot 10^{+42}:\\ \;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq 1.95 \cdot 10^{-305}:\\ \;\;\;\;a + \left(x - t \cdot a\right)\\ \mathbf{elif}\;b \leq 3.6 \cdot 10^{-221}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.32 \cdot 10^{+74}:\\ \;\;\;\;a + \left(x - t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]

Alternative 11: 63.6% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a + \left(x + b \cdot \left(y + -2\right)\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -5.5 \cdot 10^{+30}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2 \cdot 10^{-137}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.6 \cdot 10^{-252}:\\ \;\;\;\;y \cdot \left(b - z\right) + b \cdot -2\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+69}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ a (+ x (* b (+ y -2.0))))) (t_2 (* t (- b a))))
   (if (<= t -5.5e+30)
     t_2
     (if (<= t -2e-137)
       t_1
       (if (<= t -1.6e-252)
         (+ (* y (- b z)) (* b -2.0))
         (if (<= t 1.1e+69) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a + (x + (b * (y + -2.0)));
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -5.5e+30) {
		tmp = t_2;
	} else if (t <= -2e-137) {
		tmp = t_1;
	} else if (t <= -1.6e-252) {
		tmp = (y * (b - z)) + (b * -2.0);
	} else if (t <= 1.1e+69) {
		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 = a + (x + (b * (y + (-2.0d0))))
    t_2 = t * (b - a)
    if (t <= (-5.5d+30)) then
        tmp = t_2
    else if (t <= (-2d-137)) then
        tmp = t_1
    else if (t <= (-1.6d-252)) then
        tmp = (y * (b - z)) + (b * (-2.0d0))
    else if (t <= 1.1d+69) 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 = a + (x + (b * (y + -2.0)));
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -5.5e+30) {
		tmp = t_2;
	} else if (t <= -2e-137) {
		tmp = t_1;
	} else if (t <= -1.6e-252) {
		tmp = (y * (b - z)) + (b * -2.0);
	} else if (t <= 1.1e+69) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a + (x + (b * (y + -2.0)))
	t_2 = t * (b - a)
	tmp = 0
	if t <= -5.5e+30:
		tmp = t_2
	elif t <= -2e-137:
		tmp = t_1
	elif t <= -1.6e-252:
		tmp = (y * (b - z)) + (b * -2.0)
	elif t <= 1.1e+69:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a + Float64(x + Float64(b * Float64(y + -2.0))))
	t_2 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -5.5e+30)
		tmp = t_2;
	elseif (t <= -2e-137)
		tmp = t_1;
	elseif (t <= -1.6e-252)
		tmp = Float64(Float64(y * Float64(b - z)) + Float64(b * -2.0));
	elseif (t <= 1.1e+69)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a + (x + (b * (y + -2.0)));
	t_2 = t * (b - a);
	tmp = 0.0;
	if (t <= -5.5e+30)
		tmp = t_2;
	elseif (t <= -2e-137)
		tmp = t_1;
	elseif (t <= -1.6e-252)
		tmp = (y * (b - z)) + (b * -2.0);
	elseif (t <= 1.1e+69)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(x + N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e+30], t$95$2, If[LessEqual[t, -2e-137], t$95$1, If[LessEqual[t, -1.6e-252], N[(N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision] + N[(b * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e+69], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -2 \cdot 10^{-137}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -1.6 \cdot 10^{-252}:\\
\;\;\;\;y \cdot \left(b - z\right) + b \cdot -2\\

\mathbf{elif}\;t \leq 1.1 \cdot 10^{+69}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.50000000000000025e30 or 1.1000000000000001e69 < t

    1. Initial program 92.4%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in t around inf 65.3%

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

    if -5.50000000000000025e30 < t < -1.99999999999999996e-137 or -1.6000000000000001e-252 < t < 1.1000000000000001e69

    1. Initial program 96.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in t around 0 96.9%

      \[\leadsto \color{blue}{\left(x + \left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)} \]
    3. Taylor expanded in z around 0 76.5%

      \[\leadsto \color{blue}{\left(x + \left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right)\right) - -1 \cdot a} \]
    4. Taylor expanded in t around 0 71.9%

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

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

        \[\leadsto \left(b \cdot \color{blue}{\left(y + \left(-2\right)\right)} + x\right) - -1 \cdot a \]
      3. metadata-eval71.9%

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

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

    if -1.99999999999999996e-137 < t < -1.6000000000000001e-252

    1. Initial program 85.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in y around inf 57.4%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. Step-by-step derivation
      1. mul-1-neg57.4%

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

        \[\leadsto \left(-\color{blue}{z \cdot y}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      3. distribute-rgt-neg-in57.4%

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

      \[\leadsto \color{blue}{z \cdot \left(-y\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    5. Taylor expanded in t around 0 57.4%

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

        \[\leadsto -1 \cdot \left(y \cdot z\right) + b \cdot \color{blue}{\left(y + \left(-2\right)\right)} \]
      2. metadata-eval57.4%

        \[\leadsto -1 \cdot \left(y \cdot z\right) + b \cdot \left(y + \color{blue}{-2}\right) \]
      3. distribute-lft-in57.4%

        \[\leadsto -1 \cdot \left(y \cdot z\right) + \color{blue}{\left(b \cdot y + b \cdot -2\right)} \]
      4. *-commutative57.4%

        \[\leadsto -1 \cdot \left(y \cdot z\right) + \left(b \cdot y + \color{blue}{-2 \cdot b}\right) \]
      5. associate-+r+57.4%

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot z\right) + b \cdot y\right) + -2 \cdot b} \]
      6. +-commutative57.4%

        \[\leadsto \color{blue}{\left(b \cdot y + -1 \cdot \left(y \cdot z\right)\right)} + -2 \cdot b \]
      7. *-commutative57.4%

        \[\leadsto \left(b \cdot y + -1 \cdot \color{blue}{\left(z \cdot y\right)}\right) + -2 \cdot b \]
      8. associate-*r*57.4%

        \[\leadsto \left(b \cdot y + \color{blue}{\left(-1 \cdot z\right) \cdot y}\right) + -2 \cdot b \]
      9. distribute-rgt-in71.6%

        \[\leadsto \color{blue}{y \cdot \left(b + -1 \cdot z\right)} + -2 \cdot b \]
      10. mul-1-neg71.6%

        \[\leadsto y \cdot \left(b + \color{blue}{\left(-z\right)}\right) + -2 \cdot b \]
      11. unsub-neg71.6%

        \[\leadsto y \cdot \color{blue}{\left(b - z\right)} + -2 \cdot b \]
      12. *-commutative71.6%

        \[\leadsto y \cdot \left(b - z\right) + \color{blue}{b \cdot -2} \]
    7. Simplified71.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{+30}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -2 \cdot 10^{-137}:\\ \;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\ \mathbf{elif}\;t \leq -1.6 \cdot 10^{-252}:\\ \;\;\;\;y \cdot \left(b - z\right) + b \cdot -2\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+69}:\\ \;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 12: 31.0% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(-t\right)\\ \mathbf{if}\;b \leq -2.5 \cdot 10^{+39}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq 4.7 \cdot 10^{-297}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 1.28 \cdot 10^{-211}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;b \leq 4.5 \cdot 10^{-135}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 5 \cdot 10^{-68}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 1.6 \cdot 10^{+73}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- t))))
   (if (<= b -2.5e+39)
     (* y b)
     (if (<= b 4.7e-297)
       (+ x z)
       (if (<= b 1.28e-211)
         (* y (- z))
         (if (<= b 4.5e-135)
           t_1
           (if (<= b 5e-68) (+ x z) (if (<= b 1.6e+73) t_1 (* y b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * -t;
	double tmp;
	if (b <= -2.5e+39) {
		tmp = y * b;
	} else if (b <= 4.7e-297) {
		tmp = x + z;
	} else if (b <= 1.28e-211) {
		tmp = y * -z;
	} else if (b <= 4.5e-135) {
		tmp = t_1;
	} else if (b <= 5e-68) {
		tmp = x + z;
	} else if (b <= 1.6e+73) {
		tmp = t_1;
	} else {
		tmp = y * 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 = a * -t
    if (b <= (-2.5d+39)) then
        tmp = y * b
    else if (b <= 4.7d-297) then
        tmp = x + z
    else if (b <= 1.28d-211) then
        tmp = y * -z
    else if (b <= 4.5d-135) then
        tmp = t_1
    else if (b <= 5d-68) then
        tmp = x + z
    else if (b <= 1.6d+73) then
        tmp = t_1
    else
        tmp = y * 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 = a * -t;
	double tmp;
	if (b <= -2.5e+39) {
		tmp = y * b;
	} else if (b <= 4.7e-297) {
		tmp = x + z;
	} else if (b <= 1.28e-211) {
		tmp = y * -z;
	} else if (b <= 4.5e-135) {
		tmp = t_1;
	} else if (b <= 5e-68) {
		tmp = x + z;
	} else if (b <= 1.6e+73) {
		tmp = t_1;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * -t
	tmp = 0
	if b <= -2.5e+39:
		tmp = y * b
	elif b <= 4.7e-297:
		tmp = x + z
	elif b <= 1.28e-211:
		tmp = y * -z
	elif b <= 4.5e-135:
		tmp = t_1
	elif b <= 5e-68:
		tmp = x + z
	elif b <= 1.6e+73:
		tmp = t_1
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(-t))
	tmp = 0.0
	if (b <= -2.5e+39)
		tmp = Float64(y * b);
	elseif (b <= 4.7e-297)
		tmp = Float64(x + z);
	elseif (b <= 1.28e-211)
		tmp = Float64(y * Float64(-z));
	elseif (b <= 4.5e-135)
		tmp = t_1;
	elseif (b <= 5e-68)
		tmp = Float64(x + z);
	elseif (b <= 1.6e+73)
		tmp = t_1;
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * -t;
	tmp = 0.0;
	if (b <= -2.5e+39)
		tmp = y * b;
	elseif (b <= 4.7e-297)
		tmp = x + z;
	elseif (b <= 1.28e-211)
		tmp = y * -z;
	elseif (b <= 4.5e-135)
		tmp = t_1;
	elseif (b <= 5e-68)
		tmp = x + z;
	elseif (b <= 1.6e+73)
		tmp = t_1;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * (-t)), $MachinePrecision]}, If[LessEqual[b, -2.5e+39], N[(y * b), $MachinePrecision], If[LessEqual[b, 4.7e-297], N[(x + z), $MachinePrecision], If[LessEqual[b, 1.28e-211], N[(y * (-z)), $MachinePrecision], If[LessEqual[b, 4.5e-135], t$95$1, If[LessEqual[b, 5e-68], N[(x + z), $MachinePrecision], If[LessEqual[b, 1.6e+73], t$95$1, N[(y * b), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(-t\right)\\
\mathbf{if}\;b \leq -2.5 \cdot 10^{+39}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;b \leq 4.7 \cdot 10^{-297}:\\
\;\;\;\;x + z\\

\mathbf{elif}\;b \leq 1.28 \cdot 10^{-211}:\\
\;\;\;\;y \cdot \left(-z\right)\\

\mathbf{elif}\;b \leq 4.5 \cdot 10^{-135}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 5 \cdot 10^{-68}:\\
\;\;\;\;x + z\\

\mathbf{elif}\;b \leq 1.6 \cdot 10^{+73}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -2.50000000000000008e39 or 1.59999999999999991e73 < b

    1. Initial program 87.1%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in y around inf 48.9%

      \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
    3. Taylor expanded in b around inf 39.2%

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

    if -2.50000000000000008e39 < b < 4.69999999999999986e-297 or 4.49999999999999987e-135 < b < 4.99999999999999971e-68

    1. Initial program 98.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around 0 66.3%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    3. Taylor expanded in y around 0 46.2%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    4. Step-by-step derivation
      1. associate--l+46.2%

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

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - -1 \cdot z\right) \]
      3. metadata-eval46.2%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - -1 \cdot z\right) \]
      4. neg-mul-146.2%

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

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

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

        \[\leadsto \color{blue}{z + x} \]
    8. Simplified45.1%

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

    if 4.69999999999999986e-297 < b < 1.2799999999999999e-211

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in y around inf 54.2%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. Step-by-step derivation
      1. mul-1-neg54.2%

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

        \[\leadsto \left(-\color{blue}{z \cdot y}\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
      3. distribute-rgt-neg-in54.2%

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

      \[\leadsto \color{blue}{z \cdot \left(-y\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    5. Taylor expanded in z around inf 54.1%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg54.1%

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. distribute-rgt-neg-in54.1%

        \[\leadsto \color{blue}{y \cdot \left(-z\right)} \]
    7. Simplified54.1%

      \[\leadsto \color{blue}{y \cdot \left(-z\right)} \]

    if 1.2799999999999999e-211 < b < 4.49999999999999987e-135 or 4.99999999999999971e-68 < b < 1.59999999999999991e73

    1. Initial program 98.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in t around inf 55.8%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot t\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. Step-by-step derivation
      1. associate-*r*55.8%

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot t} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. neg-mul-155.8%

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

      \[\leadsto \color{blue}{\left(-a\right) \cdot t} + \left(\left(y + t\right) - 2\right) \cdot b \]
    5. Taylor expanded in a around inf 40.3%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot t\right)} \]
    6. Step-by-step derivation
      1. associate-*r*40.3%

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot t} \]
      2. neg-mul-140.3%

        \[\leadsto \color{blue}{\left(-a\right)} \cdot t \]
      3. *-commutative40.3%

        \[\leadsto \color{blue}{t \cdot \left(-a\right)} \]
    7. Simplified40.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.5 \cdot 10^{+39}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq 4.7 \cdot 10^{-297}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 1.28 \cdot 10^{-211}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;b \leq 4.5 \cdot 10^{-135}:\\ \;\;\;\;a \cdot \left(-t\right)\\ \mathbf{elif}\;b \leq 5 \cdot 10^{-68}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 1.6 \cdot 10^{+73}:\\ \;\;\;\;a \cdot \left(-t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 13: 48.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -0.00047:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-123}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 2.65 \cdot 10^{+16} \lor \neg \left(y \leq 4.1 \cdot 10^{+69}\right) \land y \leq 8.6 \cdot 10^{+88}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- b z))))
   (if (<= y -0.00047)
     t_1
     (if (<= y -3e-123)
       (+ x z)
       (if (or (<= y 2.65e+16) (and (not (<= y 4.1e+69)) (<= y 8.6e+88)))
         (* a (- 1.0 t))
         t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double tmp;
	if (y <= -0.00047) {
		tmp = t_1;
	} else if (y <= -3e-123) {
		tmp = x + z;
	} else if ((y <= 2.65e+16) || (!(y <= 4.1e+69) && (y <= 8.6e+88))) {
		tmp = a * (1.0 - 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 = y * (b - z)
    if (y <= (-0.00047d0)) then
        tmp = t_1
    else if (y <= (-3d-123)) then
        tmp = x + z
    else if ((y <= 2.65d+16) .or. (.not. (y <= 4.1d+69)) .and. (y <= 8.6d+88)) then
        tmp = a * (1.0d0 - 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 = y * (b - z);
	double tmp;
	if (y <= -0.00047) {
		tmp = t_1;
	} else if (y <= -3e-123) {
		tmp = x + z;
	} else if ((y <= 2.65e+16) || (!(y <= 4.1e+69) && (y <= 8.6e+88))) {
		tmp = a * (1.0 - t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	tmp = 0
	if y <= -0.00047:
		tmp = t_1
	elif y <= -3e-123:
		tmp = x + z
	elif (y <= 2.65e+16) or (not (y <= 4.1e+69) and (y <= 8.6e+88)):
		tmp = a * (1.0 - t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(b - z))
	tmp = 0.0
	if (y <= -0.00047)
		tmp = t_1;
	elseif (y <= -3e-123)
		tmp = Float64(x + z);
	elseif ((y <= 2.65e+16) || (!(y <= 4.1e+69) && (y <= 8.6e+88)))
		tmp = Float64(a * Float64(1.0 - t));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * (b - z);
	tmp = 0.0;
	if (y <= -0.00047)
		tmp = t_1;
	elseif (y <= -3e-123)
		tmp = x + z;
	elseif ((y <= 2.65e+16) || (~((y <= 4.1e+69)) && (y <= 8.6e+88)))
		tmp = a * (1.0 - t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -0.00047], t$95$1, If[LessEqual[y, -3e-123], N[(x + z), $MachinePrecision], If[Or[LessEqual[y, 2.65e+16], And[N[Not[LessEqual[y, 4.1e+69]], $MachinePrecision], LessEqual[y, 8.6e+88]]], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -0.00047:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -3 \cdot 10^{-123}:\\
\;\;\;\;x + z\\

\mathbf{elif}\;y \leq 2.65 \cdot 10^{+16} \lor \neg \left(y \leq 4.1 \cdot 10^{+69}\right) \land y \leq 8.6 \cdot 10^{+88}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.69999999999999986e-4 or 2.65e16 < y < 4.0999999999999999e69 or 8.59999999999999947e88 < y

    1. Initial program 87.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in y around inf 74.9%

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

    if -4.69999999999999986e-4 < y < -2.99999999999999984e-123

    1. Initial program 99.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around 0 68.0%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    3. Taylor expanded in y around 0 68.0%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    4. Step-by-step derivation
      1. associate--l+68.0%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - -1 \cdot z\right)} \]
      2. sub-neg68.0%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - -1 \cdot z\right) \]
      3. metadata-eval68.0%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - -1 \cdot z\right) \]
      4. neg-mul-168.0%

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

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

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

        \[\leadsto \color{blue}{z + x} \]
    8. Simplified49.7%

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

    if -2.99999999999999984e-123 < y < 2.65e16 or 4.0999999999999999e69 < y < 8.59999999999999947e88

    1. Initial program 99.1%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around inf 44.6%

      \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification58.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -0.00047:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-123}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 2.65 \cdot 10^{+16} \lor \neg \left(y \leq 4.1 \cdot 10^{+69}\right) \land y \leq 8.6 \cdot 10^{+88}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 14: 41.0% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;a \leq -750000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-72}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-216}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;a \leq 3.55 \cdot 10^{-106}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{+65}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- 1.0 t))))
   (if (<= a -750000.0)
     t_1
     (if (<= a -1.3e-72)
       (* y b)
       (if (<= a 3.2e-216)
         (+ x z)
         (if (<= a 3.55e-106)
           (* b (- y 2.0))
           (if (<= a 1.02e+65) (+ x z) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double tmp;
	if (a <= -750000.0) {
		tmp = t_1;
	} else if (a <= -1.3e-72) {
		tmp = y * b;
	} else if (a <= 3.2e-216) {
		tmp = x + z;
	} else if (a <= 3.55e-106) {
		tmp = b * (y - 2.0);
	} else if (a <= 1.02e+65) {
		tmp = x + z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = a * (1.0d0 - t)
    if (a <= (-750000.0d0)) then
        tmp = t_1
    else if (a <= (-1.3d-72)) then
        tmp = y * b
    else if (a <= 3.2d-216) then
        tmp = x + z
    else if (a <= 3.55d-106) then
        tmp = b * (y - 2.0d0)
    else if (a <= 1.02d+65) then
        tmp = x + z
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double tmp;
	if (a <= -750000.0) {
		tmp = t_1;
	} else if (a <= -1.3e-72) {
		tmp = y * b;
	} else if (a <= 3.2e-216) {
		tmp = x + z;
	} else if (a <= 3.55e-106) {
		tmp = b * (y - 2.0);
	} else if (a <= 1.02e+65) {
		tmp = x + z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	tmp = 0
	if a <= -750000.0:
		tmp = t_1
	elif a <= -1.3e-72:
		tmp = y * b
	elif a <= 3.2e-216:
		tmp = x + z
	elif a <= 3.55e-106:
		tmp = b * (y - 2.0)
	elif a <= 1.02e+65:
		tmp = x + z
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(1.0 - t))
	tmp = 0.0
	if (a <= -750000.0)
		tmp = t_1;
	elseif (a <= -1.3e-72)
		tmp = Float64(y * b);
	elseif (a <= 3.2e-216)
		tmp = Float64(x + z);
	elseif (a <= 3.55e-106)
		tmp = Float64(b * Float64(y - 2.0));
	elseif (a <= 1.02e+65)
		tmp = Float64(x + z);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (1.0 - t);
	tmp = 0.0;
	if (a <= -750000.0)
		tmp = t_1;
	elseif (a <= -1.3e-72)
		tmp = y * b;
	elseif (a <= 3.2e-216)
		tmp = x + z;
	elseif (a <= 3.55e-106)
		tmp = b * (y - 2.0);
	elseif (a <= 1.02e+65)
		tmp = x + z;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -750000.0], t$95$1, If[LessEqual[a, -1.3e-72], N[(y * b), $MachinePrecision], If[LessEqual[a, 3.2e-216], N[(x + z), $MachinePrecision], If[LessEqual[a, 3.55e-106], N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.02e+65], N[(x + z), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;a \leq -750000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -1.3 \cdot 10^{-72}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;a \leq 3.2 \cdot 10^{-216}:\\
\;\;\;\;x + z\\

\mathbf{elif}\;a \leq 3.55 \cdot 10^{-106}:\\
\;\;\;\;b \cdot \left(y - 2\right)\\

\mathbf{elif}\;a \leq 1.02 \cdot 10^{+65}:\\
\;\;\;\;x + z\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -7.5e5 or 1.02000000000000005e65 < a

    1. Initial program 90.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around inf 57.5%

      \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]

    if -7.5e5 < a < -1.29999999999999998e-72

    1. Initial program 93.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in y around inf 71.8%

      \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
    3. Taylor expanded in b around inf 65.3%

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

    if -1.29999999999999998e-72 < a < 3.20000000000000026e-216 or 3.5499999999999998e-106 < a < 1.02000000000000005e65

    1. Initial program 98.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around 0 94.8%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    3. Taylor expanded in y around 0 62.0%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    4. Step-by-step derivation
      1. associate--l+62.0%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - -1 \cdot z\right)} \]
      2. sub-neg62.0%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - -1 \cdot z\right) \]
      3. metadata-eval62.0%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - -1 \cdot z\right) \]
      4. neg-mul-162.0%

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

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

      \[\leadsto \color{blue}{x + z} \]
    7. Step-by-step derivation
      1. +-commutative39.3%

        \[\leadsto \color{blue}{z + x} \]
    8. Simplified39.3%

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

    if 3.20000000000000026e-216 < a < 3.5499999999999998e-106

    1. Initial program 95.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in t around inf 65.4%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot t\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. Step-by-step derivation
      1. associate-*r*65.4%

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot t} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. neg-mul-165.4%

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

      \[\leadsto \color{blue}{\left(-a\right) \cdot t} + \left(\left(y + t\right) - 2\right) \cdot b \]
    5. Taylor expanded in t around 0 53.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -750000:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-72}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-216}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;a \leq 3.55 \cdot 10^{-106}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{+65}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]

Alternative 15: 48.0% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -0.00047:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 8.5 \cdot 10^{-60}:\\
\;\;\;\;t \cdot \left(b - a\right)\\

\mathbf{elif}\;y \leq 1.15 \cdot 10^{+69}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\

\mathbf{elif}\;y \leq 5.5 \cdot 10^{+89}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -4.69999999999999986e-4 or 5.49999999999999976e89 < y

    1. Initial program 86.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in y around inf 75.4%

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

    if -4.69999999999999986e-4 < y < -2.39999999999999987e-122

    1. Initial program 99.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around 0 68.0%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    3. Taylor expanded in y around 0 68.0%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    4. Step-by-step derivation
      1. associate--l+68.0%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - -1 \cdot z\right)} \]
      2. sub-neg68.0%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - -1 \cdot z\right) \]
      3. metadata-eval68.0%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - -1 \cdot z\right) \]
      4. neg-mul-168.0%

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

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

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

        \[\leadsto \color{blue}{z + x} \]
    8. Simplified49.7%

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

    if -2.39999999999999987e-122 < y < 8.50000000000000044e-60

    1. Initial program 98.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in t around inf 45.9%

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

    if 8.50000000000000044e-60 < y < 1.15000000000000008e69

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in z around inf 49.8%

      \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]

    if 1.15000000000000008e69 < y < 5.49999999999999976e89

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around inf 47.0%

      \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification58.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -0.00047:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{-122}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-60}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+69}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{+89}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 16: 47.8% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -0.00047:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{-127}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{-60}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 1.36 \cdot 10^{+69}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+89}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- b z))))
   (if (<= y -0.00047)
     t_1
     (if (<= y -1.3e-127)
       (+ x z)
       (if (<= y 4.4e-60)
         (* t (- b a))
         (if (<= y 1.36e+69)
           (* z (- 1.0 y))
           (if (<= y 6e+89) (+ x a) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double tmp;
	if (y <= -0.00047) {
		tmp = t_1;
	} else if (y <= -1.3e-127) {
		tmp = x + z;
	} else if (y <= 4.4e-60) {
		tmp = t * (b - a);
	} else if (y <= 1.36e+69) {
		tmp = z * (1.0 - y);
	} else if (y <= 6e+89) {
		tmp = x + a;
	} 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 = y * (b - z)
    if (y <= (-0.00047d0)) then
        tmp = t_1
    else if (y <= (-1.3d-127)) then
        tmp = x + z
    else if (y <= 4.4d-60) then
        tmp = t * (b - a)
    else if (y <= 1.36d+69) then
        tmp = z * (1.0d0 - y)
    else if (y <= 6d+89) then
        tmp = x + a
    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 = y * (b - z);
	double tmp;
	if (y <= -0.00047) {
		tmp = t_1;
	} else if (y <= -1.3e-127) {
		tmp = x + z;
	} else if (y <= 4.4e-60) {
		tmp = t * (b - a);
	} else if (y <= 1.36e+69) {
		tmp = z * (1.0 - y);
	} else if (y <= 6e+89) {
		tmp = x + a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	tmp = 0
	if y <= -0.00047:
		tmp = t_1
	elif y <= -1.3e-127:
		tmp = x + z
	elif y <= 4.4e-60:
		tmp = t * (b - a)
	elif y <= 1.36e+69:
		tmp = z * (1.0 - y)
	elif y <= 6e+89:
		tmp = x + a
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(b - z))
	tmp = 0.0
	if (y <= -0.00047)
		tmp = t_1;
	elseif (y <= -1.3e-127)
		tmp = Float64(x + z);
	elseif (y <= 4.4e-60)
		tmp = Float64(t * Float64(b - a));
	elseif (y <= 1.36e+69)
		tmp = Float64(z * Float64(1.0 - y));
	elseif (y <= 6e+89)
		tmp = Float64(x + a);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * (b - z);
	tmp = 0.0;
	if (y <= -0.00047)
		tmp = t_1;
	elseif (y <= -1.3e-127)
		tmp = x + z;
	elseif (y <= 4.4e-60)
		tmp = t * (b - a);
	elseif (y <= 1.36e+69)
		tmp = z * (1.0 - y);
	elseif (y <= 6e+89)
		tmp = x + a;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -0.00047], t$95$1, If[LessEqual[y, -1.3e-127], N[(x + z), $MachinePrecision], If[LessEqual[y, 4.4e-60], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.36e+69], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e+89], N[(x + a), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -0.00047:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -1.3 \cdot 10^{-127}:\\
\;\;\;\;x + z\\

\mathbf{elif}\;y \leq 4.4 \cdot 10^{-60}:\\
\;\;\;\;t \cdot \left(b - a\right)\\

\mathbf{elif}\;y \leq 1.36 \cdot 10^{+69}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\

\mathbf{elif}\;y \leq 6 \cdot 10^{+89}:\\
\;\;\;\;x + a\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -4.69999999999999986e-4 or 6.00000000000000025e89 < y

    1. Initial program 86.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in y around inf 75.4%

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

    if -4.69999999999999986e-4 < y < -1.29999999999999995e-127

    1. Initial program 99.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around 0 68.0%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    3. Taylor expanded in y around 0 68.0%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    4. Step-by-step derivation
      1. associate--l+68.0%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - -1 \cdot z\right)} \]
      2. sub-neg68.0%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - -1 \cdot z\right) \]
      3. metadata-eval68.0%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - -1 \cdot z\right) \]
      4. neg-mul-168.0%

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

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

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

        \[\leadsto \color{blue}{z + x} \]
    8. Simplified49.7%

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

    if -1.29999999999999995e-127 < y < 4.3999999999999998e-60

    1. Initial program 98.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in t around inf 45.9%

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

    if 4.3999999999999998e-60 < y < 1.36000000000000006e69

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in z around inf 49.8%

      \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]

    if 1.36000000000000006e69 < y < 6.00000000000000025e89

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in t around 0 99.9%

      \[\leadsto \color{blue}{\left(x + \left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right)\right) - \left(-1 \cdot a + z \cdot \left(y - 1\right)\right)} \]
    3. Taylor expanded in z around 0 87.5%

      \[\leadsto \color{blue}{\left(x + \left(b \cdot \left(y - 2\right) + t \cdot \left(b - a\right)\right)\right) - -1 \cdot a} \]
    4. Taylor expanded in x around inf 59.6%

      \[\leadsto \color{blue}{x} - -1 \cdot a \]
  3. Recombined 5 regimes into one program.
  4. Final simplification59.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -0.00047:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{-127}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{-60}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 1.36 \cdot 10^{+69}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+89}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 17: 32.0% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(-t\right)\\
\mathbf{if}\;b \leq -2.6 \cdot 10^{+39}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;b \leq 2.6 \cdot 10^{-195}:\\
\;\;\;\;x + z\\

\mathbf{elif}\;b \leq 3.7 \cdot 10^{-135}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 3.9 \cdot 10^{-69}:\\
\;\;\;\;x + z\\

\mathbf{elif}\;b \leq 6.1 \cdot 10^{+75}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.6e39 or 6.10000000000000009e75 < b

    1. Initial program 87.1%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in y around inf 48.9%

      \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
    3. Taylor expanded in b around inf 39.2%

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

    if -2.6e39 < b < 2.6000000000000002e-195 or 3.6999999999999997e-135 < b < 3.89999999999999981e-69

    1. Initial program 99.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around 0 67.4%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    3. Taylor expanded in y around 0 41.9%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    4. Step-by-step derivation
      1. associate--l+41.9%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - -1 \cdot z\right)} \]
      2. sub-neg41.9%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - -1 \cdot z\right) \]
      3. metadata-eval41.9%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - -1 \cdot z\right) \]
      4. neg-mul-141.9%

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

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

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

        \[\leadsto \color{blue}{z + x} \]
    8. Simplified40.9%

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

    if 2.6000000000000002e-195 < b < 3.6999999999999997e-135 or 3.89999999999999981e-69 < b < 6.10000000000000009e75

    1. Initial program 97.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in t around inf 58.2%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot t\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. Step-by-step derivation
      1. associate-*r*58.2%

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot t} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. neg-mul-158.2%

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

      \[\leadsto \color{blue}{\left(-a\right) \cdot t} + \left(\left(y + t\right) - 2\right) \cdot b \]
    5. Taylor expanded in a around inf 43.5%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot t\right)} \]
    6. Step-by-step derivation
      1. associate-*r*43.5%

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot t} \]
      2. neg-mul-143.5%

        \[\leadsto \color{blue}{\left(-a\right)} \cdot t \]
      3. *-commutative43.5%

        \[\leadsto \color{blue}{t \cdot \left(-a\right)} \]
    7. Simplified43.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.6 \cdot 10^{+39}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{-195}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 3.7 \cdot 10^{-135}:\\ \;\;\;\;a \cdot \left(-t\right)\\ \mathbf{elif}\;b \leq 3.9 \cdot 10^{-69}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 6.1 \cdot 10^{+75}:\\ \;\;\;\;a \cdot \left(-t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 18: 60.3% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+57} \lor \neg \left(z \leq 6.7 \cdot 10^{+111}\right):\\
\;\;\;\;z \cdot \left(1 - y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.1e57 or 6.7000000000000003e111 < z

    1. Initial program 91.5%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in z around inf 64.2%

      \[\leadsto \color{blue}{z \cdot \left(1 - y\right)} \]

    if -1.1e57 < z < 6.7000000000000003e111

    1. Initial program 95.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around 0 62.9%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    3. Taylor expanded in z around 0 59.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+57} \lor \neg \left(z \leq 6.7 \cdot 10^{+111}\right):\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]

Alternative 19: 41.8% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;a \leq -860000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -5 \cdot 10^{-73}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;a \leq 1.25 \cdot 10^{+63}:\\
\;\;\;\;x + z\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.6e5 or 1.25000000000000003e63 < a

    1. Initial program 90.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around inf 57.5%

      \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]

    if -8.6e5 < a < -4.9999999999999998e-73

    1. Initial program 93.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in y around inf 71.8%

      \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
    3. Taylor expanded in b around inf 65.3%

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

    if -4.9999999999999998e-73 < a < 1.25000000000000003e63

    1. Initial program 98.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around 0 94.3%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    3. Taylor expanded in y around 0 59.4%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    4. Step-by-step derivation
      1. associate--l+59.4%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - -1 \cdot z\right)} \]
      2. sub-neg59.4%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - -1 \cdot z\right) \]
      3. metadata-eval59.4%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - -1 \cdot z\right) \]
      4. neg-mul-159.4%

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

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

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

        \[\leadsto \color{blue}{z + x} \]
    8. Simplified34.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -860000:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-73}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+63}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]

Alternative 20: 26.0% accurate, 2.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{+33}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;t \leq 4 \cdot 10^{-15}:\\
\;\;\;\;a\\

\mathbf{elif}\;t \leq 1.12 \cdot 10^{+70}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.69999999999999991e33 or 1.11999999999999993e70 < t

    1. Initial program 92.2%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in t around inf 65.9%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot t\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. Step-by-step derivation
      1. associate-*r*65.9%

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot t} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. neg-mul-165.9%

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

      \[\leadsto \color{blue}{\left(-a\right) \cdot t} + \left(\left(y + t\right) - 2\right) \cdot b \]
    5. Taylor expanded in t around inf 63.4%

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

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

    if -2.69999999999999991e33 < t < 4.0000000000000003e-15

    1. Initial program 94.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around inf 24.2%

      \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
    3. Taylor expanded in t around 0 22.0%

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

    if 4.0000000000000003e-15 < t < 1.11999999999999993e70

    1. Initial program 99.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in x around inf 29.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{+33}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-15}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{+70}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 21: 25.0% accurate, 2.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{+30}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;y \leq 1.4 \cdot 10^{-205}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 2.2 \cdot 10^{+91}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.20000000000000011e30 or 2.19999999999999999e91 < y

    1. Initial program 86.2%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in y around inf 76.3%

      \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
    3. Taylor expanded in b around inf 43.7%

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

    if -8.20000000000000011e30 < y < 1.39999999999999996e-205

    1. Initial program 98.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in x around inf 20.3%

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

    if 1.39999999999999996e-205 < y < 2.19999999999999999e91

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around inf 39.2%

      \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
    3. Taylor expanded in t around 0 22.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.2 \cdot 10^{+30}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-205}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+91}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 22: 32.8% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.2 \cdot 10^{+38} \lor \neg \left(b \leq 0.000105\right):\\
\;\;\;\;y \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -6.20000000000000035e38 or 1.05e-4 < b

    1. Initial program 88.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in y around inf 46.8%

      \[\leadsto \color{blue}{y \cdot \left(b - z\right)} \]
    3. Taylor expanded in b around inf 36.7%

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

    if -6.20000000000000035e38 < b < 1.05e-4

    1. Initial program 98.5%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around 0 60.3%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    3. Taylor expanded in y around 0 35.8%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    4. Step-by-step derivation
      1. associate--l+35.8%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - -1 \cdot z\right)} \]
      2. sub-neg35.8%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - -1 \cdot z\right) \]
      3. metadata-eval35.8%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - -1 \cdot z\right) \]
      4. neg-mul-135.8%

        \[\leadsto x + \left(b \cdot \left(t + -2\right) - \color{blue}{\left(-z\right)}\right) \]
    5. Simplified35.8%

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

      \[\leadsto \color{blue}{x + z} \]
    7. Step-by-step derivation
      1. +-commutative33.6%

        \[\leadsto \color{blue}{z + x} \]
    8. Simplified33.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.2 \cdot 10^{+38} \lor \neg \left(b \leq 0.000105\right):\\ \;\;\;\;y \cdot b\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]

Alternative 23: 20.9% accurate, 4.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -6.6 \cdot 10^{-13}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{+131}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= x -6.6e-13) x (if (<= x 1.8e+131) a x)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -6.6e-13) {
		tmp = x;
	} else if (x <= 1.8e+131) {
		tmp = a;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (x <= (-6.6d-13)) then
        tmp = x
    else if (x <= 1.8d+131) then
        tmp = a
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -6.6e-13) {
		tmp = x;
	} else if (x <= 1.8e+131) {
		tmp = a;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if x <= -6.6e-13:
		tmp = x
	elif x <= 1.8e+131:
		tmp = a
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (x <= -6.6e-13)
		tmp = x;
	elseif (x <= 1.8e+131)
		tmp = a;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (x <= -6.6e-13)
		tmp = x;
	elseif (x <= 1.8e+131)
		tmp = a;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -6.6e-13], x, If[LessEqual[x, 1.8e+131], a, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.6 \cdot 10^{-13}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 1.8 \cdot 10^{+131}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.6000000000000001e-13 or 1.80000000000000016e131 < x

    1. Initial program 92.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in x around inf 30.9%

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

    if -6.6000000000000001e-13 < x < 1.80000000000000016e131

    1. Initial program 94.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Taylor expanded in a around inf 36.4%

      \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
    3. Taylor expanded in t around 0 18.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.6 \cdot 10^{-13}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{+131}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 24: 11.1% accurate, 21.0× speedup?

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

\\
a
\end{array}
Derivation
  1. Initial program 94.1%

    \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
  2. Taylor expanded in a around inf 30.2%

    \[\leadsto \color{blue}{a \cdot \left(1 - t\right)} \]
  3. Taylor expanded in t around 0 12.5%

    \[\leadsto \color{blue}{a} \]
  4. Final simplification12.5%

    \[\leadsto a \]

Reproduce

?
herbie shell --seed 2023308 
(FPCore (x y z t a b)
  :name "Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2"
  :precision binary64
  (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))