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

Percentage Accurate: 96.5% → 99.6%
Time: 24.0s
Alternatives: 19
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 96.5% accurate, 1.0× speedup?

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

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

Alternative 1: 99.6% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

Alternative 2: 96.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x \cdot e^{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 96.9%

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

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

Alternative 3: 90.4% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;y \leq -4 \cdot 10^{-183}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 4 \cdot 10^{+52}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.2000000000000001e144 or 4e52 < y

    1. Initial program 98.9%

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

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

    if -3.2000000000000001e144 < y < -4.00000000000000002e-183 or 5.0000000000000001e-225 < y < 4e52

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

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

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

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

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

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

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

        \[\leadsto x \cdot e^{\left(-a \cdot b\right) + \color{blue}{\left(-t \cdot y\right)}} \]
      3. unsub-neg90.9%

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

        \[\leadsto x \cdot e^{\left(-\color{blue}{b \cdot a}\right) - t \cdot y} \]
      5. distribute-rgt-neg-in90.9%

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

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

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

    if -4.00000000000000002e-183 < y < 5.0000000000000001e-225

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+144}:\\ \;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\ \mathbf{elif}\;y \leq -4 \cdot 10^{-183}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right) - y \cdot t}\\ \mathbf{elif}\;y \leq 5 \cdot 10^{-225}:\\ \;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+52}:\\ \;\;\;\;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 4: 96.0% 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 e^{\color{blue}{-1 \cdot \left(a \cdot b\right) + y \cdot \left(\log z - t\right)}} \]
  3. Final simplification96.1%

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

Alternative 5: 83.5% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{-153} \lor \neg \left(t \leq 4.7 \cdot 10^{-219}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right) - y \cdot t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.20000000000000008e-153 or 4.7e-219 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.20000000000000008e-153 < t < 4.7e-219

    1. Initial program 97.8%

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

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

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

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

Alternative 6: 75.7% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{-14} \lor \neg \left(y \leq 3.6 \cdot 10^{-12}\right):\\
\;\;\;\;x \cdot {z}^{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.4999999999999999e-14 or 3.6e-12 < y

    1. Initial program 99.2%

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

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

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

    if -1.4999999999999999e-14 < y < 3.6e-12

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 71.2% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -340 \lor \neg \left(t \leq 2.2 \cdot 10^{+116}\right):\\ \;\;\;\;x \cdot e^{-y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= t -340.0) (not (<= t 2.2e+116)))
   (* 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 <= -340.0) || !(t <= 2.2e+116)) {
		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 <= (-340.0d0)) .or. (.not. (t <= 2.2d+116))) 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 <= -340.0) || !(t <= 2.2e+116)) {
		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 <= -340.0) or not (t <= 2.2e+116):
		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 <= -340.0) || !(t <= 2.2e+116))
		tmp = Float64(x * exp(Float64(-Float64(y * 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 <= -340.0) || ~((t <= 2.2e+116)))
		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, -340.0], N[Not[LessEqual[t, 2.2e+116]], $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 -340 \lor \neg \left(t \leq 2.2 \cdot 10^{+116}\right):\\
\;\;\;\;x \cdot e^{-y \cdot t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -340 or 2.2e116 < t

    1. Initial program 95.9%

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

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

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

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

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

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

    if -340 < t < 2.2e116

    1. Initial program 97.5%

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

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

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

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

Alternative 8: 73.1% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{-10} \lor \neg \left(y \leq 3.6 \cdot 10^{-12}\right):\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= y -1.7e-10) (not (<= y 3.6e-12)))
   (* 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 <= -1.7e-10) || !(y <= 3.6e-12)) {
		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 <= (-1.7d-10)) .or. (.not. (y <= 3.6d-12))) 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 <= -1.7e-10) || !(y <= 3.6e-12)) {
		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 <= -1.7e-10) or not (y <= 3.6e-12):
		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 <= -1.7e-10) || !(y <= 3.6e-12))
		tmp = Float64(x * (z ^ y));
	else
		tmp = Float64(x * exp(Float64(a * Float64(-b))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((y <= -1.7e-10) || ~((y <= 3.6e-12)))
		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, -1.7e-10], N[Not[LessEqual[y, 3.6e-12]], $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 -1.7 \cdot 10^{-10} \lor \neg \left(y \leq 3.6 \cdot 10^{-12}\right):\\
\;\;\;\;x \cdot {z}^{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.70000000000000007e-10 or 3.6e-12 < y

    1. Initial program 99.2%

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

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

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

    if -1.70000000000000007e-10 < y < 3.6e-12

    1. Initial program 94.6%

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

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

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

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

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

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

Alternative 9: 56.2% accurate, 3.0× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \color{blue}{\left(t \cdot x\right) \cdot y}\right) + 0.5 \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right) \]
      5. unpow233.2%

        \[\leadsto \left(x - \left(t \cdot x\right) \cdot y\right) + 0.5 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \left(x \cdot {y}^{2}\right)\right) \]
      6. *-commutative33.2%

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

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

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

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

        \[\leadsto \color{blue}{\left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right) \cdot 0.5} \]
      2. unpow238.5%

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

        \[\leadsto \left(\left(t \cdot t\right) \cdot \color{blue}{\left({y}^{2} \cdot x\right)}\right) \cdot 0.5 \]
      4. unpow238.5%

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

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

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

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

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

    if -5.70000000000000009e-8 < t

    1. Initial program 97.4%

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

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

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

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

Alternative 10: 38.7% accurate, 14.9× speedup?

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

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

\mathbf{elif}\;b \leq 6.5 \cdot 10^{+54}:\\
\;\;\;\;x \cdot \left(\left(1 - y \cdot t\right) + 0.5 \cdot \left(\left(y \cdot t\right) \cdot \left(y \cdot t\right)\right)\right)\\

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


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

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(1 - \color{blue}{y \cdot t}\right) + 0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right)\right) \]
      5. *-commutative26.6%

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

        \[\leadsto x \cdot \left(\left(1 - y \cdot t\right) + 0.5 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot {t}^{2}\right)\right) \]
      7. unpow226.6%

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

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

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

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

        \[\leadsto x \cdot \left(0.5 \cdot \color{blue}{\left({y}^{2} \cdot {t}^{2}\right)}\right) \]
      2. unpow245.5%

        \[\leadsto x \cdot \left(0.5 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot {t}^{2}\right)\right) \]
      3. unpow245.5%

        \[\leadsto x \cdot \left(0.5 \cdot \left(\left(y \cdot y\right) \cdot \color{blue}{\left(t \cdot t\right)}\right)\right) \]
    10. Simplified45.5%

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

    if -1.42000000000000005e-39 < b < 6.5e54

    1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(1 - \color{blue}{y \cdot t}\right) + 0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right)\right) \]
      5. *-commutative42.6%

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

        \[\leadsto x \cdot \left(\left(1 - y \cdot t\right) + 0.5 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot {t}^{2}\right)\right) \]
      7. unpow242.6%

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

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

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

    if 6.5e54 < b

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \color{blue}{\left(t \cdot x\right) \cdot y}\right) + 0.5 \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right) \]
      5. unpow223.4%

        \[\leadsto \left(x - \left(t \cdot x\right) \cdot y\right) + 0.5 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \left(x \cdot {y}^{2}\right)\right) \]
      6. *-commutative23.4%

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

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

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

      \[\leadsto \color{blue}{0.5 \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)} \]
    9. Step-by-step derivation
      1. *-commutative35.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \left(\left(t \cdot \left(y \cdot \left(y \cdot x\right)\right)\right) \cdot 0.5\right)} \]
    10. Simplified44.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.42 \cdot 10^{-39}:\\ \;\;\;\;x \cdot \left(0.5 \cdot \left(\left(y \cdot y\right) \cdot \left(t \cdot t\right)\right)\right)\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{+54}:\\ \;\;\;\;x \cdot \left(\left(1 - y \cdot t\right) + 0.5 \cdot \left(\left(y \cdot t\right) \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(\left(t \cdot \left(y \cdot \left(x \cdot y\right)\right)\right) \cdot 0.5\right)\\ \end{array} \]

Alternative 11: 37.9% accurate, 16.4× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \left(\left(t \cdot \left(y \cdot \left(x \cdot y\right)\right)\right) \cdot 0.5\right)\\
\mathbf{if}\;y \leq -6.4 \cdot 10^{-41}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -2.2 \cdot 10^{-279}:\\
\;\;\;\;x - t \cdot \left(x \cdot y\right)\\

\mathbf{elif}\;y \leq 3.2 \cdot 10^{-242}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 9.5 \cdot 10^{-79}:\\
\;\;\;\;x \cdot \left(1 - a \cdot z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.40000000000000024e-41 or -2.2e-279 < y < 3.19999999999999999e-242

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \color{blue}{\left(t \cdot x\right) \cdot y}\right) + 0.5 \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right) \]
      5. unpow230.3%

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

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

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

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

      \[\leadsto \color{blue}{0.5 \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)} \]
    9. Step-by-step derivation
      1. *-commutative42.3%

        \[\leadsto \color{blue}{\left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right) \cdot 0.5} \]
      2. unpow242.3%

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

        \[\leadsto \left(\left(t \cdot t\right) \cdot \color{blue}{\left({y}^{2} \cdot x\right)}\right) \cdot 0.5 \]
      4. unpow242.3%

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

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

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

        \[\leadsto \color{blue}{t \cdot \left(\left(t \cdot \left(y \cdot \left(y \cdot x\right)\right)\right) \cdot 0.5\right)} \]
    10. Simplified52.5%

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

    if -6.40000000000000024e-41 < y < -2.2e-279

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

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

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

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

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

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

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

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

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

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

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

    if 3.19999999999999999e-242 < y < 9.4999999999999997e-79

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.4999999999999997e-79 < y

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(1 - \color{blue}{y \cdot t}\right) + 0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right)\right) \]
      5. *-commutative28.1%

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

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

        \[\leadsto x \cdot \left(\left(1 - y \cdot t\right) + 0.5 \cdot \left(\left(y \cdot y\right) \cdot \color{blue}{\left(t \cdot t\right)}\right)\right) \]
      8. unswap-sqr27.3%

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

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

      \[\leadsto x \cdot \color{blue}{\left(0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right)\right)} \]
    9. Step-by-step derivation
      1. *-commutative34.7%

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

        \[\leadsto x \cdot \left(0.5 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot {t}^{2}\right)\right) \]
      3. unpow234.7%

        \[\leadsto x \cdot \left(0.5 \cdot \left(\left(y \cdot y\right) \cdot \color{blue}{\left(t \cdot t\right)}\right)\right) \]
    10. Simplified34.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.4 \cdot 10^{-41}:\\ \;\;\;\;t \cdot \left(\left(t \cdot \left(y \cdot \left(x \cdot y\right)\right)\right) \cdot 0.5\right)\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{-279}:\\ \;\;\;\;x - t \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-242}:\\ \;\;\;\;t \cdot \left(\left(t \cdot \left(y \cdot \left(x \cdot y\right)\right)\right) \cdot 0.5\right)\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-79}:\\ \;\;\;\;x \cdot \left(1 - a \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(0.5 \cdot \left(\left(y \cdot y\right) \cdot \left(t \cdot t\right)\right)\right)\\ \end{array} \]

Alternative 12: 33.5% accurate, 20.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.4 \cdot 10^{-42} \lor \neg \left(b \leq 3.8 \cdot 10^{+65}\right):\\
\;\;\;\;0.5 \cdot \left(\left(t \cdot t\right) \cdot \left(x \cdot \left(y \cdot y\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.4000000000000001e-42 or 3.80000000000000011e65 < b

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\left(1 - \color{blue}{y \cdot t}\right) + 0.5 \cdot \left({t}^{2} \cdot {y}^{2}\right)\right) \]
      5. *-commutative23.3%

        \[\leadsto x \cdot \left(\left(1 - y \cdot t\right) + 0.5 \cdot \color{blue}{\left({y}^{2} \cdot {t}^{2}\right)}\right) \]
      6. unpow223.3%

        \[\leadsto x \cdot \left(\left(1 - y \cdot t\right) + 0.5 \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot {t}^{2}\right)\right) \]
      7. unpow223.3%

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

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

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

      \[\leadsto \color{blue}{0.5 \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)} \]
    9. Step-by-step derivation
      1. unpow241.1%

        \[\leadsto 0.5 \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \left(x \cdot {y}^{2}\right)\right) \]
      2. unpow241.1%

        \[\leadsto 0.5 \cdot \left(\left(t \cdot t\right) \cdot \left(x \cdot \color{blue}{\left(y \cdot y\right)}\right)\right) \]
    10. Simplified41.1%

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

    if -4.4000000000000001e-42 < b < 3.80000000000000011e65

    1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.4 \cdot 10^{-42} \lor \neg \left(b \leq 3.8 \cdot 10^{+65}\right):\\ \;\;\;\;0.5 \cdot \left(\left(t \cdot t\right) \cdot \left(x \cdot \left(y \cdot y\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x - t \cdot \left(x \cdot y\right)\\ \end{array} \]

Alternative 13: 35.2% accurate, 20.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.05 \cdot 10^{-42} \lor \neg \left(b \leq 2 \cdot 10^{+73}\right):\\
\;\;\;\;t \cdot \left(\left(t \cdot \left(y \cdot \left(x \cdot y\right)\right)\right) \cdot 0.5\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.0500000000000001e-42 or 1.99999999999999997e73 < b

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \color{blue}{\left(t \cdot x\right) \cdot y}\right) + 0.5 \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right) \]
      5. unpow223.0%

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

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

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

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

      \[\leadsto \color{blue}{0.5 \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)} \]
    9. Step-by-step derivation
      1. *-commutative41.1%

        \[\leadsto \color{blue}{\left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right) \cdot 0.5} \]
      2. unpow241.1%

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

        \[\leadsto \left(\left(t \cdot t\right) \cdot \color{blue}{\left({y}^{2} \cdot x\right)}\right) \cdot 0.5 \]
      4. unpow241.1%

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

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

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

        \[\leadsto \color{blue}{t \cdot \left(\left(t \cdot \left(y \cdot \left(y \cdot x\right)\right)\right) \cdot 0.5\right)} \]
    10. Simplified44.8%

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

    if -2.0500000000000001e-42 < b < 1.99999999999999997e73

    1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.05 \cdot 10^{-42} \lor \neg \left(b \leq 2 \cdot 10^{+73}\right):\\ \;\;\;\;t \cdot \left(\left(t \cdot \left(y \cdot \left(x \cdot y\right)\right)\right) \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;x - t \cdot \left(x \cdot y\right)\\ \end{array} \]

Alternative 14: 28.3% accurate, 28.3× speedup?

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

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

\mathbf{elif}\;y \leq 3.1 \cdot 10^{-69}:\\
\;\;\;\;x \cdot \left(1 - a \cdot z\right)\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.00000000000000005e-41 < y < 3.0999999999999999e-69

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.0999999999999999e-69 < y

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{-41}:\\ \;\;\;\;t \cdot \left(y \cdot \left(-x\right)\right)\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-69}:\\ \;\;\;\;x \cdot \left(1 - a \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot t\right) \cdot \left(-y\right)\\ \end{array} \]

Alternative 15: 28.0% accurate, 28.3× speedup?

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

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

\mathbf{elif}\;b \leq 1.22 \cdot 10^{+88}:\\
\;\;\;\;x - t \cdot \left(x \cdot y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.6e53

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.6e53 < b < 1.22e88

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

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

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

    if 1.22e88 < b

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.6 \cdot 10^{+53}:\\ \;\;\;\;\left(x \cdot t\right) \cdot \left(-y\right)\\ \mathbf{elif}\;b \leq 1.22 \cdot 10^{+88}:\\ \;\;\;\;x - t \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \cdot \left(-x\right)\right)\\ \end{array} \]

Alternative 16: 27.4% accurate, 31.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-41} \lor \neg \left(y \leq 1.65 \cdot 10^{-68}\right):\\
\;\;\;\;\left(x \cdot t\right) \cdot \left(-y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.7e-41 or 1.6499999999999999e-68 < y

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7e-41 < y < 1.6499999999999999e-68

    1. Initial program 93.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{-41} \lor \neg \left(y \leq 1.65 \cdot 10^{-68}\right):\\ \;\;\;\;\left(x \cdot t\right) \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 17: 28.0% accurate, 31.1× speedup?

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

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

\mathbf{elif}\;y \leq 4.2 \cdot 10^{-69}:\\
\;\;\;\;x\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.00000000000000005e-41 < y < 4.1999999999999999e-69

    1. Initial program 93.8%

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

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

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

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

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

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

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

    if 4.1999999999999999e-69 < y

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{-41}:\\ \;\;\;\;t \cdot \left(y \cdot \left(-x\right)\right)\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{-69}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot t\right) \cdot \left(-y\right)\\ \end{array} \]

Alternative 18: 28.5% accurate, 34.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.94999999999999998e52

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.94999999999999998e52 < b

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 19.4% 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 t around inf 52.9%

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

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

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

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

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

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

    \[\leadsto x \]

Reproduce

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