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

Percentage Accurate: 96.5% → 99.6%
Time: 18.8s
Alternatives: 20
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 20 alternatives:

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

Initial Program: 96.5% 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 96.2%

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

      \[\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.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. Simplified99.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. Final simplification99.6%

    \[\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.5% accurate, 1.0× speedup?

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

\\
x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \left(\log z - t\right)}
\end{array}
Derivation
  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. Final simplification96.2%

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

Alternative 3: 87.0% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.013 \lor \neg \left(y \leq 0.0074\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -0.0129999999999999994 or 0.0074000000000000003 < y

    1. Initial program 98.1%

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

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

    if -0.0129999999999999994 < y < 0.0074000000000000003

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 96.1% accurate, 1.5× speedup?

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{e^{\left(\log z - t\right) \cdot y + -1 \cdot \left(a \cdot b\right)} \cdot x} \]
  5. Step-by-step derivation
    1. mul-1-neg95.8%

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

      \[\leadsto e^{\color{blue}{\left(\log z - t\right) \cdot y - a \cdot b}} \cdot x \]
  6. Applied egg-rr95.8%

    \[\leadsto e^{\color{blue}{\left(\log z - t\right) \cdot y - a \cdot b}} \cdot x \]
  7. Final simplification95.8%

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

Alternative 5: 76.5% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \lor \neg \left(y \leq 0.085\right):\\
\;\;\;\;x \cdot e^{y \cdot \log z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.7999999999999998 or 0.0850000000000000061 < y

    1. Initial program 98.1%

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

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

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

    if -2.7999999999999998 < y < 0.0850000000000000061

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 74.0% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{+96} \lor \neg \left(t \leq 3.2 \cdot 10^{+92}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.4999999999999996e96 or 3.20000000000000025e92 < t

    1. Initial program 94.2%

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

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

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

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

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

    if -7.4999999999999996e96 < t < 3.20000000000000025e92

    1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 70.1% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.5 \cdot 10^{-61}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\

\mathbf{elif}\;b \leq 4.2 \cdot 10^{-52}:\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.4999999999999999e-61

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative83.8%

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

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

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

    if -2.4999999999999999e-61 < b < 4.1999999999999997e-52

    1. Initial program 91.6%

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

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

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

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

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

    if 4.1999999999999997e-52 < b

    1. Initial program 98.6%

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

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

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

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

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

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

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

        \[\leadsto e^{\color{blue}{\left(\log z - t\right) \cdot y - a \cdot b}} \cdot x \]
    6. Applied egg-rr98.6%

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

      \[\leadsto \color{blue}{e^{-a \cdot b} \cdot x} \]
    8. Step-by-step derivation
      1. *-commutative77.9%

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

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

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

        \[\leadsto x \cdot \frac{1}{\color{blue}{{\left(e^{b}\right)}^{a}}} \]
      5. associate-*r/65.7%

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

        \[\leadsto \frac{\color{blue}{x}}{{\left(e^{b}\right)}^{a}} \]
    9. Simplified65.7%

      \[\leadsto \color{blue}{\frac{x}{{\left(e^{b}\right)}^{a}}} \]
    10. Step-by-step derivation
      1. pow-exp77.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.5 \cdot 10^{-61}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{elif}\;b \leq 4.2 \cdot 10^{-52}:\\ \;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{e^{a \cdot b}}\\ \end{array} \]

Alternative 8: 57.7% accurate, 2.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 2.39999999999999997e184

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

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

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

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

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

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

    if 2.39999999999999997e184 < y

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x} + \left(-a \cdot b\right) \cdot x \]
      4. distribute-lft-neg-in3.4%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{{\left(a \cdot \left(b \cdot x\right)\right)}^{2} - x \cdot x}{a \cdot \left(b \cdot x\right) - x}} \]
    12. Taylor expanded in a around inf 55.9%

      \[\leadsto \frac{\color{blue}{{a}^{2} \cdot \left({b}^{2} \cdot {x}^{2}\right)}}{a \cdot \left(b \cdot x\right) - x} \]
    13. Step-by-step derivation
      1. unpow255.9%

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

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

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

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

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

Alternative 9: 57.7% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.6 \cdot 10^{+184}:\\
\;\;\;\;\frac{x}{e^{a \cdot b}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 2.59999999999999993e184

    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. Step-by-step derivation
      1. fma-def96.3%

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

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

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

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

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

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

        \[\leadsto e^{\color{blue}{\left(\log z - t\right) \cdot y - a \cdot b}} \cdot x \]
    6. Applied egg-rr95.5%

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

      \[\leadsto \color{blue}{e^{-a \cdot b} \cdot x} \]
    8. Step-by-step derivation
      1. *-commutative68.9%

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

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

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

        \[\leadsto x \cdot \frac{1}{\color{blue}{{\left(e^{b}\right)}^{a}}} \]
      5. associate-*r/58.7%

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

        \[\leadsto \frac{\color{blue}{x}}{{\left(e^{b}\right)}^{a}} \]
    9. Simplified58.7%

      \[\leadsto \color{blue}{\frac{x}{{\left(e^{b}\right)}^{a}}} \]
    10. Step-by-step derivation
      1. pow-exp68.9%

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

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

    if 2.59999999999999993e184 < y

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x} + \left(-a \cdot b\right) \cdot x \]
      4. distribute-lft-neg-in3.4%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{{\left(a \cdot \left(b \cdot x\right)\right)}^{2} - x \cdot x}{a \cdot \left(b \cdot x\right) - x}} \]
    12. Taylor expanded in a around inf 55.9%

      \[\leadsto \frac{\color{blue}{{a}^{2} \cdot \left({b}^{2} \cdot {x}^{2}\right)}}{a \cdot \left(b \cdot x\right) - x} \]
    13. Step-by-step derivation
      1. unpow255.9%

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

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

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

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

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

Alternative 10: 35.3% accurate, 11.6× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(x \cdot b\right) - x\\
t_2 := \left(x - b \cdot \left(x \cdot a\right)\right) - a \cdot \left(a \cdot \left(\left(b \cdot b\right) \cdot \left(x \cdot -0.5\right)\right)\right)\\
t_3 := \frac{x \cdot \left(-x\right)}{t_1}\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{-273}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 1.24 \cdot 10^{-266}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq 3.3 \cdot 10^{-76}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 4.5 \cdot 10^{+90}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.2000000000000008e-273 or 1.24e-266 < y < 3.29999999999999984e-76

    1. Initial program 97.1%

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

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

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

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

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

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

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

        \[\leadsto e^{\color{blue}{\left(\log z - t\right) \cdot y - a \cdot b}} \cdot x \]
    6. Applied egg-rr96.5%

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

      \[\leadsto \color{blue}{e^{-a \cdot b} \cdot x} \]
    8. Step-by-step derivation
      1. *-commutative71.9%

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

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

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

        \[\leadsto x \cdot \frac{1}{\color{blue}{{\left(e^{b}\right)}^{a}}} \]
      5. associate-*r/61.4%

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

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

      \[\leadsto \color{blue}{\frac{x}{{\left(e^{b}\right)}^{a}}} \]
    10. Taylor expanded in a around 0 23.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - b \cdot \left(a \cdot x\right)\right) - a \cdot \left(a \cdot \left(\left({b}^{2} \cdot x\right) \cdot \color{blue}{-0.5}\right)\right) \]
      14. associate-*l*44.8%

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

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

    if -8.2000000000000008e-273 < y < 1.24e-266 or 3.29999999999999984e-76 < y < 4.5e90

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x} + \left(-a \cdot b\right) \cdot x \]
      4. distribute-lft-neg-in27.1%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(-1 \cdot \left(a \cdot \left(b \cdot x\right)\right)\right) \cdot \left(-1 \cdot \left(a \cdot \left(b \cdot x\right)\right)\right) - x \cdot x}{-1 \cdot \left(a \cdot \left(b \cdot x\right)\right) - x}} \]
      9. div-sub20.8%

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

      \[\leadsto \color{blue}{\frac{{\left(a \cdot \left(b \cdot x\right)\right)}^{2}}{a \cdot \left(b \cdot x\right) - x} - \frac{x \cdot x}{a \cdot \left(b \cdot x\right) - x}} \]
    10. Step-by-step derivation
      1. div-sub16.9%

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

      \[\leadsto \color{blue}{\frac{{\left(a \cdot \left(b \cdot x\right)\right)}^{2} - x \cdot x}{a \cdot \left(b \cdot x\right) - x}} \]
    12. Taylor expanded in a around 0 43.8%

      \[\leadsto \frac{\color{blue}{-1 \cdot {x}^{2}}}{a \cdot \left(b \cdot x\right) - x} \]
    13. Step-by-step derivation
      1. unpow243.8%

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

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

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

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

    if 4.5e90 < y

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x} + \left(-a \cdot b\right) \cdot x \]
      4. distribute-lft-neg-in8.4%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{{\left(a \cdot \left(b \cdot x\right)\right)}^{2}}{a \cdot \left(b \cdot x\right) - x} - \frac{x \cdot x}{a \cdot \left(b \cdot x\right) - x}} \]
    10. Step-by-step derivation
      1. div-sub18.0%

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

      \[\leadsto \color{blue}{\frac{{\left(a \cdot \left(b \cdot x\right)\right)}^{2} - x \cdot x}{a \cdot \left(b \cdot x\right) - x}} \]
    12. Taylor expanded in a around inf 46.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.2 \cdot 10^{-273}:\\ \;\;\;\;\left(x - b \cdot \left(x \cdot a\right)\right) - a \cdot \left(a \cdot \left(\left(b \cdot b\right) \cdot \left(x \cdot -0.5\right)\right)\right)\\ \mathbf{elif}\;y \leq 1.24 \cdot 10^{-266}:\\ \;\;\;\;\frac{x \cdot \left(-x\right)}{a \cdot \left(x \cdot b\right) - x}\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{-76}:\\ \;\;\;\;\left(x - b \cdot \left(x \cdot a\right)\right) - a \cdot \left(a \cdot \left(\left(b \cdot b\right) \cdot \left(x \cdot -0.5\right)\right)\right)\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{+90}:\\ \;\;\;\;\frac{x \cdot \left(-x\right)}{a \cdot \left(x \cdot b\right) - x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(a \cdot a\right) \cdot \left(\left(b \cdot b\right) \cdot \left(x \cdot x\right)\right)}{a \cdot \left(x \cdot b\right) - x}\\ \end{array} \]

Alternative 11: 33.7% accurate, 15.0× speedup?

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

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

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


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

    1. Initial program 92.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 73.1%

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative73.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{{\left(a \cdot \left(b \cdot x\right)\right)}^{2}}{a \cdot \left(b \cdot x\right) - x} - \frac{x \cdot x}{a \cdot \left(b \cdot x\right) - x}} \]
    10. Step-by-step derivation
      1. div-sub14.2%

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

      \[\leadsto \color{blue}{\frac{{\left(a \cdot \left(b \cdot x\right)\right)}^{2} - x \cdot x}{a \cdot \left(b \cdot x\right) - x}} \]
    12. Taylor expanded in a around 0 40.7%

      \[\leadsto \frac{\color{blue}{-1 \cdot {x}^{2}}}{a \cdot \left(b \cdot x\right) - x} \]
    13. Step-by-step derivation
      1. unpow240.7%

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

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

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

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

    if -1.6499999999999999e-19 < a

    1. Initial program 97.5%

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

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

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

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

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

      \[\leadsto \color{blue}{e^{\left(\log z - t\right) \cdot y + -1 \cdot \left(a \cdot b\right)} \cdot x} \]
    5. Step-by-step derivation
      1. mul-1-neg97.0%

        \[\leadsto e^{\left(\log z - t\right) \cdot y + \color{blue}{\left(-a \cdot b\right)}} \cdot x \]
      2. unsub-neg97.0%

        \[\leadsto e^{\color{blue}{\left(\log z - t\right) \cdot y - a \cdot b}} \cdot x \]
    6. Applied egg-rr97.0%

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

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

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

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

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

        \[\leadsto x \cdot \frac{1}{\color{blue}{{\left(e^{b}\right)}^{a}}} \]
      5. associate-*r/56.5%

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

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

      \[\leadsto \color{blue}{\frac{x}{{\left(e^{b}\right)}^{a}}} \]
    10. Taylor expanded in a around 0 22.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - b \cdot \left(a \cdot x\right)\right) - a \cdot \left(a \cdot \left(\left({b}^{2} \cdot x\right) \cdot \color{blue}{-0.5}\right)\right) \]
      14. associate-*l*39.2%

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

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

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

Alternative 12: 33.5% accurate, 15.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{-33} \lor \neg \left(y \leq -8.2 \cdot 10^{-278} \lor \neg \left(y \leq 4 \cdot 10^{-283}\right) \land y \leq 1.45 \cdot 10^{-116}\right):\\ \;\;\;\;\frac{x \cdot \left(-x\right)}{a \cdot \left(x \cdot b\right) - x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= y -4.5e-33)
         (not
          (or (<= y -8.2e-278) (and (not (<= y 4e-283)) (<= y 1.45e-116)))))
   (/ (* x (- x)) (- (* a (* x b)) x))
   (* x (- 1.0 (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((y <= -4.5e-33) || !((y <= -8.2e-278) || (!(y <= 4e-283) && (y <= 1.45e-116)))) {
		tmp = (x * -x) / ((a * (x * b)) - x);
	} else {
		tmp = x * (1.0 - (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 <= (-4.5d-33)) .or. (.not. (y <= (-8.2d-278)) .or. (.not. (y <= 4d-283)) .and. (y <= 1.45d-116))) then
        tmp = (x * -x) / ((a * (x * b)) - x)
    else
        tmp = x * (1.0d0 - (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 <= -4.5e-33) || !((y <= -8.2e-278) || (!(y <= 4e-283) && (y <= 1.45e-116)))) {
		tmp = (x * -x) / ((a * (x * b)) - x);
	} else {
		tmp = x * (1.0 - (a * b));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (y <= -4.5e-33) or not ((y <= -8.2e-278) or (not (y <= 4e-283) and (y <= 1.45e-116))):
		tmp = (x * -x) / ((a * (x * b)) - x)
	else:
		tmp = x * (1.0 - (a * b))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((y <= -4.5e-33) || !((y <= -8.2e-278) || (!(y <= 4e-283) && (y <= 1.45e-116))))
		tmp = Float64(Float64(x * Float64(-x)) / Float64(Float64(a * Float64(x * b)) - x));
	else
		tmp = Float64(x * Float64(1.0 - Float64(a * b)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((y <= -4.5e-33) || ~(((y <= -8.2e-278) || (~((y <= 4e-283)) && (y <= 1.45e-116)))))
		tmp = (x * -x) / ((a * (x * b)) - x);
	else
		tmp = x * (1.0 - (a * b));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.5e-33], N[Not[Or[LessEqual[y, -8.2e-278], And[N[Not[LessEqual[y, 4e-283]], $MachinePrecision], LessEqual[y, 1.45e-116]]]], $MachinePrecision]], N[(N[(x * (-x)), $MachinePrecision] / N[(N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{-33} \lor \neg \left(y \leq -8.2 \cdot 10^{-278} \lor \neg \left(y \leq 4 \cdot 10^{-283}\right) \land y \leq 1.45 \cdot 10^{-116}\right):\\
\;\;\;\;\frac{x \cdot \left(-x\right)}{a \cdot \left(x \cdot b\right) - x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.49999999999999991e-33 or -8.20000000000000002e-278 < y < 3.99999999999999979e-283 or 1.4499999999999999e-116 < y

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x} + \left(-a \cdot b\right) \cdot x \]
      4. distribute-lft-neg-in14.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\left(-1 \cdot \left(a \cdot \left(b \cdot x\right)\right)\right) \cdot \left(-1 \cdot \left(a \cdot \left(b \cdot x\right)\right)\right) - x \cdot x}{-1 \cdot \left(a \cdot \left(b \cdot x\right)\right) - x}} \]
      9. div-sub18.6%

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

      \[\leadsto \color{blue}{\frac{{\left(a \cdot \left(b \cdot x\right)\right)}^{2}}{a \cdot \left(b \cdot x\right) - x} - \frac{x \cdot x}{a \cdot \left(b \cdot x\right) - x}} \]
    10. Step-by-step derivation
      1. div-sub14.3%

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

      \[\leadsto \color{blue}{\frac{{\left(a \cdot \left(b \cdot x\right)\right)}^{2} - x \cdot x}{a \cdot \left(b \cdot x\right) - x}} \]
    12. Taylor expanded in a around 0 33.9%

      \[\leadsto \frac{\color{blue}{-1 \cdot {x}^{2}}}{a \cdot \left(b \cdot x\right) - x} \]
    13. Step-by-step derivation
      1. unpow233.9%

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

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

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

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

    if -4.49999999999999991e-33 < y < -8.20000000000000002e-278 or 3.99999999999999979e-283 < y < 1.4499999999999999e-116

    1. Initial program 96.8%

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative87.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{-33} \lor \neg \left(y \leq -8.2 \cdot 10^{-278} \lor \neg \left(y \leq 4 \cdot 10^{-283}\right) \land y \leq 1.45 \cdot 10^{-116}\right):\\ \;\;\;\;\frac{x \cdot \left(-x\right)}{a \cdot \left(x \cdot b\right) - x}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \end{array} \]

Alternative 13: 32.8% accurate, 23.9× speedup?

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

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

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

\mathbf{elif}\;y \leq 1.9 \cdot 10^{-6}:\\
\;\;\;\;\frac{x}{1 + a \cdot b}\\

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


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

    1. Initial program 96.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 44.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1200000000000001e41 < y < 6.50000000000000014e-126

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative82.5%

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

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

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

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

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

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

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

    if 6.50000000000000014e-126 < y < 1.9e-6

    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. Step-by-step derivation
      1. fma-def100.0%

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

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

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

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

      \[\leadsto \color{blue}{e^{\left(\log z - t\right) \cdot y + -1 \cdot \left(a \cdot b\right)} \cdot x} \]
    5. Step-by-step derivation
      1. mul-1-neg100.0%

        \[\leadsto e^{\left(\log z - t\right) \cdot y + \color{blue}{\left(-a \cdot b\right)}} \cdot x \]
      2. unsub-neg100.0%

        \[\leadsto e^{\color{blue}{\left(\log z - t\right) \cdot y - a \cdot b}} \cdot x \]
    6. Applied egg-rr100.0%

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

      \[\leadsto \color{blue}{e^{-a \cdot b} \cdot x} \]
    8. Step-by-step derivation
      1. *-commutative74.8%

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

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

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

        \[\leadsto x \cdot \frac{1}{\color{blue}{{\left(e^{b}\right)}^{a}}} \]
      5. associate-*r/65.4%

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

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

      \[\leadsto \color{blue}{\frac{x}{{\left(e^{b}\right)}^{a}}} \]
    10. Taylor expanded in b around 0 32.3%

      \[\leadsto \frac{x}{\color{blue}{a \cdot b + 1}} \]

    if 1.9e-6 < y

    1. Initial program 98.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 42.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.12 \cdot 10^{+41}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{-126}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-6}:\\ \;\;\;\;\frac{x}{1 + a \cdot b}\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a \cdot \left(-x\right)\right)\\ \end{array} \]

Alternative 14: 30.9% accurate, 28.3× speedup?

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

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

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

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


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

    1. Initial program 96.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 44.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.3499999999999998e41 < y < 2.25000000000000006e-116

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

    if 2.25000000000000006e-116 < y

    1. Initial program 98.8%

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative53.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.35 \cdot 10^{+41}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{elif}\;y \leq 2.25 \cdot 10^{-116}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(a \cdot \left(-x\right)\right)\\ \end{array} \]

Alternative 15: 28.0% accurate, 31.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{-16} \lor \neg \left(y \leq 8.2 \cdot 10^{-5}\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.35e-16 or 8.20000000000000009e-5 < y

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.35e-16 < y < 8.20000000000000009e-5

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

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

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

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

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

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

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

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

Alternative 16: 27.3% accurate, 31.1× speedup?

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

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

\mathbf{elif}\;y \leq 4.1 \cdot 10^{-103}:\\
\;\;\;\;x\\

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


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

    1. Initial program 96.9%

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative46.7%

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

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

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

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

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

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

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

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

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

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

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

    if -6.00000000000000012e-17 < y < 4.09999999999999996e-103

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

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

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

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

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

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

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

    if 4.09999999999999996e-103 < y

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 27.2% accurate, 31.1× speedup?

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

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

\mathbf{elif}\;y \leq 4.1 \cdot 10^{-103}:\\
\;\;\;\;x\\

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


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

    1. Initial program 97.1%

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative49.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.5000000000000005e-39 < y < 4.09999999999999996e-103

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative86.5%

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

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

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

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

    if 4.09999999999999996e-103 < y

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 24.7% accurate, 34.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.86e8 or 5.80000000000000049e33 < y

    1. Initial program 98.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 43.5%

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative43.5%

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

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

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

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

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

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

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

        \[\leadsto x \cdot {\left(e^{b}\right)}^{\color{blue}{\left(\sqrt{a} \cdot \sqrt{a}\right)}} \]
      6. add-sqr-sqrt13.3%

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

        \[\leadsto x \cdot \color{blue}{e^{b \cdot a}} \]
      8. *-commutative13.2%

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

        \[\leadsto x \cdot \color{blue}{{\left(e^{a}\right)}^{b}} \]
    6. Applied egg-rr13.2%

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

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

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

    if -9.86e8 < y < 5.80000000000000049e33

    1. Initial program 94.9%

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      2. *-commutative81.7%

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

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

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

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

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

Alternative 19: 24.9% accurate, 34.5× speedup?

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

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

\mathbf{elif}\;y \leq 45000000000000:\\
\;\;\;\;x\\

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


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

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{e^{b \cdot a}} \]
      8. *-commutative13.0%

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

        \[\leadsto x \cdot \color{blue}{{\left(e^{a}\right)}^{b}} \]
    6. Applied egg-rr11.3%

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

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

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

    if -9.86e8 < y < 4.5e13

    1. Initial program 94.8%

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

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

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

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

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

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

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

    if 4.5e13 < y

    1. Initial program 100.0%

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{{\left(e^{b}\right)}^{\left(-a\right)}} \]
      2. add-sqr-sqrt20.9%

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

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

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

        \[\leadsto x \cdot {\left(e^{b}\right)}^{\color{blue}{\left(\sqrt{a} \cdot \sqrt{a}\right)}} \]
      6. add-sqr-sqrt15.2%

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

        \[\leadsto x \cdot \color{blue}{e^{b \cdot a}} \]
      8. *-commutative15.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -986000000:\\ \;\;\;\;a \cdot \left(x \cdot b\right)\\ \mathbf{elif}\;y \leq 45000000000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(x \cdot a\right)\\ \end{array} \]

Alternative 20: 19.5% accurate, 315.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 96.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 66.2%

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

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

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

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

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

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

    \[\leadsto x \]

Reproduce

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