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

Percentage Accurate: 96.5% → 99.5%
Time: 21.5s
Alternatives: 20
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 96.5% accurate, 1.0× speedup?

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

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

Alternative 1: 99.5% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 84.2% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.62 \cdot 10^{+100} \lor \neg \left(a \leq 2.3 \cdot 10^{+70}\right):\\ \;\;\;\;x \cdot e^{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= a -1.62e+100) (not (<= a 2.3e+70)))
   (* x (exp (* a (- (log1p (- z)) b))))
   (* x (exp (* y (- (log z) t))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((a <= -1.62e+100) || !(a <= 2.3e+70)) {
		tmp = x * exp((a * (log1p(-z) - b)));
	} else {
		tmp = x * exp((y * (log(z) - t)));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((a <= -1.62e+100) || !(a <= 2.3e+70)) {
		tmp = x * Math.exp((a * (Math.log1p(-z) - b)));
	} else {
		tmp = x * Math.exp((y * (Math.log(z) - t)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (a <= -1.62e+100) or not (a <= 2.3e+70):
		tmp = x * math.exp((a * (math.log1p(-z) - b)))
	else:
		tmp = x * math.exp((y * (math.log(z) - t)))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((a <= -1.62e+100) || !(a <= 2.3e+70))
		tmp = Float64(x * exp(Float64(a * Float64(log1p(Float64(-z)) - b))));
	else
		tmp = Float64(x * exp(Float64(y * Float64(log(z) - t))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.62e+100], N[Not[LessEqual[a, 2.3e+70]], $MachinePrecision]], N[(x * N[Exp[N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.62 \cdot 10^{+100} \lor \neg \left(a \leq 2.3 \cdot 10^{+70}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.62000000000000003e100 or 2.29999999999999994e70 < a

    1. Initial program 93.1%

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

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

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

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

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

    if -1.62000000000000003e100 < a < 2.29999999999999994e70

    1. Initial program 99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.62 \cdot 10^{+100} \lor \neg \left(a \leq 2.3 \cdot 10^{+70}\right):\\ \;\;\;\;x \cdot e^{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 80.2% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{+110} \lor \neg \left(a \leq 1.5 \cdot 10^{+95}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.24999999999999995e110 or 1.49999999999999996e95 < a

    1. Initial program 92.8%

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

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

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

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

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

    if -1.24999999999999995e110 < a < 1.49999999999999996e95

    1. Initial program 99.9%

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

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

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

Alternative 5: 71.5% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{a \cdot \left(-b\right)}\\ t_2 := \frac{x}{e^{y \cdot t}}\\ \mathbf{if}\;t \leq -9 \cdot 10^{+26}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{-164}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-35}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+101}:\\ \;\;\;\;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))))) (t_2 (/ x (exp (* y t)))))
   (if (<= t -9e+26)
     t_2
     (if (<= t -5.8e-164)
       t_1
       (if (<= t 2.2e-35) (* x (pow z y)) (if (<= t 2.25e+101) 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));
	double t_2 = x / exp((y * t));
	double tmp;
	if (t <= -9e+26) {
		tmp = t_2;
	} else if (t <= -5.8e-164) {
		tmp = t_1;
	} else if (t <= 2.2e-35) {
		tmp = x * pow(z, y);
	} else if (t <= 2.25e+101) {
		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))
    t_2 = x / exp((y * t))
    if (t <= (-9d+26)) then
        tmp = t_2
    else if (t <= (-5.8d-164)) then
        tmp = t_1
    else if (t <= 2.2d-35) then
        tmp = x * (z ** y)
    else if (t <= 2.25d+101) 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));
	double t_2 = x / Math.exp((y * t));
	double tmp;
	if (t <= -9e+26) {
		tmp = t_2;
	} else if (t <= -5.8e-164) {
		tmp = t_1;
	} else if (t <= 2.2e-35) {
		tmp = x * Math.pow(z, y);
	} else if (t <= 2.25e+101) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x * math.exp((a * -b))
	t_2 = x / math.exp((y * t))
	tmp = 0
	if t <= -9e+26:
		tmp = t_2
	elif t <= -5.8e-164:
		tmp = t_1
	elif t <= 2.2e-35:
		tmp = x * math.pow(z, y)
	elif t <= 2.25e+101:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x * exp(Float64(a * Float64(-b))))
	t_2 = Float64(x / exp(Float64(y * t)))
	tmp = 0.0
	if (t <= -9e+26)
		tmp = t_2;
	elseif (t <= -5.8e-164)
		tmp = t_1;
	elseif (t <= 2.2e-35)
		tmp = Float64(x * (z ^ y));
	elseif (t <= 2.25e+101)
		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));
	t_2 = x / exp((y * t));
	tmp = 0.0;
	if (t <= -9e+26)
		tmp = t_2;
	elseif (t <= -5.8e-164)
		tmp = t_1;
	elseif (t <= 2.2e-35)
		tmp = x * (z ^ y);
	elseif (t <= 2.25e+101)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Exp[N[(y * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9e+26], t$95$2, If[LessEqual[t, -5.8e-164], t$95$1, If[LessEqual[t, 2.2e-35], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e+101], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -5.8 \cdot 10^{-164}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2.25 \cdot 10^{+101}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.99999999999999957e26 or 2.2500000000000001e101 < t

    1. Initial program 96.3%

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

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

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

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{-y \cdot t}} \]
      2. exp-neg83.3%

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
    7. Applied egg-rr83.3%

      \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
    8. Taylor expanded in x around 0 83.4%

      \[\leadsto \color{blue}{\frac{x}{e^{t \cdot y}}} \]

    if -8.99999999999999957e26 < t < -5.8e-164 or 2.19999999999999994e-35 < t < 2.2500000000000001e101

    1. Initial program 98.4%

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

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

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

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

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

    if -5.8e-164 < t < 2.19999999999999994e-35

    1. Initial program 98.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{+26}:\\ \;\;\;\;\frac{x}{e^{y \cdot t}}\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{-164}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-35}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+101}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{e^{y \cdot t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 71.3% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{if}\;t \leq -8.6 \cdot 10^{+26}:\\ \;\;\;\;x \cdot {e}^{\left(t \cdot \left(-y\right)\right)}\\ \mathbf{elif}\;t \leq -5.3 \cdot 10^{-149}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{-35}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+101}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{e^{y \cdot t}}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (exp (* a (- b))))))
   (if (<= t -8.6e+26)
     (* x (pow E (* t (- y))))
     (if (<= t -5.3e-149)
       t_1
       (if (<= t 2.05e-35)
         (* x (pow z y))
         (if (<= t 2e+101) t_1 (/ x (exp (* y t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * exp((a * -b));
	double tmp;
	if (t <= -8.6e+26) {
		tmp = x * pow(((double) M_E), (t * -y));
	} else if (t <= -5.3e-149) {
		tmp = t_1;
	} else if (t <= 2.05e-35) {
		tmp = x * pow(z, y);
	} else if (t <= 2e+101) {
		tmp = t_1;
	} else {
		tmp = x / exp((y * t));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * Math.exp((a * -b));
	double tmp;
	if (t <= -8.6e+26) {
		tmp = x * Math.pow(Math.E, (t * -y));
	} else if (t <= -5.3e-149) {
		tmp = t_1;
	} else if (t <= 2.05e-35) {
		tmp = x * Math.pow(z, y);
	} else if (t <= 2e+101) {
		tmp = t_1;
	} else {
		tmp = x / Math.exp((y * t));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x * math.exp((a * -b))
	tmp = 0
	if t <= -8.6e+26:
		tmp = x * math.pow(math.e, (t * -y))
	elif t <= -5.3e-149:
		tmp = t_1
	elif t <= 2.05e-35:
		tmp = x * math.pow(z, y)
	elif t <= 2e+101:
		tmp = t_1
	else:
		tmp = x / math.exp((y * t))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x * exp(Float64(a * Float64(-b))))
	tmp = 0.0
	if (t <= -8.6e+26)
		tmp = Float64(x * (exp(1) ^ Float64(t * Float64(-y))));
	elseif (t <= -5.3e-149)
		tmp = t_1;
	elseif (t <= 2.05e-35)
		tmp = Float64(x * (z ^ y));
	elseif (t <= 2e+101)
		tmp = t_1;
	else
		tmp = Float64(x / exp(Float64(y * t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x * exp((a * -b));
	tmp = 0.0;
	if (t <= -8.6e+26)
		tmp = x * (2.71828182845904523536 ^ (t * -y));
	elseif (t <= -5.3e-149)
		tmp = t_1;
	elseif (t <= 2.05e-35)
		tmp = x * (z ^ y);
	elseif (t <= 2e+101)
		tmp = t_1;
	else
		tmp = x / exp((y * t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.6e+26], N[(x * N[Power[E, N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.3e-149], t$95$1, If[LessEqual[t, 2.05e-35], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e+101], t$95$1, N[(x / N[Exp[N[(y * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -5.3 \cdot 10^{-149}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2 \cdot 10^{+101}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -8.5999999999999996e26

    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. Add Preprocessing
    3. Taylor expanded in t around inf 81.6%

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

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

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

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

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

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

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

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

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

    if -8.5999999999999996e26 < t < -5.30000000000000013e-149 or 2.05000000000000013e-35 < t < 2e101

    1. Initial program 98.4%

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

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

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

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

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

    if -5.30000000000000013e-149 < t < 2.05000000000000013e-35

    1. Initial program 98.7%

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

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

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

    if 2e101 < t

    1. Initial program 95.8%

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

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

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

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{-y \cdot t}} \]
      2. exp-neg85.6%

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
    7. Applied egg-rr85.6%

      \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
    8. Taylor expanded in x around 0 85.7%

      \[\leadsto \color{blue}{\frac{x}{e^{t \cdot y}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification80.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.6 \cdot 10^{+26}:\\ \;\;\;\;x \cdot {e}^{\left(t \cdot \left(-y\right)\right)}\\ \mathbf{elif}\;t \leq -5.3 \cdot 10^{-149}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{-35}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+101}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{e^{y \cdot t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 71.6% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-11} \lor \neg \left(t \leq 5 \cdot 10^{-33}\right):\\ \;\;\;\;\frac{x}{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 -2e-11) (not (<= t 5e-33)))
   (/ 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 <= -2e-11) || !(t <= 5e-33)) {
		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 <= (-2d-11)) .or. (.not. (t <= 5d-33))) 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 <= -2e-11) || !(t <= 5e-33)) {
		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 <= -2e-11) or not (t <= 5e-33):
		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 <= -2e-11) || !(t <= 5e-33))
		tmp = Float64(x / exp(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 <= -2e-11) || ~((t <= 5e-33)))
		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, -2e-11], N[Not[LessEqual[t, 5e-33]], $MachinePrecision]], N[(x / N[Exp[N[(y * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-11} \lor \neg \left(t \leq 5 \cdot 10^{-33}\right):\\
\;\;\;\;\frac{x}{e^{y \cdot t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.99999999999999988e-11 or 5.00000000000000028e-33 < 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. Add Preprocessing
    3. Taylor expanded in t around inf 76.1%

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

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

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{-y \cdot t}} \]
      2. exp-neg76.1%

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
    7. Applied egg-rr76.1%

      \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
    8. Taylor expanded in x around 0 76.1%

      \[\leadsto \color{blue}{\frac{x}{e^{t \cdot y}}} \]

    if -1.99999999999999988e-11 < t < 5.00000000000000028e-33

    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. Add Preprocessing
    3. Taylor expanded in y around inf 74.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-11} \lor \neg \left(t \leq 5 \cdot 10^{-33}\right):\\ \;\;\;\;\frac{x}{e^{y \cdot t}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 55.4% accurate, 2.8× speedup?

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

\mathbf{elif}\;t \leq -4.8 \cdot 10^{+47}:\\
\;\;\;\;x \cdot \frac{1}{1 + y \cdot t}\\

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


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

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{x}{t} - y \cdot x\right)} \]
    12. Taylor expanded in t around 0 38.0%

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

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

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

        \[\leadsto t \cdot \frac{x + \color{blue}{y \cdot \left(-1 \cdot \left(t \cdot x\right)\right)}}{t} \]
      4. mul-1-neg44.8%

        \[\leadsto t \cdot \frac{x + y \cdot \color{blue}{\left(-t \cdot x\right)}}{t} \]
      5. distribute-rgt-neg-out44.8%

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

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

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

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

    if -1.66e233 < t < -4.80000000000000037e47

    1. Initial program 95.2%

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

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

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

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{-y \cdot t}} \]
      2. exp-neg86.1%

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
    7. Applied egg-rr86.1%

      \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
    8. Taylor expanded in y around 0 44.6%

      \[\leadsto x \cdot \frac{1}{\color{blue}{1 + t \cdot y}} \]
    9. Step-by-step derivation
      1. *-commutative44.6%

        \[\leadsto x \cdot \frac{1}{1 + \color{blue}{y \cdot t}} \]
    10. Simplified44.6%

      \[\leadsto x \cdot \frac{1}{\color{blue}{1 + y \cdot t}} \]

    if -4.80000000000000037e47 < t

    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. Add Preprocessing
    3. Taylor expanded in y around inf 72.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.66 \cdot 10^{+233}:\\ \;\;\;\;t \cdot \frac{x - x \cdot \left(y \cdot t\right)}{t}\\ \mathbf{elif}\;t \leq -4.8 \cdot 10^{+47}:\\ \;\;\;\;x \cdot \frac{1}{1 + y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 27.5% accurate, 15.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{x}{t}\\ \mathbf{if}\;y \leq -6.2 \cdot 10^{-56}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-116}:\\ \;\;\;\;y \cdot \frac{x}{y}\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+154}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* t (/ x t))))
   (if (<= y -6.2e-56)
     t_1
     (if (<= y -3.2e-116)
       (* y (/ x y))
       (if (<= y 7.2e+154) t_1 (* x (* t (- y))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * (x / t);
	double tmp;
	if (y <= -6.2e-56) {
		tmp = t_1;
	} else if (y <= -3.2e-116) {
		tmp = y * (x / y);
	} else if (y <= 7.2e+154) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = t * (x / t)
    if (y <= (-6.2d-56)) then
        tmp = t_1
    else if (y <= (-3.2d-116)) then
        tmp = y * (x / y)
    else if (y <= 7.2d+154) then
        tmp = t_1
    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 t_1 = t * (x / t);
	double tmp;
	if (y <= -6.2e-56) {
		tmp = t_1;
	} else if (y <= -3.2e-116) {
		tmp = y * (x / y);
	} else if (y <= 7.2e+154) {
		tmp = t_1;
	} else {
		tmp = x * (t * -y);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t * (x / t)
	tmp = 0
	if y <= -6.2e-56:
		tmp = t_1
	elif y <= -3.2e-116:
		tmp = y * (x / y)
	elif y <= 7.2e+154:
		tmp = t_1
	else:
		tmp = x * (t * -y)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t * Float64(x / t))
	tmp = 0.0
	if (y <= -6.2e-56)
		tmp = t_1;
	elseif (y <= -3.2e-116)
		tmp = Float64(y * Float64(x / y));
	elseif (y <= 7.2e+154)
		tmp = t_1;
	else
		tmp = Float64(x * Float64(t * Float64(-y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t * (x / t);
	tmp = 0.0;
	if (y <= -6.2e-56)
		tmp = t_1;
	elseif (y <= -3.2e-116)
		tmp = y * (x / y);
	elseif (y <= 7.2e+154)
		tmp = t_1;
	else
		tmp = x * (t * -y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(x / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.2e-56], t$95$1, If[LessEqual[y, -3.2e-116], N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e+154], t$95$1, N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{x}{t}\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 7.2 \cdot 10^{+154}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.19999999999999975e-56 or -3.20000000000000009e-116 < y < 7.2000000000000001e154

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{x}{t} - y \cdot x\right)} \]
    12. Taylor expanded in t around 0 34.2%

      \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]

    if -6.19999999999999975e-56 < y < -3.20000000000000009e-116

    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. Add Preprocessing
    3. Taylor expanded in t around inf 65.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{y} - t \cdot x\right)} \]
    10. Taylor expanded in y around 0 42.8%

      \[\leadsto y \cdot \color{blue}{\frac{x}{y}} \]

    if 7.2000000000000001e154 < y

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{-56}:\\ \;\;\;\;t \cdot \frac{x}{t}\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-116}:\\ \;\;\;\;y \cdot \frac{x}{y}\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+154}:\\ \;\;\;\;t \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 28.4% accurate, 15.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{-55} \lor \neg \left(y \leq -2.6 \cdot 10^{-117}\right) \land y \leq 3.3 \cdot 10^{+106}:\\
\;\;\;\;t \cdot \frac{x}{t}\\

\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.79999999999999983e-55 or -2.59999999999999983e-117 < y < 3.30000000000000008e106

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{x}{t} - x \cdot y\right)} \]
    10. Step-by-step derivation
      1. *-commutative36.5%

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{x}{t} - y \cdot x\right)} \]
    12. Taylor expanded in t around 0 36.0%

      \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]

    if -4.79999999999999983e-55 < y < -2.59999999999999983e-117 or 3.30000000000000008e106 < y

    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. Add Preprocessing
    3. Taylor expanded in t around inf 70.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{y} - t \cdot x\right)} \]
    10. Taylor expanded in y around 0 28.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{-55} \lor \neg \left(y \leq -2.6 \cdot 10^{-117}\right) \land y \leq 3.3 \cdot 10^{+106}:\\ \;\;\;\;t \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 28.1% accurate, 18.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.16 \cdot 10^{-126} \lor \neg \left(a \leq 1.45 \cdot 10^{+209}\right):\\
\;\;\;\;t \cdot \frac{x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.16e-126 or 1.45e209 < a

    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. Add Preprocessing
    3. Taylor expanded in t around inf 37.6%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{x}{t} - y \cdot x\right)} \]
    12. Taylor expanded in t around 0 31.5%

      \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]

    if -1.16e-126 < a < 1.45e209

    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. Add Preprocessing
    3. Taylor expanded in t around inf 74.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.16 \cdot 10^{-126} \lor \neg \left(a \leq 1.45 \cdot 10^{+209}\right):\\ \;\;\;\;t \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 28.5% accurate, 19.6× speedup?

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

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

\mathbf{elif}\;y \leq 1.75 \cdot 10^{+148}:\\
\;\;\;\;t \cdot \frac{x}{t}\\

\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 < -2.55000000000000005e51

    1. Initial program 98.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.55000000000000005e51 < y < 1.7499999999999999e148

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{x}{t} - x \cdot y\right)} \]
    10. Step-by-step derivation
      1. *-commutative33.2%

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

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

      \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]

    if 1.7499999999999999e148 < y

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.55 \cdot 10^{+51}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{+148}:\\ \;\;\;\;t \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot t\right) \cdot \left(-y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 31.7% accurate, 19.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{+42}:\\
\;\;\;\;x \cdot \frac{1}{1 + y \cdot t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 1.35e42

    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. Add Preprocessing
    3. Taylor expanded in t around inf 62.4%

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

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

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{-y \cdot t}} \]
      2. exp-neg62.4%

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
    7. Applied egg-rr62.4%

      \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
    8. Taylor expanded in y around 0 30.1%

      \[\leadsto x \cdot \frac{1}{\color{blue}{1 + t \cdot y}} \]
    9. Step-by-step derivation
      1. *-commutative30.1%

        \[\leadsto x \cdot \frac{1}{1 + \color{blue}{y \cdot t}} \]
    10. Simplified30.1%

      \[\leadsto x \cdot \frac{1}{\color{blue}{1 + y \cdot t}} \]

    if 1.35e42 < x

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{x}{t} - y \cdot x\right)} \]
    12. Taylor expanded in t around 0 40.2%

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

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

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

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

        \[\leadsto t \cdot \frac{x + y \cdot \color{blue}{\left(-t \cdot x\right)}}{t} \]
      5. distribute-rgt-neg-out49.3%

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

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

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

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

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

Alternative 14: 28.7% accurate, 22.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.5 \cdot 10^{-77}:\\
\;\;\;\;t \cdot \frac{x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 1.50000000000000008e-77

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{x}{t} - y \cdot x\right)} \]
    12. Taylor expanded in t around 0 31.7%

      \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]

    if 1.50000000000000008e-77 < x

    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. Add Preprocessing
    3. Taylor expanded in t around inf 54.9%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{x}{t} - y \cdot x\right)} \]
    12. Taylor expanded in x around 0 32.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.5 \cdot 10^{-77}:\\ \;\;\;\;t \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(x \cdot \left(\frac{1}{t} - y\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 31.7% accurate, 22.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.1 \cdot 10^{+43}:\\
\;\;\;\;x \cdot \frac{1}{1 + y \cdot t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 2.10000000000000002e43

    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. Add Preprocessing
    3. Taylor expanded in t around inf 62.4%

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

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

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{-y \cdot t}} \]
      2. exp-neg62.4%

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
    7. Applied egg-rr62.4%

      \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
    8. Taylor expanded in y around 0 30.1%

      \[\leadsto x \cdot \frac{1}{\color{blue}{1 + t \cdot y}} \]
    9. Step-by-step derivation
      1. *-commutative30.1%

        \[\leadsto x \cdot \frac{1}{1 + \color{blue}{y \cdot t}} \]
    10. Simplified30.1%

      \[\leadsto x \cdot \frac{1}{\color{blue}{1 + y \cdot t}} \]

    if 2.10000000000000002e43 < x

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{x}{t} - y \cdot x\right)} \]
    12. Taylor expanded in x around 0 42.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.1 \cdot 10^{+43}:\\ \;\;\;\;x \cdot \frac{1}{1 + y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(x \cdot \left(\frac{1}{t} - y\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 28.0% accurate, 26.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.85 \cdot 10^{-77}:\\
\;\;\;\;t \cdot \frac{x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 2.84999999999999991e-77

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{x}{t} - y \cdot x\right)} \]
    12. Taylor expanded in t around 0 31.7%

      \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]

    if 2.84999999999999991e-77 < x

    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. Add Preprocessing
    3. Taylor expanded in t around inf 54.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.85 \cdot 10^{-77}:\\ \;\;\;\;t \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \left(x \cdot t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 25.4% accurate, 28.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.2 \cdot 10^{+78}:\\
\;\;\;\;t \cdot \frac{x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 6.2e78

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{x}{t} - y \cdot x\right)} \]
    12. Taylor expanded in t around 0 31.0%

      \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]

    if 6.2e78 < t

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 6.2 \cdot 10^{+78}:\\ \;\;\;\;t \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot t\right) \cdot \left(-y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 14.7% accurate, 31.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 1.65000000000000004e-181

    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. Add Preprocessing
    3. Taylor expanded in t around inf 61.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\color{blue}{\left(\left(-t\right) \cdot y\right)} \cdot x\right)}^{1} \]
      4. associate-*l*23.1%

        \[\leadsto {\color{blue}{\left(\left(-t\right) \cdot \left(y \cdot x\right)\right)}}^{1} \]
      5. add-sqr-sqrt9.2%

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

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

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

        \[\leadsto {\left(\color{blue}{\left(\sqrt{t} \cdot \sqrt{t}\right)} \cdot \left(y \cdot x\right)\right)}^{1} \]
      9. add-sqr-sqrt14.0%

        \[\leadsto {\left(\color{blue}{t} \cdot \left(y \cdot x\right)\right)}^{1} \]
    13. Applied egg-rr14.0%

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

        \[\leadsto \color{blue}{t \cdot \left(y \cdot x\right)} \]
    15. Simplified14.0%

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

    if 1.65000000000000004e-181 < x

    1. Initial program 97.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.65 \cdot 10^{-181}:\\ \;\;\;\;t \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 25.8% accurate, 63.0× speedup?

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

\\
t \cdot \frac{x}{t}
\end{array}
Derivation
  1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{t \cdot \left(\frac{x}{t} - x \cdot y\right)} \]
  10. Step-by-step derivation
    1. *-commutative32.5%

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

    \[\leadsto \color{blue}{t \cdot \left(\frac{x}{t} - y \cdot x\right)} \]
  12. Taylor expanded in t around 0 29.6%

    \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]
  13. Final simplification29.6%

    \[\leadsto t \cdot \frac{x}{t} \]
  14. Add Preprocessing

Alternative 20: 19.5% accurate, 315.0× speedup?

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

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

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

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

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

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

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

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

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

    \[\leadsto x \]
  8. Add Preprocessing

Reproduce

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