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

Percentage Accurate: 96.4% → 99.5%
Time: 18.5s
Alternatives: 17
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 17 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.5% 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 94.8%

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

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

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

      \[\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 94.8%

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

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

Alternative 3: 87.3% accurate, 1.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -960 or 2.79999999999999996e-5 < y

    1. Initial program 97.7%

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

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

    if -960 < y < 2.79999999999999996e-5

    1. Initial program 91.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 81.9%

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

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

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

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

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

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

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

Alternative 4: 87.3% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -960 \lor \neg \left(y \leq 1.45 \cdot 10^{-5}\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 -960.0) (not (<= y 1.45e-5)))
   (* 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 <= -960.0) || !(y <= 1.45e-5)) {
		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 <= (-960.0d0)) .or. (.not. (y <= 1.45d-5))) 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 <= -960.0) || !(y <= 1.45e-5)) {
		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 <= -960.0) or not (y <= 1.45e-5):
		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 <= -960.0) || !(y <= 1.45e-5))
		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 <= -960.0) || ~((y <= 1.45e-5)))
		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, -960.0], N[Not[LessEqual[y, 1.45e-5]], $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 -960 \lor \neg \left(y \leq 1.45 \cdot 10^{-5}\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 < -960 or 1.45e-5 < y

    1. Initial program 97.7%

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

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

    if -960 < y < 1.45e-5

    1. Initial program 91.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 81.9%

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

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

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

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

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

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

      \[\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. associate-*r*89.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -960 \lor \neg \left(y \leq 1.45 \cdot 10^{-5}\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 5: 70.9% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{-y \cdot t}\\ t_2 := x \cdot {z}^{y}\\ \mathbf{if}\;y \leq -2.2 \cdot 10^{+178}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -7700000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{+47}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+79} \lor \neg \left(y \leq 4 \cdot 10^{+132}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (exp (- (* y t))))) (t_2 (* x (pow z y))))
   (if (<= y -2.2e+178)
     t_2
     (if (<= y -7700000000000.0)
       t_1
       (if (<= y 6.8e+47)
         (* x (exp (* a (- b))))
         (if (or (<= y 6.5e+79) (not (<= y 4e+132))) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * exp(-(y * t));
	double t_2 = x * pow(z, y);
	double tmp;
	if (y <= -2.2e+178) {
		tmp = t_2;
	} else if (y <= -7700000000000.0) {
		tmp = t_1;
	} else if (y <= 6.8e+47) {
		tmp = x * exp((a * -b));
	} else if ((y <= 6.5e+79) || !(y <= 4e+132)) {
		tmp = t_2;
	} 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 * exp(-(y * t))
    t_2 = x * (z ** y)
    if (y <= (-2.2d+178)) then
        tmp = t_2
    else if (y <= (-7700000000000.0d0)) then
        tmp = t_1
    else if (y <= 6.8d+47) then
        tmp = x * exp((a * -b))
    else if ((y <= 6.5d+79) .or. (.not. (y <= 4d+132))) then
        tmp = t_2
    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 t_2 = x * Math.pow(z, y);
	double tmp;
	if (y <= -2.2e+178) {
		tmp = t_2;
	} else if (y <= -7700000000000.0) {
		tmp = t_1;
	} else if (y <= 6.8e+47) {
		tmp = x * Math.exp((a * -b));
	} else if ((y <= 6.5e+79) || !(y <= 4e+132)) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x * math.exp(-(y * t))
	t_2 = x * math.pow(z, y)
	tmp = 0
	if y <= -2.2e+178:
		tmp = t_2
	elif y <= -7700000000000.0:
		tmp = t_1
	elif y <= 6.8e+47:
		tmp = x * math.exp((a * -b))
	elif (y <= 6.5e+79) or not (y <= 4e+132):
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x * exp(Float64(-Float64(y * t))))
	t_2 = Float64(x * (z ^ y))
	tmp = 0.0
	if (y <= -2.2e+178)
		tmp = t_2;
	elseif (y <= -7700000000000.0)
		tmp = t_1;
	elseif (y <= 6.8e+47)
		tmp = Float64(x * exp(Float64(a * Float64(-b))));
	elseif ((y <= 6.5e+79) || !(y <= 4e+132))
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x * exp(-(y * t));
	t_2 = x * (z ^ y);
	tmp = 0.0;
	if (y <= -2.2e+178)
		tmp = t_2;
	elseif (y <= -7700000000000.0)
		tmp = t_1;
	elseif (y <= 6.8e+47)
		tmp = x * exp((a * -b));
	elseif ((y <= 6.5e+79) || ~((y <= 4e+132)))
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.2e+178], t$95$2, If[LessEqual[y, -7700000000000.0], t$95$1, If[LessEqual[y, 6.8e+47], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 6.5e+79], N[Not[LessEqual[y, 4e+132]], $MachinePrecision]], t$95$2, t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot e^{-y \cdot t}\\
t_2 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -2.2 \cdot 10^{+178}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -7700000000000:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 6.5 \cdot 10^{+79} \lor \neg \left(y \leq 4 \cdot 10^{+132}\right):\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.19999999999999997e178 or 6.7999999999999996e47 < y < 6.49999999999999954e79 or 3.99999999999999996e132 < y

    1. Initial program 98.6%

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

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

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

    if -2.19999999999999997e178 < y < -7.7e12 or 6.49999999999999954e79 < y < 3.99999999999999996e132

    1. Initial program 97.7%

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

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

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

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

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

    if -7.7e12 < y < 6.7999999999999996e47

    1. Initial program 91.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.2 \cdot 10^{+178}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq -7700000000000:\\ \;\;\;\;x \cdot e^{-y \cdot t}\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{+47}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+79} \lor \neg \left(y \leq 4 \cdot 10^{+132}\right):\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{-y \cdot t}\\ \end{array} \]

Alternative 6: 73.9% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{-y \cdot t}\\ t_2 := x \cdot {z}^{y}\\ \mathbf{if}\;y \leq -1.9 \cdot 10^{+175}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -4150000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.65 \cdot 10^{+48}:\\ \;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{+75} \lor \neg \left(y \leq 5.8 \cdot 10^{+132}\right):\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (exp (- (* y t))))) (t_2 (* x (pow z y))))
   (if (<= y -1.9e+175)
     t_2
     (if (<= y -4150000000000.0)
       t_1
       (if (<= y 2.65e+48)
         (* x (exp (* a (- (- z) b))))
         (if (or (<= y 8.2e+75) (not (<= y 5.8e+132))) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * exp(-(y * t));
	double t_2 = x * pow(z, y);
	double tmp;
	if (y <= -1.9e+175) {
		tmp = t_2;
	} else if (y <= -4150000000000.0) {
		tmp = t_1;
	} else if (y <= 2.65e+48) {
		tmp = x * exp((a * (-z - b)));
	} else if ((y <= 8.2e+75) || !(y <= 5.8e+132)) {
		tmp = t_2;
	} 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 * exp(-(y * t))
    t_2 = x * (z ** y)
    if (y <= (-1.9d+175)) then
        tmp = t_2
    else if (y <= (-4150000000000.0d0)) then
        tmp = t_1
    else if (y <= 2.65d+48) then
        tmp = x * exp((a * (-z - b)))
    else if ((y <= 8.2d+75) .or. (.not. (y <= 5.8d+132))) then
        tmp = t_2
    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 t_2 = x * Math.pow(z, y);
	double tmp;
	if (y <= -1.9e+175) {
		tmp = t_2;
	} else if (y <= -4150000000000.0) {
		tmp = t_1;
	} else if (y <= 2.65e+48) {
		tmp = x * Math.exp((a * (-z - b)));
	} else if ((y <= 8.2e+75) || !(y <= 5.8e+132)) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x * math.exp(-(y * t))
	t_2 = x * math.pow(z, y)
	tmp = 0
	if y <= -1.9e+175:
		tmp = t_2
	elif y <= -4150000000000.0:
		tmp = t_1
	elif y <= 2.65e+48:
		tmp = x * math.exp((a * (-z - b)))
	elif (y <= 8.2e+75) or not (y <= 5.8e+132):
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x * exp(Float64(-Float64(y * t))))
	t_2 = Float64(x * (z ^ y))
	tmp = 0.0
	if (y <= -1.9e+175)
		tmp = t_2;
	elseif (y <= -4150000000000.0)
		tmp = t_1;
	elseif (y <= 2.65e+48)
		tmp = Float64(x * exp(Float64(a * Float64(Float64(-z) - b))));
	elseif ((y <= 8.2e+75) || !(y <= 5.8e+132))
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x * exp(-(y * t));
	t_2 = x * (z ^ y);
	tmp = 0.0;
	if (y <= -1.9e+175)
		tmp = t_2;
	elseif (y <= -4150000000000.0)
		tmp = t_1;
	elseif (y <= 2.65e+48)
		tmp = x * exp((a * (-z - b)));
	elseif ((y <= 8.2e+75) || ~((y <= 5.8e+132)))
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.9e+175], t$95$2, If[LessEqual[y, -4150000000000.0], t$95$1, If[LessEqual[y, 2.65e+48], N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 8.2e+75], N[Not[LessEqual[y, 5.8e+132]], $MachinePrecision]], t$95$2, t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot e^{-y \cdot t}\\
t_2 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -1.9 \cdot 10^{+175}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -4150000000000:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 8.2 \cdot 10^{+75} \lor \neg \left(y \leq 5.8 \cdot 10^{+132}\right):\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.8999999999999998e175 or 2.65e48 < y < 8.1999999999999997e75 or 5.7999999999999997e132 < y

    1. Initial program 98.6%

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

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

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

    if -1.8999999999999998e175 < y < -4.15e12 or 8.1999999999999997e75 < y < 5.7999999999999997e132

    1. Initial program 97.7%

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

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

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

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

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

    if -4.15e12 < y < 2.65e48

    1. Initial program 91.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 80.1%

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

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

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

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

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

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

      \[\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. associate-*r*87.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.9 \cdot 10^{+175}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq -4150000000000:\\ \;\;\;\;x \cdot e^{-y \cdot t}\\ \mathbf{elif}\;y \leq 2.65 \cdot 10^{+48}:\\ \;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{+75} \lor \neg \left(y \leq 5.8 \cdot 10^{+132}\right):\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{-y \cdot t}\\ \end{array} \]

Alternative 7: 73.1% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.05 \cdot 10^{-17} \lor \neg \left(y \leq 1.3 \cdot 10^{+48}\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 -1.05e-17) (not (<= y 1.3e+48)))
   (* 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 <= -1.05e-17) || !(y <= 1.3e+48)) {
		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 <= (-1.05d-17)) .or. (.not. (y <= 1.3d+48))) 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 <= -1.05e-17) || !(y <= 1.3e+48)) {
		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 <= -1.05e-17) or not (y <= 1.3e+48):
		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 <= -1.05e-17) || !(y <= 1.3e+48))
		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 <= -1.05e-17) || ~((y <= 1.3e+48)))
		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, -1.05e-17], N[Not[LessEqual[y, 1.3e+48]], $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 -1.05 \cdot 10^{-17} \lor \neg \left(y \leq 1.3 \cdot 10^{+48}\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 < -1.04999999999999996e-17 or 1.29999999999999998e48 < y

    1. Initial program 98.3%

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

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

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

    if -1.04999999999999996e-17 < y < 1.29999999999999998e48

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

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

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

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

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

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

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

Alternative 8: 60.4% accurate, 2.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.34999999999999993e-31 or 0.00160000000000000008 < 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 y around inf 89.1%

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

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

    if -2.34999999999999993e-31 < y < 0.00160000000000000008

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(1 - \left(a \cdot b - \color{blue}{\left(\left(0.5 \cdot \left(a \cdot a\right)\right) \cdot b\right) \cdot b}\right)\right) \]
      4. distribute-rgt-out--57.3%

        \[\leadsto x \cdot \left(1 - \color{blue}{b \cdot \left(a - \left(0.5 \cdot \left(a \cdot a\right)\right) \cdot b\right)}\right) \]
      5. *-commutative57.3%

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

        \[\leadsto x \cdot \left(1 - b \cdot \left(a - \color{blue}{\left(a \cdot \left(a \cdot 0.5\right)\right)} \cdot b\right)\right) \]
    9. Applied egg-rr57.3%

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

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

Alternative 9: 42.4% accurate, 14.9× speedup?

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

\\
\begin{array}{l}
t_1 := \left(0.5 \cdot \left(a \cdot a\right)\right) \cdot \left(x \cdot \left(b \cdot b\right)\right)\\
\mathbf{if}\;y \leq -6 \cdot 10^{-41}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -1.1 \cdot 10^{-160}:\\
\;\;\;\;x - y \cdot \left(x \cdot t\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.99999999999999978e-41 or 1.15e7 < y

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\color{blue}{\left(1 - a \cdot b\right)} + 0.5 \cdot \left({a}^{2} \cdot {b}^{2}\right)\right) \]
      5. *-commutative22.5%

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

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

        \[\leadsto x \cdot \left(\left(1 - b \cdot a\right) + \left(0.5 \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot {b}^{2}\right) \]
      8. unpow222.5%

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

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

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

        \[\leadsto \color{blue}{\left(0.5 \cdot {a}^{2}\right) \cdot \left({b}^{2} \cdot x\right)} \]
      2. unpow235.0%

        \[\leadsto \left(0.5 \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot \left({b}^{2} \cdot x\right) \]
      3. unpow235.0%

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

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

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

    if -5.99999999999999978e-41 < y < -1.1e-160

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

    if -1.1e-160 < y < 1.15e7

    1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\color{blue}{\left(1 - a \cdot b\right)} + 0.5 \cdot \left({a}^{2} \cdot {b}^{2}\right)\right) \]
      5. *-commutative53.4%

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

        \[\leadsto x \cdot \left(\left(1 - b \cdot a\right) + \color{blue}{\left(0.5 \cdot {a}^{2}\right) \cdot {b}^{2}}\right) \]
      7. unpow253.4%

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

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

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

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

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

        \[\leadsto x \cdot \left(1 - \left(a \cdot b - \color{blue}{\left(\left(0.5 \cdot \left(a \cdot a\right)\right) \cdot b\right) \cdot b}\right)\right) \]
      4. distribute-rgt-out--57.5%

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

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

        \[\leadsto x \cdot \left(1 - b \cdot \left(a - \color{blue}{\left(a \cdot \left(a \cdot 0.5\right)\right)} \cdot b\right)\right) \]
    9. Applied egg-rr57.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{-41}:\\ \;\;\;\;\left(0.5 \cdot \left(a \cdot a\right)\right) \cdot \left(x \cdot \left(b \cdot b\right)\right)\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-160}:\\ \;\;\;\;x - y \cdot \left(x \cdot t\right)\\ \mathbf{elif}\;y \leq 11500000:\\ \;\;\;\;x \cdot \left(1 - b \cdot \left(a - b \cdot \left(a \cdot \left(a \cdot 0.5\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.5 \cdot \left(a \cdot a\right)\right) \cdot \left(x \cdot \left(b \cdot b\right)\right)\\ \end{array} \]

Alternative 10: 40.4% accurate, 20.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.49999999999999939e-30 or 1.15e7 < y

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\color{blue}{\left(1 - a \cdot b\right)} + 0.5 \cdot \left({a}^{2} \cdot {b}^{2}\right)\right) \]
      5. *-commutative22.0%

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

        \[\leadsto x \cdot \left(\left(1 - b \cdot a\right) + \color{blue}{\left(0.5 \cdot {a}^{2}\right) \cdot {b}^{2}}\right) \]
      7. unpow222.0%

        \[\leadsto x \cdot \left(\left(1 - b \cdot a\right) + \left(0.5 \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot {b}^{2}\right) \]
      8. unpow222.0%

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

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

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

        \[\leadsto \color{blue}{\left(0.5 \cdot {a}^{2}\right) \cdot \left({b}^{2} \cdot x\right)} \]
      2. unpow234.8%

        \[\leadsto \left(0.5 \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot \left({b}^{2} \cdot x\right) \]
      3. unpow234.8%

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

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

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

    if -9.49999999999999939e-30 < y < 1.15e7

    1. Initial program 90.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 80.7%

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

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

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

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

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

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

      \[\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. associate-*r*89.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 24.9% accurate, 22.1× speedup?

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

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

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

\mathbf{elif}\;a \leq -1.36 \cdot 10^{-28}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 6.2 \cdot 10^{+49}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.4000000000000001e171 or -1.4e42 < a < -1.35999999999999989e-28

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.4000000000000001e171 < a < -1.4e42

    1. Initial program 83.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.35999999999999989e-28 < a < 6.19999999999999985e49

    1. Initial program 99.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 49.2%

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

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

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

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

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

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

    if 6.19999999999999985e49 < a

    1. Initial program 89.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 64.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.4 \cdot 10^{+171}:\\ \;\;\;\;\left(-x\right) \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{+42}:\\ \;\;\;\;x \cdot \left(-y \cdot t\right)\\ \mathbf{elif}\;a \leq -1.36 \cdot 10^{-28}:\\ \;\;\;\;\left(-x\right) \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+49}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \end{array} \]

Alternative 12: 33.3% accurate, 24.0× speedup?

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

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

\mathbf{elif}\;y \leq 1.85 \cdot 10^{-6}:\\
\;\;\;\;x \cdot \left(1 - a \cdot \left(z + b\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 y < -6.5000000000000001e56

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.5000000000000001e56 < y < 1.8500000000000001e-6

    1. Initial program 91.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 78.1%

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

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

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

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

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

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

      \[\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. associate-*r*85.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8500000000000001e-6 < y

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 33.0% accurate, 28.3× speedup?

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

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

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

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


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

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.80000000000000002e56 < y < 0.00169999999999999991

    1. Initial program 92.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 76.7%

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

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

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

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

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

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

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

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

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

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

    if 0.00169999999999999991 < y

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 23.7% accurate, 31.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{+181} \lor \neg \left(a \leq 1.05 \cdot 10^{+16}\right):\\
\;\;\;\;-b \cdot \left(x \cdot a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.2e181 or 1.05e16 < a

    1. Initial program 91.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 72.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.2e181 < a < 1.05e16

    1. Initial program 96.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.2 \cdot 10^{+181} \lor \neg \left(a \leq 1.05 \cdot 10^{+16}\right):\\ \;\;\;\;-b \cdot \left(x \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 15: 24.8% accurate, 31.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.6 \cdot 10^{-25} \lor \neg \left(a \leq 9.5 \cdot 10^{+84}\right):\\
\;\;\;\;\left(-x\right) \cdot \left(a \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.59999999999999953e-25 or 9.49999999999999979e84 < a

    1. Initial program 90.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 68.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.59999999999999953e-25 < a < 9.49999999999999979e84

    1. Initial program 98.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 50.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.6 \cdot 10^{-25} \lor \neg \left(a \leq 9.5 \cdot 10^{+84}\right):\\ \;\;\;\;\left(-x\right) \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 16: 25.1% accurate, 31.1× speedup?

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

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

\mathbf{elif}\;a \leq 9.5 \cdot 10^{+49}:\\
\;\;\;\;x\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.22e-27 < a < 9.49999999999999969e49

    1. Initial program 99.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 49.2%

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

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

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

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

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

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

    if 9.49999999999999969e49 < a

    1. Initial program 89.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 64.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.22 \cdot 10^{-27}:\\ \;\;\;\;\left(-x\right) \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+49}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \end{array} \]

Alternative 17: 19.2% accurate, 315.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 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 59.5%

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

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

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

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

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

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

    \[\leadsto x \]

Reproduce

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