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

Percentage Accurate: 96.4% → 99.6%
Time: 15.4s
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.4% 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(a, \mathsf{log1p}\left(-z\right) - b, y \cdot \left(\log z - t\right)\right)} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (* x (exp (fma a (- (log1p (- z)) b) (* y (- (log z) t))))))
double code(double x, double y, double z, double t, double a, double b) {
	return x * exp(fma(a, (log1p(-z) - b), (y * (log(z) - t))));
}
function code(x, y, z, t, a, b)
	return Float64(x * exp(fma(a, Float64(log1p(Float64(-z)) - b), Float64(y * Float64(log(z) - t)))))
end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision] + N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

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

Alternative 2: 96.4% accurate, 1.0× speedup?

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

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

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

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

Alternative 3: 85.6% accurate, 1.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.3e10 or 2.04999999999999991e-110 < 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 y around inf 87.3%

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

    if -3.3e10 < y < 2.04999999999999991e-110

    1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 72.9% accurate, 2.8× speedup?

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

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

\mathbf{elif}\;y \leq -1.75 \cdot 10^{+16}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -0.035:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.9999999999999995e88 or -1.75e16 < y < -0.035000000000000003

    1. Initial program 96.6%

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

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

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

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

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

    if -6.9999999999999995e88 < y < -1.75e16 or 2 < y

    1. Initial program 98.9%

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

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

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

    if -0.035000000000000003 < y < 2

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative83.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+88}:\\ \;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{+16}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq -0.035:\\ \;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\ \mathbf{elif}\;y \leq 2:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \]

Alternative 5: 73.9% accurate, 2.8× speedup?

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

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

\mathbf{elif}\;t \leq -4.6 \cdot 10^{-160}:\\
\;\;\;\;x \cdot {z}^{y}\\

\mathbf{elif}\;t \leq 1.15 \cdot 10^{+33}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.8e6 or 1.15000000000000005e33 < t

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

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

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

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

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

    if -6.8e6 < t < -4.5999999999999997e-160

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

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

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

    if -4.5999999999999997e-160 < t < 1.15000000000000005e33

    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. Taylor expanded in y around 0 68.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 54.1% accurate, 2.9× speedup?

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

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

\mathbf{elif}\;t \leq -1.5 \cdot 10^{-218} \lor \neg \left(t \leq -2.7 \cdot 10^{-268}\right):\\
\;\;\;\;x \cdot {z}^{y}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6e10 < t < -1.4999999999999999e-218 or -2.7000000000000001e-268 < t

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

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

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

    if -1.4999999999999999e-218 < t < -2.7000000000000001e-268

    1. Initial program 88.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 5.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -26000000000:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-218} \lor \neg \left(t \leq -2.7 \cdot 10^{-268}\right):\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\ \end{array} \]

Alternative 7: 74.3% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -450000000000 \lor \neg \left(y \leq 2.2\right):\\
\;\;\;\;x \cdot {z}^{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.5e11 or 2.2000000000000002 < y

    1. Initial program 98.0%

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

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

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

    if -4.5e11 < y < 2.2000000000000002

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative81.7%

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

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

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

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

Alternative 8: 17.8% accurate, 25.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.1 \cdot 10^{-271}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 9.5 \cdot 10^{-194} \lor \neg \left(z \leq 9.5 \cdot 10^{-58}\right):\\
\;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < 1.1e-271

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative54.4%

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

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

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

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

    if 1.1e-271 < z < 9.50000000000000009e-194 or 9.4999999999999994e-58 < z

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.50000000000000009e-194 < z < 9.4999999999999994e-58

    1. Initial program 98.1%

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative56.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 1.1 \cdot 10^{-271}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-194} \lor \neg \left(z \leq 9.5 \cdot 10^{-58}\right):\\ \;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \end{array} \]

Alternative 9: 32.6% accurate, 25.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.19999999999999995e37 or 6.4000000000000003e153 < y

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.19999999999999995e37 < y < 0.031

    1. Initial program 95.7%

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative79.4%

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

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

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

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

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

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

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

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

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

    if 0.031 < y < 6.4000000000000003e153

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative38.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{+37}:\\ \;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\ \mathbf{elif}\;y \leq 0.031:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{+153}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\ \end{array} \]

Alternative 10: 31.5% accurate, 28.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.8 \cdot 10^{+46} \lor \neg \left(b \leq 2.8 \cdot 10^{-14}\right):\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.7999999999999999e46 or 2.8000000000000001e-14 < b

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative74.0%

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

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

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

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

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

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

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

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

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

    if -1.7999999999999999e46 < b < 2.8000000000000001e-14

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.8 \cdot 10^{+46} \lor \neg \left(b \leq 2.8 \cdot 10^{-14}\right):\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \end{array} \]

Alternative 11: 31.5% accurate, 28.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.7 \cdot 10^{+43} \lor \neg \left(b \leq 8.6 \cdot 10^{-19}\right):\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.70000000000000006e43 or 8.6e-19 < b

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative74.0%

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

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

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

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

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

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

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

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

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

    if -1.70000000000000006e43 < b < 8.6e-19

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \left(y \cdot \left(-t\right)\right)} + x \]
      6. neg-mul-137.8%

        \[\leadsto x \cdot \left(y \cdot \color{blue}{\left(-1 \cdot t\right)}\right) + x \]
      7. associate-*r*37.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.7 \cdot 10^{+43} \lor \neg \left(b \leq 8.6 \cdot 10^{-19}\right):\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \left(y \cdot t\right)\\ \end{array} \]

Alternative 12: 24.6% accurate, 31.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{-15} \lor \neg \left(y \leq 5.8 \cdot 10^{-212}\right):\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.9000000000000001e-15 or 5.7999999999999999e-212 < y

    1. Initial program 97.8%

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative41.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9000000000000001e-15 < y < 5.7999999999999999e-212

    1. Initial program 94.8%

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative86.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.9 \cdot 10^{-15} \lor \neg \left(y \leq 5.8 \cdot 10^{-212}\right):\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 13: 22.8% accurate, 44.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 2.8:\\ \;\;\;\;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 2.8) x (* a (* x b))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= 2.8) {
		tmp = x;
	} else {
		tmp = a * (x * b);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (y <= 2.8d0) then
        tmp = x
    else
        tmp = a * (x * b)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= 2.8) {
		tmp = x;
	} else {
		tmp = a * (x * b);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= 2.8:
		tmp = x
	else:
		tmp = a * (x * b)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= 2.8)
		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 <= 2.8)
		tmp = x;
	else
		tmp = a * (x * b);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 2.8], x, N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.8:\\
\;\;\;\;x\\

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


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

    1. Initial program 96.2%

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative62.6%

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

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

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

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

    if 2.7999999999999998 < y

    1. Initial program 98.7%

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative35.6%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{a \cdot \left(\left(-b\right) \cdot x\right)} \]
    11. Step-by-step derivation
      1. expm1-log1p-u21.3%

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(a \cdot \left(\left(-b\right) \cdot x\right)\right)} - 1} \]
      3. add-sqr-sqrt26.0%

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

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

        \[\leadsto e^{\mathsf{log1p}\left(a \cdot \left(\sqrt{\color{blue}{b \cdot b}} \cdot x\right)\right)} - 1 \]
      6. sqrt-unprod18.3%

        \[\leadsto e^{\mathsf{log1p}\left(a \cdot \left(\color{blue}{\left(\sqrt{b} \cdot \sqrt{b}\right)} \cdot x\right)\right)} - 1 \]
      7. add-sqr-sqrt41.6%

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

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

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

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

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

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

Alternative 14: 19.1% accurate, 315.0× speedup?

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

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

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

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

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    2. *-commutative54.4%

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification15.1%

    \[\leadsto x \]

Reproduce

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