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

Percentage Accurate: 96.3% → 99.5%
Time: 17.3s
Alternatives: 20
Speedup: 0.8×

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 20 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.3% accurate, 1.0× speedup?

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

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

Alternative 1: 99.5% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

Alternative 2: 96.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 6.5 \cdot 10^{+177}:\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}\\

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


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

    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)} \]

    if 6.5000000000000002e177 < a

    1. Initial program 80.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 83.8% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.4 \cdot 10^{+26} \lor \neg \left(a \leq 1.85 \cdot 10^{+97}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.4000000000000003e26 or 1.85e97 < a

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.4000000000000003e26 < a < 1.85e97

    1. Initial program 100.0%

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

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

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

Alternative 4: 74.3% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{+23} \lor \neg \left(a \leq 1.12 \cdot 10^{-12}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.10000000000000004e23 or 1.1200000000000001e-12 < a

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.10000000000000004e23 < a < 1.1200000000000001e-12

    1. Initial program 100.0%

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

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

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

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

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

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

Alternative 5: 73.2% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+37} \lor \neg \left(y \leq 8.6 \cdot 10^{+18}\right):\\
\;\;\;\;x \cdot {z}^{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.85e37 or 8.6e18 < y

    1. Initial program 97.3%

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

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

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

    if -1.85e37 < y < 8.6e18

    1. Initial program 95.7%

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

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

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

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

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

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

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

Alternative 6: 69.9% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.9 \cdot 10^{+22} \lor \neg \left(a \leq 3.9 \cdot 10^{-13}\right):\\
\;\;\;\;x \cdot e^{b \cdot \left(-a\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.8999999999999998e22 or 3.90000000000000004e-13 < a

    1. Initial program 92.9%

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

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

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

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

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

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

    if -6.8999999999999998e22 < a < 3.90000000000000004e-13

    1. Initial program 100.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.9 \cdot 10^{+22} \lor \neg \left(a \leq 3.9 \cdot 10^{-13}\right):\\ \;\;\;\;x \cdot e^{b \cdot \left(-a\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\ \end{array} \]

Alternative 7: 57.1% accurate, 2.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.49999999999999975e-31 or 1.44999999999999993e-62 < y

    1. Initial program 97.3%

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

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

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

    if -7.49999999999999975e-31 < y < 1.44999999999999993e-62

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{b \cdot b - z \cdot z}{b - z}} \cdot \left(a \cdot x\right) \]
      2. associate-*l/55.2%

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

        \[\leadsto x - \frac{\left(b \cdot b - z \cdot z\right) \cdot \color{blue}{\left(x \cdot a\right)}}{b - z} \]
    12. Applied egg-rr55.2%

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

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

Alternative 8: 32.1% accurate, 16.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -9 \cdot 10^{+87}:\\
\;\;\;\;x - \frac{\left(b \cdot b - z \cdot z\right) \cdot \left(x \cdot a\right)}{b - z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.0000000000000005e87

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{b \cdot b - z \cdot z}{b - z}} \cdot \left(a \cdot x\right) \]
      2. associate-*l/47.2%

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

        \[\leadsto x - \frac{\left(b \cdot b - z \cdot z\right) \cdot \color{blue}{\left(x \cdot a\right)}}{b - z} \]
    12. Applied egg-rr47.2%

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

    if -9.0000000000000005e87 < a < 1.00000000000000004e154

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000004e154 < a

    1. Initial program 82.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 27.7% accurate, 19.3× speedup?

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

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

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

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

\mathbf{elif}\;y \leq 1.3 \cdot 10^{-11}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -2.6000000000000001e199 or 2.70000000000000019e148 < y

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6000000000000001e199 < y < -4.5000000000000002e141

    1. Initial program 84.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(-x\right) \cdot \left(y \cdot t\right)\right)\right)} \]
      2. expm1-udef23.8%

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(y \cdot t\right) \cdot \left(-x\right)}\right)} - 1 \]
      4. associate-*l*23.8%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{y \cdot \left(t \cdot \left(-x\right)\right)}\right)} - 1 \]
      5. add-sqr-sqrt8.0%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)}\right)\right)} - 1 \]
      6. sqrt-unprod38.7%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}\right)\right)} - 1 \]
      7. sqr-neg38.7%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \sqrt{\color{blue}{x \cdot x}}\right)\right)} - 1 \]
      8. sqrt-unprod23.8%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}\right)\right)} - 1 \]
      9. add-sqr-sqrt31.6%

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(y \cdot \left(t \cdot x\right)\right)\right)} \]
      2. expm1-log1p41.0%

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

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

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

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

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

    if -4.5000000000000002e141 < y < -1.34999999999999996e-43

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.34999999999999996e-43 < y < 1.3e-11

    1. Initial program 94.6%

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

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

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

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

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

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

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

    if 1.3e-11 < y < 2.70000000000000019e148

    1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.6 \cdot 10^{+199}:\\ \;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{+141}:\\ \;\;\;\;t \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{-43}:\\ \;\;\;\;x \cdot \left(b \cdot \left(-a\right)\right)\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{-11}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{+148}:\\ \;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\ \end{array} \]

Alternative 10: 34.0% accurate, 20.7× speedup?

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

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

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

\mathbf{elif}\;y \leq -4.5 \cdot 10^{-26}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.9999999999999998e202 or -3.45e124 < y < -4.4999999999999999e-26

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999998e202 < y < -3.45e124

    1. Initial program 86.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.4999999999999999e-26 < y < 7.5e-12

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.5e-12 < 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 0 41.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2 \cdot 10^{+202}:\\ \;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \leq -3.45 \cdot 10^{+124}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{-26}:\\ \;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{-12}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\ \end{array} \]

Alternative 11: 34.0% accurate, 20.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -4.29999999999999982e198

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.29999999999999982e198 < y < -4.6000000000000003e132

    1. Initial program 86.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.6000000000000003e132 < y < -4.4999999999999999e-26

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.4999999999999999e-26 < y < 1.35000000000000002e-11

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.35000000000000002e-11 < 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 0 41.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.3 \cdot 10^{+198}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{elif}\;y \leq -4.6 \cdot 10^{+132}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{-26}:\\ \;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \leq 1.35 \cdot 10^{-11}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\ \end{array} \]

Alternative 12: 29.3% accurate, 22.1× speedup?

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

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

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

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

\mathbf{elif}\;y \leq 2.7 \cdot 10^{-11}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.65e201

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.65e201 < y < -3.10000000000000004e141

    1. Initial program 84.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(-x\right) \cdot \left(y \cdot t\right)\right)\right)} \]
      2. expm1-udef23.8%

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(y \cdot t\right) \cdot \left(-x\right)}\right)} - 1 \]
      4. associate-*l*23.8%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{y \cdot \left(t \cdot \left(-x\right)\right)}\right)} - 1 \]
      5. add-sqr-sqrt8.0%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)}\right)\right)} - 1 \]
      6. sqrt-unprod38.7%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}\right)\right)} - 1 \]
      7. sqr-neg38.7%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \sqrt{\color{blue}{x \cdot x}}\right)\right)} - 1 \]
      8. sqrt-unprod23.8%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}\right)\right)} - 1 \]
      9. add-sqr-sqrt31.6%

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(y \cdot \left(t \cdot x\right)\right)\right)} \]
      2. expm1-log1p41.0%

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

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

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

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

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

    if -3.10000000000000004e141 < y < -2.00000000000000015e-43

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.00000000000000015e-43 < y < 2.70000000000000005e-11

    1. Initial program 94.6%

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

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

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

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

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

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

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

    if 2.70000000000000005e-11 < 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 0 41.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.65 \cdot 10^{+201}:\\ \;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{+141}:\\ \;\;\;\;t \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-43}:\\ \;\;\;\;x \cdot \left(b \cdot \left(-a\right)\right)\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-11}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\ \end{array} \]

Alternative 13: 28.0% accurate, 25.8× speedup?

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

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

\mathbf{elif}\;y \leq 1.25 \cdot 10^{-11}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.4999999999999999e-26 or 9.70000000000000053e148 < 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 t around inf 63.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.4999999999999999e-26 < y < 1.25000000000000005e-11

    1. Initial program 94.8%

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

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

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

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

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

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

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

    if 1.25000000000000005e-11 < y < 9.70000000000000053e148

    1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{-26}:\\ \;\;\;\;y \cdot \left(t \cdot \left(-x\right)\right)\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-11}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 9.7 \cdot 10^{+148}:\\ \;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(t \cdot \left(-x\right)\right)\\ \end{array} \]

Alternative 14: 31.6% accurate, 28.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.2 \cdot 10^{+88}:\\
\;\;\;\;x - \left(z + b\right) \cdot \left(x \cdot a\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.2e88

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2e88 < a < 8e153

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

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

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

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

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

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

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

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

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

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

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

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

    if 8e153 < a

    1. Initial program 82.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{+88}:\\ \;\;\;\;x - \left(z + b\right) \cdot \left(x \cdot a\right)\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+153}:\\ \;\;\;\;x - x \cdot \left(y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\ \end{array} \]

Alternative 15: 27.2% accurate, 31.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-43} \lor \neg \left(y \leq 0.028\right):\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.00000000000000015e-43 or 0.0280000000000000006 < y

    1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.00000000000000015e-43 < y < 0.0280000000000000006

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

Alternative 16: 27.3% accurate, 31.1× speedup?

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

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

\mathbf{elif}\;y \leq 1.7 \cdot 10^{-11}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.40000000000000009e-44

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.40000000000000009e-44 < y < 1.6999999999999999e-11

    1. Initial program 94.6%

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

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

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

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

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

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

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

    if 1.6999999999999999e-11 < 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 b around inf 40.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{-44}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-11}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\ \end{array} \]

Alternative 17: 28.4% accurate, 31.1× speedup?

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

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

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

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


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

    1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.1999999999999997e-27 < y < 2.0999999999999999e-11

    1. Initial program 94.8%

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

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

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

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

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

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

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

    if 2.0999999999999999e-11 < 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 0 41.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{z \cdot \left(x \cdot a\right)} \]
      4. distribute-rgt-neg-in30.9%

        \[\leadsto \color{blue}{z \cdot \left(-x \cdot a\right)} \]
      5. distribute-rgt-neg-in30.9%

        \[\leadsto z \cdot \color{blue}{\left(x \cdot \left(-a\right)\right)} \]
    13. Simplified30.9%

      \[\leadsto \color{blue}{z \cdot \left(x \cdot \left(-a\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification33.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{-27}:\\ \;\;\;\;y \cdot \left(t \cdot \left(-x\right)\right)\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-11}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\left(-z\right) \cdot \left(x \cdot a\right)\\ \end{array} \]

Alternative 18: 22.3% accurate, 34.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{+26}:\\ \;\;\;\;t \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq 0.09:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -2.4e+26) (* t (* x y)) (if (<= y 0.09) x (* y (* x t)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -2.4e+26) {
		tmp = t * (x * y);
	} else if (y <= 0.09) {
		tmp = x;
	} else {
		tmp = y * (x * t);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (y <= (-2.4d+26)) then
        tmp = t * (x * y)
    else if (y <= 0.09d0) then
        tmp = x
    else
        tmp = y * (x * t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -2.4e+26) {
		tmp = t * (x * y);
	} else if (y <= 0.09) {
		tmp = x;
	} else {
		tmp = y * (x * t);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -2.4e+26:
		tmp = t * (x * y)
	elif y <= 0.09:
		tmp = x
	else:
		tmp = y * (x * t)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -2.4e+26)
		tmp = Float64(t * Float64(x * y));
	elseif (y <= 0.09)
		tmp = x;
	else
		tmp = Float64(y * Float64(x * t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= -2.4e+26)
		tmp = t * (x * y);
	elseif (y <= 0.09)
		tmp = x;
	else
		tmp = y * (x * t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.4e+26], N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.09], x, N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{+26}:\\
\;\;\;\;t \cdot \left(x \cdot y\right)\\

\mathbf{elif}\;y \leq 0.09:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot t\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.40000000000000005e26

    1. Initial program 96.6%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Taylor expanded in t around inf 54.8%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(y \cdot t\right)}} \]
    3. Step-by-step derivation
      1. mul-1-neg54.8%

        \[\leadsto x \cdot e^{\color{blue}{-y \cdot t}} \]
      2. distribute-rgt-neg-out54.8%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    4. Simplified54.8%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Taylor expanded in y around 0 19.4%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(t \cdot x\right)\right) + x} \]
    6. Step-by-step derivation
      1. +-commutative19.4%

        \[\leadsto \color{blue}{x + -1 \cdot \left(y \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg19.4%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(t \cdot x\right)\right)} \]
      3. unsub-neg19.4%

        \[\leadsto \color{blue}{x - y \cdot \left(t \cdot x\right)} \]
      4. associate-*r*24.3%

        \[\leadsto x - \color{blue}{\left(y \cdot t\right) \cdot x} \]
      5. *-commutative24.3%

        \[\leadsto x - \color{blue}{x \cdot \left(y \cdot t\right)} \]
    7. Simplified24.3%

      \[\leadsto \color{blue}{x - x \cdot \left(y \cdot t\right)} \]
    8. Taylor expanded in y around inf 24.0%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(t \cdot x\right)\right)} \]
    9. Step-by-step derivation
      1. mul-1-neg24.0%

        \[\leadsto \color{blue}{-y \cdot \left(t \cdot x\right)} \]
      2. associate-*r*25.8%

        \[\leadsto -\color{blue}{\left(y \cdot t\right) \cdot x} \]
      3. *-commutative25.8%

        \[\leadsto -\color{blue}{x \cdot \left(y \cdot t\right)} \]
      4. distribute-lft-neg-in25.8%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \left(y \cdot t\right)} \]
    10. Simplified25.8%

      \[\leadsto \color{blue}{\left(-x\right) \cdot \left(y \cdot t\right)} \]
    11. Step-by-step derivation
      1. expm1-log1p-u16.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(-x\right) \cdot \left(y \cdot t\right)\right)\right)} \]
      2. expm1-udef26.7%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(-x\right) \cdot \left(y \cdot t\right)\right)} - 1} \]
      3. *-commutative26.7%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(y \cdot t\right) \cdot \left(-x\right)}\right)} - 1 \]
      4. associate-*l*23.4%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{y \cdot \left(t \cdot \left(-x\right)\right)}\right)} - 1 \]
      5. add-sqr-sqrt5.5%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)}\right)\right)} - 1 \]
      6. sqrt-unprod23.0%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}\right)\right)} - 1 \]
      7. sqr-neg23.0%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \sqrt{\color{blue}{x \cdot x}}\right)\right)} - 1 \]
      8. sqrt-unprod12.6%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}\right)\right)} - 1 \]
      9. add-sqr-sqrt17.9%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \color{blue}{x}\right)\right)} - 1 \]
    12. Applied egg-rr17.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(y \cdot \left(t \cdot x\right)\right)} - 1} \]
    13. Step-by-step derivation
      1. expm1-def11.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(y \cdot \left(t \cdot x\right)\right)\right)} \]
      2. expm1-log1p13.8%

        \[\leadsto \color{blue}{y \cdot \left(t \cdot x\right)} \]
      3. associate-*r*10.6%

        \[\leadsto \color{blue}{\left(y \cdot t\right) \cdot x} \]
      4. *-commutative10.6%

        \[\leadsto \color{blue}{\left(t \cdot y\right)} \cdot x \]
      5. associate-*l*13.8%

        \[\leadsto \color{blue}{t \cdot \left(y \cdot x\right)} \]
    14. Simplified13.8%

      \[\leadsto \color{blue}{t \cdot \left(y \cdot x\right)} \]

    if -2.40000000000000005e26 < y < 0.089999999999999997

    1. Initial program 95.4%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Taylor expanded in b around inf 77.0%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    3. Step-by-step derivation
      1. associate-*r*77.0%

        \[\leadsto x \cdot e^{\color{blue}{\left(-1 \cdot a\right) \cdot b}} \]
      2. *-commutative77.0%

        \[\leadsto x \cdot e^{\color{blue}{b \cdot \left(-1 \cdot a\right)}} \]
      3. neg-mul-177.0%

        \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(-a\right)}} \]
    4. Simplified77.0%

      \[\leadsto x \cdot e^{\color{blue}{b \cdot \left(-a\right)}} \]
    5. Taylor expanded in b around 0 37.8%

      \[\leadsto \color{blue}{x} \]

    if 0.089999999999999997 < 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 t around inf 68.5%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(y \cdot t\right)}} \]
    3. Step-by-step derivation
      1. mul-1-neg68.5%

        \[\leadsto x \cdot e^{\color{blue}{-y \cdot t}} \]
      2. distribute-rgt-neg-out68.5%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    4. Simplified68.5%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Taylor expanded in y around 0 16.1%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(t \cdot x\right)\right) + x} \]
    6. Step-by-step derivation
      1. +-commutative16.1%

        \[\leadsto \color{blue}{x + -1 \cdot \left(y \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg16.1%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(t \cdot x\right)\right)} \]
      3. unsub-neg16.1%

        \[\leadsto \color{blue}{x - y \cdot \left(t \cdot x\right)} \]
      4. associate-*r*22.3%

        \[\leadsto x - \color{blue}{\left(y \cdot t\right) \cdot x} \]
      5. *-commutative22.3%

        \[\leadsto x - \color{blue}{x \cdot \left(y \cdot t\right)} \]
    7. Simplified22.3%

      \[\leadsto \color{blue}{x - x \cdot \left(y \cdot t\right)} \]
    8. Taylor expanded in y around inf 25.1%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(t \cdot x\right)\right)} \]
    9. Step-by-step derivation
      1. mul-1-neg25.1%

        \[\leadsto \color{blue}{-y \cdot \left(t \cdot x\right)} \]
      2. associate-*r*29.8%

        \[\leadsto -\color{blue}{\left(y \cdot t\right) \cdot x} \]
      3. *-commutative29.8%

        \[\leadsto -\color{blue}{x \cdot \left(y \cdot t\right)} \]
      4. distribute-lft-neg-in29.8%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \left(y \cdot t\right)} \]
    10. Simplified29.8%

      \[\leadsto \color{blue}{\left(-x\right) \cdot \left(y \cdot t\right)} \]
    11. Step-by-step derivation
      1. expm1-log1p-u24.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(-x\right) \cdot \left(y \cdot t\right)\right)\right)} \]
      2. expm1-udef30.5%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(-x\right) \cdot \left(y \cdot t\right)\right)} - 1} \]
      3. *-commutative30.5%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(y \cdot t\right) \cdot \left(-x\right)}\right)} - 1 \]
      4. associate-*l*24.3%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{y \cdot \left(t \cdot \left(-x\right)\right)}\right)} - 1 \]
      5. add-sqr-sqrt7.0%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)}\right)\right)} - 1 \]
      6. sqrt-unprod20.4%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}\right)\right)} - 1 \]
      7. sqr-neg20.4%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \sqrt{\color{blue}{x \cdot x}}\right)\right)} - 1 \]
      8. sqrt-unprod8.5%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}\right)\right)} - 1 \]
      9. add-sqr-sqrt15.4%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \color{blue}{x}\right)\right)} - 1 \]
    12. Applied egg-rr15.4%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(y \cdot \left(t \cdot x\right)\right)} - 1} \]
    13. Step-by-step derivation
      1. expm1-def10.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(y \cdot \left(t \cdot x\right)\right)\right)} \]
      2. expm1-log1p11.2%

        \[\leadsto \color{blue}{y \cdot \left(t \cdot x\right)} \]
      3. *-commutative11.2%

        \[\leadsto y \cdot \color{blue}{\left(x \cdot t\right)} \]
    14. Simplified11.2%

      \[\leadsto \color{blue}{y \cdot \left(x \cdot t\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification26.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{+26}:\\ \;\;\;\;t \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq 0.09:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot t\right)\\ \end{array} \]

Alternative 19: 20.4% accurate, 44.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 1.2 \cdot 10^{+155}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(x \cdot y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b) :precision binary64 (if (<= a 1.2e+155) x (* t (* x y))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= 1.2e+155) {
		tmp = x;
	} else {
		tmp = t * (x * 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 (a <= 1.2d+155) then
        tmp = x
    else
        tmp = t * (x * 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 (a <= 1.2e+155) {
		tmp = x;
	} else {
		tmp = t * (x * y);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= 1.2e+155:
		tmp = x
	else:
		tmp = t * (x * y)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= 1.2e+155)
		tmp = x;
	else
		tmp = Float64(t * Float64(x * y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (a <= 1.2e+155)
		tmp = x;
	else
		tmp = t * (x * y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 1.2e+155], x, N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.2 \cdot 10^{+155}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t \cdot \left(x \cdot y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 1.2000000000000001e155

    1. Initial program 98.5%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Taylor expanded in b around inf 56.6%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    3. Step-by-step derivation
      1. associate-*r*56.6%

        \[\leadsto x \cdot e^{\color{blue}{\left(-1 \cdot a\right) \cdot b}} \]
      2. *-commutative56.6%

        \[\leadsto x \cdot e^{\color{blue}{b \cdot \left(-1 \cdot a\right)}} \]
      3. neg-mul-156.6%

        \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(-a\right)}} \]
    4. Simplified56.6%

      \[\leadsto x \cdot e^{\color{blue}{b \cdot \left(-a\right)}} \]
    5. Taylor expanded in b around 0 24.3%

      \[\leadsto \color{blue}{x} \]

    if 1.2000000000000001e155 < a

    1. Initial program 82.1%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Taylor expanded in t around inf 26.6%

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(y \cdot t\right)}} \]
    3. Step-by-step derivation
      1. mul-1-neg26.6%

        \[\leadsto x \cdot e^{\color{blue}{-y \cdot t}} \]
      2. distribute-rgt-neg-out26.6%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    4. Simplified26.6%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    5. Taylor expanded in y around 0 11.8%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(t \cdot x\right)\right) + x} \]
    6. Step-by-step derivation
      1. +-commutative11.8%

        \[\leadsto \color{blue}{x + -1 \cdot \left(y \cdot \left(t \cdot x\right)\right)} \]
      2. mul-1-neg11.8%

        \[\leadsto x + \color{blue}{\left(-y \cdot \left(t \cdot x\right)\right)} \]
      3. unsub-neg11.8%

        \[\leadsto \color{blue}{x - y \cdot \left(t \cdot x\right)} \]
      4. associate-*r*11.7%

        \[\leadsto x - \color{blue}{\left(y \cdot t\right) \cdot x} \]
      5. *-commutative11.7%

        \[\leadsto x - \color{blue}{x \cdot \left(y \cdot t\right)} \]
    7. Simplified11.7%

      \[\leadsto \color{blue}{x - x \cdot \left(y \cdot t\right)} \]
    8. Taylor expanded in y around inf 26.1%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(t \cdot x\right)\right)} \]
    9. Step-by-step derivation
      1. mul-1-neg26.1%

        \[\leadsto \color{blue}{-y \cdot \left(t \cdot x\right)} \]
      2. associate-*r*26.2%

        \[\leadsto -\color{blue}{\left(y \cdot t\right) \cdot x} \]
      3. *-commutative26.2%

        \[\leadsto -\color{blue}{x \cdot \left(y \cdot t\right)} \]
      4. distribute-lft-neg-in26.2%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \left(y \cdot t\right)} \]
    10. Simplified26.2%

      \[\leadsto \color{blue}{\left(-x\right) \cdot \left(y \cdot t\right)} \]
    11. Step-by-step derivation
      1. expm1-log1p-u19.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(-x\right) \cdot \left(y \cdot t\right)\right)\right)} \]
      2. expm1-udef31.1%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(-x\right) \cdot \left(y \cdot t\right)\right)} - 1} \]
      3. *-commutative31.1%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(y \cdot t\right) \cdot \left(-x\right)}\right)} - 1 \]
      4. associate-*l*31.1%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{y \cdot \left(t \cdot \left(-x\right)\right)}\right)} - 1 \]
      5. add-sqr-sqrt18.5%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)}\right)\right)} - 1 \]
      6. sqrt-unprod30.9%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}\right)\right)} - 1 \]
      7. sqr-neg30.9%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \sqrt{\color{blue}{x \cdot x}}\right)\right)} - 1 \]
      8. sqrt-unprod15.5%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}\right)\right)} - 1 \]
      9. add-sqr-sqrt33.9%

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(t \cdot \color{blue}{x}\right)\right)} - 1 \]
    12. Applied egg-rr33.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(y \cdot \left(t \cdot x\right)\right)} - 1} \]
    13. Step-by-step derivation
      1. expm1-def22.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(y \cdot \left(t \cdot x\right)\right)\right)} \]
      2. expm1-log1p23.2%

        \[\leadsto \color{blue}{y \cdot \left(t \cdot x\right)} \]
      3. associate-*r*23.3%

        \[\leadsto \color{blue}{\left(y \cdot t\right) \cdot x} \]
      4. *-commutative23.3%

        \[\leadsto \color{blue}{\left(t \cdot y\right)} \cdot x \]
      5. associate-*l*23.3%

        \[\leadsto \color{blue}{t \cdot \left(y \cdot x\right)} \]
    14. Simplified23.3%

      \[\leadsto \color{blue}{t \cdot \left(y \cdot x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification24.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 1.2 \cdot 10^{+155}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(x \cdot y\right)\\ \end{array} \]

Alternative 20: 19.0% accurate, 315.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
def code(x, y, z, t, a, b):
	return x
function code(x, y, z, t, a, b)
	return x
end
function tmp = code(x, y, z, t, a, b)
	tmp = x;
end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 96.4%

    \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
  2. Taylor expanded in b around inf 60.3%

    \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
  3. Step-by-step derivation
    1. associate-*r*60.3%

      \[\leadsto x \cdot e^{\color{blue}{\left(-1 \cdot a\right) \cdot b}} \]
    2. *-commutative60.3%

      \[\leadsto x \cdot e^{\color{blue}{b \cdot \left(-1 \cdot a\right)}} \]
    3. neg-mul-160.3%

      \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(-a\right)}} \]
  4. Simplified60.3%

    \[\leadsto x \cdot e^{\color{blue}{b \cdot \left(-a\right)}} \]
  5. Taylor expanded in b around 0 22.0%

    \[\leadsto \color{blue}{x} \]
  6. Final simplification22.0%

    \[\leadsto x \]

Reproduce

?
herbie shell --seed 2023224 
(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))))))