Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, B

Percentage Accurate: 96.6% → 99.6%
Time: 23.9s
Alternatives: 27
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
	return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b):
	return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b)
	return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))))
end
function tmp = code(x, y, z, t, a, b)
	tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\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 27 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: 96.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
	return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b):
	return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b)
	return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))))
end
function tmp = code(x, y, z, t, a, b)
	tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 99.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ x \cdot e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (* x (exp (fma y (- (log z) t) (* a (- (log1p (- z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
	return x * exp(fma(y, (log(z) - t), (a * (log1p(-z) - b))));
}
function code(x, y, z, t, a, b)
	return Float64(x * exp(fma(y, Float64(log(z) - t), Float64(a * Float64(log1p(Float64(-z)) - b)))))
end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x \cdot e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}
\end{array}
Derivation
  1. Initial program 97.0%

    \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
  2. Step-by-step derivation
    1. fma-define97.0%

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

      \[\leadsto x \cdot e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)\right)} \]
    3. log1p-define99.6%

      \[\leadsto x \cdot e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)\right)} \]
  3. Simplified99.6%

    \[\leadsto \color{blue}{x \cdot e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}} \]
  4. Add Preprocessing
  5. Add Preprocessing

Alternative 2: 96.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
	return x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
}
def code(x, y, z, t, a, b):
	return x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))))
function code(x, y, z, t, a, b)
	return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))))
end
function tmp = code(x, y, z, t, a, b)
	tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
Derivation
  1. Initial program 97.0%

    \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
  2. Add Preprocessing
  3. Add Preprocessing

Alternative 3: 91.0% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -13.5 \lor \neg \left(y \leq 3.35 \cdot 10^{-12}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -13.5 or 3.3500000000000001e-12 < y

    1. Initial program 98.4%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 90.7%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]

    if -13.5 < y < 3.3500000000000001e-12

    1. Initial program 95.6%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 93.9%

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

      \[\leadsto x \cdot e^{-1 \cdot \left(a \cdot b\right) + y \cdot \color{blue}{\left(-1 \cdot t\right)}} \]
    5. Step-by-step derivation
      1. mul-1-neg93.8%

        \[\leadsto x \cdot e^{-1 \cdot \left(a \cdot b\right) + y \cdot \color{blue}{\left(-t\right)}} \]
    6. Simplified93.8%

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

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

Alternative 4: 96.0% accurate, 1.5× speedup?

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

\\
x \cdot e^{y \cdot \left(\log z - t\right) - a \cdot b}
\end{array}
Derivation
  1. Initial program 97.0%

    \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in z around 0 95.7%

    \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right) + y \cdot \left(\log z - t\right)}} \]
  4. Final simplification95.7%

    \[\leadsto x \cdot e^{y \cdot \left(\log z - t\right) - a \cdot b} \]
  5. Add Preprocessing

Alternative 5: 76.0% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{\left(-a\right) \cdot \left(z + b\right)}\\ t_2 := x \cdot {z}^{y}\\ t_3 := x \cdot e^{y \cdot \left(-t\right)}\\ \mathbf{if}\;y \leq -0.0095:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 3.35 \cdot 10^{-12}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.18 \cdot 10^{+39}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{+47}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+198}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+203}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (exp (* (- a) (+ z b)))))
        (t_2 (* x (pow z y)))
        (t_3 (* x (exp (* y (- t))))))
   (if (<= y -0.0095)
     t_2
     (if (<= y 3.35e-12)
       t_1
       (if (<= y 1.18e+39)
         t_2
         (if (<= y 1.3e+47)
           t_3
           (if (<= y 7e+198) t_2 (if (<= y 7.2e+203) t_1 t_3))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * exp((-a * (z + b)));
	double t_2 = x * pow(z, y);
	double t_3 = x * exp((y * -t));
	double tmp;
	if (y <= -0.0095) {
		tmp = t_2;
	} else if (y <= 3.35e-12) {
		tmp = t_1;
	} else if (y <= 1.18e+39) {
		tmp = t_2;
	} else if (y <= 1.3e+47) {
		tmp = t_3;
	} else if (y <= 7e+198) {
		tmp = t_2;
	} else if (y <= 7.2e+203) {
		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 * exp((-a * (z + b)))
    t_2 = x * (z ** y)
    t_3 = x * exp((y * -t))
    if (y <= (-0.0095d0)) then
        tmp = t_2
    else if (y <= 3.35d-12) then
        tmp = t_1
    else if (y <= 1.18d+39) then
        tmp = t_2
    else if (y <= 1.3d+47) then
        tmp = t_3
    else if (y <= 7d+198) then
        tmp = t_2
    else if (y <= 7.2d+203) 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 * Math.exp((-a * (z + b)));
	double t_2 = x * Math.pow(z, y);
	double t_3 = x * Math.exp((y * -t));
	double tmp;
	if (y <= -0.0095) {
		tmp = t_2;
	} else if (y <= 3.35e-12) {
		tmp = t_1;
	} else if (y <= 1.18e+39) {
		tmp = t_2;
	} else if (y <= 1.3e+47) {
		tmp = t_3;
	} else if (y <= 7e+198) {
		tmp = t_2;
	} else if (y <= 7.2e+203) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x * math.exp((-a * (z + b)))
	t_2 = x * math.pow(z, y)
	t_3 = x * math.exp((y * -t))
	tmp = 0
	if y <= -0.0095:
		tmp = t_2
	elif y <= 3.35e-12:
		tmp = t_1
	elif y <= 1.18e+39:
		tmp = t_2
	elif y <= 1.3e+47:
		tmp = t_3
	elif y <= 7e+198:
		tmp = t_2
	elif y <= 7.2e+203:
		tmp = t_1
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x * exp(Float64(Float64(-a) * Float64(z + b))))
	t_2 = Float64(x * (z ^ y))
	t_3 = Float64(x * exp(Float64(y * Float64(-t))))
	tmp = 0.0
	if (y <= -0.0095)
		tmp = t_2;
	elseif (y <= 3.35e-12)
		tmp = t_1;
	elseif (y <= 1.18e+39)
		tmp = t_2;
	elseif (y <= 1.3e+47)
		tmp = t_3;
	elseif (y <= 7e+198)
		tmp = t_2;
	elseif (y <= 7.2e+203)
		tmp = t_1;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x * exp((-a * (z + b)));
	t_2 = x * (z ^ y);
	t_3 = x * exp((y * -t));
	tmp = 0.0;
	if (y <= -0.0095)
		tmp = t_2;
	elseif (y <= 3.35e-12)
		tmp = t_1;
	elseif (y <= 1.18e+39)
		tmp = t_2;
	elseif (y <= 1.3e+47)
		tmp = t_3;
	elseif (y <= 7e+198)
		tmp = t_2;
	elseif (y <= 7.2e+203)
		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[Exp[N[((-a) * N[(z + b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -0.0095], t$95$2, If[LessEqual[y, 3.35e-12], t$95$1, If[LessEqual[y, 1.18e+39], t$95$2, If[LessEqual[y, 1.3e+47], t$95$3, If[LessEqual[y, 7e+198], t$95$2, If[LessEqual[y, 7.2e+203], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 3.35 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.18 \cdot 10^{+39}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 1.3 \cdot 10^{+47}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;y \leq 7 \cdot 10^{+198}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 7.2 \cdot 10^{+203}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -0.00949999999999999976 or 3.3500000000000001e-12 < y < 1.17999999999999996e39 or 1.30000000000000002e47 < y < 7.00000000000000026e198

    1. Initial program 98.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 92.1%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
    4. Taylor expanded in t around 0 69.5%

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

    if -0.00949999999999999976 < y < 3.3500000000000001e-12 or 7.00000000000000026e198 < y < 7.19999999999999964e203

    1. Initial program 95.7%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 84.1%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg84.1%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define89.8%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified89.8%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in z around 0 89.7%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right) + -1 \cdot \left(a \cdot z\right)}} \]
    7. Step-by-step derivation
      1. associate-*r*89.7%

        \[\leadsto x \cdot e^{\color{blue}{\left(-1 \cdot a\right) \cdot b} + -1 \cdot \left(a \cdot z\right)} \]
      2. associate-*r*89.7%

        \[\leadsto x \cdot e^{\left(-1 \cdot a\right) \cdot b + \color{blue}{\left(-1 \cdot a\right) \cdot z}} \]
      3. distribute-lft-out89.7%

        \[\leadsto x \cdot e^{\color{blue}{\left(-1 \cdot a\right) \cdot \left(b + z\right)}} \]
      4. neg-mul-189.7%

        \[\leadsto x \cdot e^{\color{blue}{\left(-a\right)} \cdot \left(b + z\right)} \]
    8. Simplified89.7%

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

    if 1.17999999999999996e39 < y < 1.30000000000000002e47 or 7.19999999999999964e203 < y

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 83.7%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg83.7%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out83.7%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative83.7%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified83.7%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification81.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -0.0095:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq 3.35 \cdot 10^{-12}:\\ \;\;\;\;x \cdot e^{\left(-a\right) \cdot \left(z + b\right)}\\ \mathbf{elif}\;y \leq 1.18 \cdot 10^{+39}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{+47}:\\ \;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+198}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+203}:\\ \;\;\;\;x \cdot e^{\left(-a\right) \cdot \left(z + b\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 70.6% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{+85} \lor \neg \left(y \leq 3.35 \cdot 10^{-12} \lor \neg \left(y \leq 9 \cdot 10^{+189}\right) \land y \leq 2.1 \cdot 10^{+241}\right):\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= y -1e+85)
         (not (or (<= y 3.35e-12) (and (not (<= y 9e+189)) (<= y 2.1e+241)))))
   (* x (pow z y))
   (* x (exp (* a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((y <= -1e+85) || !((y <= 3.35e-12) || (!(y <= 9e+189) && (y <= 2.1e+241)))) {
		tmp = x * pow(z, y);
	} else {
		tmp = x * exp((a * -b));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if ((y <= (-1d+85)) .or. (.not. (y <= 3.35d-12) .or. (.not. (y <= 9d+189)) .and. (y <= 2.1d+241))) then
        tmp = x * (z ** y)
    else
        tmp = x * exp((a * -b))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((y <= -1e+85) || !((y <= 3.35e-12) || (!(y <= 9e+189) && (y <= 2.1e+241)))) {
		tmp = x * Math.pow(z, y);
	} else {
		tmp = x * Math.exp((a * -b));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (y <= -1e+85) or not ((y <= 3.35e-12) or (not (y <= 9e+189) and (y <= 2.1e+241))):
		tmp = x * math.pow(z, y)
	else:
		tmp = x * math.exp((a * -b))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((y <= -1e+85) || !((y <= 3.35e-12) || (!(y <= 9e+189) && (y <= 2.1e+241))))
		tmp = Float64(x * (z ^ y));
	else
		tmp = Float64(x * exp(Float64(a * Float64(-b))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((y <= -1e+85) || ~(((y <= 3.35e-12) || (~((y <= 9e+189)) && (y <= 2.1e+241)))))
		tmp = x * (z ^ y);
	else
		tmp = x * exp((a * -b));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1e+85], N[Not[Or[LessEqual[y, 3.35e-12], And[N[Not[LessEqual[y, 9e+189]], $MachinePrecision], LessEqual[y, 2.1e+241]]]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+85} \lor \neg \left(y \leq 3.35 \cdot 10^{-12} \lor \neg \left(y \leq 9 \cdot 10^{+189}\right) \land y \leq 2.1 \cdot 10^{+241}\right):\\
\;\;\;\;x \cdot {z}^{y}\\

\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1e85 or 3.3500000000000001e-12 < y < 8.99999999999999947e189 or 2.1e241 < y

    1. Initial program 98.9%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 91.6%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
    4. Taylor expanded in t around 0 69.7%

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

    if -1e85 < y < 3.3500000000000001e-12 or 8.99999999999999947e189 < y < 2.1e241

    1. Initial program 95.9%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 76.2%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg76.2%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. distribute-rgt-neg-out76.2%

        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    5. Simplified76.2%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification73.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{+85} \lor \neg \left(y \leq 3.35 \cdot 10^{-12} \lor \neg \left(y \leq 9 \cdot 10^{+189}\right) \land y \leq 2.1 \cdot 10^{+241}\right):\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 72.0% accurate, 2.6× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -1.3:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 3.35 \cdot 10^{-12}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\

\mathbf{elif}\;y \leq 2.7 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.30000000000000004 or 3.3500000000000001e-12 < y < 2.70000000000000003e39

    1. Initial program 98.6%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 93.1%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
    4. Taylor expanded in t around 0 68.2%

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

    if -1.30000000000000004 < y < 3.3500000000000001e-12

    1. Initial program 95.6%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 82.7%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg82.7%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. distribute-rgt-neg-out82.7%

        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    5. Simplified82.7%

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

    if 2.70000000000000003e39 < y

    1. Initial program 98.2%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 70.4%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg70.4%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out70.4%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative70.4%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified70.4%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 8: 84.1% accurate, 2.9× speedup?

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

\\
x \cdot e^{a \cdot \left(-b\right) - y \cdot t}
\end{array}
Derivation
  1. Initial program 97.0%

    \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in z around 0 95.7%

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

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

      \[\leadsto x \cdot e^{-1 \cdot \left(a \cdot b\right) + y \cdot \color{blue}{\left(-t\right)}} \]
  6. Simplified83.0%

    \[\leadsto x \cdot e^{-1 \cdot \left(a \cdot b\right) + y \cdot \color{blue}{\left(-t\right)}} \]
  7. Final simplification83.0%

    \[\leadsto x \cdot e^{a \cdot \left(-b\right) - y \cdot t} \]
  8. Add Preprocessing

Alternative 9: 54.7% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{+123}:\\ \;\;\;\;y \cdot \left(t \cdot \left(\frac{1}{t} \cdot \frac{x}{y} - x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -4.5e+123) (* y (* t (- (* (/ 1.0 t) (/ x y)) x))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -4.5e+123) {
		tmp = y * (t * (((1.0 / t) * (x / y)) - x));
	} else {
		tmp = x * pow(z, y);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (t <= (-4.5d+123)) then
        tmp = y * (t * (((1.0d0 / t) * (x / y)) - x))
    else
        tmp = x * (z ** y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -4.5e+123) {
		tmp = y * (t * (((1.0 / t) * (x / y)) - x));
	} else {
		tmp = x * Math.pow(z, y);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= -4.5e+123:
		tmp = y * (t * (((1.0 / t) * (x / y)) - x))
	else:
		tmp = x * math.pow(z, y)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -4.5e+123)
		tmp = Float64(y * Float64(t * Float64(Float64(Float64(1.0 / t) * Float64(x / y)) - x)));
	else
		tmp = Float64(x * (z ^ y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= -4.5e+123)
		tmp = y * (t * (((1.0 / t) * (x / y)) - x));
	else
		tmp = x * (z ^ y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -4.5e+123], N[(y * N[(t * N[(N[(N[(1.0 / t), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+123}:\\
\;\;\;\;y \cdot \left(t \cdot \left(\frac{1}{t} \cdot \frac{x}{y} - x\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.49999999999999983e123

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 96.8%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg96.8%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out96.8%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative96.8%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified96.8%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 43.7%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg43.7%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*46.7%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified46.7%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in y around inf 46.7%

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{y} - t \cdot x\right)} \]
    10. Taylor expanded in t around inf 46.6%

      \[\leadsto y \cdot \color{blue}{\left(t \cdot \left(\frac{x}{t \cdot y} - x\right)\right)} \]
    11. Step-by-step derivation
      1. *-un-lft-identity46.6%

        \[\leadsto y \cdot \left(t \cdot \left(\frac{\color{blue}{1 \cdot x}}{t \cdot y} - x\right)\right) \]
      2. times-frac49.9%

        \[\leadsto y \cdot \left(t \cdot \left(\color{blue}{\frac{1}{t} \cdot \frac{x}{y}} - x\right)\right) \]
    12. Applied egg-rr49.9%

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

    if -4.49999999999999983e123 < t

    1. Initial program 96.6%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 64.0%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
    4. Taylor expanded in t around 0 55.2%

      \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 10: 27.3% accurate, 6.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - a \cdot b\right)\\ \mathbf{if}\;a \leq -2.7 \cdot 10^{-278}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{-184}:\\ \;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{-152}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-103}:\\ \;\;\;\;z \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{-83}:\\ \;\;\;\;y \cdot \frac{x}{y}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+46}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{+143}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+195}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+265}:\\ \;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (* a b)))))
   (if (<= a -2.7e-278)
     t_1
     (if (<= a 5.8e-184)
       (* x (* z (- a)))
       (if (<= a 1.85e-152)
         (* x (- 1.0 (* y t)))
         (if (<= a 1.65e-103)
           (* z (/ x z))
           (if (<= a 8.5e-83)
             (* y (/ x y))
             (if (<= a 9e+46)
               t_1
               (if (<= a 4.4e+143)
                 (* x (* y (- t)))
                 (if (<= a 1.35e+195)
                   (* t (* x (- y)))
                   (if (<= a 3.3e+265)
                     (* y (* x (- t)))
                     (* a (* x (- b))))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * (1.0 - (a * b));
	double tmp;
	if (a <= -2.7e-278) {
		tmp = t_1;
	} else if (a <= 5.8e-184) {
		tmp = x * (z * -a);
	} else if (a <= 1.85e-152) {
		tmp = x * (1.0 - (y * t));
	} else if (a <= 1.65e-103) {
		tmp = z * (x / z);
	} else if (a <= 8.5e-83) {
		tmp = y * (x / y);
	} else if (a <= 9e+46) {
		tmp = t_1;
	} else if (a <= 4.4e+143) {
		tmp = x * (y * -t);
	} else if (a <= 1.35e+195) {
		tmp = t * (x * -y);
	} else if (a <= 3.3e+265) {
		tmp = y * (x * -t);
	} else {
		tmp = a * (x * -b);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (1.0d0 - (a * b))
    if (a <= (-2.7d-278)) then
        tmp = t_1
    else if (a <= 5.8d-184) then
        tmp = x * (z * -a)
    else if (a <= 1.85d-152) then
        tmp = x * (1.0d0 - (y * t))
    else if (a <= 1.65d-103) then
        tmp = z * (x / z)
    else if (a <= 8.5d-83) then
        tmp = y * (x / y)
    else if (a <= 9d+46) then
        tmp = t_1
    else if (a <= 4.4d+143) then
        tmp = x * (y * -t)
    else if (a <= 1.35d+195) then
        tmp = t * (x * -y)
    else if (a <= 3.3d+265) then
        tmp = y * (x * -t)
    else
        tmp = a * (x * -b)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * (1.0 - (a * b));
	double tmp;
	if (a <= -2.7e-278) {
		tmp = t_1;
	} else if (a <= 5.8e-184) {
		tmp = x * (z * -a);
	} else if (a <= 1.85e-152) {
		tmp = x * (1.0 - (y * t));
	} else if (a <= 1.65e-103) {
		tmp = z * (x / z);
	} else if (a <= 8.5e-83) {
		tmp = y * (x / y);
	} else if (a <= 9e+46) {
		tmp = t_1;
	} else if (a <= 4.4e+143) {
		tmp = x * (y * -t);
	} else if (a <= 1.35e+195) {
		tmp = t * (x * -y);
	} else if (a <= 3.3e+265) {
		tmp = y * (x * -t);
	} else {
		tmp = a * (x * -b);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x * (1.0 - (a * b))
	tmp = 0
	if a <= -2.7e-278:
		tmp = t_1
	elif a <= 5.8e-184:
		tmp = x * (z * -a)
	elif a <= 1.85e-152:
		tmp = x * (1.0 - (y * t))
	elif a <= 1.65e-103:
		tmp = z * (x / z)
	elif a <= 8.5e-83:
		tmp = y * (x / y)
	elif a <= 9e+46:
		tmp = t_1
	elif a <= 4.4e+143:
		tmp = x * (y * -t)
	elif a <= 1.35e+195:
		tmp = t * (x * -y)
	elif a <= 3.3e+265:
		tmp = y * (x * -t)
	else:
		tmp = a * (x * -b)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x * Float64(1.0 - Float64(a * b)))
	tmp = 0.0
	if (a <= -2.7e-278)
		tmp = t_1;
	elseif (a <= 5.8e-184)
		tmp = Float64(x * Float64(z * Float64(-a)));
	elseif (a <= 1.85e-152)
		tmp = Float64(x * Float64(1.0 - Float64(y * t)));
	elseif (a <= 1.65e-103)
		tmp = Float64(z * Float64(x / z));
	elseif (a <= 8.5e-83)
		tmp = Float64(y * Float64(x / y));
	elseif (a <= 9e+46)
		tmp = t_1;
	elseif (a <= 4.4e+143)
		tmp = Float64(x * Float64(y * Float64(-t)));
	elseif (a <= 1.35e+195)
		tmp = Float64(t * Float64(x * Float64(-y)));
	elseif (a <= 3.3e+265)
		tmp = Float64(y * Float64(x * Float64(-t)));
	else
		tmp = Float64(a * Float64(x * Float64(-b)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x * (1.0 - (a * b));
	tmp = 0.0;
	if (a <= -2.7e-278)
		tmp = t_1;
	elseif (a <= 5.8e-184)
		tmp = x * (z * -a);
	elseif (a <= 1.85e-152)
		tmp = x * (1.0 - (y * t));
	elseif (a <= 1.65e-103)
		tmp = z * (x / z);
	elseif (a <= 8.5e-83)
		tmp = y * (x / y);
	elseif (a <= 9e+46)
		tmp = t_1;
	elseif (a <= 4.4e+143)
		tmp = x * (y * -t);
	elseif (a <= 1.35e+195)
		tmp = t * (x * -y);
	elseif (a <= 3.3e+265)
		tmp = y * (x * -t);
	else
		tmp = a * (x * -b);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.7e-278], t$95$1, If[LessEqual[a, 5.8e-184], N[(x * N[(z * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.85e-152], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.65e-103], N[(z * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.5e-83], N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e+46], t$95$1, If[LessEqual[a, 4.4e+143], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.35e+195], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.3e+265], N[(y * N[(x * (-t)), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - a \cdot b\right)\\
\mathbf{if}\;a \leq -2.7 \cdot 10^{-278}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 5.8 \cdot 10^{-184}:\\
\;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\

\mathbf{elif}\;a \leq 1.85 \cdot 10^{-152}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\

\mathbf{elif}\;a \leq 1.65 \cdot 10^{-103}:\\
\;\;\;\;z \cdot \frac{x}{z}\\

\mathbf{elif}\;a \leq 8.5 \cdot 10^{-83}:\\
\;\;\;\;y \cdot \frac{x}{y}\\

\mathbf{elif}\;a \leq 9 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.35 \cdot 10^{+195}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\

\mathbf{elif}\;a \leq 3.3 \cdot 10^{+265}:\\
\;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 9 regimes
  2. if a < -2.7000000000000001e-278 or 8.49999999999999938e-83 < a < 9.00000000000000019e46

    1. Initial program 97.3%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 69.3%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg69.3%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. distribute-rgt-neg-out69.3%

        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    5. Simplified69.3%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    6. Taylor expanded in a around 0 35.6%

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \left(a \cdot b\right) + 1\right)} \]
      2. associate-*r*35.6%

        \[\leadsto x \cdot \left(\color{blue}{\left(-1 \cdot a\right) \cdot b} + 1\right) \]
      3. neg-mul-135.6%

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

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

    if -2.7000000000000001e-278 < a < 5.80000000000000028e-184

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 29.3%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg29.3%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define29.3%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified29.3%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 26.1%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 26.1%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-126.1%

        \[\leadsto x + \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    9. Simplified26.1%

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in a around inf 29.0%

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(x \cdot z\right) + \frac{x}{a}\right)} \]
    11. Step-by-step derivation
      1. +-commutative29.0%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} + -1 \cdot \left(x \cdot z\right)\right)} \]
      2. mul-1-neg29.0%

        \[\leadsto a \cdot \left(\frac{x}{a} + \color{blue}{\left(-x \cdot z\right)}\right) \]
      3. *-commutative29.0%

        \[\leadsto a \cdot \left(\frac{x}{a} + \left(-\color{blue}{z \cdot x}\right)\right) \]
      4. unsub-neg29.0%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} - z \cdot x\right)} \]
    12. Simplified29.0%

      \[\leadsto \color{blue}{a \cdot \left(\frac{x}{a} - z \cdot x\right)} \]
    13. Taylor expanded in a around inf 39.1%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(x \cdot z\right)\right)} \]
    14. Step-by-step derivation
      1. mul-1-neg39.1%

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

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

        \[\leadsto -\color{blue}{x \cdot \left(z \cdot a\right)} \]
      4. distribute-rgt-neg-in55.0%

        \[\leadsto \color{blue}{x \cdot \left(-z \cdot a\right)} \]
      5. distribute-rgt-neg-out55.0%

        \[\leadsto x \cdot \color{blue}{\left(z \cdot \left(-a\right)\right)} \]
    15. Simplified55.0%

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

    if 5.80000000000000028e-184 < a < 1.8499999999999999e-152

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 93.1%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg93.1%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out93.1%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative93.1%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified93.1%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 73.4%

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-t \cdot y\right)}\right) \]
      2. unsub-neg73.4%

        \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]
      3. *-commutative73.4%

        \[\leadsto x \cdot \left(1 - \color{blue}{y \cdot t}\right) \]
    8. Simplified73.4%

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

    if 1.8499999999999999e-152 < a < 1.64999999999999995e-103

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 40.3%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg40.3%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define40.3%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified40.3%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 23.0%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 23.0%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-123.0%

        \[\leadsto x + \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    9. Simplified23.0%

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in z around inf 47.8%

      \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \left(a \cdot x\right) + \frac{x}{z}\right)} \]
    11. Taylor expanded in a around 0 47.8%

      \[\leadsto z \cdot \color{blue}{\frac{x}{z}} \]

    if 1.64999999999999995e-103 < a < 8.49999999999999938e-83

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 72.3%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg72.3%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out72.3%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative72.3%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified72.3%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 18.2%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg18.2%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*28.9%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified28.9%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in y around inf 50.2%

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{y} - t \cdot x\right)} \]
    10. Taylor expanded in y around 0 61.1%

      \[\leadsto y \cdot \color{blue}{\frac{x}{y}} \]

    if 9.00000000000000019e46 < a < 4.40000000000000028e143

    1. Initial program 94.3%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 56.6%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg56.6%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out56.6%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative56.6%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified56.6%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 22.1%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg22.1%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*22.1%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified22.1%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in t around inf 25.5%

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot y\right)\right)} \]
    10. Step-by-step derivation
      1. mul-1-neg25.5%

        \[\leadsto \color{blue}{-t \cdot \left(x \cdot y\right)} \]
      2. distribute-rgt-neg-in25.5%

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

        \[\leadsto t \cdot \left(-\color{blue}{y \cdot x}\right) \]
      4. distribute-lft-neg-in25.5%

        \[\leadsto t \cdot \color{blue}{\left(\left(-y\right) \cdot x\right)} \]
    11. Simplified25.5%

      \[\leadsto \color{blue}{t \cdot \left(\left(-y\right) \cdot x\right)} \]
    12. Step-by-step derivation
      1. distribute-lft-neg-out25.5%

        \[\leadsto t \cdot \color{blue}{\left(-y \cdot x\right)} \]
      2. distribute-rgt-neg-out25.5%

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

        \[\leadsto -t \cdot \color{blue}{\left(x \cdot y\right)} \]
      4. associate-*l*25.5%

        \[\leadsto -\color{blue}{\left(t \cdot x\right) \cdot y} \]
      5. *-commutative25.5%

        \[\leadsto -\color{blue}{y \cdot \left(t \cdot x\right)} \]
      6. associate-*r*36.6%

        \[\leadsto -\color{blue}{\left(y \cdot t\right) \cdot x} \]
    13. Applied egg-rr36.6%

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

    if 4.40000000000000028e143 < a < 1.3500000000000001e195

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 44.3%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg44.3%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out44.3%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative44.3%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified44.3%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 16.6%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg16.6%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*16.6%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified16.6%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in t around inf 30.6%

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

        \[\leadsto \color{blue}{-t \cdot \left(x \cdot y\right)} \]
      2. distribute-rgt-neg-in30.6%

        \[\leadsto \color{blue}{t \cdot \left(-x \cdot y\right)} \]
      3. *-commutative30.6%

        \[\leadsto t \cdot \left(-\color{blue}{y \cdot x}\right) \]
      4. distribute-lft-neg-in30.6%

        \[\leadsto t \cdot \color{blue}{\left(\left(-y\right) \cdot x\right)} \]
    11. Simplified30.6%

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

    if 1.3500000000000001e195 < a < 3.2999999999999998e265

    1. Initial program 85.2%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 40.9%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg40.9%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out40.9%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative40.9%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified40.9%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 18.5%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg18.5%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*18.6%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified18.6%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in t around inf 40.7%

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot y\right)\right)} \]
    10. Step-by-step derivation
      1. associate-*r*48.1%

        \[\leadsto -1 \cdot \color{blue}{\left(\left(t \cdot x\right) \cdot y\right)} \]
      2. *-commutative48.1%

        \[\leadsto -1 \cdot \color{blue}{\left(y \cdot \left(t \cdot x\right)\right)} \]
      3. neg-mul-148.1%

        \[\leadsto \color{blue}{-y \cdot \left(t \cdot x\right)} \]
      4. distribute-rgt-neg-in48.1%

        \[\leadsto \color{blue}{y \cdot \left(-t \cdot x\right)} \]
      5. distribute-rgt-neg-in48.1%

        \[\leadsto y \cdot \color{blue}{\left(t \cdot \left(-x\right)\right)} \]
    11. Simplified48.1%

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

    if 3.2999999999999998e265 < a

    1. Initial program 93.4%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 73.8%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg73.8%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. distribute-rgt-neg-out73.8%

        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    5. Simplified73.8%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    6. Taylor expanded in a around 0 41.7%

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \left(a \cdot b\right) + 1\right)} \]
      2. associate-*r*41.7%

        \[\leadsto x \cdot \left(\color{blue}{\left(-1 \cdot a\right) \cdot b} + 1\right) \]
      3. neg-mul-141.7%

        \[\leadsto x \cdot \left(\color{blue}{\left(-a\right)} \cdot b + 1\right) \]
    8. Simplified41.7%

      \[\leadsto x \cdot \color{blue}{\left(\left(-a\right) \cdot b + 1\right)} \]
    9. Taylor expanded in a around inf 48.1%

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot \left(b \cdot x\right)} \]
      2. mul-1-neg48.1%

        \[\leadsto \color{blue}{\left(-a\right)} \cdot \left(b \cdot x\right) \]
    11. Simplified48.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.7 \cdot 10^{-278}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{-184}:\\ \;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{-152}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-103}:\\ \;\;\;\;z \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{-83}:\\ \;\;\;\;y \cdot \frac{x}{y}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+46}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{+143}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+195}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+265}:\\ \;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 29.5% accurate, 6.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(t \cdot \frac{x}{y \cdot t}\right)\\ \mathbf{if}\;x \leq 1.7 \cdot 10^{-100}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.28 \cdot 10^{-24}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{-23}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 85000000:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{elif}\;x \leq 3.7 \cdot 10^{+41}:\\ \;\;\;\;x \cdot \left(z \cdot a\right)\\ \mathbf{elif}\;x \leq 4 \cdot 10^{+115}:\\ \;\;\;\;z \cdot \left(a \cdot \left(\frac{x}{z \cdot a} - x\right)\right)\\ \mathbf{elif}\;x \leq 3.1 \cdot 10^{+191}:\\ \;\;\;\;y \cdot \left(t \cdot \left(\frac{\frac{x}{t}}{y} - x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(\frac{x}{t} - x \cdot y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (* t (/ x (* y t))))))
   (if (<= x 1.7e-100)
     t_1
     (if (<= x 1.28e-24)
       (* a (* x (- b)))
       (if (<= x 4.4e-23)
         t_1
         (if (<= x 85000000.0)
           (* x (- 1.0 (* a b)))
           (if (<= x 3.7e+41)
             (* x (* z a))
             (if (<= x 4e+115)
               (* z (* a (- (/ x (* z a)) x)))
               (if (<= x 3.1e+191)
                 (* y (* t (- (/ (/ x t) y) x)))
                 (* t (- (/ x t) (* x y))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (t * (x / (y * t)));
	double tmp;
	if (x <= 1.7e-100) {
		tmp = t_1;
	} else if (x <= 1.28e-24) {
		tmp = a * (x * -b);
	} else if (x <= 4.4e-23) {
		tmp = t_1;
	} else if (x <= 85000000.0) {
		tmp = x * (1.0 - (a * b));
	} else if (x <= 3.7e+41) {
		tmp = x * (z * a);
	} else if (x <= 4e+115) {
		tmp = z * (a * ((x / (z * a)) - x));
	} else if (x <= 3.1e+191) {
		tmp = y * (t * (((x / t) / y) - x));
	} else {
		tmp = t * ((x / t) - (x * 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 = y * (t * (x / (y * t)))
    if (x <= 1.7d-100) then
        tmp = t_1
    else if (x <= 1.28d-24) then
        tmp = a * (x * -b)
    else if (x <= 4.4d-23) then
        tmp = t_1
    else if (x <= 85000000.0d0) then
        tmp = x * (1.0d0 - (a * b))
    else if (x <= 3.7d+41) then
        tmp = x * (z * a)
    else if (x <= 4d+115) then
        tmp = z * (a * ((x / (z * a)) - x))
    else if (x <= 3.1d+191) then
        tmp = y * (t * (((x / t) / y) - x))
    else
        tmp = t * ((x / t) - (x * 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 = y * (t * (x / (y * t)));
	double tmp;
	if (x <= 1.7e-100) {
		tmp = t_1;
	} else if (x <= 1.28e-24) {
		tmp = a * (x * -b);
	} else if (x <= 4.4e-23) {
		tmp = t_1;
	} else if (x <= 85000000.0) {
		tmp = x * (1.0 - (a * b));
	} else if (x <= 3.7e+41) {
		tmp = x * (z * a);
	} else if (x <= 4e+115) {
		tmp = z * (a * ((x / (z * a)) - x));
	} else if (x <= 3.1e+191) {
		tmp = y * (t * (((x / t) / y) - x));
	} else {
		tmp = t * ((x / t) - (x * y));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (t * (x / (y * t)))
	tmp = 0
	if x <= 1.7e-100:
		tmp = t_1
	elif x <= 1.28e-24:
		tmp = a * (x * -b)
	elif x <= 4.4e-23:
		tmp = t_1
	elif x <= 85000000.0:
		tmp = x * (1.0 - (a * b))
	elif x <= 3.7e+41:
		tmp = x * (z * a)
	elif x <= 4e+115:
		tmp = z * (a * ((x / (z * a)) - x))
	elif x <= 3.1e+191:
		tmp = y * (t * (((x / t) / y) - x))
	else:
		tmp = t * ((x / t) - (x * y))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(t * Float64(x / Float64(y * t))))
	tmp = 0.0
	if (x <= 1.7e-100)
		tmp = t_1;
	elseif (x <= 1.28e-24)
		tmp = Float64(a * Float64(x * Float64(-b)));
	elseif (x <= 4.4e-23)
		tmp = t_1;
	elseif (x <= 85000000.0)
		tmp = Float64(x * Float64(1.0 - Float64(a * b)));
	elseif (x <= 3.7e+41)
		tmp = Float64(x * Float64(z * a));
	elseif (x <= 4e+115)
		tmp = Float64(z * Float64(a * Float64(Float64(x / Float64(z * a)) - x)));
	elseif (x <= 3.1e+191)
		tmp = Float64(y * Float64(t * Float64(Float64(Float64(x / t) / y) - x)));
	else
		tmp = Float64(t * Float64(Float64(x / t) - Float64(x * y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * (t * (x / (y * t)));
	tmp = 0.0;
	if (x <= 1.7e-100)
		tmp = t_1;
	elseif (x <= 1.28e-24)
		tmp = a * (x * -b);
	elseif (x <= 4.4e-23)
		tmp = t_1;
	elseif (x <= 85000000.0)
		tmp = x * (1.0 - (a * b));
	elseif (x <= 3.7e+41)
		tmp = x * (z * a);
	elseif (x <= 4e+115)
		tmp = z * (a * ((x / (z * a)) - x));
	elseif (x <= 3.1e+191)
		tmp = y * (t * (((x / t) / y) - x));
	else
		tmp = t * ((x / t) - (x * y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(t * N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 1.7e-100], t$95$1, If[LessEqual[x, 1.28e-24], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.4e-23], t$95$1, If[LessEqual[x, 85000000.0], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.7e+41], N[(x * N[(z * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4e+115], N[(z * N[(a * N[(N[(x / N[(z * a), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.1e+191], N[(y * N[(t * N[(N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(x / t), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(t \cdot \frac{x}{y \cdot t}\right)\\
\mathbf{if}\;x \leq 1.7 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 1.28 \cdot 10^{-24}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\

\mathbf{elif}\;x \leq 4.4 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 85000000:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\

\mathbf{elif}\;x \leq 3.7 \cdot 10^{+41}:\\
\;\;\;\;x \cdot \left(z \cdot a\right)\\

\mathbf{elif}\;x \leq 4 \cdot 10^{+115}:\\
\;\;\;\;z \cdot \left(a \cdot \left(\frac{x}{z \cdot a} - x\right)\right)\\

\mathbf{elif}\;x \leq 3.1 \cdot 10^{+191}:\\
\;\;\;\;y \cdot \left(t \cdot \left(\frac{\frac{x}{t}}{y} - x\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if x < 1.69999999999999988e-100 or 1.28e-24 < x < 4.3999999999999999e-23

    1. Initial program 96.7%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 51.3%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg51.3%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out51.3%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative51.3%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified51.3%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 25.1%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg25.1%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*25.8%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified25.8%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in y around inf 26.8%

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{y} - t \cdot x\right)} \]
    10. Taylor expanded in t around inf 23.9%

      \[\leadsto y \cdot \color{blue}{\left(t \cdot \left(\frac{x}{t \cdot y} - x\right)\right)} \]
    11. Taylor expanded in t around 0 29.8%

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

    if 1.69999999999999988e-100 < x < 1.28e-24

    1. Initial program 88.6%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 48.8%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg48.8%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. distribute-rgt-neg-out48.8%

        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    5. Simplified48.8%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    6. Taylor expanded in a around 0 14.7%

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \left(a \cdot b\right) + 1\right)} \]
      2. associate-*r*14.7%

        \[\leadsto x \cdot \left(\color{blue}{\left(-1 \cdot a\right) \cdot b} + 1\right) \]
      3. neg-mul-114.7%

        \[\leadsto x \cdot \left(\color{blue}{\left(-a\right)} \cdot b + 1\right) \]
    8. Simplified14.7%

      \[\leadsto x \cdot \color{blue}{\left(\left(-a\right) \cdot b + 1\right)} \]
    9. Taylor expanded in a around inf 21.0%

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot \left(b \cdot x\right)} \]
      2. mul-1-neg21.0%

        \[\leadsto \color{blue}{\left(-a\right)} \cdot \left(b \cdot x\right) \]
    11. Simplified21.0%

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

    if 4.3999999999999999e-23 < x < 8.5e7

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 61.1%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg61.1%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. distribute-rgt-neg-out61.1%

        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    5. Simplified61.1%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    6. Taylor expanded in a around 0 41.3%

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \left(a \cdot b\right) + 1\right)} \]
      2. associate-*r*41.3%

        \[\leadsto x \cdot \left(\color{blue}{\left(-1 \cdot a\right) \cdot b} + 1\right) \]
      3. neg-mul-141.3%

        \[\leadsto x \cdot \left(\color{blue}{\left(-a\right)} \cdot b + 1\right) \]
    8. Simplified41.3%

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

    if 8.5e7 < x < 3.69999999999999981e41

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 22.5%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg22.5%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define22.4%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified22.4%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 10.2%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 10.2%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-110.2%

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in z around inf 10.2%

      \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \left(a \cdot x\right) + \frac{x}{z}\right)} \]
    11. Taylor expanded in z around inf 2.7%

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. mul-1-neg2.7%

        \[\leadsto \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    13. Simplified2.7%

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(x \cdot z\right)} \]
    14. Step-by-step derivation
      1. add-sqr-sqrt1.5%

        \[\leadsto \color{blue}{\left(\sqrt{-a} \cdot \sqrt{-a}\right)} \cdot \left(x \cdot z\right) \]
      2. sqrt-unprod2.9%

        \[\leadsto \color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}} \cdot \left(x \cdot z\right) \]
      3. sqr-neg2.9%

        \[\leadsto \sqrt{\color{blue}{a \cdot a}} \cdot \left(x \cdot z\right) \]
      4. sqrt-unprod1.4%

        \[\leadsto \color{blue}{\left(\sqrt{a} \cdot \sqrt{a}\right)} \cdot \left(x \cdot z\right) \]
      5. add-sqr-sqrt2.9%

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

        \[\leadsto \color{blue}{{\left(a \cdot \left(x \cdot z\right)\right)}^{1}} \]
      7. *-commutative2.9%

        \[\leadsto {\left(a \cdot \color{blue}{\left(z \cdot x\right)}\right)}^{1} \]
    15. Applied egg-rr2.9%

      \[\leadsto \color{blue}{{\left(a \cdot \left(z \cdot x\right)\right)}^{1}} \]
    16. Step-by-step derivation
      1. unpow12.9%

        \[\leadsto \color{blue}{a \cdot \left(z \cdot x\right)} \]
    17. Simplified2.9%

      \[\leadsto \color{blue}{a \cdot \left(z \cdot x\right)} \]
    18. Taylor expanded in a around 0 2.9%

      \[\leadsto \color{blue}{a \cdot \left(x \cdot z\right)} \]
    19. Step-by-step derivation
      1. *-commutative2.9%

        \[\leadsto \color{blue}{\left(x \cdot z\right) \cdot a} \]
      2. associate-*l*2.9%

        \[\leadsto \color{blue}{x \cdot \left(z \cdot a\right)} \]
      3. *-commutative2.9%

        \[\leadsto x \cdot \color{blue}{\left(a \cdot z\right)} \]
    20. Simplified2.9%

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

    if 3.69999999999999981e41 < x < 4.0000000000000001e115

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 71.2%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg71.2%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define77.3%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified77.3%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 16.8%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 16.6%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-116.6%

        \[\leadsto x + \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    9. Simplified16.6%

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in z around inf 28.5%

      \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \left(a \cdot x\right) + \frac{x}{z}\right)} \]
    11. Taylor expanded in a around inf 28.5%

      \[\leadsto z \cdot \color{blue}{\left(a \cdot \left(-1 \cdot x + \frac{x}{a \cdot z}\right)\right)} \]
    12. Step-by-step derivation
      1. neg-mul-128.5%

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

        \[\leadsto z \cdot \left(a \cdot \color{blue}{\left(\frac{x}{a \cdot z} + \left(-x\right)\right)}\right) \]
      3. unsub-neg28.5%

        \[\leadsto z \cdot \left(a \cdot \color{blue}{\left(\frac{x}{a \cdot z} - x\right)}\right) \]
    13. Simplified28.5%

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

    if 4.0000000000000001e115 < x < 3.09999999999999999e191

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 69.9%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg69.9%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out69.9%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative69.9%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified69.9%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 45.6%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg45.6%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*45.6%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified45.6%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in y around inf 51.5%

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{y} - t \cdot x\right)} \]
    10. Taylor expanded in t around inf 51.4%

      \[\leadsto y \cdot \color{blue}{\left(t \cdot \left(\frac{x}{t \cdot y} - x\right)\right)} \]
    11. Step-by-step derivation
      1. associate-/r*51.3%

        \[\leadsto y \cdot \left(t \cdot \left(\color{blue}{\frac{\frac{x}{t}}{y}} - x\right)\right) \]
    12. Simplified51.3%

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

    if 3.09999999999999999e191 < x

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 56.5%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg56.5%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out56.5%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative56.5%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified56.5%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 41.7%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg41.7%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*37.6%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified37.6%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in t around inf 48.9%

      \[\leadsto \color{blue}{t \cdot \left(\frac{x}{t} - x \cdot y\right)} \]
    10. Step-by-step derivation
      1. *-commutative48.9%

        \[\leadsto t \cdot \left(\frac{x}{t} - \color{blue}{y \cdot x}\right) \]
    11. Simplified48.9%

      \[\leadsto \color{blue}{t \cdot \left(\frac{x}{t} - y \cdot x\right)} \]
  3. Recombined 7 regimes into one program.
  4. Final simplification31.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.7 \cdot 10^{-100}:\\ \;\;\;\;y \cdot \left(t \cdot \frac{x}{y \cdot t}\right)\\ \mathbf{elif}\;x \leq 1.28 \cdot 10^{-24}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{-23}:\\ \;\;\;\;y \cdot \left(t \cdot \frac{x}{y \cdot t}\right)\\ \mathbf{elif}\;x \leq 85000000:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{elif}\;x \leq 3.7 \cdot 10^{+41}:\\ \;\;\;\;x \cdot \left(z \cdot a\right)\\ \mathbf{elif}\;x \leq 4 \cdot 10^{+115}:\\ \;\;\;\;z \cdot \left(a \cdot \left(\frac{x}{z \cdot a} - x\right)\right)\\ \mathbf{elif}\;x \leq 3.1 \cdot 10^{+191}:\\ \;\;\;\;y \cdot \left(t \cdot \left(\frac{\frac{x}{t}}{y} - x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(\frac{x}{t} - x \cdot y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 29.7% accurate, 7.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(t \cdot \frac{x}{y \cdot t}\right)\\ \mathbf{if}\;x \leq 1.7 \cdot 10^{-100}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{-24}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{-23}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 135000000:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{elif}\;x \leq 4.3 \cdot 10^{+42}:\\ \;\;\;\;x \cdot \left(z \cdot a\right)\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{+53}:\\ \;\;\;\;z \cdot \left(\frac{x}{z} - x \cdot a\right)\\ \mathbf{elif}\;x \leq 5 \cdot 10^{+146}:\\ \;\;\;\;y \cdot \left(\frac{x}{y} - x \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(\frac{x}{t} - x \cdot y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (* t (/ x (* y t))))))
   (if (<= x 1.7e-100)
     t_1
     (if (<= x 2.8e-24)
       (* a (* x (- b)))
       (if (<= x 3.6e-23)
         t_1
         (if (<= x 135000000.0)
           (* x (- 1.0 (* a b)))
           (if (<= x 4.3e+42)
             (* x (* z a))
             (if (<= x 2.8e+53)
               (* z (- (/ x z) (* x a)))
               (if (<= x 5e+146)
                 (* y (- (/ x y) (* x t)))
                 (* t (- (/ x t) (* x y))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (t * (x / (y * t)));
	double tmp;
	if (x <= 1.7e-100) {
		tmp = t_1;
	} else if (x <= 2.8e-24) {
		tmp = a * (x * -b);
	} else if (x <= 3.6e-23) {
		tmp = t_1;
	} else if (x <= 135000000.0) {
		tmp = x * (1.0 - (a * b));
	} else if (x <= 4.3e+42) {
		tmp = x * (z * a);
	} else if (x <= 2.8e+53) {
		tmp = z * ((x / z) - (x * a));
	} else if (x <= 5e+146) {
		tmp = y * ((x / y) - (x * t));
	} else {
		tmp = t * ((x / t) - (x * 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 = y * (t * (x / (y * t)))
    if (x <= 1.7d-100) then
        tmp = t_1
    else if (x <= 2.8d-24) then
        tmp = a * (x * -b)
    else if (x <= 3.6d-23) then
        tmp = t_1
    else if (x <= 135000000.0d0) then
        tmp = x * (1.0d0 - (a * b))
    else if (x <= 4.3d+42) then
        tmp = x * (z * a)
    else if (x <= 2.8d+53) then
        tmp = z * ((x / z) - (x * a))
    else if (x <= 5d+146) then
        tmp = y * ((x / y) - (x * t))
    else
        tmp = t * ((x / t) - (x * 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 = y * (t * (x / (y * t)));
	double tmp;
	if (x <= 1.7e-100) {
		tmp = t_1;
	} else if (x <= 2.8e-24) {
		tmp = a * (x * -b);
	} else if (x <= 3.6e-23) {
		tmp = t_1;
	} else if (x <= 135000000.0) {
		tmp = x * (1.0 - (a * b));
	} else if (x <= 4.3e+42) {
		tmp = x * (z * a);
	} else if (x <= 2.8e+53) {
		tmp = z * ((x / z) - (x * a));
	} else if (x <= 5e+146) {
		tmp = y * ((x / y) - (x * t));
	} else {
		tmp = t * ((x / t) - (x * y));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (t * (x / (y * t)))
	tmp = 0
	if x <= 1.7e-100:
		tmp = t_1
	elif x <= 2.8e-24:
		tmp = a * (x * -b)
	elif x <= 3.6e-23:
		tmp = t_1
	elif x <= 135000000.0:
		tmp = x * (1.0 - (a * b))
	elif x <= 4.3e+42:
		tmp = x * (z * a)
	elif x <= 2.8e+53:
		tmp = z * ((x / z) - (x * a))
	elif x <= 5e+146:
		tmp = y * ((x / y) - (x * t))
	else:
		tmp = t * ((x / t) - (x * y))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(t * Float64(x / Float64(y * t))))
	tmp = 0.0
	if (x <= 1.7e-100)
		tmp = t_1;
	elseif (x <= 2.8e-24)
		tmp = Float64(a * Float64(x * Float64(-b)));
	elseif (x <= 3.6e-23)
		tmp = t_1;
	elseif (x <= 135000000.0)
		tmp = Float64(x * Float64(1.0 - Float64(a * b)));
	elseif (x <= 4.3e+42)
		tmp = Float64(x * Float64(z * a));
	elseif (x <= 2.8e+53)
		tmp = Float64(z * Float64(Float64(x / z) - Float64(x * a)));
	elseif (x <= 5e+146)
		tmp = Float64(y * Float64(Float64(x / y) - Float64(x * t)));
	else
		tmp = Float64(t * Float64(Float64(x / t) - Float64(x * y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * (t * (x / (y * t)));
	tmp = 0.0;
	if (x <= 1.7e-100)
		tmp = t_1;
	elseif (x <= 2.8e-24)
		tmp = a * (x * -b);
	elseif (x <= 3.6e-23)
		tmp = t_1;
	elseif (x <= 135000000.0)
		tmp = x * (1.0 - (a * b));
	elseif (x <= 4.3e+42)
		tmp = x * (z * a);
	elseif (x <= 2.8e+53)
		tmp = z * ((x / z) - (x * a));
	elseif (x <= 5e+146)
		tmp = y * ((x / y) - (x * t));
	else
		tmp = t * ((x / t) - (x * y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(t * N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 1.7e-100], t$95$1, If[LessEqual[x, 2.8e-24], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.6e-23], t$95$1, If[LessEqual[x, 135000000.0], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.3e+42], N[(x * N[(z * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e+53], N[(z * N[(N[(x / z), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5e+146], N[(y * N[(N[(x / y), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(x / t), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(t \cdot \frac{x}{y \cdot t}\right)\\
\mathbf{if}\;x \leq 1.7 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 2.8 \cdot 10^{-24}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\

\mathbf{elif}\;x \leq 3.6 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 135000000:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\

\mathbf{elif}\;x \leq 4.3 \cdot 10^{+42}:\\
\;\;\;\;x \cdot \left(z \cdot a\right)\\

\mathbf{elif}\;x \leq 2.8 \cdot 10^{+53}:\\
\;\;\;\;z \cdot \left(\frac{x}{z} - x \cdot a\right)\\

\mathbf{elif}\;x \leq 5 \cdot 10^{+146}:\\
\;\;\;\;y \cdot \left(\frac{x}{y} - x \cdot t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if x < 1.69999999999999988e-100 or 2.8000000000000002e-24 < x < 3.5999999999999998e-23

    1. Initial program 96.7%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 51.3%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg51.3%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out51.3%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative51.3%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified51.3%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 25.1%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg25.1%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*25.8%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified25.8%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in y around inf 26.8%

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{y} - t \cdot x\right)} \]
    10. Taylor expanded in t around inf 23.9%

      \[\leadsto y \cdot \color{blue}{\left(t \cdot \left(\frac{x}{t \cdot y} - x\right)\right)} \]
    11. Taylor expanded in t around 0 29.8%

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

    if 1.69999999999999988e-100 < x < 2.8000000000000002e-24

    1. Initial program 88.6%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 48.8%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg48.8%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. distribute-rgt-neg-out48.8%

        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    5. Simplified48.8%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    6. Taylor expanded in a around 0 14.7%

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \left(a \cdot b\right) + 1\right)} \]
      2. associate-*r*14.7%

        \[\leadsto x \cdot \left(\color{blue}{\left(-1 \cdot a\right) \cdot b} + 1\right) \]
      3. neg-mul-114.7%

        \[\leadsto x \cdot \left(\color{blue}{\left(-a\right)} \cdot b + 1\right) \]
    8. Simplified14.7%

      \[\leadsto x \cdot \color{blue}{\left(\left(-a\right) \cdot b + 1\right)} \]
    9. Taylor expanded in a around inf 21.0%

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot \left(b \cdot x\right)} \]
      2. mul-1-neg21.0%

        \[\leadsto \color{blue}{\left(-a\right)} \cdot \left(b \cdot x\right) \]
    11. Simplified21.0%

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

    if 3.5999999999999998e-23 < x < 1.35e8

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 61.1%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg61.1%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. distribute-rgt-neg-out61.1%

        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    5. Simplified61.1%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    6. Taylor expanded in a around 0 41.3%

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \left(a \cdot b\right) + 1\right)} \]
      2. associate-*r*41.3%

        \[\leadsto x \cdot \left(\color{blue}{\left(-1 \cdot a\right) \cdot b} + 1\right) \]
      3. neg-mul-141.3%

        \[\leadsto x \cdot \left(\color{blue}{\left(-a\right)} \cdot b + 1\right) \]
    8. Simplified41.3%

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

    if 1.35e8 < x < 4.2999999999999998e42

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 22.5%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg22.5%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define22.4%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified22.4%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 10.2%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 10.2%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-110.2%

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in z around inf 10.2%

      \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \left(a \cdot x\right) + \frac{x}{z}\right)} \]
    11. Taylor expanded in z around inf 2.7%

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. mul-1-neg2.7%

        \[\leadsto \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    13. Simplified2.7%

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(x \cdot z\right)} \]
    14. Step-by-step derivation
      1. add-sqr-sqrt1.5%

        \[\leadsto \color{blue}{\left(\sqrt{-a} \cdot \sqrt{-a}\right)} \cdot \left(x \cdot z\right) \]
      2. sqrt-unprod2.9%

        \[\leadsto \color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}} \cdot \left(x \cdot z\right) \]
      3. sqr-neg2.9%

        \[\leadsto \sqrt{\color{blue}{a \cdot a}} \cdot \left(x \cdot z\right) \]
      4. sqrt-unprod1.4%

        \[\leadsto \color{blue}{\left(\sqrt{a} \cdot \sqrt{a}\right)} \cdot \left(x \cdot z\right) \]
      5. add-sqr-sqrt2.9%

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

        \[\leadsto \color{blue}{{\left(a \cdot \left(x \cdot z\right)\right)}^{1}} \]
      7. *-commutative2.9%

        \[\leadsto {\left(a \cdot \color{blue}{\left(z \cdot x\right)}\right)}^{1} \]
    15. Applied egg-rr2.9%

      \[\leadsto \color{blue}{{\left(a \cdot \left(z \cdot x\right)\right)}^{1}} \]
    16. Step-by-step derivation
      1. unpow12.9%

        \[\leadsto \color{blue}{a \cdot \left(z \cdot x\right)} \]
    17. Simplified2.9%

      \[\leadsto \color{blue}{a \cdot \left(z \cdot x\right)} \]
    18. Taylor expanded in a around 0 2.9%

      \[\leadsto \color{blue}{a \cdot \left(x \cdot z\right)} \]
    19. Step-by-step derivation
      1. *-commutative2.9%

        \[\leadsto \color{blue}{\left(x \cdot z\right) \cdot a} \]
      2. associate-*l*2.9%

        \[\leadsto \color{blue}{x \cdot \left(z \cdot a\right)} \]
      3. *-commutative2.9%

        \[\leadsto x \cdot \color{blue}{\left(a \cdot z\right)} \]
    20. Simplified2.9%

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

    if 4.2999999999999998e42 < x < 2.8e53

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 100.0%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg100.0%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define100.0%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified100.0%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 3.5%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 3.5%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-13.5%

        \[\leadsto x + \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    9. Simplified3.5%

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in z around inf 3.5%

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

        \[\leadsto z \cdot \color{blue}{\left(\frac{x}{z} + -1 \cdot \left(a \cdot x\right)\right)} \]
      2. mul-1-neg3.5%

        \[\leadsto z \cdot \left(\frac{x}{z} + \color{blue}{\left(-a \cdot x\right)}\right) \]
      3. unsub-neg3.5%

        \[\leadsto z \cdot \color{blue}{\left(\frac{x}{z} - a \cdot x\right)} \]
    12. Applied egg-rr3.5%

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

    if 2.8e53 < x < 4.9999999999999999e146

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 63.6%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg63.6%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out63.6%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative63.6%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified63.6%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 28.9%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg28.9%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*27.6%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified27.6%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in y around inf 35.6%

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

    if 4.9999999999999999e146 < x

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 57.1%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg57.1%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out57.1%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative57.1%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified57.1%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 46.0%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg46.0%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*39.6%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified39.6%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in t around inf 54.8%

      \[\leadsto \color{blue}{t \cdot \left(\frac{x}{t} - x \cdot y\right)} \]
    10. Step-by-step derivation
      1. *-commutative54.8%

        \[\leadsto t \cdot \left(\frac{x}{t} - \color{blue}{y \cdot x}\right) \]
    11. Simplified54.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.7 \cdot 10^{-100}:\\ \;\;\;\;y \cdot \left(t \cdot \frac{x}{y \cdot t}\right)\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{-24}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{-23}:\\ \;\;\;\;y \cdot \left(t \cdot \frac{x}{y \cdot t}\right)\\ \mathbf{elif}\;x \leq 135000000:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{elif}\;x \leq 4.3 \cdot 10^{+42}:\\ \;\;\;\;x \cdot \left(z \cdot a\right)\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{+53}:\\ \;\;\;\;z \cdot \left(\frac{x}{z} - x \cdot a\right)\\ \mathbf{elif}\;x \leq 5 \cdot 10^{+146}:\\ \;\;\;\;y \cdot \left(\frac{x}{y} - x \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(\frac{x}{t} - x \cdot y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 29.9% accurate, 7.3× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \left(t \cdot \frac{x}{y \cdot t}\right)\\
\mathbf{if}\;x \leq 1.7 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 2.8 \cdot 10^{-24}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\

\mathbf{elif}\;x \leq 4.2 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 135000000:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\

\mathbf{elif}\;x \leq 4.4 \cdot 10^{+39}:\\
\;\;\;\;x \cdot \left(z \cdot a\right)\\

\mathbf{elif}\;x \leq 2.3 \cdot 10^{+93}:\\
\;\;\;\;z \cdot \left(a \cdot \left(\frac{x}{z \cdot a} - x\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < 1.69999999999999988e-100 or 2.8000000000000002e-24 < x < 4.2000000000000002e-23

    1. Initial program 96.7%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 51.3%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg51.3%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out51.3%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative51.3%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified51.3%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 25.1%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg25.1%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*25.8%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified25.8%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in y around inf 26.8%

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{y} - t \cdot x\right)} \]
    10. Taylor expanded in t around inf 23.9%

      \[\leadsto y \cdot \color{blue}{\left(t \cdot \left(\frac{x}{t \cdot y} - x\right)\right)} \]
    11. Taylor expanded in t around 0 29.8%

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

    if 1.69999999999999988e-100 < x < 2.8000000000000002e-24

    1. Initial program 88.6%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 48.8%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg48.8%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. distribute-rgt-neg-out48.8%

        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    5. Simplified48.8%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    6. Taylor expanded in a around 0 14.7%

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \left(a \cdot b\right) + 1\right)} \]
      2. associate-*r*14.7%

        \[\leadsto x \cdot \left(\color{blue}{\left(-1 \cdot a\right) \cdot b} + 1\right) \]
      3. neg-mul-114.7%

        \[\leadsto x \cdot \left(\color{blue}{\left(-a\right)} \cdot b + 1\right) \]
    8. Simplified14.7%

      \[\leadsto x \cdot \color{blue}{\left(\left(-a\right) \cdot b + 1\right)} \]
    9. Taylor expanded in a around inf 21.0%

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot \left(b \cdot x\right)} \]
      2. mul-1-neg21.0%

        \[\leadsto \color{blue}{\left(-a\right)} \cdot \left(b \cdot x\right) \]
    11. Simplified21.0%

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

    if 4.2000000000000002e-23 < x < 1.35e8

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 61.1%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg61.1%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. distribute-rgt-neg-out61.1%

        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    5. Simplified61.1%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    6. Taylor expanded in a around 0 41.3%

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \left(a \cdot b\right) + 1\right)} \]
      2. associate-*r*41.3%

        \[\leadsto x \cdot \left(\color{blue}{\left(-1 \cdot a\right) \cdot b} + 1\right) \]
      3. neg-mul-141.3%

        \[\leadsto x \cdot \left(\color{blue}{\left(-a\right)} \cdot b + 1\right) \]
    8. Simplified41.3%

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

    if 1.35e8 < x < 4.4000000000000003e39

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 22.5%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg22.5%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define22.4%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified22.4%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 10.2%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 10.2%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-110.2%

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in z around inf 10.2%

      \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \left(a \cdot x\right) + \frac{x}{z}\right)} \]
    11. Taylor expanded in z around inf 2.7%

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. mul-1-neg2.7%

        \[\leadsto \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    13. Simplified2.7%

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(x \cdot z\right)} \]
    14. Step-by-step derivation
      1. add-sqr-sqrt1.5%

        \[\leadsto \color{blue}{\left(\sqrt{-a} \cdot \sqrt{-a}\right)} \cdot \left(x \cdot z\right) \]
      2. sqrt-unprod2.9%

        \[\leadsto \color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}} \cdot \left(x \cdot z\right) \]
      3. sqr-neg2.9%

        \[\leadsto \sqrt{\color{blue}{a \cdot a}} \cdot \left(x \cdot z\right) \]
      4. sqrt-unprod1.4%

        \[\leadsto \color{blue}{\left(\sqrt{a} \cdot \sqrt{a}\right)} \cdot \left(x \cdot z\right) \]
      5. add-sqr-sqrt2.9%

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

        \[\leadsto \color{blue}{{\left(a \cdot \left(x \cdot z\right)\right)}^{1}} \]
      7. *-commutative2.9%

        \[\leadsto {\left(a \cdot \color{blue}{\left(z \cdot x\right)}\right)}^{1} \]
    15. Applied egg-rr2.9%

      \[\leadsto \color{blue}{{\left(a \cdot \left(z \cdot x\right)\right)}^{1}} \]
    16. Step-by-step derivation
      1. unpow12.9%

        \[\leadsto \color{blue}{a \cdot \left(z \cdot x\right)} \]
    17. Simplified2.9%

      \[\leadsto \color{blue}{a \cdot \left(z \cdot x\right)} \]
    18. Taylor expanded in a around 0 2.9%

      \[\leadsto \color{blue}{a \cdot \left(x \cdot z\right)} \]
    19. Step-by-step derivation
      1. *-commutative2.9%

        \[\leadsto \color{blue}{\left(x \cdot z\right) \cdot a} \]
      2. associate-*l*2.9%

        \[\leadsto \color{blue}{x \cdot \left(z \cdot a\right)} \]
      3. *-commutative2.9%

        \[\leadsto x \cdot \color{blue}{\left(a \cdot z\right)} \]
    20. Simplified2.9%

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

    if 4.4000000000000003e39 < x < 2.3000000000000002e93

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 66.9%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg66.9%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define66.9%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified66.9%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 14.2%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 13.8%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-113.8%

        \[\leadsto x + \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    9. Simplified13.8%

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in z around inf 22.6%

      \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \left(a \cdot x\right) + \frac{x}{z}\right)} \]
    11. Taylor expanded in a around inf 22.6%

      \[\leadsto z \cdot \color{blue}{\left(a \cdot \left(-1 \cdot x + \frac{x}{a \cdot z}\right)\right)} \]
    12. Step-by-step derivation
      1. neg-mul-122.6%

        \[\leadsto z \cdot \left(a \cdot \left(\color{blue}{\left(-x\right)} + \frac{x}{a \cdot z}\right)\right) \]
      2. +-commutative22.6%

        \[\leadsto z \cdot \left(a \cdot \color{blue}{\left(\frac{x}{a \cdot z} + \left(-x\right)\right)}\right) \]
      3. unsub-neg22.6%

        \[\leadsto z \cdot \left(a \cdot \color{blue}{\left(\frac{x}{a \cdot z} - x\right)}\right) \]
    13. Simplified22.6%

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

    if 2.3000000000000002e93 < x

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 62.2%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg62.2%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out62.2%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative62.2%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified62.2%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 43.2%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg43.2%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*38.9%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified38.9%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in y around inf 38.8%

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{y} - t \cdot x\right)} \]
    10. Taylor expanded in t around inf 42.3%

      \[\leadsto y \cdot \color{blue}{\left(t \cdot \left(\frac{x}{t \cdot y} - x\right)\right)} \]
    11. Taylor expanded in x around 0 53.4%

      \[\leadsto \color{blue}{t \cdot \left(x \cdot \left(y \cdot \left(\frac{1}{t \cdot y} - 1\right)\right)\right)} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification32.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.7 \cdot 10^{-100}:\\ \;\;\;\;y \cdot \left(t \cdot \frac{x}{y \cdot t}\right)\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{-24}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{-23}:\\ \;\;\;\;y \cdot \left(t \cdot \frac{x}{y \cdot t}\right)\\ \mathbf{elif}\;x \leq 135000000:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{+39}:\\ \;\;\;\;x \cdot \left(z \cdot a\right)\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{+93}:\\ \;\;\;\;z \cdot \left(a \cdot \left(\frac{x}{z \cdot a} - x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(x \cdot \left(y \cdot \left(-1 + \frac{1}{y \cdot t}\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 29.9% accurate, 7.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -9.6 \cdot 10^{+153}:\\ \;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{+43}:\\ \;\;\;\;\frac{y}{\frac{y}{x}}\\ \mathbf{elif}\;a \leq -3.7 \cdot 10^{-216}:\\ \;\;\;\;x - y \cdot \left(x \cdot t\right)\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-267}:\\ \;\;\;\;\frac{x \cdot y}{y}\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{-271}:\\ \;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\ \mathbf{elif}\;a \leq 9.4 \cdot 10^{+45}:\\ \;\;\;\;x - t \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;a \leq 4.7 \cdot 10^{+203}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{x}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a -9.6e+153)
   (* x (* a (- b)))
   (if (<= a -3.2e+43)
     (/ y (/ y x))
     (if (<= a -3.7e-216)
       (- x (* y (* x t)))
       (if (<= a -1.65e-267)
         (/ (* x y) y)
         (if (<= a 1.02e-271)
           (* x (* z (- a)))
           (if (<= a 9.4e+45)
             (- x (* t (* x y)))
             (if (<= a 4.7e+203) (* x (* y (- t))) (* a (/ x a))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -9.6e+153) {
		tmp = x * (a * -b);
	} else if (a <= -3.2e+43) {
		tmp = y / (y / x);
	} else if (a <= -3.7e-216) {
		tmp = x - (y * (x * t));
	} else if (a <= -1.65e-267) {
		tmp = (x * y) / y;
	} else if (a <= 1.02e-271) {
		tmp = x * (z * -a);
	} else if (a <= 9.4e+45) {
		tmp = x - (t * (x * y));
	} else if (a <= 4.7e+203) {
		tmp = x * (y * -t);
	} else {
		tmp = a * (x / a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (a <= (-9.6d+153)) then
        tmp = x * (a * -b)
    else if (a <= (-3.2d+43)) then
        tmp = y / (y / x)
    else if (a <= (-3.7d-216)) then
        tmp = x - (y * (x * t))
    else if (a <= (-1.65d-267)) then
        tmp = (x * y) / y
    else if (a <= 1.02d-271) then
        tmp = x * (z * -a)
    else if (a <= 9.4d+45) then
        tmp = x - (t * (x * y))
    else if (a <= 4.7d+203) then
        tmp = x * (y * -t)
    else
        tmp = a * (x / a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -9.6e+153) {
		tmp = x * (a * -b);
	} else if (a <= -3.2e+43) {
		tmp = y / (y / x);
	} else if (a <= -3.7e-216) {
		tmp = x - (y * (x * t));
	} else if (a <= -1.65e-267) {
		tmp = (x * y) / y;
	} else if (a <= 1.02e-271) {
		tmp = x * (z * -a);
	} else if (a <= 9.4e+45) {
		tmp = x - (t * (x * y));
	} else if (a <= 4.7e+203) {
		tmp = x * (y * -t);
	} else {
		tmp = a * (x / a);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= -9.6e+153:
		tmp = x * (a * -b)
	elif a <= -3.2e+43:
		tmp = y / (y / x)
	elif a <= -3.7e-216:
		tmp = x - (y * (x * t))
	elif a <= -1.65e-267:
		tmp = (x * y) / y
	elif a <= 1.02e-271:
		tmp = x * (z * -a)
	elif a <= 9.4e+45:
		tmp = x - (t * (x * y))
	elif a <= 4.7e+203:
		tmp = x * (y * -t)
	else:
		tmp = a * (x / a)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= -9.6e+153)
		tmp = Float64(x * Float64(a * Float64(-b)));
	elseif (a <= -3.2e+43)
		tmp = Float64(y / Float64(y / x));
	elseif (a <= -3.7e-216)
		tmp = Float64(x - Float64(y * Float64(x * t)));
	elseif (a <= -1.65e-267)
		tmp = Float64(Float64(x * y) / y);
	elseif (a <= 1.02e-271)
		tmp = Float64(x * Float64(z * Float64(-a)));
	elseif (a <= 9.4e+45)
		tmp = Float64(x - Float64(t * Float64(x * y)));
	elseif (a <= 4.7e+203)
		tmp = Float64(x * Float64(y * Float64(-t)));
	else
		tmp = Float64(a * Float64(x / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (a <= -9.6e+153)
		tmp = x * (a * -b);
	elseif (a <= -3.2e+43)
		tmp = y / (y / x);
	elseif (a <= -3.7e-216)
		tmp = x - (y * (x * t));
	elseif (a <= -1.65e-267)
		tmp = (x * y) / y;
	elseif (a <= 1.02e-271)
		tmp = x * (z * -a);
	elseif (a <= 9.4e+45)
		tmp = x - (t * (x * y));
	elseif (a <= 4.7e+203)
		tmp = x * (y * -t);
	else
		tmp = a * (x / a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -9.6e+153], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.2e+43], N[(y / N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.7e-216], N[(x - N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.65e-267], N[(N[(x * y), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[a, 1.02e-271], N[(x * N[(z * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.4e+45], N[(x - N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.7e+203], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision], N[(a * N[(x / a), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.6 \cdot 10^{+153}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\

\mathbf{elif}\;a \leq -3.2 \cdot 10^{+43}:\\
\;\;\;\;\frac{y}{\frac{y}{x}}\\

\mathbf{elif}\;a \leq -3.7 \cdot 10^{-216}:\\
\;\;\;\;x - y \cdot \left(x \cdot t\right)\\

\mathbf{elif}\;a \leq -1.65 \cdot 10^{-267}:\\
\;\;\;\;\frac{x \cdot y}{y}\\

\mathbf{elif}\;a \leq 1.02 \cdot 10^{-271}:\\
\;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\

\mathbf{elif}\;a \leq 9.4 \cdot 10^{+45}:\\
\;\;\;\;x - t \cdot \left(x \cdot y\right)\\

\mathbf{elif}\;a \leq 4.7 \cdot 10^{+203}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\

\mathbf{else}:\\
\;\;\;\;a \cdot \frac{x}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if a < -9.5999999999999997e153

    1. Initial program 95.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 77.8%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg77.8%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. distribute-rgt-neg-out77.8%

        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    5. Simplified77.8%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    6. Taylor expanded in a around 0 35.3%

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \left(a \cdot b\right) + 1\right)} \]
      2. associate-*r*35.3%

        \[\leadsto x \cdot \left(\color{blue}{\left(-1 \cdot a\right) \cdot b} + 1\right) \]
      3. neg-mul-135.3%

        \[\leadsto x \cdot \left(\color{blue}{\left(-a\right)} \cdot b + 1\right) \]
    8. Simplified35.3%

      \[\leadsto x \cdot \color{blue}{\left(\left(-a\right) \cdot b + 1\right)} \]
    9. Taylor expanded in a around inf 32.4%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(b \cdot x\right)\right)} \]
    10. Step-by-step derivation
      1. mul-1-neg32.4%

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

        \[\leadsto -\color{blue}{\left(a \cdot b\right) \cdot x} \]
      3. distribute-lft-neg-in34.8%

        \[\leadsto \color{blue}{\left(-a \cdot b\right) \cdot x} \]
      4. *-commutative34.8%

        \[\leadsto \left(-\color{blue}{b \cdot a}\right) \cdot x \]
      5. distribute-rgt-neg-in34.8%

        \[\leadsto \color{blue}{\left(b \cdot \left(-a\right)\right)} \cdot x \]
    11. Simplified34.8%

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

    if -9.5999999999999997e153 < a < -3.20000000000000014e43

    1. Initial program 94.4%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 36.2%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg36.2%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out36.2%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative36.2%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified36.2%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 14.3%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg14.3%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*14.6%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified14.6%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in y around inf 35.3%

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{y} - t \cdot x\right)} \]
    10. Taylor expanded in y around 0 41.1%

      \[\leadsto y \cdot \color{blue}{\frac{x}{y}} \]
    11. Step-by-step derivation
      1. clear-num41.1%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{y}{x}}} \]
      2. un-div-inv41.1%

        \[\leadsto \color{blue}{\frac{y}{\frac{y}{x}}} \]
    12. Applied egg-rr41.1%

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

    if -3.20000000000000014e43 < a < -3.69999999999999996e-216

    1. Initial program 98.1%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 61.9%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg61.9%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out61.9%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative61.9%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified61.9%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 41.2%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg41.2%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*42.8%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified42.8%

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

    if -3.69999999999999996e-216 < a < -1.65000000000000002e-267

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 72.7%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg72.7%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out72.7%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative72.7%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified72.7%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 45.0%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg45.0%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*31.6%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified31.6%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in y around inf 5.2%

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{y} - t \cdot x\right)} \]
    10. Taylor expanded in y around 0 4.7%

      \[\leadsto y \cdot \color{blue}{\frac{x}{y}} \]
    11. Step-by-step derivation
      1. associate-*r/58.1%

        \[\leadsto \color{blue}{\frac{y \cdot x}{y}} \]
      2. *-commutative58.1%

        \[\leadsto \frac{\color{blue}{x \cdot y}}{y} \]
    12. Applied egg-rr58.1%

      \[\leadsto \color{blue}{\frac{x \cdot y}{y}} \]

    if -1.65000000000000002e-267 < a < 1.02e-271

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 31.5%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg31.5%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define31.5%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified31.5%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 28.6%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 28.6%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-128.6%

        \[\leadsto x + \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    9. Simplified28.6%

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in a around inf 31.0%

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(x \cdot z\right) + \frac{x}{a}\right)} \]
    11. Step-by-step derivation
      1. +-commutative31.0%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} + -1 \cdot \left(x \cdot z\right)\right)} \]
      2. mul-1-neg31.0%

        \[\leadsto a \cdot \left(\frac{x}{a} + \color{blue}{\left(-x \cdot z\right)}\right) \]
      3. *-commutative31.0%

        \[\leadsto a \cdot \left(\frac{x}{a} + \left(-\color{blue}{z \cdot x}\right)\right) \]
      4. unsub-neg31.0%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} - z \cdot x\right)} \]
    12. Simplified31.0%

      \[\leadsto \color{blue}{a \cdot \left(\frac{x}{a} - z \cdot x\right)} \]
    13. Taylor expanded in a around inf 44.7%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(x \cdot z\right)\right)} \]
    14. Step-by-step derivation
      1. mul-1-neg44.7%

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

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

        \[\leadsto -\color{blue}{x \cdot \left(z \cdot a\right)} \]
      4. distribute-rgt-neg-in49.1%

        \[\leadsto \color{blue}{x \cdot \left(-z \cdot a\right)} \]
      5. distribute-rgt-neg-out49.1%

        \[\leadsto x \cdot \color{blue}{\left(z \cdot \left(-a\right)\right)} \]
    15. Simplified49.1%

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

    if 1.02e-271 < a < 9.40000000000000004e45

    1. Initial program 99.9%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 61.0%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg61.0%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out61.0%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative61.0%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified61.0%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 32.9%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg32.9%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*31.7%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified31.7%

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

      \[\leadsto x - \color{blue}{t \cdot \left(x \cdot y\right)} \]
    10. Step-by-step derivation
      1. *-commutative32.9%

        \[\leadsto x - t \cdot \color{blue}{\left(y \cdot x\right)} \]
    11. Simplified32.9%

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

    if 9.40000000000000004e45 < a < 4.70000000000000002e203

    1. Initial program 97.2%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 49.6%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg49.6%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out49.6%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative49.6%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified49.6%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 18.1%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg18.1%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*18.1%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified18.1%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in t around inf 28.4%

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot y\right)\right)} \]
    10. Step-by-step derivation
      1. mul-1-neg28.4%

        \[\leadsto \color{blue}{-t \cdot \left(x \cdot y\right)} \]
      2. distribute-rgt-neg-in28.4%

        \[\leadsto \color{blue}{t \cdot \left(-x \cdot y\right)} \]
      3. *-commutative28.4%

        \[\leadsto t \cdot \left(-\color{blue}{y \cdot x}\right) \]
      4. distribute-lft-neg-in28.4%

        \[\leadsto t \cdot \color{blue}{\left(\left(-y\right) \cdot x\right)} \]
    11. Simplified28.4%

      \[\leadsto \color{blue}{t \cdot \left(\left(-y\right) \cdot x\right)} \]
    12. Step-by-step derivation
      1. distribute-lft-neg-out28.4%

        \[\leadsto t \cdot \color{blue}{\left(-y \cdot x\right)} \]
      2. distribute-rgt-neg-out28.4%

        \[\leadsto \color{blue}{-t \cdot \left(y \cdot x\right)} \]
      3. *-commutative28.4%

        \[\leadsto -t \cdot \color{blue}{\left(x \cdot y\right)} \]
      4. associate-*l*25.6%

        \[\leadsto -\color{blue}{\left(t \cdot x\right) \cdot y} \]
      5. *-commutative25.6%

        \[\leadsto -\color{blue}{y \cdot \left(t \cdot x\right)} \]
      6. associate-*r*31.2%

        \[\leadsto -\color{blue}{\left(y \cdot t\right) \cdot x} \]
    13. Applied egg-rr31.2%

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

    if 4.70000000000000002e203 < a

    1. Initial program 89.3%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 74.7%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg74.7%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define92.7%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified92.7%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 4.2%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 2.5%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-12.5%

        \[\leadsto x + \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    9. Simplified2.5%

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in a around inf 16.5%

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

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} + -1 \cdot \left(x \cdot z\right)\right)} \]
      2. mul-1-neg16.5%

        \[\leadsto a \cdot \left(\frac{x}{a} + \color{blue}{\left(-x \cdot z\right)}\right) \]
      3. *-commutative16.5%

        \[\leadsto a \cdot \left(\frac{x}{a} + \left(-\color{blue}{z \cdot x}\right)\right) \]
      4. unsub-neg16.5%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} - z \cdot x\right)} \]
    12. Simplified16.5%

      \[\leadsto \color{blue}{a \cdot \left(\frac{x}{a} - z \cdot x\right)} \]
    13. Taylor expanded in a around 0 42.5%

      \[\leadsto a \cdot \color{blue}{\frac{x}{a}} \]
  3. Recombined 8 regimes into one program.
  4. Final simplification38.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.6 \cdot 10^{+153}:\\ \;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{+43}:\\ \;\;\;\;\frac{y}{\frac{y}{x}}\\ \mathbf{elif}\;a \leq -3.7 \cdot 10^{-216}:\\ \;\;\;\;x - y \cdot \left(x \cdot t\right)\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-267}:\\ \;\;\;\;\frac{x \cdot y}{y}\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{-271}:\\ \;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\ \mathbf{elif}\;a \leq 9.4 \cdot 10^{+45}:\\ \;\;\;\;x - t \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;a \leq 4.7 \cdot 10^{+203}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 27.2% accurate, 8.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{-278}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-175}:\\ \;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-169}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-109}:\\ \;\;\;\;t \cdot \left(\frac{x}{t} - x \cdot y\right)\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{+47}:\\ \;\;\;\;\frac{y}{\frac{y}{x}}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{+203}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{x}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a -7.2e-278)
   (* x (- 1.0 (* a b)))
   (if (<= a 4.2e-175)
     (* x (* z (- a)))
     (if (<= a 1.45e-169)
       x
       (if (<= a 3.2e-109)
         (* t (- (/ x t) (* x y)))
         (if (<= a 2.5e+47)
           (/ y (/ y x))
           (if (<= a 2.4e+203) (* x (* y (- t))) (* a (/ x a)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -7.2e-278) {
		tmp = x * (1.0 - (a * b));
	} else if (a <= 4.2e-175) {
		tmp = x * (z * -a);
	} else if (a <= 1.45e-169) {
		tmp = x;
	} else if (a <= 3.2e-109) {
		tmp = t * ((x / t) - (x * y));
	} else if (a <= 2.5e+47) {
		tmp = y / (y / x);
	} else if (a <= 2.4e+203) {
		tmp = x * (y * -t);
	} else {
		tmp = a * (x / a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (a <= (-7.2d-278)) then
        tmp = x * (1.0d0 - (a * b))
    else if (a <= 4.2d-175) then
        tmp = x * (z * -a)
    else if (a <= 1.45d-169) then
        tmp = x
    else if (a <= 3.2d-109) then
        tmp = t * ((x / t) - (x * y))
    else if (a <= 2.5d+47) then
        tmp = y / (y / x)
    else if (a <= 2.4d+203) then
        tmp = x * (y * -t)
    else
        tmp = a * (x / a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -7.2e-278) {
		tmp = x * (1.0 - (a * b));
	} else if (a <= 4.2e-175) {
		tmp = x * (z * -a);
	} else if (a <= 1.45e-169) {
		tmp = x;
	} else if (a <= 3.2e-109) {
		tmp = t * ((x / t) - (x * y));
	} else if (a <= 2.5e+47) {
		tmp = y / (y / x);
	} else if (a <= 2.4e+203) {
		tmp = x * (y * -t);
	} else {
		tmp = a * (x / a);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= -7.2e-278:
		tmp = x * (1.0 - (a * b))
	elif a <= 4.2e-175:
		tmp = x * (z * -a)
	elif a <= 1.45e-169:
		tmp = x
	elif a <= 3.2e-109:
		tmp = t * ((x / t) - (x * y))
	elif a <= 2.5e+47:
		tmp = y / (y / x)
	elif a <= 2.4e+203:
		tmp = x * (y * -t)
	else:
		tmp = a * (x / a)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= -7.2e-278)
		tmp = Float64(x * Float64(1.0 - Float64(a * b)));
	elseif (a <= 4.2e-175)
		tmp = Float64(x * Float64(z * Float64(-a)));
	elseif (a <= 1.45e-169)
		tmp = x;
	elseif (a <= 3.2e-109)
		tmp = Float64(t * Float64(Float64(x / t) - Float64(x * y)));
	elseif (a <= 2.5e+47)
		tmp = Float64(y / Float64(y / x));
	elseif (a <= 2.4e+203)
		tmp = Float64(x * Float64(y * Float64(-t)));
	else
		tmp = Float64(a * Float64(x / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (a <= -7.2e-278)
		tmp = x * (1.0 - (a * b));
	elseif (a <= 4.2e-175)
		tmp = x * (z * -a);
	elseif (a <= 1.45e-169)
		tmp = x;
	elseif (a <= 3.2e-109)
		tmp = t * ((x / t) - (x * y));
	elseif (a <= 2.5e+47)
		tmp = y / (y / x);
	elseif (a <= 2.4e+203)
		tmp = x * (y * -t);
	else
		tmp = a * (x / a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -7.2e-278], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.2e-175], N[(x * N[(z * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.45e-169], x, If[LessEqual[a, 3.2e-109], N[(t * N[(N[(x / t), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.5e+47], N[(y / N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.4e+203], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision], N[(a * N[(x / a), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{-278}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\

\mathbf{elif}\;a \leq 4.2 \cdot 10^{-175}:\\
\;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\

\mathbf{elif}\;a \leq 1.45 \cdot 10^{-169}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 3.2 \cdot 10^{-109}:\\
\;\;\;\;t \cdot \left(\frac{x}{t} - x \cdot y\right)\\

\mathbf{elif}\;a \leq 2.5 \cdot 10^{+47}:\\
\;\;\;\;\frac{y}{\frac{y}{x}}\\

\mathbf{elif}\;a \leq 2.4 \cdot 10^{+203}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\

\mathbf{else}:\\
\;\;\;\;a \cdot \frac{x}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if a < -7.19999999999999993e-278

    1. Initial program 96.5%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 71.8%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg71.8%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. distribute-rgt-neg-out71.8%

        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    5. Simplified71.8%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    6. Taylor expanded in a around 0 37.3%

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \left(a \cdot b\right) + 1\right)} \]
      2. associate-*r*37.3%

        \[\leadsto x \cdot \left(\color{blue}{\left(-1 \cdot a\right) \cdot b} + 1\right) \]
      3. neg-mul-137.3%

        \[\leadsto x \cdot \left(\color{blue}{\left(-a\right)} \cdot b + 1\right) \]
    8. Simplified37.3%

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

    if -7.19999999999999993e-278 < a < 4.2e-175

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 29.3%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg29.3%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define29.3%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified29.3%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 26.1%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 26.1%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-126.1%

        \[\leadsto x + \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    9. Simplified26.1%

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in a around inf 29.0%

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(x \cdot z\right) + \frac{x}{a}\right)} \]
    11. Step-by-step derivation
      1. +-commutative29.0%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} + -1 \cdot \left(x \cdot z\right)\right)} \]
      2. mul-1-neg29.0%

        \[\leadsto a \cdot \left(\frac{x}{a} + \color{blue}{\left(-x \cdot z\right)}\right) \]
      3. *-commutative29.0%

        \[\leadsto a \cdot \left(\frac{x}{a} + \left(-\color{blue}{z \cdot x}\right)\right) \]
      4. unsub-neg29.0%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} - z \cdot x\right)} \]
    12. Simplified29.0%

      \[\leadsto \color{blue}{a \cdot \left(\frac{x}{a} - z \cdot x\right)} \]
    13. Taylor expanded in a around inf 39.1%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(x \cdot z\right)\right)} \]
    14. Step-by-step derivation
      1. mul-1-neg39.1%

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

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

        \[\leadsto -\color{blue}{x \cdot \left(z \cdot a\right)} \]
      4. distribute-rgt-neg-in55.0%

        \[\leadsto \color{blue}{x \cdot \left(-z \cdot a\right)} \]
      5. distribute-rgt-neg-out55.0%

        \[\leadsto x \cdot \color{blue}{\left(z \cdot \left(-a\right)\right)} \]
    15. Simplified55.0%

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

    if 4.2e-175 < a < 1.4500000000000001e-169

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 65.3%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg65.3%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out65.3%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative65.3%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified65.3%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 65.3%

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

    if 1.4500000000000001e-169 < a < 3.2000000000000002e-109

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 71.4%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg71.4%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out71.4%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative71.4%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified71.4%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 55.6%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg55.6%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*48.9%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified48.9%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in t around inf 62.8%

      \[\leadsto \color{blue}{t \cdot \left(\frac{x}{t} - x \cdot y\right)} \]
    10. Step-by-step derivation
      1. *-commutative62.8%

        \[\leadsto t \cdot \left(\frac{x}{t} - \color{blue}{y \cdot x}\right) \]
    11. Simplified62.8%

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

    if 3.2000000000000002e-109 < a < 2.50000000000000011e47

    1. Initial program 99.9%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 56.9%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg56.9%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out56.9%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative56.9%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified56.9%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 24.4%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg24.4%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*26.6%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified26.6%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in y around inf 26.6%

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{y} - t \cdot x\right)} \]
    10. Taylor expanded in y around 0 29.2%

      \[\leadsto y \cdot \color{blue}{\frac{x}{y}} \]
    11. Step-by-step derivation
      1. clear-num29.2%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{y}{x}}} \]
      2. un-div-inv29.2%

        \[\leadsto \color{blue}{\frac{y}{\frac{y}{x}}} \]
    12. Applied egg-rr29.2%

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

    if 2.50000000000000011e47 < a < 2.4000000000000001e203

    1. Initial program 97.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 49.5%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg49.5%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out49.5%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative49.5%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified49.5%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 19.1%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg19.1%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*19.1%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified19.1%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in t around inf 30.0%

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot y\right)\right)} \]
    10. Step-by-step derivation
      1. mul-1-neg30.0%

        \[\leadsto \color{blue}{-t \cdot \left(x \cdot y\right)} \]
      2. distribute-rgt-neg-in30.0%

        \[\leadsto \color{blue}{t \cdot \left(-x \cdot y\right)} \]
      3. *-commutative30.0%

        \[\leadsto t \cdot \left(-\color{blue}{y \cdot x}\right) \]
      4. distribute-lft-neg-in30.0%

        \[\leadsto t \cdot \color{blue}{\left(\left(-y\right) \cdot x\right)} \]
    11. Simplified30.0%

      \[\leadsto \color{blue}{t \cdot \left(\left(-y\right) \cdot x\right)} \]
    12. Step-by-step derivation
      1. distribute-lft-neg-out30.0%

        \[\leadsto t \cdot \color{blue}{\left(-y \cdot x\right)} \]
      2. distribute-rgt-neg-out30.0%

        \[\leadsto \color{blue}{-t \cdot \left(y \cdot x\right)} \]
      3. *-commutative30.0%

        \[\leadsto -t \cdot \color{blue}{\left(x \cdot y\right)} \]
      4. associate-*l*27.1%

        \[\leadsto -\color{blue}{\left(t \cdot x\right) \cdot y} \]
      5. *-commutative27.1%

        \[\leadsto -\color{blue}{y \cdot \left(t \cdot x\right)} \]
      6. associate-*r*33.1%

        \[\leadsto -\color{blue}{\left(y \cdot t\right) \cdot x} \]
    13. Applied egg-rr33.1%

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

    if 2.4000000000000001e203 < a

    1. Initial program 89.3%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 74.7%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg74.7%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define92.7%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified92.7%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 4.2%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 2.5%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-12.5%

        \[\leadsto x + \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    9. Simplified2.5%

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in a around inf 16.5%

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

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} + -1 \cdot \left(x \cdot z\right)\right)} \]
      2. mul-1-neg16.5%

        \[\leadsto a \cdot \left(\frac{x}{a} + \color{blue}{\left(-x \cdot z\right)}\right) \]
      3. *-commutative16.5%

        \[\leadsto a \cdot \left(\frac{x}{a} + \left(-\color{blue}{z \cdot x}\right)\right) \]
      4. unsub-neg16.5%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} - z \cdot x\right)} \]
    12. Simplified16.5%

      \[\leadsto \color{blue}{a \cdot \left(\frac{x}{a} - z \cdot x\right)} \]
    13. Taylor expanded in a around 0 42.5%

      \[\leadsto a \cdot \color{blue}{\frac{x}{a}} \]
  3. Recombined 7 regimes into one program.
  4. Final simplification39.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{-278}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-175}:\\ \;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-169}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-109}:\\ \;\;\;\;t \cdot \left(\frac{x}{t} - x \cdot y\right)\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{+47}:\\ \;\;\;\;\frac{y}{\frac{y}{x}}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{+203}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 30.5% accurate, 8.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - t \cdot \left(x \cdot y\right)\\ \mathbf{if}\;a \leq -1 \cdot 10^{+154}:\\ \;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\ \mathbf{elif}\;a \leq -3.9 \cdot 10^{+43}:\\ \;\;\;\;\frac{y}{\frac{y}{x}}\\ \mathbf{elif}\;a \leq -7.6 \cdot 10^{-274}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{-259}:\\ \;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+203}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{x}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- x (* t (* x y)))))
   (if (<= a -1e+154)
     (* x (* a (- b)))
     (if (<= a -3.9e+43)
       (/ y (/ y x))
       (if (<= a -7.6e-274)
         t_1
         (if (<= a 1.12e-259)
           (* x (* z (- a)))
           (if (<= a 1.6e+40)
             t_1
             (if (<= a 1.35e+203) (* x (* y (- t))) (* a (/ x a))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (t * (x * y));
	double tmp;
	if (a <= -1e+154) {
		tmp = x * (a * -b);
	} else if (a <= -3.9e+43) {
		tmp = y / (y / x);
	} else if (a <= -7.6e-274) {
		tmp = t_1;
	} else if (a <= 1.12e-259) {
		tmp = x * (z * -a);
	} else if (a <= 1.6e+40) {
		tmp = t_1;
	} else if (a <= 1.35e+203) {
		tmp = x * (y * -t);
	} else {
		tmp = a * (x / a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x - (t * (x * y))
    if (a <= (-1d+154)) then
        tmp = x * (a * -b)
    else if (a <= (-3.9d+43)) then
        tmp = y / (y / x)
    else if (a <= (-7.6d-274)) then
        tmp = t_1
    else if (a <= 1.12d-259) then
        tmp = x * (z * -a)
    else if (a <= 1.6d+40) then
        tmp = t_1
    else if (a <= 1.35d+203) then
        tmp = x * (y * -t)
    else
        tmp = a * (x / a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (t * (x * y));
	double tmp;
	if (a <= -1e+154) {
		tmp = x * (a * -b);
	} else if (a <= -3.9e+43) {
		tmp = y / (y / x);
	} else if (a <= -7.6e-274) {
		tmp = t_1;
	} else if (a <= 1.12e-259) {
		tmp = x * (z * -a);
	} else if (a <= 1.6e+40) {
		tmp = t_1;
	} else if (a <= 1.35e+203) {
		tmp = x * (y * -t);
	} else {
		tmp = a * (x / a);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x - (t * (x * y))
	tmp = 0
	if a <= -1e+154:
		tmp = x * (a * -b)
	elif a <= -3.9e+43:
		tmp = y / (y / x)
	elif a <= -7.6e-274:
		tmp = t_1
	elif a <= 1.12e-259:
		tmp = x * (z * -a)
	elif a <= 1.6e+40:
		tmp = t_1
	elif a <= 1.35e+203:
		tmp = x * (y * -t)
	else:
		tmp = a * (x / a)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x - Float64(t * Float64(x * y)))
	tmp = 0.0
	if (a <= -1e+154)
		tmp = Float64(x * Float64(a * Float64(-b)));
	elseif (a <= -3.9e+43)
		tmp = Float64(y / Float64(y / x));
	elseif (a <= -7.6e-274)
		tmp = t_1;
	elseif (a <= 1.12e-259)
		tmp = Float64(x * Float64(z * Float64(-a)));
	elseif (a <= 1.6e+40)
		tmp = t_1;
	elseif (a <= 1.35e+203)
		tmp = Float64(x * Float64(y * Float64(-t)));
	else
		tmp = Float64(a * Float64(x / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x - (t * (x * y));
	tmp = 0.0;
	if (a <= -1e+154)
		tmp = x * (a * -b);
	elseif (a <= -3.9e+43)
		tmp = y / (y / x);
	elseif (a <= -7.6e-274)
		tmp = t_1;
	elseif (a <= 1.12e-259)
		tmp = x * (z * -a);
	elseif (a <= 1.6e+40)
		tmp = t_1;
	elseif (a <= 1.35e+203)
		tmp = x * (y * -t);
	else
		tmp = a * (x / a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1e+154], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.9e+43], N[(y / N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -7.6e-274], t$95$1, If[LessEqual[a, 1.12e-259], N[(x * N[(z * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.6e+40], t$95$1, If[LessEqual[a, 1.35e+203], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision], N[(a * N[(x / a), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -3.9 \cdot 10^{+43}:\\
\;\;\;\;\frac{y}{\frac{y}{x}}\\

\mathbf{elif}\;a \leq -7.6 \cdot 10^{-274}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.12 \cdot 10^{-259}:\\
\;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\

\mathbf{elif}\;a \leq 1.6 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.35 \cdot 10^{+203}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\

\mathbf{else}:\\
\;\;\;\;a \cdot \frac{x}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -1.00000000000000004e154

    1. Initial program 95.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 77.8%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg77.8%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. distribute-rgt-neg-out77.8%

        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    5. Simplified77.8%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    6. Taylor expanded in a around 0 35.3%

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \left(a \cdot b\right) + 1\right)} \]
      2. associate-*r*35.3%

        \[\leadsto x \cdot \left(\color{blue}{\left(-1 \cdot a\right) \cdot b} + 1\right) \]
      3. neg-mul-135.3%

        \[\leadsto x \cdot \left(\color{blue}{\left(-a\right)} \cdot b + 1\right) \]
    8. Simplified35.3%

      \[\leadsto x \cdot \color{blue}{\left(\left(-a\right) \cdot b + 1\right)} \]
    9. Taylor expanded in a around inf 32.4%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(b \cdot x\right)\right)} \]
    10. Step-by-step derivation
      1. mul-1-neg32.4%

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

        \[\leadsto -\color{blue}{\left(a \cdot b\right) \cdot x} \]
      3. distribute-lft-neg-in34.8%

        \[\leadsto \color{blue}{\left(-a \cdot b\right) \cdot x} \]
      4. *-commutative34.8%

        \[\leadsto \left(-\color{blue}{b \cdot a}\right) \cdot x \]
      5. distribute-rgt-neg-in34.8%

        \[\leadsto \color{blue}{\left(b \cdot \left(-a\right)\right)} \cdot x \]
    11. Simplified34.8%

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

    if -1.00000000000000004e154 < a < -3.9000000000000001e43

    1. Initial program 94.4%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 36.2%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg36.2%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out36.2%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative36.2%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified36.2%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 14.3%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg14.3%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*14.6%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified14.6%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in y around inf 35.3%

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{y} - t \cdot x\right)} \]
    10. Taylor expanded in y around 0 41.1%

      \[\leadsto y \cdot \color{blue}{\frac{x}{y}} \]
    11. Step-by-step derivation
      1. clear-num41.1%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{y}{x}}} \]
      2. un-div-inv41.1%

        \[\leadsto \color{blue}{\frac{y}{\frac{y}{x}}} \]
    12. Applied egg-rr41.1%

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

    if -3.9000000000000001e43 < a < -7.59999999999999969e-274 or 1.1199999999999999e-259 < a < 1.5999999999999999e40

    1. Initial program 99.3%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 62.9%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg62.9%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out62.9%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative62.9%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified62.9%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 37.3%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg37.3%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*36.3%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified36.3%

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

      \[\leadsto x - \color{blue}{t \cdot \left(x \cdot y\right)} \]
    10. Step-by-step derivation
      1. *-commutative37.3%

        \[\leadsto x - t \cdot \color{blue}{\left(y \cdot x\right)} \]
    11. Simplified37.3%

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

    if -7.59999999999999969e-274 < a < 1.1199999999999999e-259

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 25.5%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg25.5%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define25.5%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified25.5%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 22.1%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 22.1%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-122.1%

        \[\leadsto x + \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    9. Simplified22.1%

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in a around inf 30.2%

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(x \cdot z\right) + \frac{x}{a}\right)} \]
    11. Step-by-step derivation
      1. +-commutative30.2%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} + -1 \cdot \left(x \cdot z\right)\right)} \]
      2. mul-1-neg30.2%

        \[\leadsto a \cdot \left(\frac{x}{a} + \color{blue}{\left(-x \cdot z\right)}\right) \]
      3. *-commutative30.2%

        \[\leadsto a \cdot \left(\frac{x}{a} + \left(-\color{blue}{z \cdot x}\right)\right) \]
      4. unsub-neg30.2%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} - z \cdot x\right)} \]
    12. Simplified30.2%

      \[\leadsto \color{blue}{a \cdot \left(\frac{x}{a} - z \cdot x\right)} \]
    13. Taylor expanded in a around inf 51.6%

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

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

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

        \[\leadsto -\color{blue}{x \cdot \left(z \cdot a\right)} \]
      4. distribute-rgt-neg-in56.8%

        \[\leadsto \color{blue}{x \cdot \left(-z \cdot a\right)} \]
      5. distribute-rgt-neg-out56.8%

        \[\leadsto x \cdot \color{blue}{\left(z \cdot \left(-a\right)\right)} \]
    15. Simplified56.8%

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

    if 1.5999999999999999e40 < a < 1.35e203

    1. Initial program 97.2%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 49.6%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg49.6%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out49.6%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative49.6%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified49.6%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 18.1%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg18.1%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*18.1%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified18.1%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in t around inf 28.4%

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot y\right)\right)} \]
    10. Step-by-step derivation
      1. mul-1-neg28.4%

        \[\leadsto \color{blue}{-t \cdot \left(x \cdot y\right)} \]
      2. distribute-rgt-neg-in28.4%

        \[\leadsto \color{blue}{t \cdot \left(-x \cdot y\right)} \]
      3. *-commutative28.4%

        \[\leadsto t \cdot \left(-\color{blue}{y \cdot x}\right) \]
      4. distribute-lft-neg-in28.4%

        \[\leadsto t \cdot \color{blue}{\left(\left(-y\right) \cdot x\right)} \]
    11. Simplified28.4%

      \[\leadsto \color{blue}{t \cdot \left(\left(-y\right) \cdot x\right)} \]
    12. Step-by-step derivation
      1. distribute-lft-neg-out28.4%

        \[\leadsto t \cdot \color{blue}{\left(-y \cdot x\right)} \]
      2. distribute-rgt-neg-out28.4%

        \[\leadsto \color{blue}{-t \cdot \left(y \cdot x\right)} \]
      3. *-commutative28.4%

        \[\leadsto -t \cdot \color{blue}{\left(x \cdot y\right)} \]
      4. associate-*l*25.6%

        \[\leadsto -\color{blue}{\left(t \cdot x\right) \cdot y} \]
      5. *-commutative25.6%

        \[\leadsto -\color{blue}{y \cdot \left(t \cdot x\right)} \]
      6. associate-*r*31.2%

        \[\leadsto -\color{blue}{\left(y \cdot t\right) \cdot x} \]
    13. Applied egg-rr31.2%

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

    if 1.35e203 < a

    1. Initial program 89.3%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 74.7%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg74.7%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define92.7%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified92.7%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 4.2%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 2.5%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-12.5%

        \[\leadsto x + \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    9. Simplified2.5%

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in a around inf 16.5%

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

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} + -1 \cdot \left(x \cdot z\right)\right)} \]
      2. mul-1-neg16.5%

        \[\leadsto a \cdot \left(\frac{x}{a} + \color{blue}{\left(-x \cdot z\right)}\right) \]
      3. *-commutative16.5%

        \[\leadsto a \cdot \left(\frac{x}{a} + \left(-\color{blue}{z \cdot x}\right)\right) \]
      4. unsub-neg16.5%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} - z \cdot x\right)} \]
    12. Simplified16.5%

      \[\leadsto \color{blue}{a \cdot \left(\frac{x}{a} - z \cdot x\right)} \]
    13. Taylor expanded in a around 0 42.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1 \cdot 10^{+154}:\\ \;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\ \mathbf{elif}\;a \leq -3.9 \cdot 10^{+43}:\\ \;\;\;\;\frac{y}{\frac{y}{x}}\\ \mathbf{elif}\;a \leq -7.6 \cdot 10^{-274}:\\ \;\;\;\;x - t \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{-259}:\\ \;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{+40}:\\ \;\;\;\;x - t \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+203}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 30.0% accurate, 8.7× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \left(t \cdot \frac{x}{y \cdot t}\right)\\
\mathbf{if}\;x \leq 1.7 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 1.65 \cdot 10^{-24}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\

\mathbf{elif}\;x \leq 3.5 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 53000000:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\

\mathbf{elif}\;x \leq 1.35 \cdot 10^{+39}:\\
\;\;\;\;x \cdot \left(z \cdot a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < 1.69999999999999988e-100 or 1.64999999999999992e-24 < x < 3.49999999999999993e-23

    1. Initial program 96.7%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 51.3%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg51.3%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out51.3%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative51.3%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified51.3%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 25.1%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg25.1%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*25.8%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified25.8%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in y around inf 26.8%

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{y} - t \cdot x\right)} \]
    10. Taylor expanded in t around inf 23.9%

      \[\leadsto y \cdot \color{blue}{\left(t \cdot \left(\frac{x}{t \cdot y} - x\right)\right)} \]
    11. Taylor expanded in t around 0 29.8%

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

    if 1.69999999999999988e-100 < x < 1.64999999999999992e-24

    1. Initial program 88.6%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 48.8%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg48.8%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. distribute-rgt-neg-out48.8%

        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    5. Simplified48.8%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    6. Taylor expanded in a around 0 14.7%

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \left(a \cdot b\right) + 1\right)} \]
      2. associate-*r*14.7%

        \[\leadsto x \cdot \left(\color{blue}{\left(-1 \cdot a\right) \cdot b} + 1\right) \]
      3. neg-mul-114.7%

        \[\leadsto x \cdot \left(\color{blue}{\left(-a\right)} \cdot b + 1\right) \]
    8. Simplified14.7%

      \[\leadsto x \cdot \color{blue}{\left(\left(-a\right) \cdot b + 1\right)} \]
    9. Taylor expanded in a around inf 21.0%

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot \left(b \cdot x\right)} \]
      2. mul-1-neg21.0%

        \[\leadsto \color{blue}{\left(-a\right)} \cdot \left(b \cdot x\right) \]
    11. Simplified21.0%

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

    if 3.49999999999999993e-23 < x < 5.3e7

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 61.1%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg61.1%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. distribute-rgt-neg-out61.1%

        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    5. Simplified61.1%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    6. Taylor expanded in a around 0 41.3%

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \left(a \cdot b\right) + 1\right)} \]
      2. associate-*r*41.3%

        \[\leadsto x \cdot \left(\color{blue}{\left(-1 \cdot a\right) \cdot b} + 1\right) \]
      3. neg-mul-141.3%

        \[\leadsto x \cdot \left(\color{blue}{\left(-a\right)} \cdot b + 1\right) \]
    8. Simplified41.3%

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

    if 5.3e7 < x < 1.35000000000000002e39

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 22.5%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg22.5%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define22.4%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified22.4%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 10.2%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 10.2%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-110.2%

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in z around inf 10.2%

      \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \left(a \cdot x\right) + \frac{x}{z}\right)} \]
    11. Taylor expanded in z around inf 2.7%

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. mul-1-neg2.7%

        \[\leadsto \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    13. Simplified2.7%

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(x \cdot z\right)} \]
    14. Step-by-step derivation
      1. add-sqr-sqrt1.5%

        \[\leadsto \color{blue}{\left(\sqrt{-a} \cdot \sqrt{-a}\right)} \cdot \left(x \cdot z\right) \]
      2. sqrt-unprod2.9%

        \[\leadsto \color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}} \cdot \left(x \cdot z\right) \]
      3. sqr-neg2.9%

        \[\leadsto \sqrt{\color{blue}{a \cdot a}} \cdot \left(x \cdot z\right) \]
      4. sqrt-unprod1.4%

        \[\leadsto \color{blue}{\left(\sqrt{a} \cdot \sqrt{a}\right)} \cdot \left(x \cdot z\right) \]
      5. add-sqr-sqrt2.9%

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

        \[\leadsto \color{blue}{{\left(a \cdot \left(x \cdot z\right)\right)}^{1}} \]
      7. *-commutative2.9%

        \[\leadsto {\left(a \cdot \color{blue}{\left(z \cdot x\right)}\right)}^{1} \]
    15. Applied egg-rr2.9%

      \[\leadsto \color{blue}{{\left(a \cdot \left(z \cdot x\right)\right)}^{1}} \]
    16. Step-by-step derivation
      1. unpow12.9%

        \[\leadsto \color{blue}{a \cdot \left(z \cdot x\right)} \]
    17. Simplified2.9%

      \[\leadsto \color{blue}{a \cdot \left(z \cdot x\right)} \]
    18. Taylor expanded in a around 0 2.9%

      \[\leadsto \color{blue}{a \cdot \left(x \cdot z\right)} \]
    19. Step-by-step derivation
      1. *-commutative2.9%

        \[\leadsto \color{blue}{\left(x \cdot z\right) \cdot a} \]
      2. associate-*l*2.9%

        \[\leadsto \color{blue}{x \cdot \left(z \cdot a\right)} \]
      3. *-commutative2.9%

        \[\leadsto x \cdot \color{blue}{\left(a \cdot z\right)} \]
    20. Simplified2.9%

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

    if 1.35000000000000002e39 < x

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 59.0%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg59.0%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out59.0%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative59.0%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified59.0%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 37.4%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg37.4%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*33.5%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified33.5%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in y around inf 35.3%

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{y} - t \cdot x\right)} \]
    10. Taylor expanded in t around inf 38.0%

      \[\leadsto y \cdot \color{blue}{\left(t \cdot \left(\frac{x}{t \cdot y} - x\right)\right)} \]
    11. Step-by-step derivation
      1. associate-/r*39.8%

        \[\leadsto y \cdot \left(t \cdot \left(\color{blue}{\frac{\frac{x}{t}}{y}} - x\right)\right) \]
    12. Simplified39.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.7 \cdot 10^{-100}:\\ \;\;\;\;y \cdot \left(t \cdot \frac{x}{y \cdot t}\right)\\ \mathbf{elif}\;x \leq 1.65 \cdot 10^{-24}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{-23}:\\ \;\;\;\;y \cdot \left(t \cdot \frac{x}{y \cdot t}\right)\\ \mathbf{elif}\;x \leq 53000000:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{+39}:\\ \;\;\;\;x \cdot \left(z \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(t \cdot \left(\frac{\frac{x}{t}}{y} - x\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 24.7% accurate, 12.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -4.4 \cdot 10^{+105}:\\ \;\;\;\;x \cdot \left(z \cdot a\right)\\ \mathbf{elif}\;b \leq -5.5 \cdot 10^{+57}:\\ \;\;\;\;y \cdot \frac{x}{y}\\ \mathbf{elif}\;b \leq 9.5 \cdot 10^{-9}:\\ \;\;\;\;a \cdot \frac{x}{a}\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{+116}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= b -4.4e+105)
   (* x (* z a))
   (if (<= b -5.5e+57)
     (* y (/ x y))
     (if (<= b 9.5e-9)
       (* a (/ x a))
       (if (<= b 2.8e+116) (* t (* x (- y))) (* x (* z (- a))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -4.4e+105) {
		tmp = x * (z * a);
	} else if (b <= -5.5e+57) {
		tmp = y * (x / y);
	} else if (b <= 9.5e-9) {
		tmp = a * (x / a);
	} else if (b <= 2.8e+116) {
		tmp = t * (x * -y);
	} else {
		tmp = x * (z * -a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (b <= (-4.4d+105)) then
        tmp = x * (z * a)
    else if (b <= (-5.5d+57)) then
        tmp = y * (x / y)
    else if (b <= 9.5d-9) then
        tmp = a * (x / a)
    else if (b <= 2.8d+116) then
        tmp = t * (x * -y)
    else
        tmp = x * (z * -a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -4.4e+105) {
		tmp = x * (z * a);
	} else if (b <= -5.5e+57) {
		tmp = y * (x / y);
	} else if (b <= 9.5e-9) {
		tmp = a * (x / a);
	} else if (b <= 2.8e+116) {
		tmp = t * (x * -y);
	} else {
		tmp = x * (z * -a);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if b <= -4.4e+105:
		tmp = x * (z * a)
	elif b <= -5.5e+57:
		tmp = y * (x / y)
	elif b <= 9.5e-9:
		tmp = a * (x / a)
	elif b <= 2.8e+116:
		tmp = t * (x * -y)
	else:
		tmp = x * (z * -a)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (b <= -4.4e+105)
		tmp = Float64(x * Float64(z * a));
	elseif (b <= -5.5e+57)
		tmp = Float64(y * Float64(x / y));
	elseif (b <= 9.5e-9)
		tmp = Float64(a * Float64(x / a));
	elseif (b <= 2.8e+116)
		tmp = Float64(t * Float64(x * Float64(-y)));
	else
		tmp = Float64(x * Float64(z * Float64(-a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (b <= -4.4e+105)
		tmp = x * (z * a);
	elseif (b <= -5.5e+57)
		tmp = y * (x / y);
	elseif (b <= 9.5e-9)
		tmp = a * (x / a);
	elseif (b <= 2.8e+116)
		tmp = t * (x * -y);
	else
		tmp = x * (z * -a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -4.4e+105], N[(x * N[(z * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -5.5e+57], N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.5e-9], N[(a * N[(x / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.8e+116], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], N[(x * N[(z * (-a)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -5.5 \cdot 10^{+57}:\\
\;\;\;\;y \cdot \frac{x}{y}\\

\mathbf{elif}\;b \leq 9.5 \cdot 10^{-9}:\\
\;\;\;\;a \cdot \frac{x}{a}\\

\mathbf{elif}\;b \leq 2.8 \cdot 10^{+116}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -4.40000000000000014e105

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 86.9%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg86.9%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define86.9%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified86.9%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 10.5%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 9.9%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-19.9%

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in z around inf 9.7%

      \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \left(a \cdot x\right) + \frac{x}{z}\right)} \]
    11. Taylor expanded in z around inf 21.9%

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. mul-1-neg21.9%

        \[\leadsto \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    13. Simplified21.9%

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(x \cdot z\right)} \]
    14. Step-by-step derivation
      1. add-sqr-sqrt16.1%

        \[\leadsto \color{blue}{\left(\sqrt{-a} \cdot \sqrt{-a}\right)} \cdot \left(x \cdot z\right) \]
      2. sqrt-unprod37.3%

        \[\leadsto \color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}} \cdot \left(x \cdot z\right) \]
      3. sqr-neg37.3%

        \[\leadsto \sqrt{\color{blue}{a \cdot a}} \cdot \left(x \cdot z\right) \]
      4. sqrt-unprod11.7%

        \[\leadsto \color{blue}{\left(\sqrt{a} \cdot \sqrt{a}\right)} \cdot \left(x \cdot z\right) \]
      5. add-sqr-sqrt27.8%

        \[\leadsto \color{blue}{a} \cdot \left(x \cdot z\right) \]
      6. pow127.8%

        \[\leadsto \color{blue}{{\left(a \cdot \left(x \cdot z\right)\right)}^{1}} \]
      7. *-commutative27.8%

        \[\leadsto {\left(a \cdot \color{blue}{\left(z \cdot x\right)}\right)}^{1} \]
    15. Applied egg-rr27.8%

      \[\leadsto \color{blue}{{\left(a \cdot \left(z \cdot x\right)\right)}^{1}} \]
    16. Step-by-step derivation
      1. unpow127.8%

        \[\leadsto \color{blue}{a \cdot \left(z \cdot x\right)} \]
    17. Simplified27.8%

      \[\leadsto \color{blue}{a \cdot \left(z \cdot x\right)} \]
    18. Taylor expanded in a around 0 27.8%

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

        \[\leadsto \color{blue}{\left(x \cdot z\right) \cdot a} \]
      2. associate-*l*27.8%

        \[\leadsto \color{blue}{x \cdot \left(z \cdot a\right)} \]
      3. *-commutative27.8%

        \[\leadsto x \cdot \color{blue}{\left(a \cdot z\right)} \]
    20. Simplified27.8%

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

    if -4.40000000000000014e105 < b < -5.5000000000000002e57

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 51.2%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg51.2%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out51.2%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative51.2%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified51.2%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 35.7%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg35.7%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*36.0%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified36.0%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in y around inf 51.7%

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{y} - t \cdot x\right)} \]
    10. Taylor expanded in y around 0 59.8%

      \[\leadsto y \cdot \color{blue}{\frac{x}{y}} \]

    if -5.5000000000000002e57 < b < 9.5000000000000007e-9

    1. Initial program 95.3%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 49.0%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg49.0%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define59.3%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified59.3%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 26.4%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 24.2%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-124.2%

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in a around inf 27.6%

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

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} + -1 \cdot \left(x \cdot z\right)\right)} \]
      2. mul-1-neg27.6%

        \[\leadsto a \cdot \left(\frac{x}{a} + \color{blue}{\left(-x \cdot z\right)}\right) \]
      3. *-commutative27.6%

        \[\leadsto a \cdot \left(\frac{x}{a} + \left(-\color{blue}{z \cdot x}\right)\right) \]
      4. unsub-neg27.6%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} - z \cdot x\right)} \]
    12. Simplified27.6%

      \[\leadsto \color{blue}{a \cdot \left(\frac{x}{a} - z \cdot x\right)} \]
    13. Taylor expanded in a around 0 33.5%

      \[\leadsto a \cdot \color{blue}{\frac{x}{a}} \]

    if 9.5000000000000007e-9 < b < 2.80000000000000004e116

    1. Initial program 99.9%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 59.1%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg59.1%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out59.1%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative59.1%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified59.1%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 36.1%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg36.1%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*30.8%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified30.8%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in t around inf 38.0%

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot y\right)\right)} \]
    10. Step-by-step derivation
      1. mul-1-neg38.0%

        \[\leadsto \color{blue}{-t \cdot \left(x \cdot y\right)} \]
      2. distribute-rgt-neg-in38.0%

        \[\leadsto \color{blue}{t \cdot \left(-x \cdot y\right)} \]
      3. *-commutative38.0%

        \[\leadsto t \cdot \left(-\color{blue}{y \cdot x}\right) \]
      4. distribute-lft-neg-in38.0%

        \[\leadsto t \cdot \color{blue}{\left(\left(-y\right) \cdot x\right)} \]
    11. Simplified38.0%

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

    if 2.80000000000000004e116 < b

    1. Initial program 96.9%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 84.9%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg84.9%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define84.9%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified84.9%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 7.9%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 10.9%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-110.9%

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in a around inf 15.7%

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(x \cdot z\right) + \frac{x}{a}\right)} \]
    11. Step-by-step derivation
      1. +-commutative15.7%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} + -1 \cdot \left(x \cdot z\right)\right)} \]
      2. mul-1-neg15.7%

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

        \[\leadsto a \cdot \left(\frac{x}{a} + \left(-\color{blue}{z \cdot x}\right)\right) \]
      4. unsub-neg15.7%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} - z \cdot x\right)} \]
    12. Simplified15.7%

      \[\leadsto \color{blue}{a \cdot \left(\frac{x}{a} - z \cdot x\right)} \]
    13. Taylor expanded in a around inf 24.4%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(x \cdot z\right)\right)} \]
    14. Step-by-step derivation
      1. mul-1-neg24.4%

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

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

        \[\leadsto -\color{blue}{x \cdot \left(z \cdot a\right)} \]
      4. distribute-rgt-neg-in24.6%

        \[\leadsto \color{blue}{x \cdot \left(-z \cdot a\right)} \]
      5. distribute-rgt-neg-out24.6%

        \[\leadsto x \cdot \color{blue}{\left(z \cdot \left(-a\right)\right)} \]
    15. Simplified24.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.4 \cdot 10^{+105}:\\ \;\;\;\;x \cdot \left(z \cdot a\right)\\ \mathbf{elif}\;b \leq -5.5 \cdot 10^{+57}:\\ \;\;\;\;y \cdot \frac{x}{y}\\ \mathbf{elif}\;b \leq 9.5 \cdot 10^{-9}:\\ \;\;\;\;a \cdot \frac{x}{a}\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{+116}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z \cdot \left(-a\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 27.6% accurate, 12.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.55 \cdot 10^{-76}:\\
\;\;\;\;a \cdot \frac{x}{a}\\

\mathbf{elif}\;x \leq 7 \cdot 10^{-5}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\

\mathbf{elif}\;x \leq 7.5 \cdot 10^{+84} \lor \neg \left(x \leq 3 \cdot 10^{+233}\right):\\
\;\;\;\;z \cdot \frac{x}{z}\\

\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < 1.54999999999999985e-76

    1. Initial program 96.8%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 64.8%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg64.8%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define70.1%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified70.1%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 20.9%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 20.6%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-120.6%

        \[\leadsto x + \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    9. Simplified20.6%

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in a around inf 24.8%

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(x \cdot z\right) + \frac{x}{a}\right)} \]
    11. Step-by-step derivation
      1. +-commutative24.8%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} + -1 \cdot \left(x \cdot z\right)\right)} \]
      2. mul-1-neg24.8%

        \[\leadsto a \cdot \left(\frac{x}{a} + \color{blue}{\left(-x \cdot z\right)}\right) \]
      3. *-commutative24.8%

        \[\leadsto a \cdot \left(\frac{x}{a} + \left(-\color{blue}{z \cdot x}\right)\right) \]
      4. unsub-neg24.8%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} - z \cdot x\right)} \]
    12. Simplified24.8%

      \[\leadsto \color{blue}{a \cdot \left(\frac{x}{a} - z \cdot x\right)} \]
    13. Taylor expanded in a around 0 30.1%

      \[\leadsto a \cdot \color{blue}{\frac{x}{a}} \]

    if 1.54999999999999985e-76 < x < 6.9999999999999994e-5

    1. Initial program 87.9%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 33.3%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg33.3%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. distribute-rgt-neg-out33.3%

        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    5. Simplified33.3%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
    6. Taylor expanded in a around 0 9.0%

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

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \left(a \cdot b\right) + 1\right)} \]
      2. associate-*r*9.0%

        \[\leadsto x \cdot \left(\color{blue}{\left(-1 \cdot a\right) \cdot b} + 1\right) \]
      3. neg-mul-19.0%

        \[\leadsto x \cdot \left(\color{blue}{\left(-a\right)} \cdot b + 1\right) \]
    8. Simplified9.0%

      \[\leadsto x \cdot \color{blue}{\left(\left(-a\right) \cdot b + 1\right)} \]
    9. Taylor expanded in a around inf 27.2%

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot \left(b \cdot x\right)} \]
      2. mul-1-neg27.2%

        \[\leadsto \color{blue}{\left(-a\right)} \cdot \left(b \cdot x\right) \]
    11. Simplified27.2%

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

    if 6.9999999999999994e-5 < x < 7.5000000000000001e84 or 3.00000000000000014e233 < x

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 62.1%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg62.1%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define62.1%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified62.1%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 21.1%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 23.5%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-123.5%

        \[\leadsto x + \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    9. Simplified23.5%

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in z around inf 30.3%

      \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \left(a \cdot x\right) + \frac{x}{z}\right)} \]
    11. Taylor expanded in a around 0 33.5%

      \[\leadsto z \cdot \color{blue}{\frac{x}{z}} \]

    if 7.5000000000000001e84 < x < 3.00000000000000014e233

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 65.5%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg65.5%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out65.5%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative65.5%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified65.5%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 44.6%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg44.6%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*41.2%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified41.2%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in y around inf 41.2%

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{y} - t \cdot x\right)} \]
    10. Taylor expanded in y around 0 21.0%

      \[\leadsto y \cdot \color{blue}{\frac{x}{y}} \]
    11. Step-by-step derivation
      1. associate-*r/37.8%

        \[\leadsto \color{blue}{\frac{y \cdot x}{y}} \]
      2. *-commutative37.8%

        \[\leadsto \frac{\color{blue}{x \cdot y}}{y} \]
    12. Applied egg-rr37.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.55 \cdot 10^{-76}:\\ \;\;\;\;a \cdot \frac{x}{a}\\ \mathbf{elif}\;x \leq 7 \cdot 10^{-5}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{+84} \lor \neg \left(x \leq 3 \cdot 10^{+233}\right):\\ \;\;\;\;z \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 25.3% accurate, 15.7× speedup?

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

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

\mathbf{elif}\;b \leq -1.12 \cdot 10^{+61} \lor \neg \left(b \leq 6.5 \cdot 10^{-150}\right):\\
\;\;\;\;y \cdot \frac{x}{y}\\

\mathbf{else}:\\
\;\;\;\;a \cdot \frac{x}{a}\\


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

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 86.9%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg86.9%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define86.9%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified86.9%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 10.5%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 9.9%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-19.9%

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in z around inf 9.7%

      \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \left(a \cdot x\right) + \frac{x}{z}\right)} \]
    11. Taylor expanded in z around inf 21.9%

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. mul-1-neg21.9%

        \[\leadsto \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    13. Simplified21.9%

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(x \cdot z\right)} \]
    14. Step-by-step derivation
      1. add-sqr-sqrt16.1%

        \[\leadsto \color{blue}{\left(\sqrt{-a} \cdot \sqrt{-a}\right)} \cdot \left(x \cdot z\right) \]
      2. sqrt-unprod37.3%

        \[\leadsto \color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}} \cdot \left(x \cdot z\right) \]
      3. sqr-neg37.3%

        \[\leadsto \sqrt{\color{blue}{a \cdot a}} \cdot \left(x \cdot z\right) \]
      4. sqrt-unprod11.7%

        \[\leadsto \color{blue}{\left(\sqrt{a} \cdot \sqrt{a}\right)} \cdot \left(x \cdot z\right) \]
      5. add-sqr-sqrt27.8%

        \[\leadsto \color{blue}{a} \cdot \left(x \cdot z\right) \]
      6. pow127.8%

        \[\leadsto \color{blue}{{\left(a \cdot \left(x \cdot z\right)\right)}^{1}} \]
      7. *-commutative27.8%

        \[\leadsto {\left(a \cdot \color{blue}{\left(z \cdot x\right)}\right)}^{1} \]
    15. Applied egg-rr27.8%

      \[\leadsto \color{blue}{{\left(a \cdot \left(z \cdot x\right)\right)}^{1}} \]
    16. Step-by-step derivation
      1. unpow127.8%

        \[\leadsto \color{blue}{a \cdot \left(z \cdot x\right)} \]
    17. Simplified27.8%

      \[\leadsto \color{blue}{a \cdot \left(z \cdot x\right)} \]
    18. Taylor expanded in a around 0 27.8%

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

        \[\leadsto \color{blue}{\left(x \cdot z\right) \cdot a} \]
      2. associate-*l*27.8%

        \[\leadsto \color{blue}{x \cdot \left(z \cdot a\right)} \]
      3. *-commutative27.8%

        \[\leadsto x \cdot \color{blue}{\left(a \cdot z\right)} \]
    20. Simplified27.8%

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

    if -1.50000000000000007e99 < b < -1.12e61 or 6.49999999999999997e-150 < b

    1. Initial program 98.4%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 50.4%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg50.4%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out50.4%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative50.4%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified50.4%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 26.0%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg26.0%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*25.3%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified25.3%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in y around inf 29.5%

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{y} - t \cdot x\right)} \]
    10. Taylor expanded in y around 0 29.0%

      \[\leadsto y \cdot \color{blue}{\frac{x}{y}} \]

    if -1.12e61 < b < 6.49999999999999997e-150

    1. Initial program 94.5%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 45.8%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg45.8%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define57.6%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified57.6%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 27.8%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 24.9%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-124.9%

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in a around inf 30.1%

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(x \cdot z\right) + \frac{x}{a}\right)} \]
    11. Step-by-step derivation
      1. +-commutative30.1%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} + -1 \cdot \left(x \cdot z\right)\right)} \]
      2. mul-1-neg30.1%

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

        \[\leadsto a \cdot \left(\frac{x}{a} + \left(-\color{blue}{z \cdot x}\right)\right) \]
      4. unsub-neg30.1%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} - z \cdot x\right)} \]
    12. Simplified30.1%

      \[\leadsto \color{blue}{a \cdot \left(\frac{x}{a} - z \cdot x\right)} \]
    13. Taylor expanded in a around 0 36.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.5 \cdot 10^{+99}:\\ \;\;\;\;x \cdot \left(z \cdot a\right)\\ \mathbf{elif}\;b \leq -1.12 \cdot 10^{+61} \lor \neg \left(b \leq 6.5 \cdot 10^{-150}\right):\\ \;\;\;\;y \cdot \frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 27.5% accurate, 19.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.55 \cdot 10^{-76}:\\
\;\;\;\;a \cdot \frac{x}{a}\\

\mathbf{elif}\;x \leq 7.2 \cdot 10^{-7}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < 1.54999999999999985e-76

    1. Initial program 96.8%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 64.8%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg64.8%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define70.1%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified70.1%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 20.9%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 20.6%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-120.6%

        \[\leadsto x + \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    9. Simplified20.6%

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in a around inf 24.8%

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(x \cdot z\right) + \frac{x}{a}\right)} \]
    11. Step-by-step derivation
      1. +-commutative24.8%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} + -1 \cdot \left(x \cdot z\right)\right)} \]
      2. mul-1-neg24.8%

        \[\leadsto a \cdot \left(\frac{x}{a} + \color{blue}{\left(-x \cdot z\right)}\right) \]
      3. *-commutative24.8%

        \[\leadsto a \cdot \left(\frac{x}{a} + \left(-\color{blue}{z \cdot x}\right)\right) \]
      4. unsub-neg24.8%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} - z \cdot x\right)} \]
    12. Simplified24.8%

      \[\leadsto \color{blue}{a \cdot \left(\frac{x}{a} - z \cdot x\right)} \]
    13. Taylor expanded in a around 0 30.1%

      \[\leadsto a \cdot \color{blue}{\frac{x}{a}} \]

    if 1.54999999999999985e-76 < x < 7.19999999999999989e-7

    1. Initial program 87.9%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 51.5%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg51.5%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out51.5%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative51.5%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified51.5%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 15.5%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg15.5%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*15.5%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified15.5%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in t around inf 27.7%

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot y\right)\right)} \]
    10. Step-by-step derivation
      1. mul-1-neg27.7%

        \[\leadsto \color{blue}{-t \cdot \left(x \cdot y\right)} \]
      2. distribute-rgt-neg-in27.7%

        \[\leadsto \color{blue}{t \cdot \left(-x \cdot y\right)} \]
      3. *-commutative27.7%

        \[\leadsto t \cdot \left(-\color{blue}{y \cdot x}\right) \]
      4. distribute-lft-neg-in27.7%

        \[\leadsto t \cdot \color{blue}{\left(\left(-y\right) \cdot x\right)} \]
    11. Simplified27.7%

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

    if 7.19999999999999989e-7 < x

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 57.7%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg57.7%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out57.7%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative57.7%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified57.7%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 36.1%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg36.1%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*32.8%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified32.8%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in y around inf 34.3%

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{y} - t \cdot x\right)} \]
    10. Taylor expanded in y around 0 23.7%

      \[\leadsto y \cdot \color{blue}{\frac{x}{y}} \]
    11. Step-by-step derivation
      1. associate-*r/31.5%

        \[\leadsto \color{blue}{\frac{y \cdot x}{y}} \]
      2. *-commutative31.5%

        \[\leadsto \frac{\color{blue}{x \cdot y}}{y} \]
    12. Applied egg-rr31.5%

      \[\leadsto \color{blue}{\frac{x \cdot y}{y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification30.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.55 \cdot 10^{-76}:\\ \;\;\;\;a \cdot \frac{x}{a}\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{-7}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 27.2% accurate, 20.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.5999999999999998e107 or 4.99999999999999977e-7 < y

    1. Initial program 99.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 40.4%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg40.4%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define47.2%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified47.2%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 6.8%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 5.6%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-15.6%

        \[\leadsto x + \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    9. Simplified5.6%

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in z around inf 14.0%

      \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \left(a \cdot x\right) + \frac{x}{z}\right)} \]
    11. Taylor expanded in z around inf 24.5%

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. mul-1-neg24.5%

        \[\leadsto \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    13. Simplified24.5%

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(x \cdot z\right)} \]
    14. Step-by-step derivation
      1. add-sqr-sqrt11.3%

        \[\leadsto \color{blue}{\left(\sqrt{-a} \cdot \sqrt{-a}\right)} \cdot \left(x \cdot z\right) \]
      2. sqrt-unprod42.9%

        \[\leadsto \color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}} \cdot \left(x \cdot z\right) \]
      3. sqr-neg42.9%

        \[\leadsto \sqrt{\color{blue}{a \cdot a}} \cdot \left(x \cdot z\right) \]
      4. sqrt-unprod13.5%

        \[\leadsto \color{blue}{\left(\sqrt{a} \cdot \sqrt{a}\right)} \cdot \left(x \cdot z\right) \]
      5. add-sqr-sqrt22.2%

        \[\leadsto \color{blue}{a} \cdot \left(x \cdot z\right) \]
      6. pow122.2%

        \[\leadsto \color{blue}{{\left(a \cdot \left(x \cdot z\right)\right)}^{1}} \]
      7. *-commutative22.2%

        \[\leadsto {\left(a \cdot \color{blue}{\left(z \cdot x\right)}\right)}^{1} \]
    15. Applied egg-rr22.2%

      \[\leadsto \color{blue}{{\left(a \cdot \left(z \cdot x\right)\right)}^{1}} \]
    16. Step-by-step derivation
      1. unpow122.2%

        \[\leadsto \color{blue}{a \cdot \left(z \cdot x\right)} \]
    17. Simplified22.2%

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

    if -3.5999999999999998e107 < y < 4.99999999999999977e-7

    1. Initial program 95.8%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 45.7%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg45.7%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out45.7%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative45.7%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified45.7%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 28.4%

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

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

Alternative 23: 27.1% accurate, 21.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.1 \cdot 10^{-90}:\\
\;\;\;\;a \cdot \frac{x}{a}\\

\mathbf{elif}\;x \leq 2.05 \cdot 10^{+41}:\\
\;\;\;\;a \cdot \left(x \cdot z\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < 1.09999999999999993e-90

    1. Initial program 96.7%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 64.9%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg64.9%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define69.8%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified69.8%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 20.8%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 20.6%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-120.6%

        \[\leadsto x + \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    9. Simplified20.6%

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in a around inf 23.7%

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(x \cdot z\right) + \frac{x}{a}\right)} \]
    11. Step-by-step derivation
      1. +-commutative23.7%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} + -1 \cdot \left(x \cdot z\right)\right)} \]
      2. mul-1-neg23.7%

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

        \[\leadsto a \cdot \left(\frac{x}{a} + \left(-\color{blue}{z \cdot x}\right)\right) \]
      4. unsub-neg23.7%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} - z \cdot x\right)} \]
    12. Simplified23.7%

      \[\leadsto \color{blue}{a \cdot \left(\frac{x}{a} - z \cdot x\right)} \]
    13. Taylor expanded in a around 0 29.2%

      \[\leadsto a \cdot \color{blue}{\frac{x}{a}} \]

    if 1.09999999999999993e-90 < x < 2.0500000000000002e41

    1. Initial program 93.5%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 48.4%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg48.4%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define58.0%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified58.0%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 17.4%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 14.2%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-114.2%

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in z around inf 14.1%

      \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \left(a \cdot x\right) + \frac{x}{z}\right)} \]
    11. Taylor expanded in z around inf 19.2%

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. mul-1-neg19.2%

        \[\leadsto \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    13. Simplified19.2%

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(x \cdot z\right)} \]
    14. Step-by-step derivation
      1. add-sqr-sqrt7.9%

        \[\leadsto \color{blue}{\left(\sqrt{-a} \cdot \sqrt{-a}\right)} \cdot \left(x \cdot z\right) \]
      2. sqrt-unprod25.4%

        \[\leadsto \color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}} \cdot \left(x \cdot z\right) \]
      3. sqr-neg25.4%

        \[\leadsto \sqrt{\color{blue}{a \cdot a}} \cdot \left(x \cdot z\right) \]
      4. sqrt-unprod11.6%

        \[\leadsto \color{blue}{\left(\sqrt{a} \cdot \sqrt{a}\right)} \cdot \left(x \cdot z\right) \]
      5. add-sqr-sqrt18.9%

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

        \[\leadsto \color{blue}{{\left(a \cdot \left(x \cdot z\right)\right)}^{1}} \]
      7. *-commutative18.9%

        \[\leadsto {\left(a \cdot \color{blue}{\left(z \cdot x\right)}\right)}^{1} \]
    15. Applied egg-rr18.9%

      \[\leadsto \color{blue}{{\left(a \cdot \left(z \cdot x\right)\right)}^{1}} \]
    16. Step-by-step derivation
      1. unpow118.9%

        \[\leadsto \color{blue}{a \cdot \left(z \cdot x\right)} \]
    17. Simplified18.9%

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

    if 2.0500000000000002e41 < x

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 59.0%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg59.0%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out59.0%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative59.0%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified59.0%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 37.4%

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

        \[\leadsto x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)} \]
      2. unsub-neg37.4%

        \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
      3. associate-*r*33.5%

        \[\leadsto x - \color{blue}{\left(t \cdot x\right) \cdot y} \]
    8. Simplified33.5%

      \[\leadsto \color{blue}{x - \left(t \cdot x\right) \cdot y} \]
    9. Taylor expanded in y around inf 35.3%

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{y} - t \cdot x\right)} \]
    10. Taylor expanded in y around 0 22.9%

      \[\leadsto y \cdot \color{blue}{\frac{x}{y}} \]
    11. Step-by-step derivation
      1. associate-*r/31.9%

        \[\leadsto \color{blue}{\frac{y \cdot x}{y}} \]
      2. *-commutative31.9%

        \[\leadsto \frac{\color{blue}{x \cdot y}}{y} \]
    12. Applied egg-rr31.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.1 \cdot 10^{-90}:\\ \;\;\;\;a \cdot \frac{x}{a}\\ \mathbf{elif}\;x \leq 2.05 \cdot 10^{+41}:\\ \;\;\;\;a \cdot \left(x \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 26.7% accurate, 21.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.7 \cdot 10^{-91}:\\
\;\;\;\;a \cdot \frac{x}{a}\\

\mathbf{elif}\;x \leq 4.3 \cdot 10^{+42}:\\
\;\;\;\;a \cdot \left(x \cdot z\right)\\

\mathbf{else}:\\
\;\;\;\;z \cdot \frac{x}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < 3.7000000000000002e-91

    1. Initial program 96.7%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 64.9%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg64.9%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define69.8%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified69.8%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 20.8%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 20.6%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-120.6%

        \[\leadsto x + \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    9. Simplified20.6%

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in a around inf 23.7%

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(x \cdot z\right) + \frac{x}{a}\right)} \]
    11. Step-by-step derivation
      1. +-commutative23.7%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} + -1 \cdot \left(x \cdot z\right)\right)} \]
      2. mul-1-neg23.7%

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

        \[\leadsto a \cdot \left(\frac{x}{a} + \left(-\color{blue}{z \cdot x}\right)\right) \]
      4. unsub-neg23.7%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} - z \cdot x\right)} \]
    12. Simplified23.7%

      \[\leadsto \color{blue}{a \cdot \left(\frac{x}{a} - z \cdot x\right)} \]
    13. Taylor expanded in a around 0 29.2%

      \[\leadsto a \cdot \color{blue}{\frac{x}{a}} \]

    if 3.7000000000000002e-91 < x < 4.2999999999999998e42

    1. Initial program 93.5%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 48.4%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg48.4%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define58.0%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified58.0%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 17.4%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 14.2%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-114.2%

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in z around inf 14.1%

      \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \left(a \cdot x\right) + \frac{x}{z}\right)} \]
    11. Taylor expanded in z around inf 19.2%

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. mul-1-neg19.2%

        \[\leadsto \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    13. Simplified19.2%

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(x \cdot z\right)} \]
    14. Step-by-step derivation
      1. add-sqr-sqrt7.9%

        \[\leadsto \color{blue}{\left(\sqrt{-a} \cdot \sqrt{-a}\right)} \cdot \left(x \cdot z\right) \]
      2. sqrt-unprod25.4%

        \[\leadsto \color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}} \cdot \left(x \cdot z\right) \]
      3. sqr-neg25.4%

        \[\leadsto \sqrt{\color{blue}{a \cdot a}} \cdot \left(x \cdot z\right) \]
      4. sqrt-unprod11.6%

        \[\leadsto \color{blue}{\left(\sqrt{a} \cdot \sqrt{a}\right)} \cdot \left(x \cdot z\right) \]
      5. add-sqr-sqrt18.9%

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

        \[\leadsto \color{blue}{{\left(a \cdot \left(x \cdot z\right)\right)}^{1}} \]
      7. *-commutative18.9%

        \[\leadsto {\left(a \cdot \color{blue}{\left(z \cdot x\right)}\right)}^{1} \]
    15. Applied egg-rr18.9%

      \[\leadsto \color{blue}{{\left(a \cdot \left(z \cdot x\right)\right)}^{1}} \]
    16. Step-by-step derivation
      1. unpow118.9%

        \[\leadsto \color{blue}{a \cdot \left(z \cdot x\right)} \]
    17. Simplified18.9%

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

    if 4.2999999999999998e42 < x

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 61.1%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg61.1%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define66.5%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified66.5%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 23.3%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 22.9%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-122.9%

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in z around inf 27.0%

      \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \left(a \cdot x\right) + \frac{x}{z}\right)} \]
    11. Taylor expanded in a around 0 29.5%

      \[\leadsto z \cdot \color{blue}{\frac{x}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification28.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 3.7 \cdot 10^{-91}:\\ \;\;\;\;a \cdot \frac{x}{a}\\ \mathbf{elif}\;x \leq 4.3 \cdot 10^{+42}:\\ \;\;\;\;a \cdot \left(x \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 24.9% accurate, 21.0× speedup?

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

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

\mathbf{elif}\;b \leq -1.45 \cdot 10^{+20}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;a \cdot \frac{x}{a}\\


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

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 85.3%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg85.3%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define85.3%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified85.3%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 10.3%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 9.6%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-19.6%

        \[\leadsto x + \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    9. Simplified9.6%

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in z around inf 9.5%

      \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \left(a \cdot x\right) + \frac{x}{z}\right)} \]
    11. Taylor expanded in z around inf 23.3%

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. mul-1-neg23.3%

        \[\leadsto \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    13. Simplified23.3%

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(x \cdot z\right)} \]
    14. Step-by-step derivation
      1. add-sqr-sqrt15.4%

        \[\leadsto \color{blue}{\left(\sqrt{-a} \cdot \sqrt{-a}\right)} \cdot \left(x \cdot z\right) \]
      2. sqrt-unprod38.0%

        \[\leadsto \color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}} \cdot \left(x \cdot z\right) \]
      3. sqr-neg38.0%

        \[\leadsto \sqrt{\color{blue}{a \cdot a}} \cdot \left(x \cdot z\right) \]
      4. sqrt-unprod13.6%

        \[\leadsto \color{blue}{\left(\sqrt{a} \cdot \sqrt{a}\right)} \cdot \left(x \cdot z\right) \]
      5. add-sqr-sqrt28.9%

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

        \[\leadsto \color{blue}{{\left(a \cdot \left(x \cdot z\right)\right)}^{1}} \]
      7. *-commutative28.9%

        \[\leadsto {\left(a \cdot \color{blue}{\left(z \cdot x\right)}\right)}^{1} \]
    15. Applied egg-rr28.9%

      \[\leadsto \color{blue}{{\left(a \cdot \left(z \cdot x\right)\right)}^{1}} \]
    16. Step-by-step derivation
      1. unpow128.9%

        \[\leadsto \color{blue}{a \cdot \left(z \cdot x\right)} \]
    17. Simplified28.9%

      \[\leadsto \color{blue}{a \cdot \left(z \cdot x\right)} \]
    18. Taylor expanded in a around 0 28.9%

      \[\leadsto \color{blue}{a \cdot \left(x \cdot z\right)} \]
    19. Step-by-step derivation
      1. *-commutative28.9%

        \[\leadsto \color{blue}{\left(x \cdot z\right) \cdot a} \]
      2. associate-*l*29.0%

        \[\leadsto \color{blue}{x \cdot \left(z \cdot a\right)} \]
      3. *-commutative29.0%

        \[\leadsto x \cdot \color{blue}{\left(a \cdot z\right)} \]
    20. Simplified29.0%

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

    if -1.32000000000000003e91 < b < -1.45e20

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 71.2%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg71.2%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out71.2%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative71.2%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified71.2%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 39.2%

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

    if -1.45e20 < b

    1. Initial program 96.1%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 56.5%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg56.5%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define63.7%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified63.7%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 21.6%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 20.9%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-120.9%

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in a around inf 24.5%

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

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} + -1 \cdot \left(x \cdot z\right)\right)} \]
      2. mul-1-neg24.5%

        \[\leadsto a \cdot \left(\frac{x}{a} + \color{blue}{\left(-x \cdot z\right)}\right) \]
      3. *-commutative24.5%

        \[\leadsto a \cdot \left(\frac{x}{a} + \left(-\color{blue}{z \cdot x}\right)\right) \]
      4. unsub-neg24.5%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} - z \cdot x\right)} \]
    12. Simplified24.5%

      \[\leadsto \color{blue}{a \cdot \left(\frac{x}{a} - z \cdot x\right)} \]
    13. Taylor expanded in a around 0 28.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.32 \cdot 10^{+91}:\\ \;\;\;\;x \cdot \left(z \cdot a\right)\\ \mathbf{elif}\;b \leq -1.45 \cdot 10^{+20}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 24.9% accurate, 21.0× speedup?

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

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

\mathbf{elif}\;b \leq -9.2 \cdot 10^{+19}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;a \cdot \frac{x}{a}\\


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

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 85.3%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg85.3%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define85.3%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified85.3%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 10.3%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 9.6%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-19.6%

        \[\leadsto x + \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    9. Simplified9.6%

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in z around inf 9.5%

      \[\leadsto \color{blue}{z \cdot \left(-1 \cdot \left(a \cdot x\right) + \frac{x}{z}\right)} \]
    11. Taylor expanded in z around inf 23.3%

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. mul-1-neg23.3%

        \[\leadsto \color{blue}{\left(-a\right)} \cdot \left(x \cdot z\right) \]
    13. Simplified23.3%

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(x \cdot z\right)} \]
    14. Step-by-step derivation
      1. add-sqr-sqrt15.4%

        \[\leadsto \color{blue}{\left(\sqrt{-a} \cdot \sqrt{-a}\right)} \cdot \left(x \cdot z\right) \]
      2. sqrt-unprod38.0%

        \[\leadsto \color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}} \cdot \left(x \cdot z\right) \]
      3. sqr-neg38.0%

        \[\leadsto \sqrt{\color{blue}{a \cdot a}} \cdot \left(x \cdot z\right) \]
      4. sqrt-unprod13.6%

        \[\leadsto \color{blue}{\left(\sqrt{a} \cdot \sqrt{a}\right)} \cdot \left(x \cdot z\right) \]
      5. add-sqr-sqrt28.9%

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

        \[\leadsto \color{blue}{{\left(a \cdot \left(x \cdot z\right)\right)}^{1}} \]
      7. *-commutative28.9%

        \[\leadsto {\left(a \cdot \color{blue}{\left(z \cdot x\right)}\right)}^{1} \]
    15. Applied egg-rr28.9%

      \[\leadsto \color{blue}{{\left(a \cdot \left(z \cdot x\right)\right)}^{1}} \]
    16. Step-by-step derivation
      1. unpow128.9%

        \[\leadsto \color{blue}{a \cdot \left(z \cdot x\right)} \]
    17. Simplified28.9%

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

    if -4.6999999999999999e83 < b < -9.2e19

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 71.2%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg71.2%

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. distribute-lft-neg-out71.2%

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative71.2%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Simplified71.2%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0 39.2%

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

    if -9.2e19 < b

    1. Initial program 96.1%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 56.5%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. sub-neg56.5%

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(-z\right)\right)} - b\right)} \]
      2. log1p-define63.7%

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right)} \]
    5. Simplified63.7%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in b around 0 21.6%

      \[\leadsto x \cdot \color{blue}{{\left(1 - z\right)}^{a}} \]
    7. Taylor expanded in z around 0 20.9%

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

        \[\leadsto x + \color{blue}{\left(-1 \cdot a\right) \cdot \left(x \cdot z\right)} \]
      2. neg-mul-120.9%

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot z\right)} \]
    10. Taylor expanded in a around inf 24.5%

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

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} + -1 \cdot \left(x \cdot z\right)\right)} \]
      2. mul-1-neg24.5%

        \[\leadsto a \cdot \left(\frac{x}{a} + \color{blue}{\left(-x \cdot z\right)}\right) \]
      3. *-commutative24.5%

        \[\leadsto a \cdot \left(\frac{x}{a} + \left(-\color{blue}{z \cdot x}\right)\right) \]
      4. unsub-neg24.5%

        \[\leadsto a \cdot \color{blue}{\left(\frac{x}{a} - z \cdot x\right)} \]
    12. Simplified24.5%

      \[\leadsto \color{blue}{a \cdot \left(\frac{x}{a} - z \cdot x\right)} \]
    13. Taylor expanded in a around 0 28.3%

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

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

Alternative 27: 19.9% accurate, 315.0× speedup?

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

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

    \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in t around inf 53.0%

    \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
  4. Step-by-step derivation
    1. mul-1-neg53.0%

      \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
    2. distribute-lft-neg-out53.0%

      \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
    3. *-commutative53.0%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
  5. Simplified53.0%

    \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
  6. Taylor expanded in y around 0 19.0%

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

Reproduce

?
herbie shell --seed 2024107 
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, B"
  :precision binary64
  (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))