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

Percentage Accurate: 98.0% → 98.0%
Time: 21.2s
Alternatives: 12
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 12 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: 98.0% 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: 98.0% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 86.2% accurate, 1.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.8999999999999999e-69 or 6.90000000000000001e-28 < y

    1. Initial program 97.3%

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

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

    if -1.8999999999999999e-69 < y < 6.90000000000000001e-28

    1. Initial program 99.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.9 \cdot 10^{-69} \lor \neg \left(y \leq 6.9 \cdot 10^{-28}\right):\\ \;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{-a \cdot b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 74.8% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{+24} \lor \neg \left(y \leq 7\right):\\
\;\;\;\;x \cdot {z}^{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.6000000000000003e24 or 7 < y

    1. Initial program 97.6%

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

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

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

    if -5.6000000000000003e24 < y < 7

    1. Initial program 98.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.6 \cdot 10^{+24} \lor \neg \left(y \leq 7\right):\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{-a \cdot b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 57.5% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.08 \cdot 10^{-17} \lor \neg \left(y \leq 4.5 \cdot 10^{-5}\right):\\
\;\;\;\;x \cdot {z}^{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.07999999999999995e-17 or 4.50000000000000028e-5 < y

    1. Initial program 97.7%

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

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

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

    if -1.07999999999999995e-17 < y < 4.50000000000000028e-5

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.08 \cdot 10^{-17} \lor \neg \left(y \leq 4.5 \cdot 10^{-5}\right):\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 33.6% accurate, 18.5× speedup?

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

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

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

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


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

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

    if -9.5000000000000004e44 < y < 1.8e-51

    1. Initial program 98.4%

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\left(1 + -1 \cdot \left(a \cdot b\right)\right)} \]
    7. 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)} \]
    8. Simplified48.2%

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

    if 1.8e-51 < y

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.5 \cdot 10^{+44}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-51}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 33.6% accurate, 18.5× speedup?

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

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

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

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


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

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

    if -4.19999999999999991e42 < y < 1.8e-51

    1. Initial program 98.4%

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\left(1 + -1 \cdot \left(a \cdot b\right)\right)} \]
    7. 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)} \]
    8. Simplified48.2%

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

    if 1.8e-51 < y

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{+42}:\\ \;\;\;\;x - t \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-51}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 25.8% accurate, 19.6× speedup?

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

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

\mathbf{elif}\;y \leq 1.02 \cdot 10^{-53}:\\
\;\;\;\;x\\

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


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

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2999999999999999e24 < y < 1.02000000000000002e-53

    1. Initial program 98.3%

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

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

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

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

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

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

    if 1.02000000000000002e-53 < y

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.3 \cdot 10^{+24}:\\ \;\;\;\;b \cdot \left(x \cdot a\right)\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{-53}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 26.0% accurate, 19.6× speedup?

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

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

\mathbf{elif}\;y \leq 7.4 \cdot 10^{-52}:\\
\;\;\;\;x\\

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


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

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.5999999999999999e24 < y < 7.3999999999999995e-52

    1. Initial program 98.3%

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

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

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

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

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

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

    if 7.3999999999999995e-52 < y

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.6 \cdot 10^{+24}:\\ \;\;\;\;b \cdot \left(x \cdot a\right)\\ \mathbf{elif}\;y \leq 7.4 \cdot 10^{-52}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 28.8% accurate, 19.6× speedup?

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

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

\mathbf{elif}\;y \leq 5.5 \cdot 10^{-54}:\\
\;\;\;\;x\\

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


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

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.32e39 < y < 5.50000000000000046e-54

    1. Initial program 98.4%

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

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

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

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

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

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

    if 5.50000000000000046e-54 < y

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.32 \cdot 10^{+39}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{-54}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 28.6% accurate, 19.6× speedup?

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

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

\mathbf{elif}\;y \leq 3.1 \cdot 10^{-52}:\\
\;\;\;\;x\\

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


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

    1. Initial program 98.4%

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999989e37 < y < 3.0999999999999999e-52

    1. Initial program 98.4%

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

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

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

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

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

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

    if 3.0999999999999999e-52 < y

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5 \cdot 10^{+37}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-52}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 24.3% accurate, 20.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.49999999999999997e24 or 1.8e-51 < y

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.49999999999999997e24 < y < 1.8e-51

    1. Initial program 98.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.5 \cdot 10^{+24} \lor \neg \left(y \leq 1.8 \cdot 10^{-51}\right):\\ \;\;\;\;b \cdot \left(x \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 19.8% 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 98.1%

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

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

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

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

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

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

    \[\leadsto x \]
  8. Add Preprocessing

Reproduce

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