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

Percentage Accurate: 96.6% → 99.6%
Time: 19.7s
Alternatives: 16
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 16 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 96.6% accurate, 1.0× speedup?

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

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

Alternative 1: 99.6% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

    \[\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 -6.4 \cdot 10^{-15} \lor \neg \left(y \leq 60000000000000\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 -6.4e-15) (not (<= y 60000000000000.0)))
   (* 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 <= -6.4e-15) || !(y <= 60000000000000.0)) {
		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 <= (-6.4d-15)) .or. (.not. (y <= 60000000000000.0d0))) 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 <= -6.4e-15) || !(y <= 60000000000000.0)) {
		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 <= -6.4e-15) or not (y <= 60000000000000.0):
		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 <= -6.4e-15) || !(y <= 60000000000000.0))
		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 <= -6.4e-15) || ~((y <= 60000000000000.0)))
		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, -6.4e-15], N[Not[LessEqual[y, 60000000000000.0]], $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 -6.4 \cdot 10^{-15} \lor \neg \left(y \leq 60000000000000\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 < -6.3999999999999999e-15 or 6e13 < y

    1. Initial program 98.5%

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

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

    if -6.3999999999999999e-15 < y < 6e13

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.4 \cdot 10^{-15} \lor \neg \left(y \leq 60000000000000\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: 73.4% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot {z}^{y}\\ \mathbf{if}\;y \leq -6200:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{+21}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+68} \lor \neg \left(y \leq 3.4 \cdot 10^{+156}\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 -6200.0)
     t_1
     (if (<= y 4.6e+21)
       (* x (exp (* a (- b))))
       (if (or (<= y 2.4e+68) (not (<= y 3.4e+156)))
         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 <= -6200.0) {
		tmp = t_1;
	} else if (y <= 4.6e+21) {
		tmp = x * exp((a * -b));
	} else if ((y <= 2.4e+68) || !(y <= 3.4e+156)) {
		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 <= (-6200.0d0)) then
        tmp = t_1
    else if (y <= 4.6d+21) then
        tmp = x * exp((a * -b))
    else if ((y <= 2.4d+68) .or. (.not. (y <= 3.4d+156))) 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 <= -6200.0) {
		tmp = t_1;
	} else if (y <= 4.6e+21) {
		tmp = x * Math.exp((a * -b));
	} else if ((y <= 2.4e+68) || !(y <= 3.4e+156)) {
		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 <= -6200.0:
		tmp = t_1
	elif y <= 4.6e+21:
		tmp = x * math.exp((a * -b))
	elif (y <= 2.4e+68) or not (y <= 3.4e+156):
		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 <= -6200.0)
		tmp = t_1;
	elseif (y <= 4.6e+21)
		tmp = Float64(x * exp(Float64(a * Float64(-b))));
	elseif ((y <= 2.4e+68) || !(y <= 3.4e+156))
		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 <= -6200.0)
		tmp = t_1;
	elseif (y <= 4.6e+21)
		tmp = x * exp((a * -b));
	elseif ((y <= 2.4e+68) || ~((y <= 3.4e+156)))
		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, -6200.0], t$95$1, If[LessEqual[y, 4.6e+21], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 2.4e+68], N[Not[LessEqual[y, 3.4e+156]], $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 -6200:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 2.4 \cdot 10^{+68} \lor \neg \left(y \leq 3.4 \cdot 10^{+156}\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 < -6200 or 4.6e21 < y < 2.40000000000000008e68 or 3.4000000000000001e156 < y

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

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

      \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
    4. Step-by-step derivation
      1. *-commutative78.4%

        \[\leadsto \color{blue}{{z}^{y} \cdot x} \]
    5. Simplified78.4%

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

    if -6200 < y < 4.6e21

    1. Initial program 96.2%

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

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

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

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

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

    if 2.40000000000000008e68 < y < 3.4000000000000001e156

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6200:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{+21}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+68} \lor \neg \left(y \leq 3.4 \cdot 10^{+156}\right):\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\ \end{array} \]

Alternative 5: 76.4% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot {z}^{y}\\ \mathbf{if}\;y \leq -350:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.18 \cdot 10^{+20}:\\ \;\;\;\;x \cdot e^{\left(-a\right) \cdot \left(z + b\right)}\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{+68} \lor \neg \left(y \leq 1.9 \cdot 10^{+160}\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 -350.0)
     t_1
     (if (<= y 1.18e+20)
       (* x (exp (* (- a) (+ z b))))
       (if (or (<= y 3.9e+68) (not (<= y 1.9e+160)))
         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 <= -350.0) {
		tmp = t_1;
	} else if (y <= 1.18e+20) {
		tmp = x * exp((-a * (z + b)));
	} else if ((y <= 3.9e+68) || !(y <= 1.9e+160)) {
		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 <= (-350.0d0)) then
        tmp = t_1
    else if (y <= 1.18d+20) then
        tmp = x * exp((-a * (z + b)))
    else if ((y <= 3.9d+68) .or. (.not. (y <= 1.9d+160))) 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 <= -350.0) {
		tmp = t_1;
	} else if (y <= 1.18e+20) {
		tmp = x * Math.exp((-a * (z + b)));
	} else if ((y <= 3.9e+68) || !(y <= 1.9e+160)) {
		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 <= -350.0:
		tmp = t_1
	elif y <= 1.18e+20:
		tmp = x * math.exp((-a * (z + b)))
	elif (y <= 3.9e+68) or not (y <= 1.9e+160):
		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 <= -350.0)
		tmp = t_1;
	elseif (y <= 1.18e+20)
		tmp = Float64(x * exp(Float64(Float64(-a) * Float64(z + b))));
	elseif ((y <= 3.9e+68) || !(y <= 1.9e+160))
		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 <= -350.0)
		tmp = t_1;
	elseif (y <= 1.18e+20)
		tmp = x * exp((-a * (z + b)));
	elseif ((y <= 3.9e+68) || ~((y <= 1.9e+160)))
		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, -350.0], t$95$1, If[LessEqual[y, 1.18e+20], N[(x * N[Exp[N[((-a) * N[(z + b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 3.9e+68], N[Not[LessEqual[y, 1.9e+160]], $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 -350:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 3.9 \cdot 10^{+68} \lor \neg \left(y \leq 1.9 \cdot 10^{+160}\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 < -350 or 1.18e20 < y < 3.90000000000000019e68 or 1.90000000000000006e160 < y

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

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

      \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
    4. Step-by-step derivation
      1. *-commutative78.4%

        \[\leadsto \color{blue}{{z}^{y} \cdot x} \]
    5. Simplified78.4%

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

    if -350 < y < 1.18e20

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.90000000000000019e68 < y < 1.90000000000000006e160

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -350:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq 1.18 \cdot 10^{+20}:\\ \;\;\;\;x \cdot e^{\left(-a\right) \cdot \left(z + b\right)}\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{+68} \lor \neg \left(y \leq 1.9 \cdot 10^{+160}\right):\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\ \end{array} \]

Alternative 6: 74.0% accurate, 2.9× speedup?

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

    1. Initial program 98.4%

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

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

      \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
    4. Step-by-step derivation
      1. *-commutative73.4%

        \[\leadsto \color{blue}{{z}^{y} \cdot x} \]
    5. Simplified73.4%

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

    if -20 < y < 2.15e15

    1. Initial program 96.2%

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

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

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

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

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

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

Alternative 7: 54.8% accurate, 3.0× speedup?

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

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

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


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

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

    if -3600 < t

    1. Initial program 96.9%

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

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

      \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
    4. Step-by-step derivation
      1. *-commutative68.7%

        \[\leadsto \color{blue}{{z}^{y} \cdot x} \]
    5. Simplified68.7%

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

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

Alternative 8: 27.9% accurate, 22.1× speedup?

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

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

\mathbf{elif}\;y \leq -4.1 \cdot 10^{+33}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 2.6 \cdot 10^{-45}:\\
\;\;\;\;x\\

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


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

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.6e190 < y < -4.09999999999999995e33 or 2.59999999999999987e-45 < y

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(x \cdot a\right)} \cdot z \]
      4. *-commutative28.6%

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

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

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

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

    if -4.09999999999999995e33 < y < -2.6e-75

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6e-75 < y < 2.59999999999999987e-45

    1. Initial program 96.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.6 \cdot 10^{+190}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{+33}:\\ \;\;\;\;\left(-z\right) \cdot \left(x \cdot a\right)\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-75}:\\ \;\;\;\;\left(-b\right) \cdot \left(x \cdot a\right)\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-45}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\left(-z\right) \cdot \left(x \cdot a\right)\\ \end{array} \]

Alternative 9: 27.9% accurate, 22.1× speedup?

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

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

\mathbf{elif}\;y \leq -7.4 \cdot 10^{+35}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 2.1 \cdot 10^{-46}:\\
\;\;\;\;x\\

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


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

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.9e188 < y < -7.4e35 or 2.09999999999999987e-46 < y

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(x \cdot a\right)} \cdot z \]
      4. *-commutative28.6%

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

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

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

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

    if -7.4e35 < y < -8.0000000000000003e-83

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.0000000000000003e-83 < y < 2.09999999999999987e-46

    1. Initial program 96.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.9 \cdot 10^{+188}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \mathbf{elif}\;y \leq -7.4 \cdot 10^{+35}:\\ \;\;\;\;\left(-z\right) \cdot \left(x \cdot a\right)\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-83}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-46}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\left(-z\right) \cdot \left(x \cdot a\right)\\ \end{array} \]

Alternative 10: 32.2% accurate, 23.9× speedup?

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

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

\mathbf{elif}\;y \leq -3.5 \cdot 10^{-77}:\\
\;\;\;\;a \cdot \left(z \cdot \left(-x\right)\right)\\

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6e112 < y < -3.50000000000000013e-77

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.50000000000000013e-77 < y < 5.19999999999999973e-45

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

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

    if 5.19999999999999973e-45 < y

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{z \cdot \left(x \cdot a\right)} \]
      5. distribute-rgt-neg-in31.7%

        \[\leadsto \color{blue}{z \cdot \left(-x \cdot a\right)} \]
      6. distribute-rgt-neg-in31.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.6 \cdot 10^{+112}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \leq -3.5 \cdot 10^{-77}:\\ \;\;\;\;a \cdot \left(z \cdot \left(-x\right)\right)\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{-45}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-z\right) \cdot \left(x \cdot a\right)\\ \end{array} \]

Alternative 11: 31.3% accurate, 23.9× speedup?

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

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

\mathbf{elif}\;y \leq -2.6 \cdot 10^{-75}:\\
\;\;\;\;a \cdot \left(z \cdot \left(-x\right)\right)\\

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.69999999999999997e112 < y < -2.6e-75

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6e-75 < y < 5.19999999999999973e-45

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

    if 5.19999999999999973e-45 < y

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{z \cdot \left(x \cdot a\right)} \]
      5. distribute-rgt-neg-in31.7%

        \[\leadsto \color{blue}{z \cdot \left(-x \cdot a\right)} \]
      6. distribute-rgt-neg-in31.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+112}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-75}:\\ \;\;\;\;a \cdot \left(z \cdot \left(-x\right)\right)\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{-45}:\\ \;\;\;\;x - a \cdot \left(x \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-z\right) \cdot \left(x \cdot a\right)\\ \end{array} \]

Alternative 12: 31.2% accurate, 23.9× speedup?

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

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

\mathbf{elif}\;y \leq -2.6 \cdot 10^{-75}:\\
\;\;\;\;a \cdot \left(z \cdot \left(-x\right)\right)\\

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

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


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

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

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

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

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

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

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

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

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

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

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

    if -1.0499999999999999e112 < y < -2.6e-75

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6e-75 < y < 5.19999999999999973e-45

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

    if 5.19999999999999973e-45 < y

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{z \cdot \left(x \cdot a\right)} \]
      5. distribute-rgt-neg-in31.7%

        \[\leadsto \color{blue}{z \cdot \left(-x \cdot a\right)} \]
      6. distribute-rgt-neg-in31.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.05 \cdot 10^{+112}:\\ \;\;\;\;x - t \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-75}:\\ \;\;\;\;a \cdot \left(z \cdot \left(-x\right)\right)\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{-45}:\\ \;\;\;\;x - a \cdot \left(x \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-z\right) \cdot \left(x \cdot a\right)\\ \end{array} \]

Alternative 13: 27.9% accurate, 25.8× speedup?

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

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

\mathbf{elif}\;y \leq -2.6 \cdot 10^{-75}:\\
\;\;\;\;a \cdot \left(z \cdot \left(-x\right)\right)\\

\mathbf{elif}\;y \leq 2.9 \cdot 10^{-46}:\\
\;\;\;\;x\\

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


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

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7e188 < y < -2.6e-75

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6e-75 < y < 2.90000000000000005e-46

    1. Initial program 96.2%

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

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

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

    if 2.90000000000000005e-46 < y

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{z \cdot \left(x \cdot a\right)} \]
      5. distribute-rgt-neg-in31.7%

        \[\leadsto \color{blue}{z \cdot \left(-x \cdot a\right)} \]
      6. distribute-rgt-neg-in31.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{+188}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-75}:\\ \;\;\;\;a \cdot \left(z \cdot \left(-x\right)\right)\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{-46}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\left(-z\right) \cdot \left(x \cdot a\right)\\ \end{array} \]

Alternative 14: 28.0% accurate, 25.8× speedup?

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

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

\mathbf{elif}\;y \leq -1.05 \cdot 10^{-82}:\\
\;\;\;\;a \cdot \left(z \cdot \left(-x\right)\right)\\

\mathbf{elif}\;y \leq 3.4 \cdot 10^{-46}:\\
\;\;\;\;x\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.49999999999999997e112 < y < -1.05e-82

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.05e-82 < y < 3.39999999999999996e-46

    1. Initial program 96.2%

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

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

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

    if 3.39999999999999996e-46 < y

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{z \cdot \left(x \cdot a\right)} \]
      5. distribute-rgt-neg-in31.7%

        \[\leadsto \color{blue}{z \cdot \left(-x \cdot a\right)} \]
      6. distribute-rgt-neg-in31.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.5 \cdot 10^{+112}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \leq -1.05 \cdot 10^{-82}:\\ \;\;\;\;a \cdot \left(z \cdot \left(-x\right)\right)\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-46}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\left(-z\right) \cdot \left(x \cdot a\right)\\ \end{array} \]

Alternative 15: 27.3% accurate, 31.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{-75} \lor \neg \left(y \leq 4 \cdot 10^{-45}\right):\\
\;\;\;\;\left(-b\right) \cdot \left(x \cdot a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.6e-75 or 3.99999999999999994e-45 < 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 b around inf 37.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6e-75 < y < 3.99999999999999994e-45

    1. Initial program 96.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.6 \cdot 10^{-75} \lor \neg \left(y \leq 4 \cdot 10^{-45}\right):\\ \;\;\;\;\left(-b\right) \cdot \left(x \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 16: 19.7% 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.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 75.9%

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

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

    \[\leadsto x \]

Reproduce

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