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

Percentage Accurate: 96.7% → 96.7%
Time: 11.2s
Alternatives: 10
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 10 alternatives:

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

Initial Program: 96.7% accurate, 1.0× speedup?

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

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

Alternative 1: 96.7% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 32.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(t \cdot y\right) \cdot x\right) \cdot 1\\ \mathbf{if}\;\left(\log \left(1 - z\right) - b\right) \cdot a - \left(t - \log z\right) \cdot y \leq -1 \cdot 10^{+21}:\\ \;\;\;\;\frac{\left(1 \cdot x\right) \cdot \left(1 \cdot x\right) - t\_1 \cdot t\_1}{t\_1 + 1 \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(1, x, \left(\left(\left(-t\right) \cdot y\right) \cdot x\right) \cdot 1\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (* (* t y) x) 1.0)))
   (if (<= (- (* (- (log (- 1.0 z)) b) a) (* (- t (log z)) y)) -1e+21)
     (/ (- (* (* 1.0 x) (* 1.0 x)) (* t_1 t_1)) (+ t_1 (* 1.0 x)))
     (fma 1.0 x (* (* (* (- t) y) x) 1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((t * y) * x) * 1.0;
	double tmp;
	if ((((log((1.0 - z)) - b) * a) - ((t - log(z)) * y)) <= -1e+21) {
		tmp = (((1.0 * x) * (1.0 * x)) - (t_1 * t_1)) / (t_1 + (1.0 * x));
	} else {
		tmp = fma(1.0, x, (((-t * y) * x) * 1.0));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(Float64(t * y) * x) * 1.0)
	tmp = 0.0
	if (Float64(Float64(Float64(log(Float64(1.0 - z)) - b) * a) - Float64(Float64(t - log(z)) * y)) <= -1e+21)
		tmp = Float64(Float64(Float64(Float64(1.0 * x) * Float64(1.0 * x)) - Float64(t_1 * t_1)) / Float64(t_1 + Float64(1.0 * x)));
	else
		tmp = fma(1.0, x, Float64(Float64(Float64(Float64(-t) * y) * x) * 1.0));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t * y), $MachinePrecision] * x), $MachinePrecision] * 1.0), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] * a), $MachinePrecision] - N[(N[(t - N[Log[z], $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], -1e+21], N[(N[(N[(N[(1.0 * x), $MachinePrecision] * N[(1.0 * x), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 + N[(1.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 * x + N[(N[(N[((-t) * y), $MachinePrecision] * x), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(\left(t \cdot y\right) \cdot x\right) \cdot 1\\
\mathbf{if}\;\left(\log \left(1 - z\right) - b\right) \cdot a - \left(t - \log z\right) \cdot y \leq -1 \cdot 10^{+21}:\\
\;\;\;\;\frac{\left(1 \cdot x\right) \cdot \left(1 \cdot x\right) - t\_1 \cdot t\_1}{t\_1 + 1 \cdot x}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -1e21

    1. Initial program 99.1%

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

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot \left(y \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}\right)\right)\right) + x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z} + -1 \cdot \left(t \cdot \left(x \cdot \left(y \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}\right)\right)\right)} \]
      2. mul-1-negN/A

        \[\leadsto x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z} + \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot \left(y \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}\right)\right)\right)\right)} \]
      3. unsub-negN/A

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

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

        \[\leadsto x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z} - \color{blue}{\left(\left(t \cdot x\right) \cdot y\right) \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}} \]
      6. distribute-rgt-out--N/A

        \[\leadsto \color{blue}{e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z} \cdot \left(x - \left(t \cdot x\right) \cdot y\right)} \]
      7. lower-*.f64N/A

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

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

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

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

        \[\leadsto 1 \cdot \left(x - \left(x \cdot t\right) \cdot y\right) \]
      3. Step-by-step derivation
        1. Applied rewrites3.0%

          \[\leadsto 1 \cdot \left(x - \left(x \cdot t\right) \cdot y\right) \]
        2. Step-by-step derivation
          1. Applied rewrites13.1%

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

          if -1e21 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

          1. Initial program 93.9%

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

            \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot \left(y \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}\right)\right)\right) + x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}} \]
          4. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z} + -1 \cdot \left(t \cdot \left(x \cdot \left(y \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}\right)\right)\right)} \]
            2. mul-1-negN/A

              \[\leadsto x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z} + \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot \left(y \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}\right)\right)\right)\right)} \]
            3. unsub-negN/A

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

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

              \[\leadsto x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z} - \color{blue}{\left(\left(t \cdot x\right) \cdot y\right) \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}} \]
            6. distribute-rgt-out--N/A

              \[\leadsto \color{blue}{e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z} \cdot \left(x - \left(t \cdot x\right) \cdot y\right)} \]
            7. lower-*.f64N/A

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

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

            \[\leadsto {z}^{y} \cdot \left(\color{blue}{x} - \left(x \cdot t\right) \cdot y\right) \]
          7. Step-by-step derivation
            1. Applied rewrites43.9%

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

              \[\leadsto 1 \cdot \left(x - \left(x \cdot t\right) \cdot y\right) \]
            3. Step-by-step derivation
              1. Applied rewrites38.9%

                \[\leadsto 1 \cdot \left(x - \left(x \cdot t\right) \cdot y\right) \]
              2. Step-by-step derivation
                1. Applied rewrites40.4%

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\log \left(1 - z\right) - b\right) \cdot a - \left(t - \log z\right) \cdot y \leq -1 \cdot 10^{+21}:\\ \;\;\;\;\frac{\left(1 \cdot x\right) \cdot \left(1 \cdot x\right) - \left(\left(\left(t \cdot y\right) \cdot x\right) \cdot 1\right) \cdot \left(\left(\left(t \cdot y\right) \cdot x\right) \cdot 1\right)}{\left(\left(t \cdot y\right) \cdot x\right) \cdot 1 + 1 \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(1, x, \left(\left(\left(-t\right) \cdot y\right) \cdot x\right) \cdot 1\right)\\ \end{array} \]
              5. Add Preprocessing

              Alternative 3: 74.4% accurate, 1.4× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := e^{\log z \cdot y} \cdot x\\ \mathbf{if}\;y \leq -2.6 \cdot 10^{+174}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -9.4 \cdot 10^{+111}:\\ \;\;\;\;e^{\left(-t\right) \cdot y} \cdot x\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+71}:\\ \;\;\;\;e^{\left(\left(-z\right) - b\right) \cdot a} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (x y z t a b)
               :precision binary64
               (let* ((t_1 (* (exp (* (log z) y)) x)))
                 (if (<= y -2.6e+174)
                   t_1
                   (if (<= y -9.4e+111)
                     (* (exp (* (- t) y)) x)
                     (if (<= y 9e+71) (* (exp (* (- (- z) b) a)) x) t_1)))))
              double code(double x, double y, double z, double t, double a, double b) {
              	double t_1 = exp((log(z) * y)) * x;
              	double tmp;
              	if (y <= -2.6e+174) {
              		tmp = t_1;
              	} else if (y <= -9.4e+111) {
              		tmp = exp((-t * y)) * x;
              	} else if (y <= 9e+71) {
              		tmp = exp(((-z - b) * a)) * x;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              real(8) function code(x, y, z, t, a, b)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8), intent (in) :: b
                  real(8) :: t_1
                  real(8) :: tmp
                  t_1 = exp((log(z) * y)) * x
                  if (y <= (-2.6d+174)) then
                      tmp = t_1
                  else if (y <= (-9.4d+111)) then
                      tmp = exp((-t * y)) * x
                  else if (y <= 9d+71) then
                      tmp = exp(((-z - b) * a)) * x
                  else
                      tmp = t_1
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a, double b) {
              	double t_1 = Math.exp((Math.log(z) * y)) * x;
              	double tmp;
              	if (y <= -2.6e+174) {
              		tmp = t_1;
              	} else if (y <= -9.4e+111) {
              		tmp = Math.exp((-t * y)) * x;
              	} else if (y <= 9e+71) {
              		tmp = Math.exp(((-z - b) * a)) * x;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b):
              	t_1 = math.exp((math.log(z) * y)) * x
              	tmp = 0
              	if y <= -2.6e+174:
              		tmp = t_1
              	elif y <= -9.4e+111:
              		tmp = math.exp((-t * y)) * x
              	elif y <= 9e+71:
              		tmp = math.exp(((-z - b) * a)) * x
              	else:
              		tmp = t_1
              	return tmp
              
              function code(x, y, z, t, a, b)
              	t_1 = Float64(exp(Float64(log(z) * y)) * x)
              	tmp = 0.0
              	if (y <= -2.6e+174)
              		tmp = t_1;
              	elseif (y <= -9.4e+111)
              		tmp = Float64(exp(Float64(Float64(-t) * y)) * x);
              	elseif (y <= 9e+71)
              		tmp = Float64(exp(Float64(Float64(Float64(-z) - b) * a)) * x);
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b)
              	t_1 = exp((log(z) * y)) * x;
              	tmp = 0.0;
              	if (y <= -2.6e+174)
              		tmp = t_1;
              	elseif (y <= -9.4e+111)
              		tmp = exp((-t * y)) * x;
              	elseif (y <= 9e+71)
              		tmp = exp(((-z - b) * a)) * x;
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Exp[N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[y, -2.6e+174], t$95$1, If[LessEqual[y, -9.4e+111], N[(N[Exp[N[((-t) * y), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 9e+71], N[(N[Exp[N[(N[((-z) - b), $MachinePrecision] * a), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := e^{\log z \cdot y} \cdot x\\
              \mathbf{if}\;y \leq -2.6 \cdot 10^{+174}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;y \leq -9.4 \cdot 10^{+111}:\\
              \;\;\;\;e^{\left(-t\right) \cdot y} \cdot x\\
              
              \mathbf{elif}\;y \leq 9 \cdot 10^{+71}:\\
              \;\;\;\;e^{\left(\left(-z\right) - b\right) \cdot a} \cdot x\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if y < -2.5999999999999999e174 or 9.00000000000000087e71 < y

                1. Initial program 98.8%

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

                  \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto x \cdot e^{\color{blue}{\left(\log z - t\right) \cdot y}} \]
                  2. lower-*.f64N/A

                    \[\leadsto x \cdot e^{\color{blue}{\left(\log z - t\right) \cdot y}} \]
                  3. lower--.f64N/A

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

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

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

                  \[\leadsto x \cdot e^{\log z \cdot y} \]
                7. Step-by-step derivation
                  1. Applied rewrites70.7%

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

                  if -2.5999999999999999e174 < y < -9.40000000000000015e111

                  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

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

                      \[\leadsto x \cdot e^{\color{blue}{\left(-1 \cdot t\right) \cdot y}} \]
                    2. mul-1-negN/A

                      \[\leadsto x \cdot e^{\color{blue}{\left(\mathsf{neg}\left(t\right)\right)} \cdot y} \]
                    3. lower-*.f64N/A

                      \[\leadsto x \cdot e^{\color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot y}} \]
                    4. lower-neg.f6486.3

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

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

                  if -9.40000000000000015e111 < y < 9.00000000000000087e71

                  1. Initial program 94.2%

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

                    \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto x \cdot e^{\color{blue}{\left(\log \left(1 - z\right) - b\right) \cdot a}} \]
                    2. lower-*.f64N/A

                      \[\leadsto x \cdot e^{\color{blue}{\left(\log \left(1 - z\right) - b\right) \cdot a}} \]
                    3. lower--.f64N/A

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

                      \[\leadsto x \cdot e^{\left(\log \color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)} - b\right) \cdot a} \]
                    5. lower-log1p.f64N/A

                      \[\leadsto x \cdot e^{\left(\color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(z\right)\right)} - b\right) \cdot a} \]
                    6. lower-neg.f6481.7

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

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

                    \[\leadsto x \cdot e^{\left(-1 \cdot z - b\right) \cdot a} \]
                  7. Step-by-step derivation
                    1. Applied rewrites81.7%

                      \[\leadsto x \cdot e^{\left(\left(-z\right) - b\right) \cdot a} \]
                  8. Recombined 3 regimes into one program.
                  9. Final simplification78.5%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.6 \cdot 10^{+174}:\\ \;\;\;\;e^{\log z \cdot y} \cdot x\\ \mathbf{elif}\;y \leq -9.4 \cdot 10^{+111}:\\ \;\;\;\;e^{\left(-t\right) \cdot y} \cdot x\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+71}:\\ \;\;\;\;e^{\left(\left(-z\right) - b\right) \cdot a} \cdot x\\ \mathbf{else}:\\ \;\;\;\;e^{\log z \cdot y} \cdot x\\ \end{array} \]
                  10. Add Preprocessing

                  Alternative 4: 84.4% accurate, 1.5× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := e^{\left(\log z - t\right) \cdot y} \cdot x\\ \mathbf{if}\;y \leq -2.75 \cdot 10^{+51}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+71}:\\ \;\;\;\;e^{\left(\left(-z\right) - b\right) \cdot a} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b)
                   :precision binary64
                   (let* ((t_1 (* (exp (* (- (log z) t) y)) x)))
                     (if (<= y -2.75e+51)
                       t_1
                       (if (<= y 6.5e+71) (* (exp (* (- (- z) b) a)) x) t_1))))
                  double code(double x, double y, double z, double t, double a, double b) {
                  	double t_1 = exp(((log(z) - t) * y)) * x;
                  	double tmp;
                  	if (y <= -2.75e+51) {
                  		tmp = t_1;
                  	} else if (y <= 6.5e+71) {
                  		tmp = exp(((-z - b) * a)) * x;
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(x, y, z, t, a, b)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      real(8), intent (in) :: b
                      real(8) :: t_1
                      real(8) :: tmp
                      t_1 = exp(((log(z) - t) * y)) * x
                      if (y <= (-2.75d+51)) then
                          tmp = t_1
                      else if (y <= 6.5d+71) then
                          tmp = exp(((-z - b) * a)) * x
                      else
                          tmp = t_1
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b) {
                  	double t_1 = Math.exp(((Math.log(z) - t) * y)) * x;
                  	double tmp;
                  	if (y <= -2.75e+51) {
                  		tmp = t_1;
                  	} else if (y <= 6.5e+71) {
                  		tmp = Math.exp(((-z - b) * a)) * x;
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a, b):
                  	t_1 = math.exp(((math.log(z) - t) * y)) * x
                  	tmp = 0
                  	if y <= -2.75e+51:
                  		tmp = t_1
                  	elif y <= 6.5e+71:
                  		tmp = math.exp(((-z - b) * a)) * x
                  	else:
                  		tmp = t_1
                  	return tmp
                  
                  function code(x, y, z, t, a, b)
                  	t_1 = Float64(exp(Float64(Float64(log(z) - t) * y)) * x)
                  	tmp = 0.0
                  	if (y <= -2.75e+51)
                  		tmp = t_1;
                  	elseif (y <= 6.5e+71)
                  		tmp = Float64(exp(Float64(Float64(Float64(-z) - b) * a)) * x);
                  	else
                  		tmp = t_1;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a, b)
                  	t_1 = exp(((log(z) - t) * y)) * x;
                  	tmp = 0.0;
                  	if (y <= -2.75e+51)
                  		tmp = t_1;
                  	elseif (y <= 6.5e+71)
                  		tmp = exp(((-z - b) * a)) * x;
                  	else
                  		tmp = t_1;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Exp[N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] * y), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[y, -2.75e+51], t$95$1, If[LessEqual[y, 6.5e+71], N[(N[Exp[N[(N[((-z) - b), $MachinePrecision] * a), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := e^{\left(\log z - t\right) \cdot y} \cdot x\\
                  \mathbf{if}\;y \leq -2.75 \cdot 10^{+51}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;y \leq 6.5 \cdot 10^{+71}:\\
                  \;\;\;\;e^{\left(\left(-z\right) - b\right) \cdot a} \cdot x\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if y < -2.75e51 or 6.49999999999999954e71 < y

                    1. Initial program 99.1%

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

                      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto x \cdot e^{\color{blue}{\left(\log z - t\right) \cdot y}} \]
                      2. lower-*.f64N/A

                        \[\leadsto x \cdot e^{\color{blue}{\left(\log z - t\right) \cdot y}} \]
                      3. lower--.f64N/A

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

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

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

                    if -2.75e51 < y < 6.49999999999999954e71

                    1. Initial program 93.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 a around inf

                      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto x \cdot e^{\color{blue}{\left(\log \left(1 - z\right) - b\right) \cdot a}} \]
                      2. lower-*.f64N/A

                        \[\leadsto x \cdot e^{\color{blue}{\left(\log \left(1 - z\right) - b\right) \cdot a}} \]
                      3. lower--.f64N/A

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

                        \[\leadsto x \cdot e^{\left(\log \color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)} - b\right) \cdot a} \]
                      5. lower-log1p.f64N/A

                        \[\leadsto x \cdot e^{\left(\color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(z\right)\right)} - b\right) \cdot a} \]
                      6. lower-neg.f6484.5

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

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

                      \[\leadsto x \cdot e^{\left(-1 \cdot z - b\right) \cdot a} \]
                    7. Step-by-step derivation
                      1. Applied rewrites84.5%

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.75 \cdot 10^{+51}:\\ \;\;\;\;e^{\left(\log z - t\right) \cdot y} \cdot x\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+71}:\\ \;\;\;\;e^{\left(\left(-z\right) - b\right) \cdot a} \cdot x\\ \mathbf{else}:\\ \;\;\;\;e^{\left(\log z - t\right) \cdot y} \cdot x\\ \end{array} \]
                    10. Add Preprocessing

                    Alternative 5: 74.0% accurate, 2.3× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := e^{\left(\left(-z\right) - b\right) \cdot a} \cdot x\\ t_2 := e^{\left(-t\right) \cdot y} \cdot x\\ \mathbf{if}\;t \leq -2.7 \cdot 10^{+55}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -2.85 \cdot 10^{-303}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-290}:\\ \;\;\;\;\left(x - \left(t \cdot x\right) \cdot y\right) \cdot {z}^{y}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+149}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b)
                     :precision binary64
                     (let* ((t_1 (* (exp (* (- (- z) b) a)) x)) (t_2 (* (exp (* (- t) y)) x)))
                       (if (<= t -2.7e+55)
                         t_2
                         (if (<= t -2.85e-303)
                           t_1
                           (if (<= t 7e-290)
                             (* (- x (* (* t x) y)) (pow z y))
                             (if (<= t 5.5e+149) t_1 t_2))))))
                    double code(double x, double y, double z, double t, double a, double b) {
                    	double t_1 = exp(((-z - b) * a)) * x;
                    	double t_2 = exp((-t * y)) * x;
                    	double tmp;
                    	if (t <= -2.7e+55) {
                    		tmp = t_2;
                    	} else if (t <= -2.85e-303) {
                    		tmp = t_1;
                    	} else if (t <= 7e-290) {
                    		tmp = (x - ((t * x) * y)) * pow(z, y);
                    	} else if (t <= 5.5e+149) {
                    		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 = exp(((-z - b) * a)) * x
                        t_2 = exp((-t * y)) * x
                        if (t <= (-2.7d+55)) then
                            tmp = t_2
                        else if (t <= (-2.85d-303)) then
                            tmp = t_1
                        else if (t <= 7d-290) then
                            tmp = (x - ((t * x) * y)) * (z ** y)
                        else if (t <= 5.5d+149) 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 = Math.exp(((-z - b) * a)) * x;
                    	double t_2 = Math.exp((-t * y)) * x;
                    	double tmp;
                    	if (t <= -2.7e+55) {
                    		tmp = t_2;
                    	} else if (t <= -2.85e-303) {
                    		tmp = t_1;
                    	} else if (t <= 7e-290) {
                    		tmp = (x - ((t * x) * y)) * Math.pow(z, y);
                    	} else if (t <= 5.5e+149) {
                    		tmp = t_1;
                    	} else {
                    		tmp = t_2;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a, b):
                    	t_1 = math.exp(((-z - b) * a)) * x
                    	t_2 = math.exp((-t * y)) * x
                    	tmp = 0
                    	if t <= -2.7e+55:
                    		tmp = t_2
                    	elif t <= -2.85e-303:
                    		tmp = t_1
                    	elif t <= 7e-290:
                    		tmp = (x - ((t * x) * y)) * math.pow(z, y)
                    	elif t <= 5.5e+149:
                    		tmp = t_1
                    	else:
                    		tmp = t_2
                    	return tmp
                    
                    function code(x, y, z, t, a, b)
                    	t_1 = Float64(exp(Float64(Float64(Float64(-z) - b) * a)) * x)
                    	t_2 = Float64(exp(Float64(Float64(-t) * y)) * x)
                    	tmp = 0.0
                    	if (t <= -2.7e+55)
                    		tmp = t_2;
                    	elseif (t <= -2.85e-303)
                    		tmp = t_1;
                    	elseif (t <= 7e-290)
                    		tmp = Float64(Float64(x - Float64(Float64(t * x) * y)) * (z ^ y));
                    	elseif (t <= 5.5e+149)
                    		tmp = t_1;
                    	else
                    		tmp = t_2;
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a, b)
                    	t_1 = exp(((-z - b) * a)) * x;
                    	t_2 = exp((-t * y)) * x;
                    	tmp = 0.0;
                    	if (t <= -2.7e+55)
                    		tmp = t_2;
                    	elseif (t <= -2.85e-303)
                    		tmp = t_1;
                    	elseif (t <= 7e-290)
                    		tmp = (x - ((t * x) * y)) * (z ^ y);
                    	elseif (t <= 5.5e+149)
                    		tmp = t_1;
                    	else
                    		tmp = t_2;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Exp[N[(N[((-z) - b), $MachinePrecision] * a), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(N[Exp[N[((-t) * y), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[t, -2.7e+55], t$95$2, If[LessEqual[t, -2.85e-303], t$95$1, If[LessEqual[t, 7e-290], N[(N[(x - N[(N[(t * x), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e+149], t$95$1, t$95$2]]]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := e^{\left(\left(-z\right) - b\right) \cdot a} \cdot x\\
                    t_2 := e^{\left(-t\right) \cdot y} \cdot x\\
                    \mathbf{if}\;t \leq -2.7 \cdot 10^{+55}:\\
                    \;\;\;\;t\_2\\
                    
                    \mathbf{elif}\;t \leq -2.85 \cdot 10^{-303}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;t \leq 7 \cdot 10^{-290}:\\
                    \;\;\;\;\left(x - \left(t \cdot x\right) \cdot y\right) \cdot {z}^{y}\\
                    
                    \mathbf{elif}\;t \leq 5.5 \cdot 10^{+149}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_2\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if t < -2.69999999999999977e55 or 5.49999999999999999e149 < t

                      1. Initial program 98.8%

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

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

                          \[\leadsto x \cdot e^{\color{blue}{\left(-1 \cdot t\right) \cdot y}} \]
                        2. mul-1-negN/A

                          \[\leadsto x \cdot e^{\color{blue}{\left(\mathsf{neg}\left(t\right)\right)} \cdot y} \]
                        3. lower-*.f64N/A

                          \[\leadsto x \cdot e^{\color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot y}} \]
                        4. lower-neg.f6487.3

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

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

                      if -2.69999999999999977e55 < t < -2.84999999999999991e-303 or 6.99999999999999963e-290 < t < 5.49999999999999999e149

                      1. Initial program 94.6%

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

                        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
                      4. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto x \cdot e^{\color{blue}{\left(\log \left(1 - z\right) - b\right) \cdot a}} \]
                        2. lower-*.f64N/A

                          \[\leadsto x \cdot e^{\color{blue}{\left(\log \left(1 - z\right) - b\right) \cdot a}} \]
                        3. lower--.f64N/A

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

                          \[\leadsto x \cdot e^{\left(\log \color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)} - b\right) \cdot a} \]
                        5. lower-log1p.f64N/A

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

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

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

                        \[\leadsto x \cdot e^{\left(-1 \cdot z - b\right) \cdot a} \]
                      7. Step-by-step derivation
                        1. Applied rewrites74.6%

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

                        if -2.84999999999999991e-303 < t < 6.99999999999999963e-290

                        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 0

                          \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot \left(y \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}\right)\right)\right) + x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}} \]
                        4. Step-by-step derivation
                          1. +-commutativeN/A

                            \[\leadsto \color{blue}{x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z} + -1 \cdot \left(t \cdot \left(x \cdot \left(y \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}\right)\right)\right)} \]
                          2. mul-1-negN/A

                            \[\leadsto x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z} + \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot \left(y \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}\right)\right)\right)\right)} \]
                          3. unsub-negN/A

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

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

                            \[\leadsto x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z} - \color{blue}{\left(\left(t \cdot x\right) \cdot y\right) \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}} \]
                          6. distribute-rgt-out--N/A

                            \[\leadsto \color{blue}{e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z} \cdot \left(x - \left(t \cdot x\right) \cdot y\right)} \]
                          7. lower-*.f64N/A

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

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

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

                            \[\leadsto {z}^{y} \cdot \left(\color{blue}{x} - \left(x \cdot t\right) \cdot y\right) \]
                        8. Recombined 3 regimes into one program.
                        9. Final simplification79.6%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{+55}:\\ \;\;\;\;e^{\left(-t\right) \cdot y} \cdot x\\ \mathbf{elif}\;t \leq -2.85 \cdot 10^{-303}:\\ \;\;\;\;e^{\left(\left(-z\right) - b\right) \cdot a} \cdot x\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-290}:\\ \;\;\;\;\left(x - \left(t \cdot x\right) \cdot y\right) \cdot {z}^{y}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+149}:\\ \;\;\;\;e^{\left(\left(-z\right) - b\right) \cdot a} \cdot x\\ \mathbf{else}:\\ \;\;\;\;e^{\left(-t\right) \cdot y} \cdot x\\ \end{array} \]
                        10. Add Preprocessing

                        Alternative 6: 74.0% accurate, 2.6× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := e^{\left(-t\right) \cdot y} \cdot x\\ \mathbf{if}\;t \leq -2.7 \cdot 10^{+55}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+149}:\\ \;\;\;\;e^{\left(\left(-z\right) - b\right) \cdot a} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                        (FPCore (x y z t a b)
                         :precision binary64
                         (let* ((t_1 (* (exp (* (- t) y)) x)))
                           (if (<= t -2.7e+55)
                             t_1
                             (if (<= t 5.5e+149) (* (exp (* (- (- z) b) a)) x) t_1))))
                        double code(double x, double y, double z, double t, double a, double b) {
                        	double t_1 = exp((-t * y)) * x;
                        	double tmp;
                        	if (t <= -2.7e+55) {
                        		tmp = t_1;
                        	} else if (t <= 5.5e+149) {
                        		tmp = exp(((-z - b) * a)) * x;
                        	} else {
                        		tmp = t_1;
                        	}
                        	return tmp;
                        }
                        
                        real(8) function code(x, y, z, t, a, b)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            real(8), intent (in) :: z
                            real(8), intent (in) :: t
                            real(8), intent (in) :: a
                            real(8), intent (in) :: b
                            real(8) :: t_1
                            real(8) :: tmp
                            t_1 = exp((-t * y)) * x
                            if (t <= (-2.7d+55)) then
                                tmp = t_1
                            else if (t <= 5.5d+149) then
                                tmp = exp(((-z - b) * a)) * x
                            else
                                tmp = t_1
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x, double y, double z, double t, double a, double b) {
                        	double t_1 = Math.exp((-t * y)) * x;
                        	double tmp;
                        	if (t <= -2.7e+55) {
                        		tmp = t_1;
                        	} else if (t <= 5.5e+149) {
                        		tmp = Math.exp(((-z - b) * a)) * x;
                        	} else {
                        		tmp = t_1;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t, a, b):
                        	t_1 = math.exp((-t * y)) * x
                        	tmp = 0
                        	if t <= -2.7e+55:
                        		tmp = t_1
                        	elif t <= 5.5e+149:
                        		tmp = math.exp(((-z - b) * a)) * x
                        	else:
                        		tmp = t_1
                        	return tmp
                        
                        function code(x, y, z, t, a, b)
                        	t_1 = Float64(exp(Float64(Float64(-t) * y)) * x)
                        	tmp = 0.0
                        	if (t <= -2.7e+55)
                        		tmp = t_1;
                        	elseif (t <= 5.5e+149)
                        		tmp = Float64(exp(Float64(Float64(Float64(-z) - b) * a)) * x);
                        	else
                        		tmp = t_1;
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t, a, b)
                        	t_1 = exp((-t * y)) * x;
                        	tmp = 0.0;
                        	if (t <= -2.7e+55)
                        		tmp = t_1;
                        	elseif (t <= 5.5e+149)
                        		tmp = exp(((-z - b) * a)) * x;
                        	else
                        		tmp = t_1;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Exp[N[((-t) * y), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[t, -2.7e+55], t$95$1, If[LessEqual[t, 5.5e+149], N[(N[Exp[N[(N[((-z) - b), $MachinePrecision] * a), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_1 := e^{\left(-t\right) \cdot y} \cdot x\\
                        \mathbf{if}\;t \leq -2.7 \cdot 10^{+55}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;t \leq 5.5 \cdot 10^{+149}:\\
                        \;\;\;\;e^{\left(\left(-z\right) - b\right) \cdot a} \cdot x\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_1\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if t < -2.69999999999999977e55 or 5.49999999999999999e149 < t

                          1. Initial program 98.8%

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

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

                              \[\leadsto x \cdot e^{\color{blue}{\left(-1 \cdot t\right) \cdot y}} \]
                            2. mul-1-negN/A

                              \[\leadsto x \cdot e^{\color{blue}{\left(\mathsf{neg}\left(t\right)\right)} \cdot y} \]
                            3. lower-*.f64N/A

                              \[\leadsto x \cdot e^{\color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot y}} \]
                            4. lower-neg.f6487.3

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

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

                          if -2.69999999999999977e55 < t < 5.49999999999999999e149

                          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 a around inf

                            \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
                          4. Step-by-step derivation
                            1. *-commutativeN/A

                              \[\leadsto x \cdot e^{\color{blue}{\left(\log \left(1 - z\right) - b\right) \cdot a}} \]
                            2. lower-*.f64N/A

                              \[\leadsto x \cdot e^{\color{blue}{\left(\log \left(1 - z\right) - b\right) \cdot a}} \]
                            3. lower--.f64N/A

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

                              \[\leadsto x \cdot e^{\left(\log \color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)} - b\right) \cdot a} \]
                            5. lower-log1p.f64N/A

                              \[\leadsto x \cdot e^{\left(\color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(z\right)\right)} - b\right) \cdot a} \]
                            6. lower-neg.f6472.7

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

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

                            \[\leadsto x \cdot e^{\left(-1 \cdot z - b\right) \cdot a} \]
                          7. Step-by-step derivation
                            1. Applied rewrites72.7%

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{+55}:\\ \;\;\;\;e^{\left(-t\right) \cdot y} \cdot x\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+149}:\\ \;\;\;\;e^{\left(\left(-z\right) - b\right) \cdot a} \cdot x\\ \mathbf{else}:\\ \;\;\;\;e^{\left(-t\right) \cdot y} \cdot x\\ \end{array} \]
                          10. Add Preprocessing

                          Alternative 7: 70.5% accurate, 2.6× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := e^{\left(-t\right) \cdot y} \cdot x\\ \mathbf{if}\;t \leq -1.12 \cdot 10^{+67}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+149}:\\ \;\;\;\;e^{\left(-b\right) \cdot a} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                          (FPCore (x y z t a b)
                           :precision binary64
                           (let* ((t_1 (* (exp (* (- t) y)) x)))
                             (if (<= t -1.12e+67) t_1 (if (<= t 5.5e+149) (* (exp (* (- b) a)) x) t_1))))
                          double code(double x, double y, double z, double t, double a, double b) {
                          	double t_1 = exp((-t * y)) * x;
                          	double tmp;
                          	if (t <= -1.12e+67) {
                          		tmp = t_1;
                          	} else if (t <= 5.5e+149) {
                          		tmp = exp((-b * a)) * x;
                          	} else {
                          		tmp = t_1;
                          	}
                          	return tmp;
                          }
                          
                          real(8) function code(x, y, z, t, a, b)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              real(8), intent (in) :: z
                              real(8), intent (in) :: t
                              real(8), intent (in) :: a
                              real(8), intent (in) :: b
                              real(8) :: t_1
                              real(8) :: tmp
                              t_1 = exp((-t * y)) * x
                              if (t <= (-1.12d+67)) then
                                  tmp = t_1
                              else if (t <= 5.5d+149) then
                                  tmp = exp((-b * a)) * x
                              else
                                  tmp = t_1
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a, double b) {
                          	double t_1 = Math.exp((-t * y)) * x;
                          	double tmp;
                          	if (t <= -1.12e+67) {
                          		tmp = t_1;
                          	} else if (t <= 5.5e+149) {
                          		tmp = Math.exp((-b * a)) * x;
                          	} else {
                          		tmp = t_1;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a, b):
                          	t_1 = math.exp((-t * y)) * x
                          	tmp = 0
                          	if t <= -1.12e+67:
                          		tmp = t_1
                          	elif t <= 5.5e+149:
                          		tmp = math.exp((-b * a)) * x
                          	else:
                          		tmp = t_1
                          	return tmp
                          
                          function code(x, y, z, t, a, b)
                          	t_1 = Float64(exp(Float64(Float64(-t) * y)) * x)
                          	tmp = 0.0
                          	if (t <= -1.12e+67)
                          		tmp = t_1;
                          	elseif (t <= 5.5e+149)
                          		tmp = Float64(exp(Float64(Float64(-b) * a)) * x);
                          	else
                          		tmp = t_1;
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t, a, b)
                          	t_1 = exp((-t * y)) * x;
                          	tmp = 0.0;
                          	if (t <= -1.12e+67)
                          		tmp = t_1;
                          	elseif (t <= 5.5e+149)
                          		tmp = exp((-b * a)) * x;
                          	else
                          		tmp = t_1;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Exp[N[((-t) * y), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[t, -1.12e+67], t$95$1, If[LessEqual[t, 5.5e+149], N[(N[Exp[N[((-b) * a), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_1 := e^{\left(-t\right) \cdot y} \cdot x\\
                          \mathbf{if}\;t \leq -1.12 \cdot 10^{+67}:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{elif}\;t \leq 5.5 \cdot 10^{+149}:\\
                          \;\;\;\;e^{\left(-b\right) \cdot a} \cdot x\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t\_1\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if t < -1.12e67 or 5.49999999999999999e149 < t

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

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

                                \[\leadsto x \cdot e^{\color{blue}{\left(-1 \cdot t\right) \cdot y}} \]
                              2. mul-1-negN/A

                                \[\leadsto x \cdot e^{\color{blue}{\left(\mathsf{neg}\left(t\right)\right)} \cdot y} \]
                              3. lower-*.f64N/A

                                \[\leadsto x \cdot e^{\color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot y}} \]
                              4. lower-neg.f6487.9

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

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

                            if -1.12e67 < t < 5.49999999999999999e149

                            1. Initial program 95.0%

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

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

                                \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
                              2. *-commutativeN/A

                                \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{b \cdot a}\right)} \]
                              3. distribute-lft-neg-inN/A

                                \[\leadsto x \cdot e^{\color{blue}{\left(\mathsf{neg}\left(b\right)\right) \cdot a}} \]
                              4. lower-*.f64N/A

                                \[\leadsto x \cdot e^{\color{blue}{\left(\mathsf{neg}\left(b\right)\right) \cdot a}} \]
                              5. lower-neg.f6466.8

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

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

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

                          Alternative 8: 58.6% accurate, 2.9× speedup?

                          \[\begin{array}{l} \\ e^{\left(-b\right) \cdot a} \cdot x \end{array} \]
                          (FPCore (x y z t a b) :precision binary64 (* (exp (* (- b) a)) x))
                          double code(double x, double y, double z, double t, double a, double b) {
                          	return exp((-b * a)) * 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 = exp((-b * a)) * x
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a, double b) {
                          	return Math.exp((-b * a)) * x;
                          }
                          
                          def code(x, y, z, t, a, b):
                          	return math.exp((-b * a)) * x
                          
                          function code(x, y, z, t, a, b)
                          	return Float64(exp(Float64(Float64(-b) * a)) * x)
                          end
                          
                          function tmp = code(x, y, z, t, a, b)
                          	tmp = exp((-b * a)) * x;
                          end
                          
                          code[x_, y_, z_, t_, a_, b_] := N[(N[Exp[N[((-b) * a), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision]
                          
                          \begin{array}{l}
                          
                          \\
                          e^{\left(-b\right) \cdot a} \cdot x
                          \end{array}
                          
                          Derivation
                          1. Initial program 96.2%

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

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

                              \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
                            2. *-commutativeN/A

                              \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{b \cdot a}\right)} \]
                            3. distribute-lft-neg-inN/A

                              \[\leadsto x \cdot e^{\color{blue}{\left(\mathsf{neg}\left(b\right)\right) \cdot a}} \]
                            4. lower-*.f64N/A

                              \[\leadsto x \cdot e^{\color{blue}{\left(\mathsf{neg}\left(b\right)\right) \cdot a}} \]
                            5. lower-neg.f6458.0

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

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

                            \[\leadsto e^{\left(-b\right) \cdot a} \cdot x \]
                          7. Add Preprocessing

                          Alternative 9: 28.2% accurate, 13.7× speedup?

                          \[\begin{array}{l} \\ \mathsf{fma}\left(1, x, \left(\left(\left(-t\right) \cdot y\right) \cdot x\right) \cdot 1\right) \end{array} \]
                          (FPCore (x y z t a b)
                           :precision binary64
                           (fma 1.0 x (* (* (* (- t) y) x) 1.0)))
                          double code(double x, double y, double z, double t, double a, double b) {
                          	return fma(1.0, x, (((-t * y) * x) * 1.0));
                          }
                          
                          function code(x, y, z, t, a, b)
                          	return fma(1.0, x, Float64(Float64(Float64(Float64(-t) * y) * x) * 1.0))
                          end
                          
                          code[x_, y_, z_, t_, a_, b_] := N[(1.0 * x + N[(N[(N[((-t) * y), $MachinePrecision] * x), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision]
                          
                          \begin{array}{l}
                          
                          \\
                          \mathsf{fma}\left(1, x, \left(\left(\left(-t\right) \cdot y\right) \cdot x\right) \cdot 1\right)
                          \end{array}
                          
                          Derivation
                          1. Initial program 96.2%

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

                            \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot \left(y \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}\right)\right)\right) + x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}} \]
                          4. Step-by-step derivation
                            1. +-commutativeN/A

                              \[\leadsto \color{blue}{x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z} + -1 \cdot \left(t \cdot \left(x \cdot \left(y \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}\right)\right)\right)} \]
                            2. mul-1-negN/A

                              \[\leadsto x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z} + \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot \left(y \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}\right)\right)\right)\right)} \]
                            3. unsub-negN/A

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

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

                              \[\leadsto x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z} - \color{blue}{\left(\left(t \cdot x\right) \cdot y\right) \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}} \]
                            6. distribute-rgt-out--N/A

                              \[\leadsto \color{blue}{e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z} \cdot \left(x - \left(t \cdot x\right) \cdot y\right)} \]
                            7. lower-*.f64N/A

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

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

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

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

                              \[\leadsto 1 \cdot \left(x - \left(x \cdot t\right) \cdot y\right) \]
                            3. Step-by-step derivation
                              1. Applied rewrites23.2%

                                \[\leadsto 1 \cdot \left(x - \left(x \cdot t\right) \cdot y\right) \]
                              2. Step-by-step derivation
                                1. Applied rewrites24.0%

                                  \[\leadsto \mathsf{fma}\left(1, \color{blue}{x}, 1 \cdot \left(\left(-x\right) \cdot \left(t \cdot y\right)\right)\right) \]
                                2. Final simplification24.0%

                                  \[\leadsto \mathsf{fma}\left(1, x, \left(\left(\left(-t\right) \cdot y\right) \cdot x\right) \cdot 1\right) \]
                                3. Add Preprocessing

                                Alternative 10: 26.7% accurate, 17.3× speedup?

                                \[\begin{array}{l} \\ 1 \cdot \left(x - \left(t \cdot x\right) \cdot y\right) \end{array} \]
                                (FPCore (x y z t a b) :precision binary64 (* 1.0 (- x (* (* t x) y))))
                                double code(double x, double y, double z, double t, double a, double b) {
                                	return 1.0 * (x - ((t * x) * y));
                                }
                                
                                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 = 1.0d0 * (x - ((t * x) * y))
                                end function
                                
                                public static double code(double x, double y, double z, double t, double a, double b) {
                                	return 1.0 * (x - ((t * x) * y));
                                }
                                
                                def code(x, y, z, t, a, b):
                                	return 1.0 * (x - ((t * x) * y))
                                
                                function code(x, y, z, t, a, b)
                                	return Float64(1.0 * Float64(x - Float64(Float64(t * x) * y)))
                                end
                                
                                function tmp = code(x, y, z, t, a, b)
                                	tmp = 1.0 * (x - ((t * x) * y));
                                end
                                
                                code[x_, y_, z_, t_, a_, b_] := N[(1.0 * N[(x - N[(N[(t * x), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                
                                \begin{array}{l}
                                
                                \\
                                1 \cdot \left(x - \left(t \cdot x\right) \cdot y\right)
                                \end{array}
                                
                                Derivation
                                1. Initial program 96.2%

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

                                  \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot \left(y \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}\right)\right)\right) + x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}} \]
                                4. Step-by-step derivation
                                  1. +-commutativeN/A

                                    \[\leadsto \color{blue}{x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z} + -1 \cdot \left(t \cdot \left(x \cdot \left(y \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}\right)\right)\right)} \]
                                  2. mul-1-negN/A

                                    \[\leadsto x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z} + \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot \left(y \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}\right)\right)\right)\right)} \]
                                  3. unsub-negN/A

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

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

                                    \[\leadsto x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z} - \color{blue}{\left(\left(t \cdot x\right) \cdot y\right) \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z}} \]
                                  6. distribute-rgt-out--N/A

                                    \[\leadsto \color{blue}{e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \log z} \cdot \left(x - \left(t \cdot x\right) \cdot y\right)} \]
                                  7. lower-*.f64N/A

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

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

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

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

                                    \[\leadsto 1 \cdot \left(x - \left(x \cdot t\right) \cdot y\right) \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites23.2%

                                      \[\leadsto 1 \cdot \left(x - \left(x \cdot t\right) \cdot y\right) \]
                                    2. Final simplification23.2%

                                      \[\leadsto 1 \cdot \left(x - \left(t \cdot x\right) \cdot y\right) \]
                                    3. Add Preprocessing

                                    Reproduce

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