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

Percentage Accurate: 96.8% → 99.5%
Time: 21.4s
Alternatives: 13
Speedup: 1.5×

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

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

Initial Program: 96.8% 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.5% 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 95.7%

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

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

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

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

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

    \[\leadsto x \cdot e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)} \]

Alternative 2: 85.8% accurate, 1.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.00000000000000006e-17 or 3.6e-10 < y

    1. Initial program 98.5%

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

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

    if -3.00000000000000006e-17 < y < 3.6e-10

    1. Initial program 92.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{-17} \lor \neg \left(y \leq 3.6 \cdot 10^{-10}\right):\\ \;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right)}\\ \end{array} \]

Alternative 3: 99.2% accurate, 1.5× speedup?

\[\begin{array}{l} \\ x \cdot e^{y \cdot \left(\log z - t\right) - a \cdot \left(z + b\right)} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (* x (exp (- (* y (- (log z) t)) (* a (+ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
	return x * exp(((y * (log(z) - t)) - (a * (z + b))));
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = x * exp(((y * (log(z) - t)) - (a * (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 * (z + b))));
}
def code(x, y, z, t, a, b):
	return x * math.exp(((y * (math.log(z) - t)) - (a * (z + b))))
function code(x, y, z, t, a, b)
	return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) - Float64(a * Float64(z + b)))))
end
function tmp = code(x, y, z, t, a, b)
	tmp = x * exp(((y * (log(z) - t)) - (a * (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[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x \cdot e^{y \cdot \left(\log z - t\right) - a \cdot \left(z + b\right)}
\end{array}
Derivation
  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. Taylor expanded in z around 0 99.2%

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

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

    \[\leadsto x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\color{blue}{\left(-z\right)} - b\right)} \]
  5. Final simplification99.2%

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

Alternative 4: 85.3% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{-16} \lor \neg \left(y \leq 1.5 \cdot 10^{-9}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.35e-16 or 1.49999999999999999e-9 < y

    1. Initial program 98.5%

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

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

    if -1.35e-16 < y < 1.49999999999999999e-9

    1. Initial program 92.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{-16} \lor \neg \left(y \leq 1.5 \cdot 10^{-9}\right):\\ \;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \end{array} \]

Alternative 5: 73.0% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot e^{t \cdot \left(-y\right)}\\
t_2 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -1.32 \cdot 10^{+168}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -8 \cdot 10^{+123}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -1.45 \cdot 10^{+54}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -4.2 \cdot 10^{-17}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.32000000000000007e168 or -7.99999999999999982e123 < y < -1.4499999999999999e54 or 3.10000000000000009 < y

    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. Taylor expanded in y around inf 93.5%

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

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

    if -1.32000000000000007e168 < y < -7.99999999999999982e123 or -1.4499999999999999e54 < y < -4.19999999999999984e-17

    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. Taylor expanded in t around inf 84.7%

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

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

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

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

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

    if -4.19999999999999984e-17 < y < 3.10000000000000009

    1. Initial program 92.9%

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

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    3. 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)}} \]
    4. Simplified82.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.32 \cdot 10^{+168}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq -8 \cdot 10^{+123}:\\ \;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\ \mathbf{elif}\;y \leq -1.45 \cdot 10^{+54}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-17}:\\ \;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\ \mathbf{elif}\;y \leq 3.1:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \]

Alternative 6: 73.6% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -320000000000 \lor \neg \left(y \leq 1.78\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 -320000000000.0) (not (<= y 1.78)))
   (* 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 <= -320000000000.0) || !(y <= 1.78)) {
		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 <= (-320000000000.0d0)) .or. (.not. (y <= 1.78d0))) 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 <= -320000000000.0) || !(y <= 1.78)) {
		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 <= -320000000000.0) or not (y <= 1.78):
		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 <= -320000000000.0) || !(y <= 1.78))
		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 <= -320000000000.0) || ~((y <= 1.78)))
		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, -320000000000.0], N[Not[LessEqual[y, 1.78]], $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 -320000000000 \lor \neg \left(y \leq 1.78\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 < -3.2e11 or 1.78000000000000003 < 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. Taylor expanded in y around inf 94.5%

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

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

    if -3.2e11 < y < 1.78000000000000003

    1. Initial program 93.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -320000000000 \lor \neg \left(y \leq 1.78\right):\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \end{array} \]

Alternative 7: 52.6% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{+131}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -2.8e+131) (* a (* x (- b))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -2.8e+131) {
		tmp = a * (x * -b);
	} 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 <= (-2.8d+131)) then
        tmp = a * (x * -b)
    else
        tmp = x * (z ** y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -2.8e+131) {
		tmp = a * (x * -b);
	} else {
		tmp = x * Math.pow(z, y);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= -2.8e+131:
		tmp = a * (x * -b)
	else:
		tmp = x * math.pow(z, y)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -2.8e+131)
		tmp = Float64(a * Float64(x * Float64(-b)));
	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 <= -2.8e+131)
		tmp = a * (x * -b);
	else
		tmp = x * (z ^ y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.8e+131], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


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

    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. Taylor expanded in b around inf 37.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(a \cdot b\right)} \]
      4. distribute-lft-neg-in24.9%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \left(a \cdot b\right)} \]
    10. Simplified24.9%

      \[\leadsto \color{blue}{\left(-x\right) \cdot \left(a \cdot b\right)} \]
    11. Step-by-step derivation
      1. distribute-lft-neg-out24.9%

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

        \[\leadsto -\color{blue}{\left(a \cdot b\right) \cdot x} \]
      3. associate-*l*25.0%

        \[\leadsto -\color{blue}{a \cdot \left(b \cdot x\right)} \]
    12. Applied egg-rr25.0%

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

    if -2.8000000000000001e131 < t

    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. Taylor expanded in y around inf 71.5%

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

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

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

Alternative 8: 27.1% accurate, 25.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.7 \cdot 10^{+201}:\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\

\mathbf{elif}\;y \leq -4.2 \cdot 10^{-111} \lor \neg \left(y \leq 1.1 \cdot 10^{-50}\right):\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.6999999999999999e201

    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. Taylor expanded in t around inf 76.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6999999999999999e201 < y < -4.1999999999999997e-111 or 1.0999999999999999e-50 < y

    1. Initial program 96.3%

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

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

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

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

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-a \cdot b\right)}\right) \]
      2. unsub-neg11.4%

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(a \cdot b\right)} \]
      4. distribute-lft-neg-in25.0%

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

      \[\leadsto \color{blue}{\left(-x\right) \cdot \left(a \cdot b\right)} \]
    11. Step-by-step derivation
      1. distribute-lft-neg-out25.0%

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

        \[\leadsto -\color{blue}{\left(a \cdot b\right) \cdot x} \]
      3. associate-*l*23.8%

        \[\leadsto -\color{blue}{a \cdot \left(b \cdot x\right)} \]
    12. Applied egg-rr23.8%

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

    if -4.1999999999999997e-111 < y < 1.0999999999999999e-50

    1. Initial program 94.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.7 \cdot 10^{+201}:\\ \;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-111} \lor \neg \left(y \leq 1.1 \cdot 10^{-50}\right):\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 30.0% accurate, 28.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{-107}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\

\mathbf{elif}\;y \leq 1.15 \cdot 10^{-50}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.4999999999999999e-107

    1. Initial program 98.7%

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

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

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

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

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-a \cdot b\right)}\right) \]
      2. unsub-neg13.5%

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(a \cdot b\right)} \]
      4. distribute-lft-neg-in26.1%

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

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

    if -9.4999999999999999e-107 < y < 1.1500000000000001e-50

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

    if 1.1500000000000001e-50 < y

    1. Initial program 94.9%

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

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

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

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

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-a \cdot b\right)}\right) \]
      2. unsub-neg9.5%

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(a \cdot b\right)} \]
      4. distribute-lft-neg-in21.7%

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

      \[\leadsto \color{blue}{\left(-x\right) \cdot \left(a \cdot b\right)} \]
    11. Step-by-step derivation
      1. distribute-lft-neg-out21.7%

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

        \[\leadsto -\color{blue}{\left(a \cdot b\right) \cdot x} \]
      3. associate-*l*25.7%

        \[\leadsto -\color{blue}{a \cdot \left(b \cdot x\right)} \]
    12. Applied egg-rr25.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.5 \cdot 10^{-107}:\\ \;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-50}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \end{array} \]

Alternative 10: 30.1% accurate, 28.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{-106}:\\ \;\;\;\;\left(x \cdot \left(a \cdot b\right)\right) \cdot -3\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-50}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\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
 (if (<= y -1.3e-106)
   (* (* x (* a b)) -3.0)
   (if (<= y 1.15e-50) (* x (- 1.0 (* a b))) (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -1.3e-106) {
		tmp = (x * (a * b)) * -3.0;
	} else if (y <= 1.15e-50) {
		tmp = x * (1.0 - (a * b));
	} 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) :: tmp
    if (y <= (-1.3d-106)) then
        tmp = (x * (a * b)) * (-3.0d0)
    else if (y <= 1.15d-50) then
        tmp = x * (1.0d0 - (a * b))
    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 tmp;
	if (y <= -1.3e-106) {
		tmp = (x * (a * b)) * -3.0;
	} else if (y <= 1.15e-50) {
		tmp = x * (1.0 - (a * b));
	} else {
		tmp = a * (x * -b);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -1.3e-106:
		tmp = (x * (a * b)) * -3.0
	elif y <= 1.15e-50:
		tmp = x * (1.0 - (a * b))
	else:
		tmp = a * (x * -b)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -1.3e-106)
		tmp = Float64(Float64(x * Float64(a * b)) * -3.0);
	elseif (y <= 1.15e-50)
		tmp = Float64(x * Float64(1.0 - Float64(a * b)));
	else
		tmp = Float64(a * Float64(x * Float64(-b)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= -1.3e-106)
		tmp = (x * (a * b)) * -3.0;
	elseif (y <= 1.15e-50)
		tmp = x * (1.0 - (a * b));
	else
		tmp = a * (x * -b);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.3e-106], N[(N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision] * -3.0), $MachinePrecision], If[LessEqual[y, 1.15e-50], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{-106}:\\
\;\;\;\;\left(x \cdot \left(a \cdot b\right)\right) \cdot -3\\

\mathbf{elif}\;y \leq 1.15 \cdot 10^{-50}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.3e-106

    1. Initial program 98.7%

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

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

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

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

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-a \cdot b\right)}\right) \]
      2. unsub-neg13.5%

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(a \cdot b\right)} \]
      4. distribute-lft-neg-in26.1%

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

      \[\leadsto \color{blue}{\left(-x\right) \cdot \left(a \cdot b\right)} \]
    11. Step-by-step derivation
      1. *-rgt-identity26.1%

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

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

        \[\leadsto \color{blue}{\left(-x \cdot \left(a \cdot b\right)\right)} \cdot 1 \]
      4. distribute-lft-neg-in26.1%

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

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

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

        \[\leadsto \left(x \cdot \left(a \cdot b\right)\right) \cdot \color{blue}{\left(1 - 2\right)} \]
      8. distribute-rgt-out--16.0%

        \[\leadsto \color{blue}{1 \cdot \left(x \cdot \left(a \cdot b\right)\right) - 2 \cdot \left(x \cdot \left(a \cdot b\right)\right)} \]
      9. *-un-lft-identity16.0%

        \[\leadsto 1 \cdot \left(x \cdot \left(a \cdot b\right)\right) - \color{blue}{1 \cdot \left(2 \cdot \left(x \cdot \left(a \cdot b\right)\right)\right)} \]
      10. *-un-lft-identity16.0%

        \[\leadsto \color{blue}{x \cdot \left(a \cdot b\right)} - 1 \cdot \left(2 \cdot \left(x \cdot \left(a \cdot b\right)\right)\right) \]
      11. cancel-sign-sub-inv16.0%

        \[\leadsto \color{blue}{x \cdot \left(a \cdot b\right) + \left(-1\right) \cdot \left(2 \cdot \left(x \cdot \left(a \cdot b\right)\right)\right)} \]
    12. Applied egg-rr15.1%

      \[\leadsto \color{blue}{a \cdot \left(b \cdot x\right) + \left(-1 \cdot \left(\left(a \cdot b\right) \cdot \left(x \cdot 2\right)\right) + -1 \cdot \left(\left(a \cdot b\right) \cdot \left(x \cdot 2\right)\right)\right)} \]
    13. Step-by-step derivation
      1. *-rgt-identity15.1%

        \[\leadsto \color{blue}{\left(a \cdot \left(b \cdot x\right)\right) \cdot 1} + \left(-1 \cdot \left(\left(a \cdot b\right) \cdot \left(x \cdot 2\right)\right) + -1 \cdot \left(\left(a \cdot b\right) \cdot \left(x \cdot 2\right)\right)\right) \]
      2. distribute-rgt-out15.1%

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

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

        \[\leadsto \left(a \cdot \left(b \cdot x\right)\right) \cdot 1 + \left(\color{blue}{\left(a \cdot \left(b \cdot x\right)\right)} \cdot 2\right) \cdot \left(-1 + -1\right) \]
      5. metadata-eval12.7%

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

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

        \[\leadsto \left(a \cdot \left(b \cdot x\right)\right) \cdot 1 + \left(a \cdot \left(b \cdot x\right)\right) \cdot \color{blue}{-4} \]
      8. distribute-lft-out17.8%

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

        \[\leadsto \color{blue}{\left(\left(a \cdot b\right) \cdot x\right)} \cdot \left(1 + -4\right) \]
      10. *-commutative26.1%

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

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

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

    if -1.3e-106 < y < 1.1500000000000001e-50

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

    if 1.1500000000000001e-50 < y

    1. Initial program 94.9%

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

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

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

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

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-a \cdot b\right)}\right) \]
      2. unsub-neg9.5%

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(a \cdot b\right)} \]
      4. distribute-lft-neg-in21.7%

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

      \[\leadsto \color{blue}{\left(-x\right) \cdot \left(a \cdot b\right)} \]
    11. Step-by-step derivation
      1. distribute-lft-neg-out21.7%

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

        \[\leadsto -\color{blue}{\left(a \cdot b\right) \cdot x} \]
      3. associate-*l*25.7%

        \[\leadsto -\color{blue}{a \cdot \left(b \cdot x\right)} \]
    12. Applied egg-rr25.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{-106}:\\ \;\;\;\;\left(x \cdot \left(a \cdot b\right)\right) \cdot -3\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-50}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \end{array} \]

Alternative 11: 26.0% accurate, 31.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.7 \cdot 10^{-109} \lor \neg \left(y \leq 1.05 \cdot 10^{-50}\right):\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.69999999999999981e-109 or 1.05e-50 < y

    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. Taylor expanded in b around inf 34.7%

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

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

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

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-a \cdot b\right)}\right) \]
      2. unsub-neg11.5%

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(a \cdot b\right)} \]
      4. distribute-lft-neg-in24.0%

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

      \[\leadsto \color{blue}{\left(-x\right) \cdot \left(a \cdot b\right)} \]
    11. Step-by-step derivation
      1. distribute-lft-neg-out24.0%

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

        \[\leadsto -\color{blue}{\left(a \cdot b\right) \cdot x} \]
      3. associate-*l*21.7%

        \[\leadsto -\color{blue}{a \cdot \left(b \cdot x\right)} \]
    12. Applied egg-rr21.7%

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

    if -3.69999999999999981e-109 < y < 1.05e-50

    1. Initial program 94.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.7 \cdot 10^{-109} \lor \neg \left(y \leq 1.05 \cdot 10^{-50}\right):\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 12: 26.3% accurate, 31.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-112}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\

\mathbf{elif}\;y \leq 1.3 \cdot 10^{-52}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.7000000000000001e-112

    1. Initial program 98.7%

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

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

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

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

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-a \cdot b\right)}\right) \]
      2. unsub-neg13.5%

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(a \cdot b\right)} \]
      4. distribute-lft-neg-in26.1%

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

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

    if -2.7000000000000001e-112 < y < 1.2999999999999999e-52

    1. Initial program 94.0%

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

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

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

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

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

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

    if 1.2999999999999999e-52 < y

    1. Initial program 94.9%

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

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

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

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

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-a \cdot b\right)}\right) \]
      2. unsub-neg9.5%

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

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

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

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

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

        \[\leadsto \color{blue}{-x \cdot \left(a \cdot b\right)} \]
      4. distribute-lft-neg-in21.7%

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

      \[\leadsto \color{blue}{\left(-x\right) \cdot \left(a \cdot b\right)} \]
    11. Step-by-step derivation
      1. distribute-lft-neg-out21.7%

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

        \[\leadsto -\color{blue}{\left(a \cdot b\right) \cdot x} \]
      3. associate-*l*25.7%

        \[\leadsto -\color{blue}{a \cdot \left(b \cdot x\right)} \]
    12. Applied egg-rr25.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{-112}:\\ \;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{-52}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \end{array} \]

Alternative 13: 19.2% 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 95.7%

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

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

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

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(-b\right)}} \]
  4. Simplified55.0%

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

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

    \[\leadsto x \]

Reproduce

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