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

Percentage Accurate: 96.8% → 99.6%
Time: 28.8s
Alternatives: 18
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 18 alternatives:

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

Initial Program: 96.8% accurate, 1.0× speedup?

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

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

Alternative 1: 99.6% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

Alternative 2: 96.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 3: 86.6% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.4 \cdot 10^{-29} \lor \neg \left(y \leq 2.6 \cdot 10^{-36}\right):\\
\;\;\;\;x \cdot {\left(\frac{z}{e^{t}}\right)}^{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.39999999999999958e-29 or 2.6e-36 < y

    1. Initial program 96.4%

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

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

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

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

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

      \[\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. Taylor expanded in a around 0 88.7%

      \[\leadsto \color{blue}{x \cdot e^{y \cdot \left(\log z - t\right)}} \]
    5. Step-by-step derivation
      1. *-commutative88.7%

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

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

        \[\leadsto x \cdot {\color{blue}{\left(\frac{e^{\log z}}{e^{t}}\right)}}^{y} \]
      4. rem-exp-log89.4%

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

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

    if -8.39999999999999958e-29 < y < 2.6e-36

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.4 \cdot 10^{-29} \lor \neg \left(y \leq 2.6 \cdot 10^{-36}\right):\\ \;\;\;\;x \cdot {\left(\frac{z}{e^{t}}\right)}^{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\ \end{array} \]

Alternative 4: 73.9% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\ t_2 := x \cdot e^{-y \cdot t}\\ \mathbf{if}\;t \leq -1 \cdot 10^{+45}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-211}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{-12}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{+42}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (exp (* a (- (- z) b))))) (t_2 (* x (exp (- (* y t))))))
   (if (<= t -1e+45)
     t_2
     (if (<= t 6.8e-211)
       t_1
       (if (<= t 5.6e-12) (* x (pow z y)) (if (<= t 1.65e+42) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * exp((a * (-z - b)));
	double t_2 = x * exp(-(y * t));
	double tmp;
	if (t <= -1e+45) {
		tmp = t_2;
	} else if (t <= 6.8e-211) {
		tmp = t_1;
	} else if (t <= 5.6e-12) {
		tmp = x * pow(z, y);
	} else if (t <= 1.65e+42) {
		tmp = t_1;
	} 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) :: tmp
    t_1 = x * exp((a * (-z - b)))
    t_2 = x * exp(-(y * t))
    if (t <= (-1d+45)) then
        tmp = t_2
    else if (t <= 6.8d-211) then
        tmp = t_1
    else if (t <= 5.6d-12) then
        tmp = x * (z ** y)
    else if (t <= 1.65d+42) then
        tmp = t_1
    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 * (-z - b)));
	double t_2 = x * Math.exp(-(y * t));
	double tmp;
	if (t <= -1e+45) {
		tmp = t_2;
	} else if (t <= 6.8e-211) {
		tmp = t_1;
	} else if (t <= 5.6e-12) {
		tmp = x * Math.pow(z, y);
	} else if (t <= 1.65e+42) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x * math.exp((a * (-z - b)))
	t_2 = x * math.exp(-(y * t))
	tmp = 0
	if t <= -1e+45:
		tmp = t_2
	elif t <= 6.8e-211:
		tmp = t_1
	elif t <= 5.6e-12:
		tmp = x * math.pow(z, y)
	elif t <= 1.65e+42:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x * exp(Float64(a * Float64(Float64(-z) - b))))
	t_2 = Float64(x * exp(Float64(-Float64(y * t))))
	tmp = 0.0
	if (t <= -1e+45)
		tmp = t_2;
	elseif (t <= 6.8e-211)
		tmp = t_1;
	elseif (t <= 5.6e-12)
		tmp = Float64(x * (z ^ y));
	elseif (t <= 1.65e+42)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x * exp((a * (-z - b)));
	t_2 = x * exp(-(y * t));
	tmp = 0.0;
	if (t <= -1e+45)
		tmp = t_2;
	elseif (t <= 6.8e-211)
		tmp = t_1;
	elseif (t <= 5.6e-12)
		tmp = x * (z ^ y);
	elseif (t <= 1.65e+42)
		tmp = t_1;
	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 * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Exp[(-N[(y * t), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e+45], t$95$2, If[LessEqual[t, 6.8e-211], t$95$1, If[LessEqual[t, 5.6e-12], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e+42], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 6.8 \cdot 10^{-211}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 5.6 \cdot 10^{-12}:\\
\;\;\;\;x \cdot {z}^{y}\\

\mathbf{elif}\;t \leq 1.65 \cdot 10^{+42}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.9999999999999993e44 or 1.6499999999999999e42 < t

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

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

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

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

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

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

    if -9.9999999999999993e44 < t < 6.8000000000000002e-211 or 5.6000000000000004e-12 < t < 1.6499999999999999e42

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

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

    if 6.8000000000000002e-211 < t < 5.6000000000000004e-12

    1. Initial program 95.8%

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

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

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

        \[\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. Taylor expanded in a around 0 73.4%

      \[\leadsto \color{blue}{x \cdot e^{y \cdot \left(\log z - t\right)}} \]
    5. Step-by-step derivation
      1. *-commutative73.4%

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

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

        \[\leadsto x \cdot {\color{blue}{\left(\frac{e^{\log z}}{e^{t}}\right)}}^{y} \]
      4. rem-exp-log73.4%

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

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

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

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

      \[\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 -1 \cdot 10^{+45}:\\ \;\;\;\;x \cdot e^{-y \cdot t}\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-211}:\\ \;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{-12}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{+42}:\\ \;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{-y \cdot t}\\ \end{array} \]

Alternative 5: 69.8% accurate, 2.9× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x \cdot e^{-y \cdot t}\\


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

    1. Initial program 96.2%

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

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

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

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

      \[\leadsto x \cdot e^{\color{blue}{\left(-a\right) \cdot b}} \]
    5. Step-by-step derivation
      1. distribute-lft-neg-out82.4%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. exp-neg82.4%

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{a \cdot b}}} \]
      3. exp-prod62.0%

        \[\leadsto x \cdot \frac{1}{\color{blue}{{\left(e^{a}\right)}^{b}}} \]
      4. un-div-inv62.0%

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

        \[\leadsto \frac{x}{\color{blue}{e^{a \cdot b}}} \]
    6. Applied egg-rr82.4%

      \[\leadsto \color{blue}{\frac{x}{e^{a \cdot b}}} \]

    if -2.09999999999999986e92 < b < 5.5999999999999999e41

    1. Initial program 95.5%

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

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

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

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

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

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

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

Alternative 6: 72.4% accurate, 2.9× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{x}{e^{a \cdot b}}\\


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

    1. Initial program 96.1%

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

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

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

      \[\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. Taylor expanded in a around 0 89.9%

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

        \[\leadsto x \cdot e^{\color{blue}{\left(\log z - t\right) \cdot y}} \]
      2. exp-prod89.9%

        \[\leadsto x \cdot \color{blue}{{\left(e^{\log z - t}\right)}^{y}} \]
      3. exp-diff89.9%

        \[\leadsto x \cdot {\color{blue}{\left(\frac{e^{\log z}}{e^{t}}\right)}}^{y} \]
      4. rem-exp-log89.9%

        \[\leadsto x \cdot {\left(\frac{\color{blue}{z}}{e^{t}}\right)}^{y} \]
    6. Simplified89.9%

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

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

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

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

    if -3.4e16 < y < 9.20000000000000035e-26

    1. Initial program 95.4%

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

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

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. exp-neg83.6%

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{a \cdot b}}} \]
      3. exp-prod71.6%

        \[\leadsto x \cdot \frac{1}{\color{blue}{{\left(e^{a}\right)}^{b}}} \]
      4. un-div-inv71.6%

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{a}\right)}^{b}}} \]
      5. exp-prod83.6%

        \[\leadsto \frac{x}{\color{blue}{e^{a \cdot b}}} \]
    6. Applied egg-rr83.6%

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

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

Alternative 7: 55.0% accurate, 2.9× speedup?

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

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

\mathbf{elif}\;t \leq -0.007:\\
\;\;\;\;\frac{\frac{x \cdot x}{b}}{t_1 \cdot \frac{t_1}{x \cdot b}}\\

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


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

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(y \cdot x\right) \cdot \color{blue}{\frac{0 \cdot 0 - t \cdot t}{0 + t}} \]
      4. +-lft-identity48.8%

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

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

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

        \[\leadsto x + \frac{\left(x \cdot y\right) \cdot \left(\color{blue}{0} - t \cdot t\right)}{t} \]
      8. sub0-neg47.0%

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

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

        \[\leadsto x + \color{blue}{\frac{x \cdot y}{\frac{t}{-t \cdot t}}} \]
      2. distribute-rgt-neg-in48.8%

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

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

    if -1.1799999999999999e83 < t < -0.00700000000000000015

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(x \cdot x\right) \cdot \frac{x - \left(-a\right) \cdot \left(x \cdot b\right)}{x \cdot b} - \left(x - \left(-a\right) \cdot \left(x \cdot b\right)\right) \cdot \left(\left(\left(-a\right) \cdot \left(x \cdot b\right)\right) \cdot \left(-a\right)\right)}{\left(x - \left(-a\right) \cdot \left(x \cdot b\right)\right) \cdot \frac{x - \left(-a\right) \cdot \left(x \cdot b\right)}{x \cdot b}}} \]
    9. Applied egg-rr9.4%

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

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

        \[\leadsto \frac{\frac{\color{blue}{x \cdot x}}{b}}{\left(x + x \cdot \left(a \cdot b\right)\right) \cdot \frac{x + x \cdot \left(a \cdot b\right)}{x \cdot b}} \]
    12. Simplified47.6%

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

    if -0.00700000000000000015 < t

    1. Initial program 95.4%

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

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

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

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

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

      \[\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. Taylor expanded in a around 0 73.6%

      \[\leadsto \color{blue}{x \cdot e^{y \cdot \left(\log z - t\right)}} \]
    5. Step-by-step derivation
      1. *-commutative73.6%

        \[\leadsto x \cdot e^{\color{blue}{\left(\log z - t\right) \cdot y}} \]
      2. exp-prod70.1%

        \[\leadsto x \cdot \color{blue}{{\left(e^{\log z - t}\right)}^{y}} \]
      3. exp-diff70.1%

        \[\leadsto x \cdot {\color{blue}{\left(\frac{e^{\log z}}{e^{t}}\right)}}^{y} \]
      4. rem-exp-log70.1%

        \[\leadsto x \cdot {\left(\frac{\color{blue}{z}}{e^{t}}\right)}^{y} \]
    6. Simplified70.1%

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

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

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

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

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

Alternative 8: 39.4% accurate, 11.6× speedup?

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

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

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

\mathbf{elif}\;y \leq 6.4 \cdot 10^{+251}:\\
\;\;\;\;0.5 \cdot \left(\left(a \cdot a\right) \cdot \left(b \cdot \left(x \cdot b\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x + \frac{x \cdot y}{\frac{t}{-t \cdot t}}\\


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(x \cdot x\right) \cdot \frac{x - \left(-a\right) \cdot \left(x \cdot b\right)}{x \cdot b} - \left(x - \left(-a\right) \cdot \left(x \cdot b\right)\right) \cdot \left(\left(\left(-a\right) \cdot \left(x \cdot b\right)\right) \cdot \left(-a\right)\right)}{\left(x - \left(-a\right) \cdot \left(x \cdot b\right)\right) \cdot \frac{x - \left(-a\right) \cdot \left(x \cdot b\right)}{x \cdot b}}} \]
    9. Applied egg-rr11.5%

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

      \[\leadsto \frac{\color{blue}{\frac{{x}^{2}}{b}}}{\left(x + x \cdot \left(a \cdot b\right)\right) \cdot \frac{x + x \cdot \left(a \cdot b\right)}{x \cdot b}} \]
    11. Step-by-step derivation
      1. unpow234.5%

        \[\leadsto \frac{\frac{\color{blue}{x \cdot x}}{b}}{\left(x + x \cdot \left(a \cdot b\right)\right) \cdot \frac{x + x \cdot \left(a \cdot b\right)}{x \cdot b}} \]
    12. Simplified34.5%

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

    if -5.60000000000000037e102 < y < 1.75000000000000008e-19

    1. Initial program 95.9%

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

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

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

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

      \[\leadsto x \cdot e^{\color{blue}{\left(-a\right) \cdot b}} \]
    5. Step-by-step derivation
      1. distribute-lft-neg-out77.9%

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{a \cdot b}}} \]
      3. exp-prod67.1%

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

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{a}\right)}^{b}}} \]
      5. exp-prod77.9%

        \[\leadsto \frac{x}{\color{blue}{e^{a \cdot b}}} \]
    6. Applied egg-rr77.9%

      \[\leadsto \color{blue}{\frac{x}{e^{a \cdot b}}} \]
    7. Taylor expanded in b around 0 34.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.75000000000000008e-19 < y < 6.3999999999999995e251

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{a \cdot b}}} \]
      3. exp-prod34.7%

        \[\leadsto x \cdot \frac{1}{\color{blue}{{\left(e^{a}\right)}^{b}}} \]
      4. un-div-inv34.7%

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{a}\right)}^{b}}} \]
      5. exp-prod44.3%

        \[\leadsto \frac{x}{\color{blue}{e^{a \cdot b}}} \]
    6. Applied egg-rr44.3%

      \[\leadsto \color{blue}{\frac{x}{e^{a \cdot b}}} \]
    7. Taylor expanded in b around 0 11.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(a \cdot a\right) \cdot \left(b \cdot \color{blue}{\left(b \cdot x\right)}\right)\right) \cdot 0.5 \]
    12. Simplified43.3%

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

    if 6.3999999999999995e251 < 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 83.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{\left(x \cdot y\right)} \cdot \left(0 \cdot 0 - t \cdot t\right)}{t} \]
      7. metadata-eval51.6%

        \[\leadsto x + \frac{\left(x \cdot y\right) \cdot \left(\color{blue}{0} - t \cdot t\right)}{t} \]
      8. sub0-neg51.6%

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

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

        \[\leadsto x + \color{blue}{\frac{x \cdot y}{\frac{t}{-t \cdot t}}} \]
      2. distribute-rgt-neg-in51.6%

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

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

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

Alternative 9: 37.2% accurate, 14.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+108} \lor \neg \left(t \leq 1.05 \cdot 10^{+132}\right):\\
\;\;\;\;x + \frac{x \cdot y}{\frac{t}{-t \cdot t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.4999999999999996e108 or 1.04999999999999997e132 < t

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(y \cdot x\right) \cdot \color{blue}{\frac{0 \cdot 0 - t \cdot t}{0 + t}} \]
      4. +-lft-identity46.2%

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

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

        \[\leadsto x + \frac{\color{blue}{\left(x \cdot y\right)} \cdot \left(0 \cdot 0 - t \cdot t\right)}{t} \]
      7. metadata-eval45.2%

        \[\leadsto x + \frac{\left(x \cdot y\right) \cdot \left(\color{blue}{0} - t \cdot t\right)}{t} \]
      8. sub0-neg45.2%

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

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

        \[\leadsto x + \color{blue}{\frac{x \cdot y}{\frac{t}{-t \cdot t}}} \]
      2. distribute-rgt-neg-in46.2%

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

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

    if -6.4999999999999996e108 < t < 1.04999999999999997e132

    1. Initial program 95.9%

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

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

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

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

      \[\leadsto x \cdot e^{\color{blue}{\left(-a\right) \cdot b}} \]
    5. Step-by-step derivation
      1. distribute-lft-neg-out68.2%

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{a \cdot b}}} \]
      3. exp-prod58.2%

        \[\leadsto x \cdot \frac{1}{\color{blue}{{\left(e^{a}\right)}^{b}}} \]
      4. un-div-inv58.2%

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{a}\right)}^{b}}} \]
      5. exp-prod68.2%

        \[\leadsto \frac{x}{\color{blue}{e^{a \cdot b}}} \]
    6. Applied egg-rr68.2%

      \[\leadsto \color{blue}{\frac{x}{e^{a \cdot b}}} \]
    7. Taylor expanded in b around 0 27.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+108} \lor \neg \left(t \leq 1.05 \cdot 10^{+132}\right):\\ \;\;\;\;x + \frac{x \cdot y}{\frac{t}{-t \cdot t}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(1 - a \cdot b\right) + \left(0.5 \cdot \left(a \cdot a\right)\right) \cdot \left(b \cdot b\right)\right)\\ \end{array} \]

Alternative 10: 35.4% accurate, 19.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.42 \cdot 10^{+19} \lor \neg \left(a \leq 7.6 \cdot 10^{+124}\right):\\
\;\;\;\;0.5 \cdot \left(\left(a \cdot a\right) \cdot \left(b \cdot \left(x \cdot b\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x + \frac{x \cdot y}{\frac{t}{-t \cdot t}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.42e19 or 7.5999999999999997e124 < a

    1. Initial program 90.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.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. mul-1-neg71.4%

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

      \[\leadsto x \cdot e^{\color{blue}{\left(-a\right) \cdot b}} \]
    5. Step-by-step derivation
      1. distribute-lft-neg-out71.4%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. exp-neg71.4%

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{a \cdot b}}} \]
      3. exp-prod73.0%

        \[\leadsto x \cdot \frac{1}{\color{blue}{{\left(e^{a}\right)}^{b}}} \]
      4. un-div-inv73.0%

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

        \[\leadsto \frac{x}{\color{blue}{e^{a \cdot b}}} \]
    6. Applied egg-rr71.4%

      \[\leadsto \color{blue}{\frac{x}{e^{a \cdot b}}} \]
    7. Taylor expanded in b around 0 6.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.42e19 < a < 7.5999999999999997e124

    1. Initial program 99.3%

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

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

        \[\leadsto x \cdot e^{\color{blue}{\left(-1 \cdot t\right) \cdot y}} \]
      2. mul-1-neg70.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(y \cdot x\right) \cdot \color{blue}{\frac{0 \cdot 0 - t \cdot t}{0 + t}} \]
      4. +-lft-identity45.9%

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

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

        \[\leadsto x + \frac{\color{blue}{\left(x \cdot y\right)} \cdot \left(0 \cdot 0 - t \cdot t\right)}{t} \]
      7. metadata-eval45.9%

        \[\leadsto x + \frac{\left(x \cdot y\right) \cdot \left(\color{blue}{0} - t \cdot t\right)}{t} \]
      8. sub0-neg45.9%

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

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

        \[\leadsto x + \color{blue}{\frac{x \cdot y}{\frac{t}{-t \cdot t}}} \]
      2. distribute-rgt-neg-in45.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.42 \cdot 10^{+19} \lor \neg \left(a \leq 7.6 \cdot 10^{+124}\right):\\ \;\;\;\;0.5 \cdot \left(\left(a \cdot a\right) \cdot \left(b \cdot \left(x \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{x \cdot y}{\frac{t}{-t \cdot t}}\\ \end{array} \]

Alternative 11: 35.3% accurate, 20.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.22 \cdot 10^{-58} \lor \neg \left(a \leq 8.5 \cdot 10^{-76}\right):\\
\;\;\;\;0.5 \cdot \left(\left(a \cdot a\right) \cdot \left(b \cdot \left(x \cdot b\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.2199999999999999e-58 or 8.50000000000000038e-76 < a

    1. Initial program 93.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 67.0%

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

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

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

      \[\leadsto x \cdot e^{\color{blue}{\left(-a\right) \cdot b}} \]
    5. Step-by-step derivation
      1. distribute-lft-neg-out67.0%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. exp-neg67.0%

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{a \cdot b}}} \]
      3. exp-prod63.7%

        \[\leadsto x \cdot \frac{1}{\color{blue}{{\left(e^{a}\right)}^{b}}} \]
      4. un-div-inv63.7%

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{a}\right)}^{b}}} \]
      5. exp-prod67.0%

        \[\leadsto \frac{x}{\color{blue}{e^{a \cdot b}}} \]
    6. Applied egg-rr67.0%

      \[\leadsto \color{blue}{\frac{x}{e^{a \cdot b}}} \]
    7. Taylor expanded in b around 0 12.1%

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \left(x \cdot a\right) \cdot b\right) + \left(-\color{blue}{\left(-1 \cdot \left({a}^{2} \cdot x\right) + 0.5 \cdot \left({a}^{2} \cdot x\right)\right) \cdot {b}^{2}}\right) \]
      9. distribute-rgt-out32.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(a \cdot a\right) \cdot \left(b \cdot \color{blue}{\left(b \cdot x\right)}\right)\right) \cdot 0.5 \]
    12. Simplified34.8%

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

    if -1.2199999999999999e-58 < a < 8.50000000000000038e-76

    1. Initial program 100.0%

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{\left(-t\right)} \cdot y} \]
      3. *-commutative78.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)}} \]
    5. Taylor expanded in y around 0 53.1%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(0 - t \cdot \left(y \cdot x\right)\right)} \]
      3. cancel-sign-sub-inv53.1%

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

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

        \[\leadsto x + \left(0 + \color{blue}{x \cdot \left(\left(-t\right) \cdot y\right)}\right) \]
      6. distribute-lft-neg-out54.1%

        \[\leadsto x + \left(0 + x \cdot \color{blue}{\left(-t \cdot y\right)}\right) \]
      7. distribute-rgt-neg-in54.1%

        \[\leadsto x + \left(0 + x \cdot \color{blue}{\left(t \cdot \left(-y\right)\right)}\right) \]
    9. Applied egg-rr54.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.22 \cdot 10^{-58} \lor \neg \left(a \leq 8.5 \cdot 10^{-76}\right):\\ \;\;\;\;0.5 \cdot \left(\left(a \cdot a\right) \cdot \left(b \cdot \left(x \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \left(y \cdot t\right)\\ \end{array} \]

Alternative 12: 30.3% accurate, 28.3× speedup?

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

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

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

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


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

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.85e-246 < y < 1.40000000000000001e-19

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot b\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv48.5%

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

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

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

        \[\leadsto x - \color{blue}{x \cdot \left(a \cdot b\right)} \]
    9. Applied egg-rr54.5%

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

    if 1.40000000000000001e-19 < y

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot b\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv13.7%

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

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

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

        \[\leadsto x - \color{blue}{x \cdot \left(a \cdot b\right)} \]
    9. Applied egg-rr12.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.85 \cdot 10^{-246}:\\ \;\;\;\;x - y \cdot \left(x \cdot t\right)\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-19}:\\ \;\;\;\;x - x \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \end{array} \]

Alternative 13: 30.7% accurate, 28.3× speedup?

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

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

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

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


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

    1. Initial program 90.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 74.4%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot b\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv19.1%

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

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

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

        \[\leadsto x - \color{blue}{x \cdot \left(a \cdot b\right)} \]
    9. Applied egg-rr23.6%

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

    if -2.8499999999999998e125 < a < 8e129

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \left(-t\right) \cdot \left(y \cdot x\right)} \]
    8. Step-by-step derivation
      1. distribute-lft-neg-out39.9%

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

        \[\leadsto x + \color{blue}{\left(0 - t \cdot \left(y \cdot x\right)\right)} \]
      3. cancel-sign-sub-inv39.9%

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

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

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

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

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

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

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

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

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

    if 8e129 < a

    1. Initial program 86.5%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot b\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv25.4%

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

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

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

        \[\leadsto x - \color{blue}{x \cdot \left(a \cdot b\right)} \]
    9. Applied egg-rr32.5%

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

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

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

Alternative 14: 32.4% accurate, 28.3× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -2.99999999999999969e104 < y < 1.75000000000000008e-19

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot b\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv40.3%

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

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

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

        \[\leadsto x - \color{blue}{x \cdot \left(a \cdot b\right)} \]
    9. Applied egg-rr45.3%

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

    if 1.75000000000000008e-19 < y

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot b\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv13.7%

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

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

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

        \[\leadsto x - \color{blue}{x \cdot \left(a \cdot b\right)} \]
    9. Applied egg-rr12.3%

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

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

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

Alternative 15: 25.3% accurate, 31.1× speedup?

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

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

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


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

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot b\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv18.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\color{blue}{\frac{-a}{a}} \cdot a\right) \cdot \left(x \cdot b\right) \]
      6. associate-/r/22.7%

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

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

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

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

        \[\leadsto b \cdot \left(x \cdot \color{blue}{\left(\frac{-a}{a} \cdot a\right)}\right) \]
      11. distribute-frac-neg21.2%

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

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

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

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

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

    if -1.8999999999999998e88 < y < 2.6000000000000001e-74

    1. Initial program 95.3%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Step-by-step derivation
      1. +-commutative95.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-def95.3%

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

        \[\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. Taylor expanded in a around 0 65.9%

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

        \[\leadsto x \cdot e^{\color{blue}{\left(\log z - t\right) \cdot y}} \]
      2. exp-prod57.6%

        \[\leadsto x \cdot \color{blue}{{\left(e^{\log z - t}\right)}^{y}} \]
      3. exp-diff57.6%

        \[\leadsto x \cdot {\color{blue}{\left(\frac{e^{\log z}}{e^{t}}\right)}}^{y} \]
      4. rem-exp-log57.6%

        \[\leadsto x \cdot {\left(\frac{\color{blue}{z}}{e^{t}}\right)}^{y} \]
    6. Simplified57.6%

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

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

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

Alternative 16: 25.5% accurate, 31.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.4999999999999999e87 or 2.6e-75 < y

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot b\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv18.7%

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

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

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

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

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

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

    if -1.4999999999999999e87 < y < 2.6e-75

    1. Initial program 95.3%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Step-by-step derivation
      1. +-commutative95.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-def95.3%

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

        \[\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. Taylor expanded in a around 0 65.9%

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

        \[\leadsto x \cdot e^{\color{blue}{\left(\log z - t\right) \cdot y}} \]
      2. exp-prod57.6%

        \[\leadsto x \cdot \color{blue}{{\left(e^{\log z - t}\right)}^{y}} \]
      3. exp-diff57.6%

        \[\leadsto x \cdot {\color{blue}{\left(\frac{e^{\log z}}{e^{t}}\right)}}^{y} \]
      4. rem-exp-log57.6%

        \[\leadsto x \cdot {\left(\frac{\color{blue}{z}}{e^{t}}\right)}^{y} \]
    6. Simplified57.6%

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

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

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

Alternative 17: 30.4% accurate, 34.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.5499999999999999e-19

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot b\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv33.7%

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

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

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

        \[\leadsto x - \color{blue}{x \cdot \left(a \cdot b\right)} \]
    9. Applied egg-rr37.0%

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

    if 1.5499999999999999e-19 < y

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \left(-a\right) \cdot \left(x \cdot b\right)} \]
    8. Step-by-step derivation
      1. cancel-sign-sub-inv13.7%

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

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

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

        \[\leadsto x - \color{blue}{x \cdot \left(a \cdot b\right)} \]
    9. Applied egg-rr12.3%

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

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

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

Alternative 18: 18.9% accurate, 315.0× speedup?

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x \cdot e^{y \cdot \left(\log z - t\right)}} \]
  5. Step-by-step derivation
    1. *-commutative75.4%

      \[\leadsto x \cdot e^{\color{blue}{\left(\log z - t\right) \cdot y}} \]
    2. exp-prod71.6%

      \[\leadsto x \cdot \color{blue}{{\left(e^{\log z - t}\right)}^{y}} \]
    3. exp-diff71.6%

      \[\leadsto x \cdot {\color{blue}{\left(\frac{e^{\log z}}{e^{t}}\right)}}^{y} \]
    4. rem-exp-log71.6%

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

    \[\leadsto \color{blue}{x \cdot {\left(\frac{z}{e^{t}}\right)}^{y}} \]
  7. Taylor expanded in y around 0 21.9%

    \[\leadsto \color{blue}{x} \]
  8. Final simplification21.9%

    \[\leadsto x \]

Reproduce

?
herbie shell --seed 2023297 
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, B"
  :precision binary64
  (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))