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

Percentage Accurate: 96.5% → 99.5%
Time: 19.8s
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.5% accurate, 1.0× speedup?

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

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

Alternative 1: 99.5% accurate, 0.8× speedup?

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

\\
x \cdot e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}
\end{array}
Derivation
  1. Initial program 95.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. fma-def95.9%

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

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

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

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

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

Alternative 2: 96.5% 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 95.5%

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

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

Alternative 3: 86.8% accurate, 1.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.80000000000000033e-44 or 1.3e18 < y

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

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

    if -6.80000000000000033e-44 < y < 1.3e18

    1. Initial program 93.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 0 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 71.5% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{a \cdot \left(-b\right)}\\ t_2 := x \cdot {z}^{y}\\ \mathbf{if}\;y \leq -1.5 \cdot 10^{+27}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 305:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.75 \cdot 10^{+104}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{+134}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{+154} \lor \neg \left(y \leq 1.7 \cdot 10^{+179}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\left(-y\right) \cdot \left(x \cdot t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (exp (* a (- b))))) (t_2 (* x (pow z y))))
   (if (<= y -1.5e+27)
     t_2
     (if (<= y 305.0)
       t_1
       (if (<= y 2.75e+104)
         t_2
         (if (<= y 8.5e+134)
           t_1
           (if (or (<= y 5.4e+154) (not (<= y 1.7e+179)))
             t_2
             (* (- y) (* x t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * exp((a * -b));
	double t_2 = x * pow(z, y);
	double tmp;
	if (y <= -1.5e+27) {
		tmp = t_2;
	} else if (y <= 305.0) {
		tmp = t_1;
	} else if (y <= 2.75e+104) {
		tmp = t_2;
	} else if (y <= 8.5e+134) {
		tmp = t_1;
	} else if ((y <= 5.4e+154) || !(y <= 1.7e+179)) {
		tmp = t_2;
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * exp((a * -b))
    t_2 = x * (z ** y)
    if (y <= (-1.5d+27)) then
        tmp = t_2
    else if (y <= 305.0d0) then
        tmp = t_1
    else if (y <= 2.75d+104) then
        tmp = t_2
    else if (y <= 8.5d+134) then
        tmp = t_1
    else if ((y <= 5.4d+154) .or. (.not. (y <= 1.7d+179))) then
        tmp = t_2
    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 t_1 = x * Math.exp((a * -b));
	double t_2 = x * Math.pow(z, y);
	double tmp;
	if (y <= -1.5e+27) {
		tmp = t_2;
	} else if (y <= 305.0) {
		tmp = t_1;
	} else if (y <= 2.75e+104) {
		tmp = t_2;
	} else if (y <= 8.5e+134) {
		tmp = t_1;
	} else if ((y <= 5.4e+154) || !(y <= 1.7e+179)) {
		tmp = t_2;
	} else {
		tmp = -y * (x * t);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x * math.exp((a * -b))
	t_2 = x * math.pow(z, y)
	tmp = 0
	if y <= -1.5e+27:
		tmp = t_2
	elif y <= 305.0:
		tmp = t_1
	elif y <= 2.75e+104:
		tmp = t_2
	elif y <= 8.5e+134:
		tmp = t_1
	elif (y <= 5.4e+154) or not (y <= 1.7e+179):
		tmp = t_2
	else:
		tmp = -y * (x * t)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x * exp(Float64(a * Float64(-b))))
	t_2 = Float64(x * (z ^ y))
	tmp = 0.0
	if (y <= -1.5e+27)
		tmp = t_2;
	elseif (y <= 305.0)
		tmp = t_1;
	elseif (y <= 2.75e+104)
		tmp = t_2;
	elseif (y <= 8.5e+134)
		tmp = t_1;
	elseif ((y <= 5.4e+154) || !(y <= 1.7e+179))
		tmp = t_2;
	else
		tmp = Float64(Float64(-y) * Float64(x * t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x * exp((a * -b));
	t_2 = x * (z ^ y);
	tmp = 0.0;
	if (y <= -1.5e+27)
		tmp = t_2;
	elseif (y <= 305.0)
		tmp = t_1;
	elseif (y <= 2.75e+104)
		tmp = t_2;
	elseif (y <= 8.5e+134)
		tmp = t_1;
	elseif ((y <= 5.4e+154) || ~((y <= 1.7e+179)))
		tmp = t_2;
	else
		tmp = -y * (x * t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.5e+27], t$95$2, If[LessEqual[y, 305.0], t$95$1, If[LessEqual[y, 2.75e+104], t$95$2, If[LessEqual[y, 8.5e+134], t$95$1, If[Or[LessEqual[y, 5.4e+154], N[Not[LessEqual[y, 1.7e+179]], $MachinePrecision]], t$95$2, N[((-y) * N[(x * t), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 305:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 2.75 \cdot 10^{+104}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 8.5 \cdot 10^{+134}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 5.4 \cdot 10^{+154} \lor \neg \left(y \leq 1.7 \cdot 10^{+179}\right):\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.49999999999999988e27 or 305 < y < 2.75000000000000008e104 or 8.50000000000000024e134 < y < 5.40000000000000011e154 or 1.69999999999999998e179 < y

    1. Initial program 96.3%

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

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

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

    if -1.49999999999999988e27 < y < 305 or 2.75000000000000008e104 < y < 8.50000000000000024e134

    1. Initial program 94.6%

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

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

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

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

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

    if 5.40000000000000011e154 < y < 1.69999999999999998e179

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.5 \cdot 10^{+27}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq 305:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{elif}\;y \leq 2.75 \cdot 10^{+104}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{+134}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{+154} \lor \neg \left(y \leq 1.7 \cdot 10^{+179}\right):\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{else}:\\ \;\;\;\;\left(-y\right) \cdot \left(x \cdot t\right)\\ \end{array} \]

Alternative 5: 74.3% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+27}:\\
\;\;\;\;x \cdot {z}^{y}\\

\mathbf{elif}\;y \leq 3 \cdot 10^{+65}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-b\right) - z\right)}\\

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


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

    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 y around inf 96.5%

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

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

    if -1.49999999999999988e27 < y < 3.0000000000000002e65

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.0000000000000002e65 < y

    1. Initial program 98.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.5 \cdot 10^{+27}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq 3 \cdot 10^{+65}:\\ \;\;\;\;x \cdot e^{a \cdot \left(\left(-b\right) - z\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\ \end{array} \]

Alternative 6: 71.6% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{+27}:\\
\;\;\;\;x \cdot {z}^{y}\\

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

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


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

    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 y around inf 96.5%

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

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

    if -2.09999999999999995e27 < y < 2750

    1. Initial program 94.3%

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

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

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

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

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

    if 2750 < y

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

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

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

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

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

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

Alternative 7: 55.5% accurate, 3.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -125000000:\\
\;\;\;\;x - x \cdot \left(y \cdot t\right)\\

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


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

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - t \cdot \left(x \cdot y\right)} \]
    8. Step-by-step derivation
      1. expm1-log1p-u21.0%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(x \cdot y\right)\right)\right)} \]
      2. expm1-udef21.0%

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

        \[\leadsto x - \left(e^{\mathsf{log1p}\left(\color{blue}{\left(x \cdot y\right) \cdot t}\right)} - 1\right) \]
      4. associate-*l*22.6%

        \[\leadsto x - \left(e^{\mathsf{log1p}\left(\color{blue}{x \cdot \left(y \cdot t\right)}\right)} - 1\right) \]
    9. Applied egg-rr22.6%

      \[\leadsto x - \color{blue}{\left(e^{\mathsf{log1p}\left(x \cdot \left(y \cdot t\right)\right)} - 1\right)} \]
    10. Step-by-step derivation
      1. expm1-def22.6%

        \[\leadsto x - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \left(y \cdot t\right)\right)\right)} \]
      2. expm1-log1p42.7%

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

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

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

    if -1.25e8 < t

    1. Initial program 95.0%

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

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

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

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

Alternative 8: 33.6% accurate, 24.0× speedup?

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

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

\mathbf{elif}\;y \leq 5.6 \cdot 10^{+89}:\\
\;\;\;\;x \cdot \left(1 - a \cdot \left(z + b\right)\right)\\

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


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

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.2000000000000003e172 < y < 5.5999999999999996e89

    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 y around 0 69.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.5999999999999996e89 < 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 t around inf 73.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.2 \cdot 10^{+172}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{+89}:\\ \;\;\;\;x \cdot \left(1 - a \cdot \left(z + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-y\right) \cdot \left(x \cdot t\right)\\ \end{array} \]

Alternative 9: 27.5% accurate, 25.8× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{if}\;y \leq -9500:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 2.3 \cdot 10^{-81}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9500 or 1e108 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9500 < y < 2.29999999999999991e-81

    1. Initial program 93.1%

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

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

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

    if 2.29999999999999991e-81 < y < 1e108

    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 b around inf 54.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9500:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{-81}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 10^{+108}:\\ \;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \end{array} \]

Alternative 10: 28.1% accurate, 25.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9500:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\

\mathbf{elif}\;y \leq 4 \cdot 10^{-87}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 6.2 \cdot 10^{+107}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -9500

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9500 < y < 4.00000000000000007e-87

    1. Initial program 93.1%

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

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

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

    if 4.00000000000000007e-87 < y < 6.20000000000000052e107

    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 b around inf 54.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.20000000000000052e107 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9500:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-87}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{+107}:\\ \;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\ \end{array} \]

Alternative 11: 28.9% accurate, 25.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9600:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\

\mathbf{elif}\;y \leq 1.45 \cdot 10^{-81}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.1 \cdot 10^{+108}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -9600

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9600 < y < 1.44999999999999994e-81

    1. Initial program 93.1%

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

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

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

    if 1.44999999999999994e-81 < y < 1.1000000000000001e108

    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 b around inf 54.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.1000000000000001e108 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9600:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-81}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+108}:\\ \;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-y\right) \cdot \left(x \cdot t\right)\\ \end{array} \]

Alternative 12: 33.3% accurate, 28.3× speedup?

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

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

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

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


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

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.3999999999999996e171 < y < 2.2999999999999999e86

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

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

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

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

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

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

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

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

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

    if 2.2999999999999999e86 < 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 t around inf 73.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 26.1% accurate, 31.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9600 \lor \neg \left(y \leq 4.1 \cdot 10^{-84}\right):\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9600 or 4.10000000000000005e-84 < y

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9600 < y < 4.10000000000000005e-84

    1. Initial program 93.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9600 \lor \neg \left(y \leq 4.1 \cdot 10^{-84}\right):\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 14: 22.0% accurate, 34.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{-123}:\\
\;\;\;\;\left(-a\right) \cdot \left(x \cdot z\right)\\

\mathbf{elif}\;a \leq 8.5 \cdot 10^{+103}:\\
\;\;\;\;x\\

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


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

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.10000000000000003e-123 < a < 8.4999999999999992e103

    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)}} \]
    3. Taylor expanded in y around 0 30.0%

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

    if 8.4999999999999992e103 < a

    1. Initial program 93.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 24.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-x \cdot t\right) \cdot y} \]
    11. Step-by-step derivation
      1. expm1-log1p-u19.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(-x \cdot t\right) \cdot y\right)\right)} \]
      2. expm1-udef41.2%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(-x \cdot t\right) \cdot y\right)} - 1} \]
      3. add-sqr-sqrt21.9%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{-x \cdot t} \cdot \sqrt{-x \cdot t}\right)} \cdot y\right)} - 1 \]
      4. sqrt-unprod41.3%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\left(-x \cdot t\right) \cdot \left(-x \cdot t\right)}} \cdot y\right)} - 1 \]
      5. sqr-neg41.3%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\left(x \cdot t\right) \cdot \left(x \cdot t\right)}} \cdot y\right)} - 1 \]
      6. sqrt-unprod28.9%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{x \cdot t} \cdot \sqrt{x \cdot t}\right)} \cdot y\right)} - 1 \]
      7. add-sqr-sqrt38.8%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(x \cdot t\right)} \cdot y\right)} - 1 \]
      8. associate-*l*38.8%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{x \cdot \left(t \cdot y\right)}\right)} - 1 \]
    12. Applied egg-rr38.8%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(x \cdot \left(t \cdot y\right)\right)} - 1} \]
    13. Step-by-step derivation
      1. expm1-def19.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \left(t \cdot y\right)\right)\right)} \]
      2. expm1-log1p20.0%

        \[\leadsto \color{blue}{x \cdot \left(t \cdot y\right)} \]
    14. Simplified20.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{-123}:\\ \;\;\;\;\left(-a\right) \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{+103}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot t\right)\\ \end{array} \]

Alternative 15: 23.1% accurate, 44.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.55 \cdot 10^{+16}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.55e16

    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 y around inf 65.3%

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

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

    if 1.55e16 < y

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(b \cdot x\right)} \cdot \left(-a\right) \]
      3. add-sqr-sqrt9.0%

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

        \[\leadsto \left(b \cdot x\right) \cdot \color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}} \]
      5. sqr-neg32.0%

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

        \[\leadsto \left(b \cdot x\right) \cdot \color{blue}{\left(\sqrt{a} \cdot \sqrt{a}\right)} \]
      7. add-sqr-sqrt21.3%

        \[\leadsto \left(b \cdot x\right) \cdot \color{blue}{a} \]
      8. expm1-log1p-u21.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(b \cdot x\right) \cdot a\right)\right)} \]
      9. *-commutative21.0%

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(a \cdot \left(b \cdot x\right)\right)} - 1} \]
      11. *-commutative34.7%

        \[\leadsto e^{\mathsf{log1p}\left(a \cdot \color{blue}{\left(x \cdot b\right)}\right)} - 1 \]
    12. Applied egg-rr34.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(a \cdot \left(x \cdot b\right)\right)} - 1} \]
    13. Step-by-step derivation
      1. expm1-def21.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(a \cdot \left(x \cdot b\right)\right)\right)} \]
      2. expm1-log1p21.3%

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

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

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

Alternative 16: 19.4% accurate, 315.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
def code(x, y, z, t, a, b):
	return x
function code(x, y, z, t, a, b)
	return x
end
function tmp = code(x, y, z, t, a, b)
	tmp = x;
end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 95.5%

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

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification17.2%

    \[\leadsto x \]

Reproduce

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