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

Percentage Accurate: 96.2% → 99.6%
Time: 19.1s
Alternatives: 14
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 14 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.2% accurate, 1.0× speedup?

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

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

Alternative 1: 99.6% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

Alternative 2: 96.2% accurate, 1.0× speedup?

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

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

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

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

Alternative 3: 86.2% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.6 \cdot 10^{-51} \lor \neg \left(a \leq 6.2 \cdot 10^{-254}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right) - y \cdot t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.5999999999999995e-51 or 6.19999999999999976e-254 < a

    1. Initial program 94.9%

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

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

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

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

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

    if -8.5999999999999995e-51 < a < 6.19999999999999976e-254

    1. Initial program 99.8%

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

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

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

Alternative 4: 88.7% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+159} \lor \neg \left(y \leq 7.8 \cdot 10^{+126}\right):\\
\;\;\;\;x \cdot {\left(\frac{z}{e^{t}}\right)}^{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.0000000000000002e159 or 7.79999999999999986e126 < 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. Add Preprocessing
    3. Taylor expanded in y around inf 88.2%

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

        \[\leadsto x \cdot \color{blue}{{\left(e^{y}\right)}^{\left(\log z - t\right)}} \]
      2. expm1-log1p-u88.2%

        \[\leadsto x \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\left(e^{y}\right)}^{\left(\log z - t\right)}\right)\right)} \]
      3. expm1-udef88.2%

        \[\leadsto x \cdot \color{blue}{\left(e^{\mathsf{log1p}\left({\left(e^{y}\right)}^{\left(\log z - t\right)}\right)} - 1\right)} \]
      4. pow-exp88.2%

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

        \[\leadsto x \cdot \left(e^{\mathsf{log1p}\left(e^{\color{blue}{\left(\log z - t\right) \cdot y}}\right)} - 1\right) \]
      6. exp-prod88.2%

        \[\leadsto x \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{{\left(e^{\log z - t}\right)}^{y}}\right)} - 1\right) \]
      7. exp-diff88.2%

        \[\leadsto x \cdot \left(e^{\mathsf{log1p}\left({\color{blue}{\left(\frac{e^{\log z}}{e^{t}}\right)}}^{y}\right)} - 1\right) \]
      8. add-exp-log88.2%

        \[\leadsto x \cdot \left(e^{\mathsf{log1p}\left({\left(\frac{\color{blue}{z}}{e^{t}}\right)}^{y}\right)} - 1\right) \]
    5. Applied egg-rr88.2%

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

        \[\leadsto x \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\left(\frac{z}{e^{t}}\right)}^{y}\right)\right)} \]
      2. expm1-log1p88.2%

        \[\leadsto x \cdot \color{blue}{{\left(\frac{z}{e^{t}}\right)}^{y}} \]
    7. Simplified88.2%

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

    if -3.0000000000000002e159 < y < 7.79999999999999986e126

    1. Initial program 95.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{+159} \lor \neg \left(y \leq 7.8 \cdot 10^{+126}\right):\\ \;\;\;\;x \cdot {\left(\frac{z}{e^{t}}\right)}^{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right) - y \cdot t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 95.6% accurate, 1.5× speedup?

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

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

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

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

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

Alternative 6: 84.1% accurate, 2.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.18 \cdot 10^{-113} \lor \neg \left(t \leq -5.6 \cdot 10^{-270}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right) - y \cdot t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.18e-113 or -5.5999999999999999e-270 < t

    1. Initial program 96.5%

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

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

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

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

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

    if -1.18e-113 < t < -5.5999999999999999e-270

    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. Add Preprocessing
    3. Taylor expanded in y around inf 75.1%

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

        \[\leadsto x \cdot \color{blue}{{\left(e^{y}\right)}^{\left(\log z - t\right)}} \]
      2. expm1-log1p-u75.1%

        \[\leadsto x \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\left(e^{y}\right)}^{\left(\log z - t\right)}\right)\right)} \]
      3. expm1-udef75.1%

        \[\leadsto x \cdot \color{blue}{\left(e^{\mathsf{log1p}\left({\left(e^{y}\right)}^{\left(\log z - t\right)}\right)} - 1\right)} \]
      4. pow-exp75.1%

        \[\leadsto x \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{e^{y \cdot \left(\log z - t\right)}}\right)} - 1\right) \]
      5. *-commutative75.1%

        \[\leadsto x \cdot \left(e^{\mathsf{log1p}\left(e^{\color{blue}{\left(\log z - t\right) \cdot y}}\right)} - 1\right) \]
      6. exp-prod75.1%

        \[\leadsto x \cdot \left(e^{\mathsf{log1p}\left(\color{blue}{{\left(e^{\log z - t}\right)}^{y}}\right)} - 1\right) \]
      7. exp-diff75.1%

        \[\leadsto x \cdot \left(e^{\mathsf{log1p}\left({\color{blue}{\left(\frac{e^{\log z}}{e^{t}}\right)}}^{y}\right)} - 1\right) \]
      8. add-exp-log75.1%

        \[\leadsto x \cdot \left(e^{\mathsf{log1p}\left({\left(\frac{\color{blue}{z}}{e^{t}}\right)}^{y}\right)} - 1\right) \]
    5. Applied egg-rr75.1%

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

        \[\leadsto x \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\left(\frac{z}{e^{t}}\right)}^{y}\right)\right)} \]
      2. expm1-log1p75.4%

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

      \[\leadsto x \cdot \color{blue}{{\left(\frac{z}{e^{t}}\right)}^{y}} \]
    8. Taylor expanded in t around 0 75.4%

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

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

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

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

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

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

Alternative 7: 70.0% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -12500000 \lor \neg \left(t \leq 2.3 \cdot 10^{-130}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.25e7 or 2.3000000000000001e-130 < t

    1. Initial program 95.5%

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

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

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. *-commutative67.7%

        \[\leadsto x \cdot e^{-\color{blue}{y \cdot t}} \]
    5. Simplified67.7%

      \[\leadsto x \cdot e^{\color{blue}{-y \cdot t}} \]

    if -1.25e7 < t < 2.3000000000000001e-130

    1. Initial program 97.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -12500000 \lor \neg \left(t \leq 2.3 \cdot 10^{-130}\right):\\ \;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 69.4% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.7 \cdot 10^{-5} \lor \neg \left(a \leq 9.6 \cdot 10^{+67}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.7e-5 or 9.60000000000000007e67 < a

    1. Initial program 92.3%

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

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

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

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

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

    if -1.7e-5 < a < 9.60000000000000007e67

    1. Initial program 99.8%

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

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

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. *-commutative76.5%

        \[\leadsto x \cdot e^{-\color{blue}{y \cdot t}} \]
    5. Simplified76.5%

      \[\leadsto x \cdot e^{\color{blue}{-y \cdot t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.5%

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

Alternative 9: 55.8% accurate, 2.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.04e-33 or 2.79999999999999995e-22 < y

    1. Initial program 96.0%

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

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

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

    if -1.04e-33 < y < 2.79999999999999995e-22

    1. Initial program 96.1%

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

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

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

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

        \[\leadsto e^{\color{blue}{\left(-1 \cdot a\right) \cdot b}} \cdot x \]
      3. exp-prod71.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.04 \cdot 10^{-33} \lor \neg \left(y \leq 2.8 \cdot 10^{-22}\right):\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 30.1% accurate, 14.3× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(1 - a \cdot b\right)\\
\mathbf{if}\;b \leq -2.85 \cdot 10^{+81}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq -6.6 \cdot 10^{-46}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\

\mathbf{elif}\;b \leq 3.6 \cdot 10^{+76}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.85000000000000017e81 or 3.6000000000000003e76 < b

    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. Add Preprocessing
    3. Taylor expanded in z around 0 97.7%

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

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

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

        \[\leadsto e^{\color{blue}{\left(-1 \cdot a\right) \cdot b}} \cdot x \]
      3. exp-prod69.0%

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

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

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

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

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

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

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

    if -2.85000000000000017e81 < b < -6.60000000000000027e-46

    1. Initial program 100.0%

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

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

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. *-commutative47.1%

        \[\leadsto x \cdot e^{-\color{blue}{y \cdot t}} \]
    5. Simplified47.1%

      \[\leadsto x \cdot e^{\color{blue}{-y \cdot t}} \]
    6. Taylor expanded in y around 0 19.0%

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

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

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

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

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

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

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

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

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

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

    if -6.60000000000000027e-46 < b < 3.6000000000000003e76

    1. Initial program 94.4%

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

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

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. *-commutative65.2%

        \[\leadsto x \cdot e^{-\color{blue}{y \cdot t}} \]
    5. Simplified65.2%

      \[\leadsto x \cdot e^{\color{blue}{-y \cdot t}} \]
    6. Taylor expanded in y around 0 35.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.85 \cdot 10^{+81}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{elif}\;b \leq -6.6 \cdot 10^{-46}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{elif}\;b \leq 3.6 \cdot 10^{+76}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 23.5% accurate, 19.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.35 \cdot 10^{+99} \lor \neg \left(a \leq 9 \cdot 10^{+82}\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 a < -2.34999999999999991e99 or 8.9999999999999993e82 < a

    1. Initial program 91.7%

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

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

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. *-commutative29.4%

        \[\leadsto x \cdot e^{-\color{blue}{y \cdot t}} \]
    5. Simplified29.4%

      \[\leadsto x \cdot e^{\color{blue}{-y \cdot t}} \]
    6. Taylor expanded in y around 0 14.8%

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

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

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

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

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

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

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

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

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

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

    if -2.34999999999999991e99 < a < 8.9999999999999993e82

    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. Add Preprocessing
    3. Taylor expanded in t around inf 70.4%

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

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. *-commutative70.4%

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

      \[\leadsto x \cdot e^{\color{blue}{-y \cdot t}} \]
    6. Taylor expanded in y around 0 27.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.35 \cdot 10^{+99} \lor \neg \left(a \leq 9 \cdot 10^{+82}\right):\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 26.2% accurate, 19.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{-21} \lor \neg \left(y \leq 2.9 \cdot 10^{+92}\right):\\
\;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.0000000000000007e-21 or 2.9000000000000001e92 < y

    1. Initial program 97.2%

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

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

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. *-commutative59.5%

        \[\leadsto x \cdot e^{-\color{blue}{y \cdot t}} \]
    5. Simplified59.5%

      \[\leadsto x \cdot e^{\color{blue}{-y \cdot t}} \]
    6. Taylor expanded in y around 0 23.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.0000000000000007e-21 < y < 2.9000000000000001e92

    1. Initial program 95.2%

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

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

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. *-commutative48.6%

        \[\leadsto x \cdot e^{-\color{blue}{y \cdot t}} \]
    5. Simplified48.6%

      \[\leadsto x \cdot e^{\color{blue}{-y \cdot t}} \]
    6. Taylor expanded in y around 0 29.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{-21} \lor \neg \left(y \leq 2.9 \cdot 10^{+92}\right):\\ \;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 28.6% accurate, 26.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 8.2999999999999998e74

    1. Initial program 97.4%

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

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

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. *-commutative60.0%

        \[\leadsto x \cdot e^{-\color{blue}{y \cdot t}} \]
    5. Simplified60.0%

      \[\leadsto x \cdot e^{\color{blue}{-y \cdot t}} \]
    6. Taylor expanded in y around 0 30.9%

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

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

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

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

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

    if 8.2999999999999998e74 < a

    1. Initial program 91.2%

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

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

        \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
      2. *-commutative29.1%

        \[\leadsto x \cdot e^{-\color{blue}{y \cdot t}} \]
    5. Simplified29.1%

      \[\leadsto x \cdot e^{\color{blue}{-y \cdot t}} \]
    6. Taylor expanded in y around 0 11.8%

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

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

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

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

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

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

        \[\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}{y \cdot \left(t \cdot x\right)} \]
      4. distribute-rgt-neg-in25.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 8.3 \cdot 10^{+74}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 18.9% accurate, 315.0× speedup?

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

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

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

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

      \[\leadsto x \cdot e^{\color{blue}{-t \cdot y}} \]
    2. *-commutative53.3%

      \[\leadsto x \cdot e^{-\color{blue}{y \cdot t}} \]
  5. Simplified53.3%

    \[\leadsto x \cdot e^{\color{blue}{-y \cdot t}} \]
  6. Taylor expanded in y around 0 18.4%

    \[\leadsto \color{blue}{x} \]
  7. Final simplification18.4%

    \[\leadsto x \]
  8. Add Preprocessing

Reproduce

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