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

Percentage Accurate: 96.7% → 99.3%
Time: 17.3s
Alternatives: 14
Speedup: 1.5×

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 14 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.7% 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.3% accurate, 1.5× speedup?

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

\\
x \cdot e^{y \cdot \left(\log z - t\right) - a \cdot \left(z + b\right)}
\end{array}
Derivation
  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 z around 0 100.0%

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

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

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

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

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

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

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

Alternative 2: 87.0% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.2 \cdot 10^{-114} \lor \neg \left(a \leq 1.7 \cdot 10^{-151}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right) - y \cdot t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.1999999999999997e-114 or 1.7000000000000001e-151 < a

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

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

    if -9.1999999999999997e-114 < a < 1.7000000000000001e-151

    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 a around 0 94.6%

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

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

Alternative 3: 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.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 z around 0 96.1%

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

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

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

      \[\leadsto x \cdot e^{\color{blue}{\left(\log z - t\right) \cdot y - a \cdot b}} \]
    4. *-commutative96.1%

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

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

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

Alternative 4: 54.4% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.4 \cdot 10^{+185} \lor \neg \left(a \leq 4.6 \cdot 10^{+61}\right):\\
\;\;\;\;x \cdot e^{z \cdot \left(-a\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.40000000000000013e185 or 4.5999999999999999e61 < a

    1. Initial program 89.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 z around 0 100.0%

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

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

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

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

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot z}} \]
      2. distribute-lft-neg-out44.5%

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

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

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

    if -5.40000000000000013e185 < a < 4.5999999999999999e61

    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 a around 0 82.2%

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

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

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

Alternative 5: 70.5% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.98 \cdot 10^{+29} \lor \neg \left(t \leq 2 \cdot 10^{-84}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.9799999999999999e29 or 2.0000000000000001e-84 < t

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

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

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

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

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

    if -2.9799999999999999e29 < t < 2.0000000000000001e-84

    1. Initial program 95.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.98 \cdot 10^{+29} \lor \neg \left(t \leq 2 \cdot 10^{-84}\right):\\ \;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \]

Alternative 6: 69.7% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.5 \cdot 10^{-94} \lor \neg \left(b \leq 1.32 \cdot 10^{-8}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -9.4999999999999997e-94 or 1.32000000000000007e-8 < b

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

    if -9.4999999999999997e-94 < b < 1.32000000000000007e-8

    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 a around 0 87.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9.5 \cdot 10^{-94} \lor \neg \left(b \leq 1.32 \cdot 10^{-8}\right):\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\ \end{array} \]

Alternative 7: 84.0% accurate, 2.9× speedup?

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

\\
x \cdot e^{a \cdot \left(-b\right) - y \cdot t}
\end{array}
Derivation
  1. Initial program 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 z around 0 96.1%

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

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

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

      \[\leadsto x \cdot e^{\color{blue}{\left(\log z - t\right) \cdot y - a \cdot b}} \]
    4. *-commutative96.1%

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

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

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

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

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

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

Alternative 8: 56.3% accurate, 2.9× speedup?

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

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

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

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

    if -0.00320000000000000015 < y < 3.7e-16

    1. Initial program 95.4%

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

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{\left(\log z - t\right) \cdot y - a \cdot b}} \]
      4. *-commutative93.9%

        \[\leadsto x \cdot e^{\left(\log z - t\right) \cdot y - \color{blue}{b \cdot a}} \]
    4. Simplified93.9%

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

      \[\leadsto \color{blue}{e^{-a \cdot b} \cdot x} \]
    6. Taylor expanded in a around 0 45.9%

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

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

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

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

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

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

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

Alternative 9: 28.1% accurate, 20.7× speedup?

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

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

\mathbf{elif}\;a \leq -5.2 \cdot 10^{-256}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 3.5 \cdot 10^{-230}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 1.02 \cdot 10^{+61}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.0499999999999999e131 or -5.2000000000000002e-256 < a < 3.49999999999999988e-230

    1. Initial program 92.4%

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

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{\left(\log z - t\right) \cdot y - a \cdot b}} \]
      4. *-commutative90.9%

        \[\leadsto x \cdot e^{\left(\log z - t\right) \cdot y - \color{blue}{b \cdot a}} \]
    4. Simplified90.9%

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

      \[\leadsto \color{blue}{e^{-a \cdot b} \cdot x} \]
    6. Taylor expanded in a around 0 27.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.0499999999999999e131 < a < -5.2000000000000002e-256 or 3.49999999999999988e-230 < a < 1.01999999999999999e61

    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 a around 0 82.1%

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

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

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

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

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

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

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

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

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

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

    if 1.01999999999999999e61 < a

    1. Initial program 93.3%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{e^{-a \cdot b} \cdot x} \]
    6. Taylor expanded in a around 0 29.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.05 \cdot 10^{+131}:\\ \;\;\;\;b \cdot \left(-x \cdot a\right)\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-256}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-230}:\\ \;\;\;\;b \cdot \left(-x \cdot a\right)\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{+61}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \end{array} \]

Alternative 10: 33.2% accurate, 28.3× speedup?

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

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

\mathbf{elif}\;y \leq 520000000000:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\

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


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

    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 a around 0 85.2%

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

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

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

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

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

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

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

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

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

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

    if -1.8e84 < y < 5.2e11

    1. Initial program 95.4%

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

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{\left(\log z - t\right) \cdot y - a \cdot b}} \]
      4. *-commutative94.1%

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

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

      \[\leadsto \color{blue}{e^{-a \cdot b} \cdot x} \]
    6. Taylor expanded in a around 0 42.9%

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

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

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

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

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

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

    if 5.2e11 < y

    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. Taylor expanded in z around 0 98.5%

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{\left(\log z - t\right) \cdot y - a \cdot b}} \]
      4. *-commutative98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 32.0% accurate, 28.3× speedup?

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

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

\mathbf{elif}\;y \leq 0.021:\\
\;\;\;\;x - a \cdot \left(x \cdot b\right)\\

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


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

    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 a around 0 85.2%

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999996e81 < y < 0.0210000000000000013

    1. Initial program 95.4%

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

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{\left(\log z - t\right) \cdot y - a \cdot b}} \]
      4. *-commutative94.1%

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

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

      \[\leadsto \color{blue}{e^{-a \cdot b} \cdot x} \]
    6. Taylor expanded in a around 0 43.7%

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

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

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

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

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

    if 0.0210000000000000013 < y

    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. Taylor expanded in z around 0 98.5%

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{\left(\log z - t\right) \cdot y - a \cdot b}} \]
      4. *-commutative98.5%

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

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

      \[\leadsto \color{blue}{e^{-a \cdot b} \cdot x} \]
    6. Taylor expanded in a around 0 10.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 26.7% accurate, 31.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.4 \cdot 10^{-47} \lor \neg \left(y \leq 4.8 \cdot 10^{-85}\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 < -8.4000000000000003e-47 or 4.8000000000000001e-85 < 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 z around 0 98.1%

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{\left(\log z - t\right) \cdot y - a \cdot b}} \]
      4. *-commutative98.1%

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

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

      \[\leadsto \color{blue}{e^{-a \cdot b} \cdot x} \]
    6. Taylor expanded in a around 0 18.0%

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

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

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

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

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

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

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

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

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

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

    if -8.4000000000000003e-47 < y < 4.8000000000000001e-85

    1. Initial program 95.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.4 \cdot 10^{-47} \lor \neg \left(y \leq 4.8 \cdot 10^{-85}\right):\\ \;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 13: 26.8% accurate, 31.1× speedup?

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

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

\mathbf{elif}\;y \leq 3.2 \cdot 10^{-85}:\\
\;\;\;\;x\\

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


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

    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. Taylor expanded in z around 0 98.5%

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{\left(\log z - t\right) \cdot y - a \cdot b}} \]
      4. *-commutative98.5%

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

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

      \[\leadsto \color{blue}{e^{-a \cdot b} \cdot x} \]
    6. Taylor expanded in a around 0 20.9%

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

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

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

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

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

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

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

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

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

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

    if -8.20000000000000003e-47 < y < 3.20000000000000027e-85

    1. Initial program 95.3%

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

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

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

    if 3.20000000000000027e-85 < 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. Taylor expanded in z around 0 97.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{e^{-a \cdot b} \cdot x} \]
    6. Taylor expanded in a around 0 15.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 18.9% accurate, 315.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 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 a around 0 69.6%

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

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

    \[\leadsto x \]

Reproduce

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