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

Percentage Accurate: 96.3% → 99.6%
Time: 18.0s
Alternatives: 19
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 19 alternatives:

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

Initial Program: 96.3% accurate, 1.0× speedup?

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

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

Alternative 1: 99.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 97.3%

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

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

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

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

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

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

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

Alternative 2: 96.3% accurate, 1.0× speedup?

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

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

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

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

Alternative 3: 91.1% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+33} \lor \neg \left(y \leq 1.95 \cdot 10^{+58}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.8000000000000001e33 or 1.95000000000000005e58 < y

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

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

    if -1.8000000000000001e33 < y < 1.95000000000000005e58

    1. Initial program 95.7%

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

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

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

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

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

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

Alternative 4: 95.9% accurate, 1.5× speedup?

\[\begin{array}{l} \\ x \cdot e^{y \cdot \left(\log z - t\right) - a \cdot b} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (* x (exp (- (* y (- (log z) t)) (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
	return x * exp(((y * (log(z) - t)) - (a * 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 * 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 * b)));
}
def code(x, y, z, t, a, b):
	return x * math.exp(((y * (math.log(z) - t)) - (a * b)))
function code(x, y, z, t, a, b)
	return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) - Float64(a * b))))
end
function tmp = code(x, y, z, t, a, b)
	tmp = x * exp(((y * (log(z) - t)) - (a * 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 * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

Alternative 5: 72.6% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{a \cdot \left(-b\right)}\\ t_2 := x \cdot e^{y \cdot \left(-t\right)}\\ t_3 := x \cdot {z}^{y}\\ \mathbf{if}\;t \leq -2.6 \cdot 10^{+48}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.6 \cdot 10^{-13}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.25 \cdot 10^{-166}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-242}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+37}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (exp (* a (- b)))))
        (t_2 (* x (exp (* y (- t)))))
        (t_3 (* x (pow z y))))
   (if (<= t -2.6e+48)
     t_2
     (if (<= t -1.6e-13)
       t_1
       (if (<= t -2.25e-166)
         t_3
         (if (<= t -3.5e-242) t_1 (if (<= t 2.5e+37) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * exp((a * -b));
	double t_2 = x * exp((y * -t));
	double t_3 = x * pow(z, y);
	double tmp;
	if (t <= -2.6e+48) {
		tmp = t_2;
	} else if (t <= -1.6e-13) {
		tmp = t_1;
	} else if (t <= -2.25e-166) {
		tmp = t_3;
	} else if (t <= -3.5e-242) {
		tmp = t_1;
	} else if (t <= 2.5e+37) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x * exp((a * -b))
    t_2 = x * exp((y * -t))
    t_3 = x * (z ** y)
    if (t <= (-2.6d+48)) then
        tmp = t_2
    else if (t <= (-1.6d-13)) then
        tmp = t_1
    else if (t <= (-2.25d-166)) then
        tmp = t_3
    else if (t <= (-3.5d-242)) then
        tmp = t_1
    else if (t <= 2.5d+37) then
        tmp = t_3
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * Math.exp((a * -b));
	double t_2 = x * Math.exp((y * -t));
	double t_3 = x * Math.pow(z, y);
	double tmp;
	if (t <= -2.6e+48) {
		tmp = t_2;
	} else if (t <= -1.6e-13) {
		tmp = t_1;
	} else if (t <= -2.25e-166) {
		tmp = t_3;
	} else if (t <= -3.5e-242) {
		tmp = t_1;
	} else if (t <= 2.5e+37) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x * math.exp((a * -b))
	t_2 = x * math.exp((y * -t))
	t_3 = x * math.pow(z, y)
	tmp = 0
	if t <= -2.6e+48:
		tmp = t_2
	elif t <= -1.6e-13:
		tmp = t_1
	elif t <= -2.25e-166:
		tmp = t_3
	elif t <= -3.5e-242:
		tmp = t_1
	elif t <= 2.5e+37:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x * exp(Float64(a * Float64(-b))))
	t_2 = Float64(x * exp(Float64(y * Float64(-t))))
	t_3 = Float64(x * (z ^ y))
	tmp = 0.0
	if (t <= -2.6e+48)
		tmp = t_2;
	elseif (t <= -1.6e-13)
		tmp = t_1;
	elseif (t <= -2.25e-166)
		tmp = t_3;
	elseif (t <= -3.5e-242)
		tmp = t_1;
	elseif (t <= 2.5e+37)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x * exp((a * -b));
	t_2 = x * exp((y * -t));
	t_3 = x * (z ^ y);
	tmp = 0.0;
	if (t <= -2.6e+48)
		tmp = t_2;
	elseif (t <= -1.6e-13)
		tmp = t_1;
	elseif (t <= -2.25e-166)
		tmp = t_3;
	elseif (t <= -3.5e-242)
		tmp = t_1;
	elseif (t <= 2.5e+37)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.6e+48], t$95$2, If[LessEqual[t, -1.6e-13], t$95$1, If[LessEqual[t, -2.25e-166], t$95$3, If[LessEqual[t, -3.5e-242], t$95$1, If[LessEqual[t, 2.5e+37], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot e^{a \cdot \left(-b\right)}\\
t_2 := x \cdot e^{y \cdot \left(-t\right)}\\
t_3 := x \cdot {z}^{y}\\
\mathbf{if}\;t \leq -2.6 \cdot 10^{+48}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -1.6 \cdot 10^{-13}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -2.25 \cdot 10^{-166}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq -3.5 \cdot 10^{-242}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2.5 \cdot 10^{+37}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.59999999999999995e48 or 2.49999999999999994e37 < t

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

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

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

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

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

    if -2.59999999999999995e48 < t < -1.6e-13 or -2.2499999999999999e-166 < t < -3.4999999999999999e-242

    1. Initial program 99.9%

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

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

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

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

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

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

    if -1.6e-13 < t < -2.2499999999999999e-166 or -3.4999999999999999e-242 < t < 2.49999999999999994e37

    1. Initial program 96.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+48}:\\ \;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\ \mathbf{elif}\;t \leq -1.6 \cdot 10^{-13}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{elif}\;t \leq -2.25 \cdot 10^{-166}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-242}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+37}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\ \end{array} \]

Alternative 6: 74.2% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot {z}^{y}\\ t_2 := x \cdot e^{y \cdot \left(-t\right)}\\ \mathbf{if}\;y \leq -9 \cdot 10^{+129}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -330:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{-25}:\\ \;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{+194}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (pow z y))) (t_2 (* x (exp (* y (- t))))))
   (if (<= y -9e+129)
     t_2
     (if (<= y -330.0)
       t_1
       (if (<= y 1.3e-25)
         (* x (exp (* a (- (- z) b))))
         (if (<= y 6.6e+194) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * pow(z, y);
	double t_2 = x * exp((y * -t));
	double tmp;
	if (y <= -9e+129) {
		tmp = t_2;
	} else if (y <= -330.0) {
		tmp = t_1;
	} else if (y <= 1.3e-25) {
		tmp = x * exp((a * (-z - b)));
	} else if (y <= 6.6e+194) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * (z ** y)
    t_2 = x * exp((y * -t))
    if (y <= (-9d+129)) then
        tmp = t_2
    else if (y <= (-330.0d0)) then
        tmp = t_1
    else if (y <= 1.3d-25) then
        tmp = x * exp((a * (-z - b)))
    else if (y <= 6.6d+194) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * Math.pow(z, y);
	double t_2 = x * Math.exp((y * -t));
	double tmp;
	if (y <= -9e+129) {
		tmp = t_2;
	} else if (y <= -330.0) {
		tmp = t_1;
	} else if (y <= 1.3e-25) {
		tmp = x * Math.exp((a * (-z - b)));
	} else if (y <= 6.6e+194) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x * math.pow(z, y)
	t_2 = x * math.exp((y * -t))
	tmp = 0
	if y <= -9e+129:
		tmp = t_2
	elif y <= -330.0:
		tmp = t_1
	elif y <= 1.3e-25:
		tmp = x * math.exp((a * (-z - b)))
	elif y <= 6.6e+194:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x * (z ^ y))
	t_2 = Float64(x * exp(Float64(y * Float64(-t))))
	tmp = 0.0
	if (y <= -9e+129)
		tmp = t_2;
	elseif (y <= -330.0)
		tmp = t_1;
	elseif (y <= 1.3e-25)
		tmp = Float64(x * exp(Float64(a * Float64(Float64(-z) - b))));
	elseif (y <= 6.6e+194)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x * (z ^ y);
	t_2 = x * exp((y * -t));
	tmp = 0.0;
	if (y <= -9e+129)
		tmp = t_2;
	elseif (y <= -330.0)
		tmp = t_1;
	elseif (y <= 1.3e-25)
		tmp = x * exp((a * (-z - b)));
	elseif (y <= 6.6e+194)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9e+129], t$95$2, If[LessEqual[y, -330.0], t$95$1, If[LessEqual[y, 1.3e-25], N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.6e+194], t$95$2, t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
t_2 := x \cdot e^{y \cdot \left(-t\right)}\\
\mathbf{if}\;y \leq -9 \cdot 10^{+129}:\\
\;\;\;\;t_2\\

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

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

\mathbf{elif}\;y \leq 6.6 \cdot 10^{+194}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.0000000000000003e129 or 1.3e-25 < y < 6.59999999999999967e194

    1. Initial program 98.8%

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

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

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

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

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

    if -9.0000000000000003e129 < y < -330 or 6.59999999999999967e194 < y

    1. Initial program 100.0%

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

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

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

    if -330 < y < 1.3e-25

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9 \cdot 10^{+129}:\\ \;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\ \mathbf{elif}\;y \leq -330:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{-25}:\\ \;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\ \mathbf{elif}\;y \leq 6.6 \cdot 10^{+194}:\\ \;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \]

Alternative 7: 72.9% accurate, 2.9× speedup?

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

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

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

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

    if -6.5999999999999996 < y < 9.80000000000000037e58

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

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

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

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

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

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

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

Alternative 8: 84.3% accurate, 2.9× speedup?

\[\begin{array}{l} \\ x \cdot e^{a \cdot \left(-b\right) - y \cdot t} \end{array} \]
(FPCore (x y z t a b) :precision binary64 (* x (exp (- (* a (- b)) (* y t)))))
double code(double x, double y, double z, double t, double a, double b) {
	return x * exp(((a * -b) - (y * t)));
}
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(((a * -b) - (y * t)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x * Math.exp(((a * -b) - (y * t)));
}
def code(x, y, z, t, a, b):
	return x * math.exp(((a * -b) - (y * t)))
function code(x, y, z, t, a, b)
	return Float64(x * exp(Float64(Float64(a * Float64(-b)) - Float64(y * t))))
end
function tmp = code(x, y, z, t, a, b)
	tmp = x * exp(((a * -b) - (y * t)));
end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(a * (-b)), $MachinePrecision] - N[(y * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

    \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)} + -1 \cdot \left(a \cdot b\right)} \]
  6. Final simplification84.4%

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

Alternative 9: 53.1% accurate, 3.0× speedup?

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

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

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


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

    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

    if -2.99999999999999984e-13 < t

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

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

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

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

Alternative 10: 33.9% accurate, 28.3× speedup?

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

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

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

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


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

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

    if -1.14999999999999998e50 < y < 4.59999999999999996e-14

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.59999999999999996e-14 < y

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 32.8% accurate, 28.3× speedup?

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

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

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

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


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

    1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.40000000000000024e-171 < y < 4.8e-14

    1. Initial program 94.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 84.8%

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

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

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

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

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

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

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

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

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

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

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

    if 4.8e-14 < y

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.4 \cdot 10^{-171}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-14}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-y\right) \cdot \left(x \cdot t\right)\\ \end{array} \]

Alternative 12: 32.3% accurate, 28.3× speedup?

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

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

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

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


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

    1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7999999999999999e-173 < y < 4.8e-14

    1. Initial program 94.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 84.8%

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

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

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

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

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

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

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

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

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

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

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

    if 4.8e-14 < y

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.8 \cdot 10^{-173}:\\ \;\;\;\;x - t \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-14}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-y\right) \cdot \left(x \cdot t\right)\\ \end{array} \]

Alternative 13: 27.4% accurate, 31.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{-94} \lor \neg \left(y \leq 2.45 \cdot 10^{-63}\right):\\
\;\;\;\;\left(a \cdot b\right) \cdot \left(-x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.19999999999999997e-94 or 2.45000000000000008e-63 < y

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \left(\left(-b\right) \cdot a\right)} \]
      11. add-sqr-sqrt3.0%

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

        \[\leadsto -x \cdot \left(\color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right)}} \cdot a\right) \]
      13. sqr-neg21.1%

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

        \[\leadsto -x \cdot \left(\color{blue}{\left(\sqrt{b} \cdot \sqrt{b}\right)} \cdot a\right) \]
      15. add-sqr-sqrt17.1%

        \[\leadsto -x \cdot \left(\color{blue}{b} \cdot a\right) \]
    12. Applied egg-rr17.1%

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

    if -3.19999999999999997e-94 < y < 2.45000000000000008e-63

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

Alternative 14: 28.3% accurate, 31.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+34} \lor \neg \left(y \leq 4.6 \cdot 10^{-14}\right):\\
\;\;\;\;\left(-y\right) \cdot \left(x \cdot t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.19999999999999955e34 or 4.59999999999999996e-14 < y

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

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

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

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

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

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

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

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

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

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

    if -6.19999999999999955e34 < y < 4.59999999999999996e-14

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{+34} \lor \neg \left(y \leq 4.6 \cdot 10^{-14}\right):\\ \;\;\;\;\left(-y\right) \cdot \left(x \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 15: 29.2% accurate, 31.1× speedup?

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

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

\mathbf{elif}\;y \leq 4.5 \cdot 10^{-14}:\\
\;\;\;\;x\\

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


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

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

    if -6.19999999999999955e34 < y < 4.4999999999999998e-14

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

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

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

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

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

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

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

    if 4.4999999999999998e-14 < y

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{+34}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-14}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\left(-y\right) \cdot \left(x \cdot t\right)\\ \end{array} \]

Alternative 16: 24.9% accurate, 34.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -60000 \lor \neg \left(y \leq 3.8 \cdot 10^{+28}\right):\\
\;\;\;\;a \cdot \left(x \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6e4 or 3.7999999999999999e28 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6e4 < y < 3.7999999999999999e28

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

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

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

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

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

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

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

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

Alternative 17: 24.0% accurate, 34.5× speedup?

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

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

\mathbf{elif}\;y \leq 5.2 \cdot 10^{+108}:\\
\;\;\;\;x\\

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


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

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -56000 < y < 5.2000000000000005e108

    1. Initial program 95.8%

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

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

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

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

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

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

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

    if 5.2000000000000005e108 < y

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -56000:\\ \;\;\;\;a \cdot \left(x \cdot b\right)\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+108}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(a \cdot b\right)\\ \end{array} \]

Alternative 18: 22.9% accurate, 34.5× speedup?

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

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

\mathbf{elif}\;y \leq 3.6 \cdot 10^{+93}:\\
\;\;\;\;x\\

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


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

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6e4 < y < 3.5999999999999999e93

    1. Initial program 95.7%

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

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

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

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

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

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

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

    if 3.5999999999999999e93 < y

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(x + \color{blue}{\sqrt{y \cdot \left(t \cdot x\right)} \cdot \sqrt{y \cdot \left(t \cdot x\right)}}\right)} - 1 \]
      10. add-sqr-sqrt26.4%

        \[\leadsto e^{\mathsf{log1p}\left(x + \color{blue}{y \cdot \left(t \cdot x\right)}\right)} - 1 \]
    7. Applied egg-rr26.4%

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

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

        \[\leadsto \color{blue}{x + y \cdot \left(t \cdot x\right)} \]
    9. Simplified2.6%

      \[\leadsto \color{blue}{x + y \cdot \left(t \cdot x\right)} \]
    10. Taylor expanded in y around inf 25.1%

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

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

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

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

Alternative 19: 19.7% accurate, 315.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 97.3%

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

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

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

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

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

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

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

    \[\leadsto x \]

Reproduce

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