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

Percentage Accurate: 96.6% → 99.8%
Time: 26.1s
Alternatives: 16
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 16 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.8% accurate, 0.8× speedup?

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

\\
x \cdot e^{\mathsf{fma}\left(a, \mathsf{log1p}\left(-z\right) - b, y \cdot \left(\log z - t\right)\right)}
\end{array}
Derivation
  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. Step-by-step derivation
    1. +-commutative96.5%

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

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

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

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

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

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

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 96.5%

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

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

Alternative 3: 87.3% accurate, 1.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.09999999999999983e-18 or 6e-10 < y

    1. Initial program 99.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 y around inf 89.5%

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

    if -5.09999999999999983e-18 < y < 6e-10

    1. Initial program 93.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 y around 0 84.5%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.1 \cdot 10^{-18} \lor \neg \left(y \leq 6 \cdot 10^{-10}\right):\\ \;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}\\ \end{array} \]

Alternative 4: 71.6% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := e^{b \cdot \left(-a\right)}\\ t_2 := x \cdot {z}^{y}\\ \mathbf{if}\;y \leq -0.0021:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-112}:\\ \;\;\;\;x \cdot t_1\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-162}:\\ \;\;\;\;x \cdot {\left(e^{-t}\right)}^{y}\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{+27}:\\ \;\;\;\;x \cdot \left(\left(1 + t_1\right) + -1\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (exp (* b (- a)))) (t_2 (* x (pow z y))))
   (if (<= y -0.0021)
     t_2
     (if (<= y -9e-112)
       (* x t_1)
       (if (<= y -1.2e-162)
         (* x (pow (exp (- t)) y))
         (if (<= y 4.6e+27) (* x (+ (+ 1.0 t_1) -1.0)) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = exp((b * -a));
	double t_2 = x * pow(z, y);
	double tmp;
	if (y <= -0.0021) {
		tmp = t_2;
	} else if (y <= -9e-112) {
		tmp = x * t_1;
	} else if (y <= -1.2e-162) {
		tmp = x * pow(exp(-t), y);
	} else if (y <= 4.6e+27) {
		tmp = x * ((1.0 + t_1) + -1.0);
	} 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 = exp((b * -a))
    t_2 = x * (z ** y)
    if (y <= (-0.0021d0)) then
        tmp = t_2
    else if (y <= (-9d-112)) then
        tmp = x * t_1
    else if (y <= (-1.2d-162)) then
        tmp = x * (exp(-t) ** y)
    else if (y <= 4.6d+27) then
        tmp = x * ((1.0d0 + t_1) + (-1.0d0))
    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 = Math.exp((b * -a));
	double t_2 = x * Math.pow(z, y);
	double tmp;
	if (y <= -0.0021) {
		tmp = t_2;
	} else if (y <= -9e-112) {
		tmp = x * t_1;
	} else if (y <= -1.2e-162) {
		tmp = x * Math.pow(Math.exp(-t), y);
	} else if (y <= 4.6e+27) {
		tmp = x * ((1.0 + t_1) + -1.0);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = math.exp((b * -a))
	t_2 = x * math.pow(z, y)
	tmp = 0
	if y <= -0.0021:
		tmp = t_2
	elif y <= -9e-112:
		tmp = x * t_1
	elif y <= -1.2e-162:
		tmp = x * math.pow(math.exp(-t), y)
	elif y <= 4.6e+27:
		tmp = x * ((1.0 + t_1) + -1.0)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = exp(Float64(b * Float64(-a)))
	t_2 = Float64(x * (z ^ y))
	tmp = 0.0
	if (y <= -0.0021)
		tmp = t_2;
	elseif (y <= -9e-112)
		tmp = Float64(x * t_1);
	elseif (y <= -1.2e-162)
		tmp = Float64(x * (exp(Float64(-t)) ^ y));
	elseif (y <= 4.6e+27)
		tmp = Float64(x * Float64(Float64(1.0 + t_1) + -1.0));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = exp((b * -a));
	t_2 = x * (z ^ y);
	tmp = 0.0;
	if (y <= -0.0021)
		tmp = t_2;
	elseif (y <= -9e-112)
		tmp = x * t_1;
	elseif (y <= -1.2e-162)
		tmp = x * (exp(-t) ^ y);
	elseif (y <= 4.6e+27)
		tmp = x * ((1.0 + t_1) + -1.0);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Exp[N[(b * (-a)), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -0.0021], t$95$2, If[LessEqual[y, -9e-112], N[(x * t$95$1), $MachinePrecision], If[LessEqual[y, -1.2e-162], N[(x * N[Power[N[Exp[(-t)], $MachinePrecision], y], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e+27], N[(x * N[(N[(1.0 + t$95$1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -9 \cdot 10^{-112}:\\
\;\;\;\;x \cdot t_1\\

\mathbf{elif}\;y \leq -1.2 \cdot 10^{-162}:\\
\;\;\;\;x \cdot {\left(e^{-t}\right)}^{y}\\

\mathbf{elif}\;y \leq 4.6 \cdot 10^{+27}:\\
\;\;\;\;x \cdot \left(\left(1 + t_1\right) + -1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -0.00209999999999999987 or 4.6000000000000001e27 < y

    1. Initial program 99.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 y around inf 91.2%

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

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

    if -0.00209999999999999987 < y < -9.00000000000000024e-112

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

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

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

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

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

    if -9.00000000000000024e-112 < y < -1.2000000000000001e-162

    1. Initial program 75.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 t around inf 51.5%

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

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

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

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

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

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

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

    if -1.2000000000000001e-162 < y < 4.6000000000000001e27

    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. Step-by-step derivation
      1. +-commutative96.1%

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

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

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right) + y \cdot \left(\log z - t\right)} \]
      4. fma-udef99.9%

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

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

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

        \[\leadsto x \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(e^{a \cdot \left(\color{blue}{\log \left(1 + \left(-z\right)\right)} - b\right) + y \cdot \left(\log z - t\right)}\right)\right) \]
      8. sub-neg96.1%

        \[\leadsto x \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(e^{a \cdot \left(\log \color{blue}{\left(1 - z\right)} - b\right) + y \cdot \left(\log z - t\right)}\right)\right) \]
      9. +-commutative96.1%

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

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

      \[\leadsto x \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(z\right) - b\right)\right)}\right)\right)} \]
    4. Step-by-step derivation
      1. expm1-udef95.1%

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

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

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

        \[\leadsto x \cdot \left(\left(1 + e^{\mathsf{fma}\left(y, \color{blue}{\log z + \left(-t\right)}, a \cdot \left(\mathsf{log1p}\left(z\right) - b\right)\right)}\right) - 1\right) \]
      5. add-sqr-sqrt44.7%

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

        \[\leadsto x \cdot \left(\left(1 + e^{\mathsf{fma}\left(y, \log z + \color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}, a \cdot \left(\mathsf{log1p}\left(z\right) - b\right)\right)}\right) - 1\right) \]
      7. sqr-neg77.9%

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

        \[\leadsto x \cdot \left(\left(1 + e^{\mathsf{fma}\left(y, \log z + \color{blue}{\sqrt{t} \cdot \sqrt{t}}, a \cdot \left(\mathsf{log1p}\left(z\right) - b\right)\right)}\right) - 1\right) \]
      9. add-sqr-sqrt84.7%

        \[\leadsto x \cdot \left(\left(1 + e^{\mathsf{fma}\left(y, \log z + \color{blue}{t}, a \cdot \left(\mathsf{log1p}\left(z\right) - b\right)\right)}\right) - 1\right) \]
    5. Applied egg-rr84.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -0.0021:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-112}:\\ \;\;\;\;x \cdot e^{b \cdot \left(-a\right)}\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-162}:\\ \;\;\;\;x \cdot {\left(e^{-t}\right)}^{y}\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{+27}:\\ \;\;\;\;x \cdot \left(\left(1 + e^{b \cdot \left(-a\right)}\right) + -1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \]

Alternative 5: 80.7% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{-8} \lor \neg \left(a \leq 3.4 \cdot 10^{+103}\right):\\
\;\;\;\;x \cdot {\left(e^{-a}\right)}^{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.49999999999999993e-8 or 3.3999999999999998e103 < 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. Taylor expanded in b around inf 70.5%

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

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

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{\left(-1 \cdot a\right) \cdot b}} \]
      2. exp-prod79.8%

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

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

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

    if -4.49999999999999993e-8 < a < 3.3999999999999998e103

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.5 \cdot 10^{-8} \lor \neg \left(a \leq 3.4 \cdot 10^{+103}\right):\\ \;\;\;\;x \cdot {\left(e^{-a}\right)}^{b}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\ \end{array} \]

Alternative 6: 72.8% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.011 \lor \neg \left(y \leq 10^{+31}\right):\\
\;\;\;\;x \cdot {z}^{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -0.010999999999999999 or 9.9999999999999996e30 < y

    1. Initial program 99.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 y around inf 91.2%

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

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

    if -0.010999999999999999 < y < 9.9999999999999996e30

    1. Initial program 94.1%

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

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

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

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(-z\right)} - b\right) + y \cdot \left(\log z - t\right)} \]
      4. fma-udef99.9%

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

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

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

        \[\leadsto x \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(e^{a \cdot \left(\color{blue}{\log \left(1 + \left(-z\right)\right)} - b\right) + y \cdot \left(\log z - t\right)}\right)\right) \]
      8. sub-neg94.1%

        \[\leadsto x \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(e^{a \cdot \left(\log \color{blue}{\left(1 - z\right)} - b\right) + y \cdot \left(\log z - t\right)}\right)\right) \]
      9. +-commutative94.1%

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

        \[\leadsto x \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(e^{\color{blue}{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\log \left(1 - z\right) - b\right)\right)}}\right)\right) \]
    3. Applied egg-rr92.5%

      \[\leadsto x \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(z\right) - b\right)\right)}\right)\right)} \]
    4. Step-by-step derivation
      1. expm1-udef92.5%

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(1 + e^{\mathsf{fma}\left(y, \log z + \color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}, a \cdot \left(\mathsf{log1p}\left(z\right) - b\right)\right)}\right) - 1\right) \]
      7. sqr-neg78.4%

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

        \[\leadsto x \cdot \left(\left(1 + e^{\mathsf{fma}\left(y, \log z + \color{blue}{\sqrt{t} \cdot \sqrt{t}}, a \cdot \left(\mathsf{log1p}\left(z\right) - b\right)\right)}\right) - 1\right) \]
      9. add-sqr-sqrt80.0%

        \[\leadsto x \cdot \left(\left(1 + e^{\mathsf{fma}\left(y, \log z + \color{blue}{t}, a \cdot \left(\mathsf{log1p}\left(z\right) - b\right)\right)}\right) - 1\right) \]
    5. Applied egg-rr80.0%

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

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

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

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

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

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

Alternative 7: 71.2% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.1 \cdot 10^{+37} \lor \neg \left(t \leq 6.8 \cdot 10^{-89}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.0999999999999998e37 or 6.8000000000000001e-89 < t

    1. Initial program 95.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 t around inf 73.8%

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

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

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

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

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

    if -4.0999999999999998e37 < t < 6.8000000000000001e-89

    1. Initial program 97.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 y around inf 70.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.1 \cdot 10^{+37} \lor \neg \left(t \leq 6.8 \cdot 10^{-89}\right):\\ \;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \]

Alternative 8: 72.8% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.011 \lor \neg \left(y \leq 8.8 \cdot 10^{+27}\right):\\
\;\;\;\;x \cdot {z}^{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -0.010999999999999999 or 8.7999999999999995e27 < y

    1. Initial program 99.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 y around inf 91.2%

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

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

    if -0.010999999999999999 < y < 8.7999999999999995e27

    1. Initial program 94.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 b around inf 80.6%

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

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

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

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

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

Alternative 9: 55.2% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{-33} \lor \neg \left(y \leq 4.8 \cdot 10^{-67}\right):\\
\;\;\;\;x \cdot {z}^{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.54999999999999998e-33 or 4.8e-67 < y

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

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

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

    if -1.54999999999999998e-33 < y < 4.8e-67

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{-33} \lor \neg \left(y \leq 4.8 \cdot 10^{-67}\right):\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \left(a \cdot b\right)\\ \end{array} \]

Alternative 10: 39.6% accurate, 20.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{+73} \lor \neg \left(y \leq 5800\right):\\
\;\;\;\;\left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \left(y \cdot y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.6e73 or 5800 < y

    1. Initial program 99.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 t around inf 60.4%

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\left(1 + \left(-1 \cdot \left(t \cdot y\right) + 0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. +-commutative28.6%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right) + -1 \cdot \left(t \cdot y\right)\right)}\right) \]
      2. mul-1-neg28.6%

        \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right) + \color{blue}{\left(-t \cdot y\right)}\right)\right) \]
      3. unsub-neg28.6%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right) - t \cdot y\right)}\right) \]
      4. *-commutative28.6%

        \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \color{blue}{\left({y}^{2} \cdot {t}^{2}\right)} - t \cdot y\right)\right) \]
      5. unpow228.6%

        \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot {t}^{2}\right) - t \cdot y\right)\right) \]
      6. unpow228.6%

        \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \left(\left(y \cdot y\right) \cdot \color{blue}{\left(t \cdot t\right)}\right) - t \cdot y\right)\right) \]
      7. unswap-sqr25.6%

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

        \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \left(\left(y \cdot t\right) \cdot \left(y \cdot t\right)\right) - \color{blue}{y \cdot t}\right)\right) \]
    7. Simplified25.6%

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

      \[\leadsto \color{blue}{0.5 \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*r*33.1%

        \[\leadsto \color{blue}{\left(0.5 \cdot {t}^{2}\right) \cdot \left(x \cdot {y}^{2}\right)} \]
      2. unpow233.1%

        \[\leadsto \left(0.5 \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot \left(x \cdot {y}^{2}\right) \]
      3. unpow233.1%

        \[\leadsto \left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    10. Simplified33.1%

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

    if -4.6e73 < y < 5800

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.6 \cdot 10^{+73} \lor \neg \left(y \leq 5800\right):\\ \;\;\;\;\left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \left(y \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \left(a \cdot b\right)\\ \end{array} \]

Alternative 11: 39.5% accurate, 20.8× speedup?

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

\\
\begin{array}{l}
t_1 := 0.5 \cdot \left(t \cdot t\right)\\
\mathbf{if}\;y \leq -1.9 \cdot 10^{+36}:\\
\;\;\;\;x \cdot \left(1 + t_1 \cdot \left(y \cdot y\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\


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

    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 56.9%

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

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

      \[\leadsto x \cdot \color{blue}{\left(1 + \left(-1 \cdot \left(t \cdot y\right) + 0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. +-commutative41.2%

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right) - t \cdot y\right)}\right) \]
      4. *-commutative41.2%

        \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \color{blue}{\left({y}^{2} \cdot {t}^{2}\right)} - t \cdot y\right)\right) \]
      5. unpow241.2%

        \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot {t}^{2}\right) - t \cdot y\right)\right) \]
      6. unpow241.2%

        \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \left(\left(y \cdot y\right) \cdot \color{blue}{\left(t \cdot t\right)}\right) - t \cdot y\right)\right) \]
      7. unswap-sqr36.3%

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

        \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \left(\left(y \cdot t\right) \cdot \left(y \cdot t\right)\right) - \color{blue}{y \cdot t}\right)\right) \]
    7. Simplified36.3%

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

      \[\leadsto x \cdot \left(1 + \color{blue}{0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right)}\right) \]
    9. Step-by-step derivation
      1. associate-*r*41.4%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.5 \cdot {t}^{2}\right) \cdot {y}^{2}}\right) \]
      2. unpow241.4%

        \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {y}^{2}\right) \]
      3. unpow241.4%

        \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    10. Simplified41.4%

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

    if -1.90000000000000012e36 < y < 5800

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

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

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

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

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

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

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

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

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

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

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

    if 5800 < 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 t around inf 60.0%

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\left(1 + \left(-1 \cdot \left(t \cdot y\right) + 0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. +-commutative16.3%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right) + -1 \cdot \left(t \cdot y\right)\right)}\right) \]
      2. mul-1-neg16.3%

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right) - t \cdot y\right)}\right) \]
      4. *-commutative16.3%

        \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \color{blue}{\left({y}^{2} \cdot {t}^{2}\right)} - t \cdot y\right)\right) \]
      5. unpow216.3%

        \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot {t}^{2}\right) - t \cdot y\right)\right) \]
      6. unpow216.3%

        \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \left(\left(y \cdot y\right) \cdot \color{blue}{\left(t \cdot t\right)}\right) - t \cdot y\right)\right) \]
      7. unswap-sqr15.1%

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

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

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

      \[\leadsto \color{blue}{0.5 \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*r*25.1%

        \[\leadsto \color{blue}{\left(0.5 \cdot {t}^{2}\right) \cdot \left(x \cdot {y}^{2}\right)} \]
      2. unpow225.1%

        \[\leadsto \left(0.5 \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot \left(x \cdot {y}^{2}\right) \]
      3. unpow225.1%

        \[\leadsto \left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
    10. Simplified25.1%

      \[\leadsto \color{blue}{\left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \left(y \cdot y\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification41.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.9 \cdot 10^{+36}:\\ \;\;\;\;x \cdot \left(1 + \left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(y \cdot y\right)\right)\\ \mathbf{elif}\;y \leq 5800:\\ \;\;\;\;x - x \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \left(y \cdot y\right)\right)\\ \end{array} \]

Alternative 12: 29.7% accurate, 28.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.2 \cdot 10^{-12}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.2000000000000002e-12

    1. Initial program 94.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 t around inf 36.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.2000000000000002e-12 < a < 3.7e147

    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 t around inf 69.3%

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

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

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

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

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

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

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

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

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

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

    if 3.7e147 < a

    1. Initial program 93.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 t around inf 28.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.2 \cdot 10^{-12}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{+147}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\ \end{array} \]

Alternative 13: 23.5% accurate, 31.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{-88}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\

\mathbf{elif}\;a \leq 1.46 \cdot 10^{+150}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.90000000000000006e-88

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.90000000000000006e-88 < a < 1.4599999999999999e150

    1. Initial program 97.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 t around inf 69.8%

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\left(1 + \left(-1 \cdot \left(t \cdot y\right) + 0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. +-commutative37.3%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right) + -1 \cdot \left(t \cdot y\right)\right)}\right) \]
      2. mul-1-neg37.3%

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right) - t \cdot y\right)}\right) \]
      4. *-commutative37.3%

        \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \color{blue}{\left({y}^{2} \cdot {t}^{2}\right)} - t \cdot y\right)\right) \]
      5. unpow237.3%

        \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot {t}^{2}\right) - t \cdot y\right)\right) \]
      6. unpow237.3%

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

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

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

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

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

    if 1.4599999999999999e150 < a

    1. Initial program 93.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 t around inf 28.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.9 \cdot 10^{-88}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \mathbf{elif}\;a \leq 1.46 \cdot 10^{+150}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\ \end{array} \]

Alternative 14: 30.9% accurate, 34.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 5.1e10

    1. Initial program 96.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 b around inf 59.4%

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

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

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

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

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

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

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

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

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

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

    if 5.1e10 < t

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 21.6% accurate, 39.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{-88}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.39999999999999975e-88

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.39999999999999975e-88 < a

    1. Initial program 97.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 t around inf 62.7%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right) - t \cdot y\right)}\right) \]
      4. *-commutative34.6%

        \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \color{blue}{\left({y}^{2} \cdot {t}^{2}\right)} - t \cdot y\right)\right) \]
      5. unpow234.6%

        \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot {t}^{2}\right) - t \cdot y\right)\right) \]
      6. unpow234.6%

        \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \left(\left(y \cdot y\right) \cdot \color{blue}{\left(t \cdot t\right)}\right) - t \cdot y\right)\right) \]
      7. unswap-sqr35.7%

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

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

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

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

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

Alternative 16: 19.7% 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 96.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 t around inf 56.1%

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

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

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

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

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

    \[\leadsto x \cdot \color{blue}{\left(1 + \left(-1 \cdot \left(t \cdot y\right) + 0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right)\right)\right)} \]
  6. Step-by-step derivation
    1. +-commutative31.2%

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

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

      \[\leadsto x \cdot \left(1 + \color{blue}{\left(0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right) - t \cdot y\right)}\right) \]
    4. *-commutative31.2%

      \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \color{blue}{\left({y}^{2} \cdot {t}^{2}\right)} - t \cdot y\right)\right) \]
    5. unpow231.2%

      \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot {t}^{2}\right) - t \cdot y\right)\right) \]
    6. unpow231.2%

      \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \left(\left(y \cdot y\right) \cdot \color{blue}{\left(t \cdot t\right)}\right) - t \cdot y\right)\right) \]
    7. unswap-sqr32.1%

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

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

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

    \[\leadsto \color{blue}{x} \]
  9. Final simplification20.9%

    \[\leadsto x \]

Reproduce

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