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

Percentage Accurate: 96.8% → 99.6%
Time: 21.0s
Alternatives: 22
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 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.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.6% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

Alternative 2: 96.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 3: 86.7% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{-28} \lor \neg \left(y \leq 2.35 \cdot 10^{-26}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.4000000000000002e-28 or 2.34999999999999995e-26 < y

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

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

    if -2.4000000000000002e-28 < y < 2.34999999999999995e-26

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 74.0% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{+19}:\\
\;\;\;\;x \cdot {z}^{y}\\

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

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


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

    1. Initial program 96.8%

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

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

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

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

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

    if -9.2e19 < y < 1.8000000000000001e-26

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8000000000000001e-26 < y

    1. Initial program 95.5%

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative68.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)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.2 \cdot 10^{+19}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-26}:\\ \;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\ \end{array} \]

Alternative 5: 72.3% accurate, 2.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.6e18 or 9.20000000000000035e-26 < y

    1. Initial program 96.1%

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

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

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

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

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

    if -1.6e18 < y < 9.20000000000000035e-26

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

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

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

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

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

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

Alternative 6: 69.8% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.5 \cdot 10^{+92} \lor \neg \left(b \leq 5.8 \cdot 10^{+41}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.50000000000000011e92 or 5.79999999999999977e41 < b

    1. Initial program 96.2%

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

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

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

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

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

    if -2.50000000000000011e92 < b < 5.79999999999999977e41

    1. Initial program 95.5%

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

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

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

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

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

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

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

Alternative 7: 55.2% accurate, 2.9× speedup?

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

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

\mathbf{elif}\;t \leq -0.007:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\

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


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

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x - t \cdot \left(x \cdot y\right)\right)} + 0.5 \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right) \]
      4. *-commutative50.3%

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

        \[\leadsto \left(x - t \cdot \left(y \cdot x\right)\right) + \color{blue}{\left(0.5 \cdot {t}^{2}\right) \cdot \left(x \cdot {y}^{2}\right)} \]
      6. unpow250.3%

        \[\leadsto \left(x - t \cdot \left(y \cdot x\right)\right) + \left(0.5 \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot \left(x \cdot {y}^{2}\right) \]
      7. *-commutative50.3%

        \[\leadsto \left(x - t \cdot \left(y \cdot x\right)\right) + \left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left({y}^{2} \cdot x\right)} \]
      8. unpow250.3%

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

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

      \[\leadsto \color{blue}{x \cdot \left(\left(1 + 0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right)\right) - t \cdot y\right)} \]
    9. Step-by-step derivation
      1. associate--l+50.3%

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

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

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

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

    if -1.35000000000000003e83 < t < -0.00700000000000000015

    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 0 63.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.00700000000000000015 < t

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{+83}:\\ \;\;\;\;x \cdot \left(1 + \left(0.5 \cdot \left(\left(t \cdot t\right) \cdot \left(y \cdot y\right)\right) - y \cdot t\right)\right)\\ \mathbf{elif}\;t \leq -0.007:\\ \;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \]

Alternative 8: 43.7% accurate, 14.9× speedup?

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

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

\mathbf{elif}\;y \leq 1.75 \cdot 10^{-19}:\\
\;\;\;\;x \cdot \left(1 + \left(t_1 \cdot \left(b \cdot b\right) - a \cdot b\right)\right)\\

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


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

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x - t \cdot \left(x \cdot y\right)\right)} + 0.5 \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right) \]
      4. *-commutative41.0%

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

        \[\leadsto \left(x - t \cdot \left(y \cdot x\right)\right) + \color{blue}{\left(0.5 \cdot {t}^{2}\right) \cdot \left(x \cdot {y}^{2}\right)} \]
      6. unpow241.0%

        \[\leadsto \left(x - t \cdot \left(y \cdot x\right)\right) + \left(0.5 \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot \left(x \cdot {y}^{2}\right) \]
      7. *-commutative41.0%

        \[\leadsto \left(x - t \cdot \left(y \cdot x\right)\right) + \left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left({y}^{2} \cdot x\right)} \]
      8. unpow241.0%

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

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

      \[\leadsto \color{blue}{x \cdot \left(\left(1 + 0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right)\right) - t \cdot y\right)} \]
    9. Step-by-step derivation
      1. associate--l+43.2%

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

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

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

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

    if -4.29999999999999984e-169 < y < 1.75000000000000008e-19

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - a \cdot \left(x \cdot b\right)\right) + 0.5 \cdot \left(\left(\left(a \cdot a\right) \cdot \color{blue}{\left(b \cdot b\right)}\right) \cdot x\right) \]
      8. unswap-sqr57.9%

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

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

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

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

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

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

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

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

    if 1.75000000000000008e-19 < y

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - a \cdot \left(x \cdot b\right)\right) + 0.5 \cdot \left(\left(\left(a \cdot a\right) \cdot \color{blue}{\left(b \cdot b\right)}\right) \cdot x\right) \]
      8. unswap-sqr19.3%

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

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

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

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

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

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

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

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

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

Alternative 9: 46.1% accurate, 14.9× speedup?

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

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

\mathbf{elif}\;y \leq 2.05 \cdot 10^{-20}:\\
\;\;\;\;x \cdot \left(1 + \left(t_1 \cdot \left(b \cdot b\right) - a \cdot b\right)\right)\\

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


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

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x - t \cdot \left(x \cdot y\right)\right)} + 0.5 \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right) \]
      4. *-commutative38.3%

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

        \[\leadsto \left(x - t \cdot \left(y \cdot x\right)\right) + \color{blue}{\left(0.5 \cdot {t}^{2}\right) \cdot \left(x \cdot {y}^{2}\right)} \]
      6. unpow238.3%

        \[\leadsto \left(x - t \cdot \left(y \cdot x\right)\right) + \left(0.5 \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot \left(x \cdot {y}^{2}\right) \]
      7. *-commutative38.3%

        \[\leadsto \left(x - t \cdot \left(y \cdot x\right)\right) + \left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left({y}^{2} \cdot x\right)} \]
      8. unpow238.3%

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

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

      \[\leadsto \color{blue}{x + \left(-1 \cdot \left(t \cdot \left(x \cdot y\right)\right) + 0.5 \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)\right)} \]
    9. Step-by-step derivation
      1. associate-+r+38.3%

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

        \[\leadsto \left(x + \color{blue}{\left(-t \cdot \left(x \cdot y\right)\right)}\right) + 0.5 \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right) \]
      3. sub-neg38.3%

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

        \[\leadsto \left(x - \color{blue}{\left(t \cdot x\right) \cdot y}\right) + 0.5 \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right) \]
      5. unpow242.0%

        \[\leadsto \left(x - \left(t \cdot x\right) \cdot y\right) + 0.5 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \left(x \cdot {y}^{2}\right)\right) \]
      6. unpow242.0%

        \[\leadsto \left(x - \left(t \cdot x\right) \cdot y\right) + 0.5 \cdot \left(\left(t \cdot t\right) \cdot \left(x \cdot \color{blue}{\left(y \cdot y\right)}\right)\right) \]
      7. associate-*l*47.2%

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

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

    if -5.80000000000000007e-105 < y < 2.05e-20

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.05e-20 < y

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - a \cdot \left(x \cdot b\right)\right) + 0.5 \cdot \left(\left(\left(a \cdot a\right) \cdot \color{blue}{\left(b \cdot b\right)}\right) \cdot x\right) \]
      8. unswap-sqr19.3%

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

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

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

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

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

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

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

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

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

Alternative 10: 42.1% accurate, 16.5× speedup?

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

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

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

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


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

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - t \cdot \left(y \cdot x\right)\right) + \color{blue}{\left(0.5 \cdot {t}^{2}\right) \cdot \left(x \cdot {y}^{2}\right)} \]
      6. unpow241.4%

        \[\leadsto \left(x - t \cdot \left(y \cdot x\right)\right) + \left(0.5 \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot \left(x \cdot {y}^{2}\right) \]
      7. *-commutative41.4%

        \[\leadsto \left(x - t \cdot \left(y \cdot x\right)\right) + \left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left({y}^{2} \cdot x\right)} \]
      8. unpow241.4%

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

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

      \[\leadsto \color{blue}{x \cdot \left(\left(1 + 0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right)\right) - t \cdot y\right)} \]
    9. Step-by-step derivation
      1. associate--l+43.6%

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

        \[\leadsto x \cdot \left(1 + \left(0.5 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot {y}^{2}\right) - t \cdot y\right)\right) \]
      3. unpow243.6%

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

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

    if -4.10000000000000019e-162 < y < 2.6500000000000001e-20

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.6500000000000001e-20 < y

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - a \cdot \left(x \cdot b\right)\right) + 0.5 \cdot \left(\left(\left(a \cdot a\right) \cdot \color{blue}{\left(b \cdot b\right)}\right) \cdot x\right) \]
      8. unswap-sqr19.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.1 \cdot 10^{-162}:\\ \;\;\;\;x \cdot \left(1 + \left(0.5 \cdot \left(\left(t \cdot t\right) \cdot \left(y \cdot y\right)\right) - y \cdot t\right)\right)\\ \mathbf{elif}\;y \leq 2.65 \cdot 10^{-20}:\\ \;\;\;\;x - x \cdot \left(a \cdot \left(z + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.5 \cdot \left(a \cdot a\right)\right) \cdot \left(x \cdot \left(b \cdot b\right)\right)\\ \end{array} \]

Alternative 11: 33.4% accurate, 18.3× speedup?

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

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

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

\mathbf{elif}\;a \leq 4.2 \cdot 10^{+238}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.06e-59 or 3.5000000000000001e119 < a < 4.20000000000000015e238

    1. Initial program 93.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - a \cdot \left(x \cdot b\right)\right) + 0.5 \cdot \color{blue}{\left(\left({a}^{2} \cdot {b}^{2}\right) \cdot x\right)} \]
      6. unpow241.9%

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

        \[\leadsto \left(x - a \cdot \left(x \cdot b\right)\right) + 0.5 \cdot \left(\left(\left(a \cdot a\right) \cdot \color{blue}{\left(b \cdot b\right)}\right) \cdot x\right) \]
      8. unswap-sqr37.5%

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

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

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

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

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

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

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

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

    if -1.06e-59 < a < 3.5000000000000001e119

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

    if 4.20000000000000015e238 < a

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.06 \cdot 10^{-59}:\\ \;\;\;\;\left(0.5 \cdot \left(a \cdot a\right)\right) \cdot \left(x \cdot \left(b \cdot b\right)\right)\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+119}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{+238}:\\ \;\;\;\;\left(0.5 \cdot \left(a \cdot a\right)\right) \cdot \left(x \cdot \left(b \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \end{array} \]

Alternative 12: 29.6% accurate, 20.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.31999999999999998e244

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.31999999999999998e244 < a < -1.65e94

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.65e94 < a < -1.0500000000000001e53

    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 0 64.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.0500000000000001e53 < a < 6.19999999999999962e97

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

    if 6.19999999999999962e97 < a

    1. Initial program 85.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 47.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.32 \cdot 10^{+244}:\\ \;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{+94}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{+53}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+97}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \end{array} \]

Alternative 13: 27.0% accurate, 22.1× speedup?

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

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

\mathbf{elif}\;y \leq 5.45 \cdot 10^{-219}:\\
\;\;\;\;x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.90000000000000014e-8 or 5.4499999999999997e-219 < y < 5.0000000000000002e-183

    1. Initial program 93.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(t \cdot y\right)}} \]
    3. Step-by-step derivation
      1. mul-1-neg54.8%

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

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative54.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.5%

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

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

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

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

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

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

    if -1.90000000000000014e-8 < y < 5.4499999999999997e-219 or 5.0000000000000002e-183 < y < 1.16000000000000005e-35

    1. Initial program 97.4%

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

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

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

    if 1.16000000000000005e-35 < y

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.9 \cdot 10^{-8}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \leq 5.45 \cdot 10^{-219}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 5 \cdot 10^{-183}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \leq 1.16 \cdot 10^{-35}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\ \end{array} \]

Alternative 14: 32.3% accurate, 24.0× speedup?

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

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

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

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


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

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.3000000000000001e-4 < y < 5.4999999999999997e-35

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.4999999999999997e-35 < y

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 31.1% accurate, 28.3× speedup?

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

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

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

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


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

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.55000000000000007e-5 < y < 5.4999999999999997e-35

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

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

    if 5.4999999999999997e-35 < y

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{-5}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{-35}:\\ \;\;\;\;x - a \cdot \left(x \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\ \end{array} \]

Alternative 16: 29.6% accurate, 28.3× speedup?

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

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

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

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


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

    1. Initial program 95.8%

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
      3. *-commutative63.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 31.1%

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

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

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

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

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

    if -3.6e-253 < y < 1.06e-35

    1. Initial program 95.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 91.5%

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

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

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

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

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

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

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

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

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

    if 1.06e-35 < y

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.6 \cdot 10^{-253}:\\ \;\;\;\;x - t \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq 1.06 \cdot 10^{-35}:\\ \;\;\;\;x - a \cdot \left(x \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\ \end{array} \]

Alternative 17: 25.3% accurate, 31.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+90} \lor \neg \left(y \leq 1.9 \cdot 10^{-74}\right):\\
\;\;\;\;-b \cdot \left(x \cdot a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.9999999999999997e90 or 1.8999999999999998e-74 < y

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.9999999999999997e90 < y < 1.8999999999999998e-74

    1. Initial program 95.3%

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

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

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

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

Alternative 18: 27.0% accurate, 31.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{-9} \lor \neg \left(y \leq 4.5 \cdot 10^{-35}\right):\\
\;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.20000000000000039e-9 or 4.5000000000000001e-35 < y

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.20000000000000039e-9 < y < 4.5000000000000001e-35

    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 inf 61.0%

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

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

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

Alternative 19: 26.9% accurate, 31.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{-8} \lor \neg \left(y \leq 5.5 \cdot 10^{-35}\right):\\
\;\;\;\;y \cdot \left(x \cdot \left(-t\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.20000000000000063e-8 or 5.4999999999999997e-35 < y

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.20000000000000063e-8 < y < 5.4999999999999997e-35

    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 inf 61.0%

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

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

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

Alternative 20: 25.7% accurate, 31.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.85 \cdot 10^{-40}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\

\mathbf{elif}\;y \leq 2.5 \cdot 10^{-74}:\\
\;\;\;\;x\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.84999999999999992e-40 < y < 2.49999999999999999e-74

    1. Initial program 94.2%

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

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

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

    if 2.49999999999999999e-74 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.85 \cdot 10^{-40}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-74}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;-b \cdot \left(x \cdot a\right)\\ \end{array} \]

Alternative 21: 21.1% accurate, 34.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{+168} \lor \neg \left(a \leq 1.6 \cdot 10^{+97}\right):\\
\;\;\;\;x \cdot \left(y \cdot t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.6000000000000001e168 or 1.60000000000000008e97 < a

    1. Initial program 86.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 42.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.6000000000000001e168 < a < 1.60000000000000008e97

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.6 \cdot 10^{+168} \lor \neg \left(a \leq 1.6 \cdot 10^{+97}\right):\\ \;\;\;\;x \cdot \left(y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 22: 18.9% 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 95.8%

    \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
  2. Taylor expanded in y around inf 75.4%

    \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
  3. Taylor expanded in y around 0 21.9%

    \[\leadsto \color{blue}{x} \]
  4. Final simplification21.9%

    \[\leadsto x \]

Reproduce

?
herbie shell --seed 2023297 
(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))))))