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

Percentage Accurate: 96.7% → 99.5%
Time: 18.5s
Alternatives: 15
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 15 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.7% accurate, 1.0× speedup?

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

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

Alternative 1: 99.5% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

Alternative 2: 96.7% accurate, 1.0× speedup?

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

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

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

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

Alternative 3: 87.4% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.1 \cdot 10^{-23} \lor \neg \left(y \leq 1.3 \cdot 10^{-42}\right):\\ \;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{\left(-a\right) \cdot \left(z + b\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= y -1.1e-23) (not (<= y 1.3e-42)))
   (* 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 <= -1.1e-23) || !(y <= 1.3e-42)) {
		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 <= (-1.1d-23)) .or. (.not. (y <= 1.3d-42))) 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 <= -1.1e-23) || !(y <= 1.3e-42)) {
		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 <= -1.1e-23) or not (y <= 1.3e-42):
		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 <= -1.1e-23) || !(y <= 1.3e-42))
		tmp = Float64(x * exp(Float64(y * Float64(log(z) - t))));
	else
		tmp = Float64(x * exp(Float64(Float64(-a) * Float64(z + b))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((y <= -1.1e-23) || ~((y <= 1.3e-42)))
		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, -1.1e-23], N[Not[LessEqual[y, 1.3e-42]], $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 -1.1 \cdot 10^{-23} \lor \neg \left(y \leq 1.3 \cdot 10^{-42}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.1e-23 or 1.3e-42 < y

    1. Initial program 98.0%

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

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

    if -1.1e-23 < y < 1.3e-42

    1. Initial program 97.3%

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

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

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

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

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

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

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

      \[\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*90.0%

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

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

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

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

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

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

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

Alternative 4: 74.1% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -28000000000000:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 3.2 \cdot 10^{+144} \lor \neg \left(y \leq 7 \cdot 10^{+223}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.8e13 or 0.00125000000000000003 < y < 3.2000000000000001e144 or 7.0000000000000002e223 < y

    1. Initial program 97.4%

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

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

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

    if -2.8e13 < y < 0.00125000000000000003

    1. Initial program 97.6%

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

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

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

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

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

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

    if 3.2000000000000001e144 < y < 7.0000000000000002e223

    1. Initial program 100.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -28000000000000:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq 0.00125:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{+144} \lor \neg \left(y \leq 7 \cdot 10^{+223}\right):\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\ \end{array} \]

Alternative 5: 77.1% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -3 \cdot 10^{+14}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 4.8 \cdot 10^{+144} \lor \neg \left(y \leq 6 \cdot 10^{+225}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3e14 or 1.55000000000000004 < y < 4.8000000000000001e144 or 6.000000000000001e225 < 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 88.8%

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

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

    if -3e14 < y < 1.55000000000000004

    1. Initial program 96.8%

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

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

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

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

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

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

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

      \[\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*88.2%

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

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

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

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

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

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

    if 4.8000000000000001e144 < y < 6.000000000000001e225

    1. Initial program 100.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{+14}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq 1.55:\\ \;\;\;\;x \cdot e^{\left(-a\right) \cdot \left(z + b\right)}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{+144} \lor \neg \left(y \leq 6 \cdot 10^{+225}\right):\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\ \end{array} \]

Alternative 6: 55.3% accurate, 2.8× speedup?

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

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

\mathbf{elif}\;t \leq -5.4 \cdot 10^{+200}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq -2.3 \cdot 10^{+73}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.2500000000000001e286

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot x - \left(y \cdot \left(x \cdot t\right)\right) \cdot \left(y \cdot \color{blue}{\left(x \cdot t\right)}\right)}{x + y \cdot \left(t \cdot x\right)} \]
      4. *-commutative1.6%

        \[\leadsto \frac{x \cdot x - \left(y \cdot \left(x \cdot t\right)\right) \cdot \left(y \cdot \left(x \cdot t\right)\right)}{x + y \cdot \color{blue}{\left(x \cdot t\right)}} \]
    9. Applied egg-rr1.6%

      \[\leadsto \color{blue}{\frac{x \cdot x - \left(y \cdot \left(x \cdot t\right)\right) \cdot \left(y \cdot \left(x \cdot t\right)\right)}{x + y \cdot \left(x \cdot t\right)}} \]
    10. Step-by-step derivation
      1. associate-*l*1.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot x}}{x + x \cdot \left(y \cdot t\right)} \]
    14. Simplified63.1%

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

    if -1.2500000000000001e286 < t < -5.40000000000000031e200 or -1.43999999999999993e162 < t < -2.3e73

    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

    if -5.40000000000000031e200 < t < -1.43999999999999993e162

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.3e73 < t

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.25 \cdot 10^{+286}:\\ \;\;\;\;\frac{x \cdot x}{x + x \cdot \left(y \cdot t\right)}\\ \mathbf{elif}\;t \leq -5.4 \cdot 10^{+200}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{elif}\;t \leq -1.44 \cdot 10^{+162}:\\ \;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{+73}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \]

Alternative 7: 74.7% accurate, 2.9× speedup?

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

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

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

    if -3.1e14 < y < 0.00419999999999999974

    1. Initial program 97.6%

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

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

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

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

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

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

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

Alternative 8: 36.1% accurate, 16.4× speedup?

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

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

\mathbf{elif}\;y \leq -1.2 \cdot 10^{-66}:\\
\;\;\;\;t_1\\

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

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

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


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

    1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6e111 < y < -1.20000000000000013e-66 or 4.2000000000000003e103 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot x - \left(y \cdot \left(x \cdot t\right)\right) \cdot \left(y \cdot \left(x \cdot t\right)\right)}{x + y \cdot \color{blue}{\left(x \cdot t\right)}} \]
    9. Applied egg-rr17.3%

      \[\leadsto \color{blue}{\frac{x \cdot x - \left(y \cdot \left(x \cdot t\right)\right) \cdot \left(y \cdot \left(x \cdot t\right)\right)}{x + y \cdot \left(x \cdot t\right)}} \]
    10. Step-by-step derivation
      1. associate-*l*18.5%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{{x}^{2}}}{x + x \cdot \left(y \cdot t\right)} \]
    13. Step-by-step derivation
      1. unpow235.4%

        \[\leadsto \frac{\color{blue}{x \cdot x}}{x + x \cdot \left(y \cdot t\right)} \]
    14. Simplified35.4%

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

    if -1.20000000000000013e-66 < y < 1.29999999999999989e-4

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

    if 1.29999999999999989e-4 < y < 4.2000000000000003e103

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{+111}:\\ \;\;\;\;\left(-t\right) \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-66}:\\ \;\;\;\;\frac{x \cdot x}{x + x \cdot \left(y \cdot t\right)}\\ \mathbf{elif}\;y \leq 0.00013:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{+103}:\\ \;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot x}{x + x \cdot \left(y \cdot t\right)}\\ \end{array} \]

Alternative 9: 27.6% accurate, 19.3× speedup?

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

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

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

\mathbf{elif}\;y \leq -5 \cdot 10^{-79}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 8.2 \cdot 10^{-115}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -6e111 or -6.60000000000000047e-41 < y < -4.99999999999999999e-79

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6e111 < y < -6.60000000000000047e-41

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999999e-79 < y < 8.1999999999999993e-115

    1. Initial program 96.8%

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

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

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

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

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

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

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

    if 8.1999999999999993e-115 < y < 8.79999999999999995e83

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.79999999999999995e83 < 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 t around inf 65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{+111}:\\ \;\;\;\;\left(-t\right) \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq -6.6 \cdot 10^{-41}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y \leq -5 \cdot 10^{-79}:\\ \;\;\;\;\left(-t\right) \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{-115}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 8.8 \cdot 10^{+83}:\\ \;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \end{array} \]

Alternative 10: 33.2% accurate, 19.3× speedup?

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

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

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

\mathbf{elif}\;y \leq -6.8 \cdot 10^{-63}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -4.50000000000000001e111 or -2.8000000000000001e-39 < y < -6.79999999999999997e-63

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.50000000000000001e111 < y < -2.8000000000000001e-39

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.79999999999999997e-63 < y < 3.59999999999999994e-7

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

    if 3.59999999999999994e-7 < y < 9.30000000000000055e86

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.30000000000000055e86 < 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 t around inf 65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{+111}:\\ \;\;\;\;\left(-t\right) \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{-39}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y \leq -6.8 \cdot 10^{-63}:\\ \;\;\;\;\left(-t\right) \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{-7}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{elif}\;y \leq 9.3 \cdot 10^{+86}:\\ \;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \end{array} \]

Alternative 11: 27.0% accurate, 22.1× speedup?

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

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

\mathbf{elif}\;y \leq 1.16 \cdot 10^{-114}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.9 \cdot 10^{+144}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.09999999999999981e-15 or 1.1599999999999999e-114 < y < 1.90000000000000013e144

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.09999999999999981e-15 < y < 1.1599999999999999e-114

    1. Initial program 97.1%

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

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

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

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

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

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

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

    if 1.90000000000000013e144 < y < 8.4999999999999994e222

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.4999999999999994e222 < y

    1. Initial program 94.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{-15}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y \leq 1.16 \cdot 10^{-114}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+144}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{+222}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\ \end{array} \]

Alternative 12: 27.0% accurate, 25.8× speedup?

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

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

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

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

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


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

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.34999999999999995e-9 < y < 8.99999999999999939e-117

    1. Initial program 97.1%

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

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

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

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

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

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

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

    if 8.99999999999999939e-117 < y < 4.89999999999999971e87

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.89999999999999971e87 < 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 t around inf 65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 27.9% accurate, 31.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.4999999999999996e-10 or 2.2e-32 < y

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.4999999999999996e-10 < y < 2.2e-32

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

Alternative 14: 24.9% accurate, 34.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.00027 \lor \neg \left(y \leq 0.0034\right):\\
\;\;\;\;a \cdot \left(x \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.70000000000000003e-4 or 0.00339999999999999981 < y

    1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.70000000000000003e-4 < y < 0.00339999999999999981

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

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

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

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

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

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

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

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

Alternative 15: 19.8% accurate, 315.0× speedup?

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

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

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

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

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

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

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

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

    \[\leadsto x \]

Reproduce

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