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

Percentage Accurate: 96.8% → 96.8%
Time: 14.0s
Alternatives: 14
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 14 alternatives:

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

Initial Program: 96.8% 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.8% accurate, 1.0× speedup?

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

\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
Derivation
  1. Initial program 96.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. Add Preprocessing

Alternative 2: 33.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+187}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot y, -t, x\right)\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+304}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot y, \log z, x\right)\\

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


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

    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 0

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x \cdot y, \color{blue}{\log z - t}, x\right) \]
      2. Taylor expanded in t around inf

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

          \[\leadsto \left(\left(-t\right) \cdot x\right) \cdot y \]

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

        1. Initial program 92.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 0

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(x \cdot y, \color{blue}{\log z - t}, x\right) \]
          2. Taylor expanded in t around inf

            \[\leadsto \mathsf{fma}\left(x \cdot y, -1 \cdot t, x\right) \]
          3. Step-by-step derivation
            1. Applied rewrites52.9%

              \[\leadsto \mathsf{fma}\left(x \cdot y, -t, x\right) \]

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

            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 y around 0

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(x \cdot y, \log z, x\right) \]
              3. Step-by-step derivation
                1. Applied rewrites25.6%

                  \[\leadsto \mathsf{fma}\left(x \cdot y, \log z, x\right) \]

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

                1. Initial program 94.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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(x \cdot y, \color{blue}{\log z - t}, x\right) \]
                  2. Taylor expanded in t around inf

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

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

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

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

                    Alternative 3: 33.7% accurate, 0.4× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+36}:\\ \;\;\;\;-y \cdot \left(x \cdot t\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+254}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot y, -t, x\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+304}:\\ \;\;\;\;x \cdot \left(y \cdot \log z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b)
                     :precision binary64
                     (let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
                       (if (<= t_1 -2e+36)
                         (- (* y (* x t)))
                         (if (<= t_1 2e+254)
                           (fma (* x y) (- t) x)
                           (if (<= t_1 2e+304) (* x (* y (log z))) (* x (* y (- t))))))))
                    double code(double x, double y, double z, double t, double a, double b) {
                    	double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
                    	double tmp;
                    	if (t_1 <= -2e+36) {
                    		tmp = -(y * (x * t));
                    	} else if (t_1 <= 2e+254) {
                    		tmp = fma((x * y), -t, x);
                    	} else if (t_1 <= 2e+304) {
                    		tmp = x * (y * log(z));
                    	} else {
                    		tmp = x * (y * -t);
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a, b)
                    	t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))
                    	tmp = 0.0
                    	if (t_1 <= -2e+36)
                    		tmp = Float64(-Float64(y * Float64(x * t)));
                    	elseif (t_1 <= 2e+254)
                    		tmp = fma(Float64(x * y), Float64(-t), x);
                    	elseif (t_1 <= 2e+304)
                    		tmp = Float64(x * Float64(y * log(z)));
                    	else
                    		tmp = Float64(x * Float64(y * Float64(-t)));
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -2e+36], (-N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), If[LessEqual[t$95$1, 2e+254], N[(N[(x * y), $MachinePrecision] * (-t) + x), $MachinePrecision], If[LessEqual[t$95$1, 2e+304], N[(x * N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision]]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
                    \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+36}:\\
                    \;\;\;\;-y \cdot \left(x \cdot t\right)\\
                    
                    \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+254}:\\
                    \;\;\;\;\mathsf{fma}\left(x \cdot y, -t, x\right)\\
                    
                    \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+304}:\\
                    \;\;\;\;x \cdot \left(y \cdot \log z\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 4 regimes
                    2. if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2.00000000000000008e36

                      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 0

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(x \cdot y, \color{blue}{\log z - t}, x\right) \]
                        2. Taylor expanded in t around inf

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

                            \[\leadsto \left(\left(-t\right) \cdot x\right) \cdot y \]

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

                          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 y around 0

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(x \cdot y, \color{blue}{\log z - t}, x\right) \]
                            2. Taylor expanded in t around inf

                              \[\leadsto \mathsf{fma}\left(x \cdot y, -1 \cdot t, x\right) \]
                            3. Step-by-step derivation
                              1. Applied rewrites45.8%

                                \[\leadsto \mathsf{fma}\left(x \cdot y, -t, x\right) \]

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

                              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 y around 0

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(x \cdot y, \color{blue}{\log z - t}, x\right) \]
                                2. Taylor expanded in y around inf

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

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

                                    \[\leadsto x \cdot \left(y \cdot \log z\right) \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites44.3%

                                      \[\leadsto x \cdot \left(y \cdot \log z\right) \]

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

                                    1. Initial program 94.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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left(x \cdot y, \color{blue}{\log z - t}, x\right) \]
                                      2. Taylor expanded in t around inf

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

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

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

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

                                        Alternative 4: 34.0% accurate, 0.7× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+36}:\\ \;\;\;\;-y \cdot \left(x \cdot t\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+304}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot y, -t, x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \end{array} \end{array} \]
                                        (FPCore (x y z t a b)
                                         :precision binary64
                                         (let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
                                           (if (<= t_1 -2e+36)
                                             (- (* y (* x t)))
                                             (if (<= t_1 2e+304) (fma (* x y) (- t) x) (* x (* y (- t)))))))
                                        double code(double x, double y, double z, double t, double a, double b) {
                                        	double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
                                        	double tmp;
                                        	if (t_1 <= -2e+36) {
                                        		tmp = -(y * (x * t));
                                        	} else if (t_1 <= 2e+304) {
                                        		tmp = fma((x * y), -t, x);
                                        	} else {
                                        		tmp = x * (y * -t);
                                        	}
                                        	return tmp;
                                        }
                                        
                                        function code(x, y, z, t, a, b)
                                        	t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))
                                        	tmp = 0.0
                                        	if (t_1 <= -2e+36)
                                        		tmp = Float64(-Float64(y * Float64(x * t)));
                                        	elseif (t_1 <= 2e+304)
                                        		tmp = fma(Float64(x * y), Float64(-t), x);
                                        	else
                                        		tmp = Float64(x * Float64(y * Float64(-t)));
                                        	end
                                        	return tmp
                                        end
                                        
                                        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -2e+36], (-N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), If[LessEqual[t$95$1, 2e+304], N[(N[(x * y), $MachinePrecision] * (-t) + x), $MachinePrecision], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision]]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
                                        \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+36}:\\
                                        \;\;\;\;-y \cdot \left(x \cdot t\right)\\
                                        
                                        \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+304}:\\
                                        \;\;\;\;\mathsf{fma}\left(x \cdot y, -t, x\right)\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 3 regimes
                                        2. if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2.00000000000000008e36

                                          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 0

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \mathsf{fma}\left(x \cdot y, \color{blue}{\log z - t}, x\right) \]
                                            2. Taylor expanded in t around inf

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

                                                \[\leadsto \left(\left(-t\right) \cdot x\right) \cdot y \]

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

                                              1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \mathsf{fma}\left(x \cdot y, \color{blue}{\log z - t}, x\right) \]
                                                2. Taylor expanded in t around inf

                                                  \[\leadsto \mathsf{fma}\left(x \cdot y, -1 \cdot t, x\right) \]
                                                3. Step-by-step derivation
                                                  1. Applied rewrites42.0%

                                                    \[\leadsto \mathsf{fma}\left(x \cdot y, -t, x\right) \]

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

                                                  1. Initial program 94.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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(x \cdot y, \color{blue}{\log z - t}, x\right) \]
                                                    2. Taylor expanded in t around inf

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

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

                                                          \[\leadsto \left(\left(-t\right) \cdot y\right) \cdot x \]
                                                      3. Recombined 3 regimes into one program.
                                                      4. Final simplification36.3%

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

                                                      Alternative 5: 33.3% accurate, 0.7× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+36}:\\ \;\;\;\;-y \cdot \left(x \cdot t\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+282}:\\ \;\;\;\;\mathsf{fma}\left(-x \cdot t, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \end{array} \end{array} \]
                                                      (FPCore (x y z t a b)
                                                       :precision binary64
                                                       (let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
                                                         (if (<= t_1 -2e+36)
                                                           (- (* y (* x t)))
                                                           (if (<= t_1 1e+282) (fma (- (* x t)) y x) (* x (* y (- t)))))))
                                                      double code(double x, double y, double z, double t, double a, double b) {
                                                      	double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
                                                      	double tmp;
                                                      	if (t_1 <= -2e+36) {
                                                      		tmp = -(y * (x * t));
                                                      	} else if (t_1 <= 1e+282) {
                                                      		tmp = fma(-(x * t), y, x);
                                                      	} else {
                                                      		tmp = x * (y * -t);
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      function code(x, y, z, t, a, b)
                                                      	t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))
                                                      	tmp = 0.0
                                                      	if (t_1 <= -2e+36)
                                                      		tmp = Float64(-Float64(y * Float64(x * t)));
                                                      	elseif (t_1 <= 1e+282)
                                                      		tmp = fma(Float64(-Float64(x * t)), y, x);
                                                      	else
                                                      		tmp = Float64(x * Float64(y * Float64(-t)));
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -2e+36], (-N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), If[LessEqual[t$95$1, 1e+282], N[((-N[(x * t), $MachinePrecision]) * y + x), $MachinePrecision], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision]]]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
                                                      \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+36}:\\
                                                      \;\;\;\;-y \cdot \left(x \cdot t\right)\\
                                                      
                                                      \mathbf{elif}\;t\_1 \leq 10^{+282}:\\
                                                      \;\;\;\;\mathsf{fma}\left(-x \cdot t, y, x\right)\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 3 regimes
                                                      2. if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2.00000000000000008e36

                                                        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 0

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \mathsf{fma}\left(x \cdot y, \color{blue}{\log z - t}, x\right) \]
                                                          2. Taylor expanded in t around inf

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

                                                              \[\leadsto \left(\left(-t\right) \cdot x\right) \cdot y \]

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

                                                            1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto \mathsf{fma}\left(x \cdot y, \color{blue}{\log z - t}, x\right) \]
                                                              2. Step-by-step derivation
                                                                1. Applied rewrites44.0%

                                                                  \[\leadsto \mathsf{fma}\left(x \cdot \left(\log z - t\right), y, x\right) \]
                                                                2. Taylor expanded in t around inf

                                                                  \[\leadsto \mathsf{fma}\left(-1 \cdot \left(t \cdot x\right), y, x\right) \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites39.9%

                                                                    \[\leadsto \mathsf{fma}\left(x \cdot \left(-t\right), y, x\right) \]

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

                                                                  1. Initial program 95.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

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

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

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

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

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

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

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

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

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

                                                                      \[\leadsto \mathsf{fma}\left(x \cdot y, \color{blue}{\log z - t}, x\right) \]
                                                                    2. Taylor expanded in t around inf

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

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

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

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

                                                                      Alternative 6: 19.3% accurate, 1.4× speedup?

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

                                                                        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 y around 0

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

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

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

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

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

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

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

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

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

                                                                            \[\leadsto \mathsf{fma}\left(x \cdot y, \color{blue}{\log z - t}, x\right) \]
                                                                          2. Step-by-step derivation
                                                                            1. Applied rewrites28.0%

                                                                              \[\leadsto \mathsf{fma}\left(x \cdot \left(\log z - t\right), y, x\right) \]
                                                                            2. Taylor expanded in t around inf

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

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

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

                                                                              1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

                                                                                  \[\leadsto \mathsf{fma}\left(x \cdot y, \color{blue}{\log z - t}, x\right) \]
                                                                                2. Taylor expanded in t around inf

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

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

                                                                                      \[\leadsto \left(\left(-t\right) \cdot y\right) \cdot x \]
                                                                                  3. Recombined 2 regimes into one program.
                                                                                  4. Final simplification21.0%

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

                                                                                  Alternative 7: 19.1% accurate, 1.4× speedup?

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

                                                                                    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

                                                                                        \[\leadsto \mathsf{fma}\left(x \cdot y, \color{blue}{\log z - t}, x\right) \]
                                                                                      2. Taylor expanded in t around inf

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

                                                                                          \[\leadsto \left(\left(-t\right) \cdot x\right) \cdot y \]

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

                                                                                        1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

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

                                                                                            \[\leadsto \mathsf{fma}\left(x \cdot y, \color{blue}{\log z - t}, x\right) \]
                                                                                          2. Taylor expanded in t around inf

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

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

                                                                                                \[\leadsto \left(\left(-t\right) \cdot y\right) \cdot x \]
                                                                                            3. Recombined 2 regimes into one program.
                                                                                            4. Final simplification20.8%

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

                                                                                            Alternative 8: 87.3% accurate, 1.5× speedup?

                                                                                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{y \cdot \left(\log z - t\right)}\\ \mathbf{if}\;y \leq -1.55 \cdot 10^{-19}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 8.4 \cdot 10^{-13}:\\ \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                                            (FPCore (x y z t a b)
                                                                                             :precision binary64
                                                                                             (let* ((t_1 (* x (exp (* y (- (log z) t))))))
                                                                                               (if (<= y -1.55e-19)
                                                                                                 t_1
                                                                                                 (if (<= y 8.4e-13) (* x (exp (- (* a (+ z b))))) t_1))))
                                                                                            double code(double x, double y, double z, double t, double a, double b) {
                                                                                            	double t_1 = x * exp((y * (log(z) - t)));
                                                                                            	double tmp;
                                                                                            	if (y <= -1.55e-19) {
                                                                                            		tmp = t_1;
                                                                                            	} else if (y <= 8.4e-13) {
                                                                                            		tmp = x * exp(-(a * (z + b)));
                                                                                            	} 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 = x * exp((y * (log(z) - t)))
                                                                                                if (y <= (-1.55d-19)) then
                                                                                                    tmp = t_1
                                                                                                else if (y <= 8.4d-13) then
                                                                                                    tmp = x * exp(-(a * (z + b)))
                                                                                                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 = x * Math.exp((y * (Math.log(z) - t)));
                                                                                            	double tmp;
                                                                                            	if (y <= -1.55e-19) {
                                                                                            		tmp = t_1;
                                                                                            	} else if (y <= 8.4e-13) {
                                                                                            		tmp = x * Math.exp(-(a * (z + b)));
                                                                                            	} else {
                                                                                            		tmp = t_1;
                                                                                            	}
                                                                                            	return tmp;
                                                                                            }
                                                                                            
                                                                                            def code(x, y, z, t, a, b):
                                                                                            	t_1 = x * math.exp((y * (math.log(z) - t)))
                                                                                            	tmp = 0
                                                                                            	if y <= -1.55e-19:
                                                                                            		tmp = t_1
                                                                                            	elif y <= 8.4e-13:
                                                                                            		tmp = x * math.exp(-(a * (z + b)))
                                                                                            	else:
                                                                                            		tmp = t_1
                                                                                            	return tmp
                                                                                            
                                                                                            function code(x, y, z, t, a, b)
                                                                                            	t_1 = Float64(x * exp(Float64(y * Float64(log(z) - t))))
                                                                                            	tmp = 0.0
                                                                                            	if (y <= -1.55e-19)
                                                                                            		tmp = t_1;
                                                                                            	elseif (y <= 8.4e-13)
                                                                                            		tmp = Float64(x * exp(Float64(-Float64(a * Float64(z + b)))));
                                                                                            	else
                                                                                            		tmp = t_1;
                                                                                            	end
                                                                                            	return tmp
                                                                                            end
                                                                                            
                                                                                            function tmp_2 = code(x, y, z, t, a, b)
                                                                                            	t_1 = x * exp((y * (log(z) - t)));
                                                                                            	tmp = 0.0;
                                                                                            	if (y <= -1.55e-19)
                                                                                            		tmp = t_1;
                                                                                            	elseif (y <= 8.4e-13)
                                                                                            		tmp = x * exp(-(a * (z + b)));
                                                                                            	else
                                                                                            		tmp = t_1;
                                                                                            	end
                                                                                            	tmp_2 = tmp;
                                                                                            end
                                                                                            
                                                                                            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.55e-19], t$95$1, If[LessEqual[y, 8.4e-13], N[(x * N[Exp[(-N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                                                                            
                                                                                            \begin{array}{l}
                                                                                            
                                                                                            \\
                                                                                            \begin{array}{l}
                                                                                            t_1 := x \cdot e^{y \cdot \left(\log z - t\right)}\\
                                                                                            \mathbf{if}\;y \leq -1.55 \cdot 10^{-19}:\\
                                                                                            \;\;\;\;t\_1\\
                                                                                            
                                                                                            \mathbf{elif}\;y \leq 8.4 \cdot 10^{-13}:\\
                                                                                            \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\
                                                                                            
                                                                                            \mathbf{else}:\\
                                                                                            \;\;\;\;t\_1\\
                                                                                            
                                                                                            
                                                                                            \end{array}
                                                                                            \end{array}
                                                                                            
                                                                                            Derivation
                                                                                            1. Split input into 2 regimes
                                                                                            2. if y < -1.5499999999999999e-19 or 8.39999999999999955e-13 < 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 y around inf

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

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

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

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

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

                                                                                              if -1.5499999999999999e-19 < y < 8.39999999999999955e-13

                                                                                              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 y around 0

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

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

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

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

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

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

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

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

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

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

                                                                                              Alternative 9: 72.1% accurate, 1.5× speedup?

                                                                                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{y \cdot \left(-t\right)}\\ \mathbf{if}\;t \leq -246:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-38}:\\ \;\;\;\;x \cdot e^{y \cdot \log z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                                              (FPCore (x y z t a b)
                                                                                               :precision binary64
                                                                                               (let* ((t_1 (* x (exp (* y (- t))))))
                                                                                                 (if (<= t -246.0) t_1 (if (<= t 1.65e-38) (* x (exp (* y (log z)))) t_1))))
                                                                                              double code(double x, double y, double z, double t, double a, double b) {
                                                                                              	double t_1 = x * exp((y * -t));
                                                                                              	double tmp;
                                                                                              	if (t <= -246.0) {
                                                                                              		tmp = t_1;
                                                                                              	} else if (t <= 1.65e-38) {
                                                                                              		tmp = x * exp((y * log(z)));
                                                                                              	} 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 = x * exp((y * -t))
                                                                                                  if (t <= (-246.0d0)) then
                                                                                                      tmp = t_1
                                                                                                  else if (t <= 1.65d-38) then
                                                                                                      tmp = x * exp((y * log(z)))
                                                                                                  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 = x * Math.exp((y * -t));
                                                                                              	double tmp;
                                                                                              	if (t <= -246.0) {
                                                                                              		tmp = t_1;
                                                                                              	} else if (t <= 1.65e-38) {
                                                                                              		tmp = x * Math.exp((y * Math.log(z)));
                                                                                              	} else {
                                                                                              		tmp = t_1;
                                                                                              	}
                                                                                              	return tmp;
                                                                                              }
                                                                                              
                                                                                              def code(x, y, z, t, a, b):
                                                                                              	t_1 = x * math.exp((y * -t))
                                                                                              	tmp = 0
                                                                                              	if t <= -246.0:
                                                                                              		tmp = t_1
                                                                                              	elif t <= 1.65e-38:
                                                                                              		tmp = x * math.exp((y * math.log(z)))
                                                                                              	else:
                                                                                              		tmp = t_1
                                                                                              	return tmp
                                                                                              
                                                                                              function code(x, y, z, t, a, b)
                                                                                              	t_1 = Float64(x * exp(Float64(y * Float64(-t))))
                                                                                              	tmp = 0.0
                                                                                              	if (t <= -246.0)
                                                                                              		tmp = t_1;
                                                                                              	elseif (t <= 1.65e-38)
                                                                                              		tmp = Float64(x * exp(Float64(y * log(z))));
                                                                                              	else
                                                                                              		tmp = t_1;
                                                                                              	end
                                                                                              	return tmp
                                                                                              end
                                                                                              
                                                                                              function tmp_2 = code(x, y, z, t, a, b)
                                                                                              	t_1 = x * exp((y * -t));
                                                                                              	tmp = 0.0;
                                                                                              	if (t <= -246.0)
                                                                                              		tmp = t_1;
                                                                                              	elseif (t <= 1.65e-38)
                                                                                              		tmp = x * exp((y * log(z)));
                                                                                              	else
                                                                                              		tmp = t_1;
                                                                                              	end
                                                                                              	tmp_2 = tmp;
                                                                                              end
                                                                                              
                                                                                              code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -246.0], t$95$1, If[LessEqual[t, 1.65e-38], N[(x * N[Exp[N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                                                                              
                                                                                              \begin{array}{l}
                                                                                              
                                                                                              \\
                                                                                              \begin{array}{l}
                                                                                              t_1 := x \cdot e^{y \cdot \left(-t\right)}\\
                                                                                              \mathbf{if}\;t \leq -246:\\
                                                                                              \;\;\;\;t\_1\\
                                                                                              
                                                                                              \mathbf{elif}\;t \leq 1.65 \cdot 10^{-38}:\\
                                                                                              \;\;\;\;x \cdot e^{y \cdot \log z}\\
                                                                                              
                                                                                              \mathbf{else}:\\
                                                                                              \;\;\;\;t\_1\\
                                                                                              
                                                                                              
                                                                                              \end{array}
                                                                                              \end{array}
                                                                                              
                                                                                              Derivation
                                                                                              1. Split input into 2 regimes
                                                                                              2. if t < -246 or 1.6500000000000001e-38 < t

                                                                                                1. Initial program 95.3%

                                                                                                  \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
                                                                                                2. 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. mul-1-negN/A

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

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

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

                                                                                                    \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
                                                                                                  5. lower-neg.f6484.1

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

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

                                                                                                if -246 < t < 1.6500000000000001e-38

                                                                                                1. Initial program 96.9%

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

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

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

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

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

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

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

                                                                                                    \[\leadsto x \cdot e^{y \cdot \log z} \]
                                                                                                8. Recombined 2 regimes into one program.
                                                                                                9. Add Preprocessing

                                                                                                Alternative 10: 74.8% accurate, 2.6× speedup?

                                                                                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{y \cdot \left(-t\right)}\\ \mathbf{if}\;t \leq -2300:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{+33}:\\ \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                                                (FPCore (x y z t a b)
                                                                                                 :precision binary64
                                                                                                 (let* ((t_1 (* x (exp (* y (- t))))))
                                                                                                   (if (<= t -2300.0)
                                                                                                     t_1
                                                                                                     (if (<= t 2.2e+33) (* x (exp (- (* a (+ z b))))) t_1))))
                                                                                                double code(double x, double y, double z, double t, double a, double b) {
                                                                                                	double t_1 = x * exp((y * -t));
                                                                                                	double tmp;
                                                                                                	if (t <= -2300.0) {
                                                                                                		tmp = t_1;
                                                                                                	} else if (t <= 2.2e+33) {
                                                                                                		tmp = x * exp(-(a * (z + b)));
                                                                                                	} 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 = x * exp((y * -t))
                                                                                                    if (t <= (-2300.0d0)) then
                                                                                                        tmp = t_1
                                                                                                    else if (t <= 2.2d+33) then
                                                                                                        tmp = x * exp(-(a * (z + b)))
                                                                                                    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 = x * Math.exp((y * -t));
                                                                                                	double tmp;
                                                                                                	if (t <= -2300.0) {
                                                                                                		tmp = t_1;
                                                                                                	} else if (t <= 2.2e+33) {
                                                                                                		tmp = x * Math.exp(-(a * (z + b)));
                                                                                                	} else {
                                                                                                		tmp = t_1;
                                                                                                	}
                                                                                                	return tmp;
                                                                                                }
                                                                                                
                                                                                                def code(x, y, z, t, a, b):
                                                                                                	t_1 = x * math.exp((y * -t))
                                                                                                	tmp = 0
                                                                                                	if t <= -2300.0:
                                                                                                		tmp = t_1
                                                                                                	elif t <= 2.2e+33:
                                                                                                		tmp = x * math.exp(-(a * (z + b)))
                                                                                                	else:
                                                                                                		tmp = t_1
                                                                                                	return tmp
                                                                                                
                                                                                                function code(x, y, z, t, a, b)
                                                                                                	t_1 = Float64(x * exp(Float64(y * Float64(-t))))
                                                                                                	tmp = 0.0
                                                                                                	if (t <= -2300.0)
                                                                                                		tmp = t_1;
                                                                                                	elseif (t <= 2.2e+33)
                                                                                                		tmp = Float64(x * exp(Float64(-Float64(a * Float64(z + b)))));
                                                                                                	else
                                                                                                		tmp = t_1;
                                                                                                	end
                                                                                                	return tmp
                                                                                                end
                                                                                                
                                                                                                function tmp_2 = code(x, y, z, t, a, b)
                                                                                                	t_1 = x * exp((y * -t));
                                                                                                	tmp = 0.0;
                                                                                                	if (t <= -2300.0)
                                                                                                		tmp = t_1;
                                                                                                	elseif (t <= 2.2e+33)
                                                                                                		tmp = x * exp(-(a * (z + b)));
                                                                                                	else
                                                                                                		tmp = t_1;
                                                                                                	end
                                                                                                	tmp_2 = tmp;
                                                                                                end
                                                                                                
                                                                                                code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2300.0], t$95$1, If[LessEqual[t, 2.2e+33], N[(x * N[Exp[(-N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                                                                                
                                                                                                \begin{array}{l}
                                                                                                
                                                                                                \\
                                                                                                \begin{array}{l}
                                                                                                t_1 := x \cdot e^{y \cdot \left(-t\right)}\\
                                                                                                \mathbf{if}\;t \leq -2300:\\
                                                                                                \;\;\;\;t\_1\\
                                                                                                
                                                                                                \mathbf{elif}\;t \leq 2.2 \cdot 10^{+33}:\\
                                                                                                \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\
                                                                                                
                                                                                                \mathbf{else}:\\
                                                                                                \;\;\;\;t\_1\\
                                                                                                
                                                                                                
                                                                                                \end{array}
                                                                                                \end{array}
                                                                                                
                                                                                                Derivation
                                                                                                1. Split input into 2 regimes
                                                                                                2. if t < -2300 or 2.19999999999999994e33 < t

                                                                                                  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

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

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

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

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

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

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

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

                                                                                                  if -2300 < t < 2.19999999999999994e33

                                                                                                  1. Initial program 97.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 y around 0

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

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

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

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

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

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

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

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

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

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

                                                                                                  Alternative 11: 72.3% accurate, 2.6× speedup?

                                                                                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{y \cdot \left(-t\right)}\\ \mathbf{if}\;t \leq -530:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+30}:\\ \;\;\;\;x \cdot e^{-a \cdot b}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                                                  (FPCore (x y z t a b)
                                                                                                   :precision binary64
                                                                                                   (let* ((t_1 (* x (exp (* y (- t))))))
                                                                                                     (if (<= t -530.0) t_1 (if (<= t 1.4e+30) (* x (exp (- (* a b)))) t_1))))
                                                                                                  double code(double x, double y, double z, double t, double a, double b) {
                                                                                                  	double t_1 = x * exp((y * -t));
                                                                                                  	double tmp;
                                                                                                  	if (t <= -530.0) {
                                                                                                  		tmp = t_1;
                                                                                                  	} else if (t <= 1.4e+30) {
                                                                                                  		tmp = x * exp(-(a * b));
                                                                                                  	} 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 = x * exp((y * -t))
                                                                                                      if (t <= (-530.0d0)) then
                                                                                                          tmp = t_1
                                                                                                      else if (t <= 1.4d+30) then
                                                                                                          tmp = x * exp(-(a * b))
                                                                                                      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 = x * Math.exp((y * -t));
                                                                                                  	double tmp;
                                                                                                  	if (t <= -530.0) {
                                                                                                  		tmp = t_1;
                                                                                                  	} else if (t <= 1.4e+30) {
                                                                                                  		tmp = x * Math.exp(-(a * b));
                                                                                                  	} else {
                                                                                                  		tmp = t_1;
                                                                                                  	}
                                                                                                  	return tmp;
                                                                                                  }
                                                                                                  
                                                                                                  def code(x, y, z, t, a, b):
                                                                                                  	t_1 = x * math.exp((y * -t))
                                                                                                  	tmp = 0
                                                                                                  	if t <= -530.0:
                                                                                                  		tmp = t_1
                                                                                                  	elif t <= 1.4e+30:
                                                                                                  		tmp = x * math.exp(-(a * b))
                                                                                                  	else:
                                                                                                  		tmp = t_1
                                                                                                  	return tmp
                                                                                                  
                                                                                                  function code(x, y, z, t, a, b)
                                                                                                  	t_1 = Float64(x * exp(Float64(y * Float64(-t))))
                                                                                                  	tmp = 0.0
                                                                                                  	if (t <= -530.0)
                                                                                                  		tmp = t_1;
                                                                                                  	elseif (t <= 1.4e+30)
                                                                                                  		tmp = Float64(x * exp(Float64(-Float64(a * b))));
                                                                                                  	else
                                                                                                  		tmp = t_1;
                                                                                                  	end
                                                                                                  	return tmp
                                                                                                  end
                                                                                                  
                                                                                                  function tmp_2 = code(x, y, z, t, a, b)
                                                                                                  	t_1 = x * exp((y * -t));
                                                                                                  	tmp = 0.0;
                                                                                                  	if (t <= -530.0)
                                                                                                  		tmp = t_1;
                                                                                                  	elseif (t <= 1.4e+30)
                                                                                                  		tmp = x * exp(-(a * b));
                                                                                                  	else
                                                                                                  		tmp = t_1;
                                                                                                  	end
                                                                                                  	tmp_2 = tmp;
                                                                                                  end
                                                                                                  
                                                                                                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -530.0], t$95$1, If[LessEqual[t, 1.4e+30], N[(x * N[Exp[(-N[(a * b), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                                                                                  
                                                                                                  \begin{array}{l}
                                                                                                  
                                                                                                  \\
                                                                                                  \begin{array}{l}
                                                                                                  t_1 := x \cdot e^{y \cdot \left(-t\right)}\\
                                                                                                  \mathbf{if}\;t \leq -530:\\
                                                                                                  \;\;\;\;t\_1\\
                                                                                                  
                                                                                                  \mathbf{elif}\;t \leq 1.4 \cdot 10^{+30}:\\
                                                                                                  \;\;\;\;x \cdot e^{-a \cdot b}\\
                                                                                                  
                                                                                                  \mathbf{else}:\\
                                                                                                  \;\;\;\;t\_1\\
                                                                                                  
                                                                                                  
                                                                                                  \end{array}
                                                                                                  \end{array}
                                                                                                  
                                                                                                  Derivation
                                                                                                  1. Split input into 2 regimes
                                                                                                  2. if t < -530 or 1.39999999999999992e30 < t

                                                                                                    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

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

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

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

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

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

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

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

                                                                                                    if -530 < t < 1.39999999999999992e30

                                                                                                    1. Initial program 97.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. lower-neg.f64N/A

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

                                                                                                        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
                                                                                                    5. Applied rewrites64.4%

                                                                                                      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
                                                                                                  3. Recombined 2 regimes into one program.
                                                                                                  4. Add Preprocessing

                                                                                                  Alternative 12: 36.3% accurate, 2.6× speedup?

                                                                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.65 \cdot 10^{+121}:\\ \;\;\;\;x \cdot \left(y \cdot \log z\right)\\ \mathbf{elif}\;y \leq 0.34:\\ \;\;\;\;x \cdot e^{-z \cdot a}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\ \end{array} \end{array} \]
                                                                                                  (FPCore (x y z t a b)
                                                                                                   :precision binary64
                                                                                                   (if (<= y -1.65e+121)
                                                                                                     (* x (* y (log z)))
                                                                                                     (if (<= y 0.34) (* x (exp (- (* z a)))) (* x (* y (- t))))))
                                                                                                  double code(double x, double y, double z, double t, double a, double b) {
                                                                                                  	double tmp;
                                                                                                  	if (y <= -1.65e+121) {
                                                                                                  		tmp = x * (y * log(z));
                                                                                                  	} else if (y <= 0.34) {
                                                                                                  		tmp = x * exp(-(z * a));
                                                                                                  	} else {
                                                                                                  		tmp = x * (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 (y <= (-1.65d+121)) then
                                                                                                          tmp = x * (y * log(z))
                                                                                                      else if (y <= 0.34d0) then
                                                                                                          tmp = x * exp(-(z * a))
                                                                                                      else
                                                                                                          tmp = x * (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 (y <= -1.65e+121) {
                                                                                                  		tmp = x * (y * Math.log(z));
                                                                                                  	} else if (y <= 0.34) {
                                                                                                  		tmp = x * Math.exp(-(z * a));
                                                                                                  	} else {
                                                                                                  		tmp = x * (y * -t);
                                                                                                  	}
                                                                                                  	return tmp;
                                                                                                  }
                                                                                                  
                                                                                                  def code(x, y, z, t, a, b):
                                                                                                  	tmp = 0
                                                                                                  	if y <= -1.65e+121:
                                                                                                  		tmp = x * (y * math.log(z))
                                                                                                  	elif y <= 0.34:
                                                                                                  		tmp = x * math.exp(-(z * a))
                                                                                                  	else:
                                                                                                  		tmp = x * (y * -t)
                                                                                                  	return tmp
                                                                                                  
                                                                                                  function code(x, y, z, t, a, b)
                                                                                                  	tmp = 0.0
                                                                                                  	if (y <= -1.65e+121)
                                                                                                  		tmp = Float64(x * Float64(y * log(z)));
                                                                                                  	elseif (y <= 0.34)
                                                                                                  		tmp = Float64(x * exp(Float64(-Float64(z * a))));
                                                                                                  	else
                                                                                                  		tmp = Float64(x * Float64(y * Float64(-t)));
                                                                                                  	end
                                                                                                  	return tmp
                                                                                                  end
                                                                                                  
                                                                                                  function tmp_2 = code(x, y, z, t, a, b)
                                                                                                  	tmp = 0.0;
                                                                                                  	if (y <= -1.65e+121)
                                                                                                  		tmp = x * (y * log(z));
                                                                                                  	elseif (y <= 0.34)
                                                                                                  		tmp = x * exp(-(z * a));
                                                                                                  	else
                                                                                                  		tmp = x * (y * -t);
                                                                                                  	end
                                                                                                  	tmp_2 = tmp;
                                                                                                  end
                                                                                                  
                                                                                                  code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.65e+121], N[(x * N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.34], N[(x * N[Exp[(-N[(z * a), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], N[(x * N[(y * (-t)), $MachinePrecision]), $MachinePrecision]]]
                                                                                                  
                                                                                                  \begin{array}{l}
                                                                                                  
                                                                                                  \\
                                                                                                  \begin{array}{l}
                                                                                                  \mathbf{if}\;y \leq -1.65 \cdot 10^{+121}:\\
                                                                                                  \;\;\;\;x \cdot \left(y \cdot \log z\right)\\
                                                                                                  
                                                                                                  \mathbf{elif}\;y \leq 0.34:\\
                                                                                                  \;\;\;\;x \cdot e^{-z \cdot a}\\
                                                                                                  
                                                                                                  \mathbf{else}:\\
                                                                                                  \;\;\;\;x \cdot \left(y \cdot \left(-t\right)\right)\\
                                                                                                  
                                                                                                  
                                                                                                  \end{array}
                                                                                                  \end{array}
                                                                                                  
                                                                                                  Derivation
                                                                                                  1. Split input into 3 regimes
                                                                                                  2. if y < -1.6499999999999999e121

                                                                                                    1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

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

                                                                                                        \[\leadsto \mathsf{fma}\left(x \cdot y, \color{blue}{\log z - t}, x\right) \]
                                                                                                      2. Taylor expanded in y around inf

                                                                                                        \[\leadsto x \cdot \left(y \cdot \color{blue}{\left(\log z - t\right)}\right) \]
                                                                                                      3. Step-by-step derivation
                                                                                                        1. Applied rewrites35.1%

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

                                                                                                          \[\leadsto x \cdot \left(y \cdot \log z\right) \]
                                                                                                        3. Step-by-step derivation
                                                                                                          1. Applied rewrites25.3%

                                                                                                            \[\leadsto x \cdot \left(y \cdot \log z\right) \]

                                                                                                          if -1.6499999999999999e121 < y < 0.340000000000000024

                                                                                                          1. Initial program 95.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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                              if 0.340000000000000024 < y

                                                                                                              1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

                                                                                                                  \[\leadsto \mathsf{fma}\left(x \cdot y, \color{blue}{\log z - t}, x\right) \]
                                                                                                                2. Taylor expanded in t around inf

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

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

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

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

                                                                                                                  Alternative 13: 56.6% accurate, 2.8× speedup?

                                                                                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq 4.2 \cdot 10^{-49}:\\ \;\;\;\;x \cdot e^{-a \cdot b}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{-z \cdot a}\\ \end{array} \end{array} \]
                                                                                                                  (FPCore (x y z t a b)
                                                                                                                   :precision binary64
                                                                                                                   (if (<= z 4.2e-49) (* x (exp (- (* a b)))) (* x (exp (- (* z a))))))
                                                                                                                  double code(double x, double y, double z, double t, double a, double b) {
                                                                                                                  	double tmp;
                                                                                                                  	if (z <= 4.2e-49) {
                                                                                                                  		tmp = x * exp(-(a * b));
                                                                                                                  	} else {
                                                                                                                  		tmp = x * exp(-(z * a));
                                                                                                                  	}
                                                                                                                  	return tmp;
                                                                                                                  }
                                                                                                                  
                                                                                                                  real(8) function code(x, y, z, t, a, b)
                                                                                                                      real(8), intent (in) :: x
                                                                                                                      real(8), intent (in) :: y
                                                                                                                      real(8), intent (in) :: z
                                                                                                                      real(8), intent (in) :: t
                                                                                                                      real(8), intent (in) :: a
                                                                                                                      real(8), intent (in) :: b
                                                                                                                      real(8) :: tmp
                                                                                                                      if (z <= 4.2d-49) then
                                                                                                                          tmp = x * exp(-(a * b))
                                                                                                                      else
                                                                                                                          tmp = x * exp(-(z * a))
                                                                                                                      end if
                                                                                                                      code = tmp
                                                                                                                  end function
                                                                                                                  
                                                                                                                  public static double code(double x, double y, double z, double t, double a, double b) {
                                                                                                                  	double tmp;
                                                                                                                  	if (z <= 4.2e-49) {
                                                                                                                  		tmp = x * Math.exp(-(a * b));
                                                                                                                  	} else {
                                                                                                                  		tmp = x * Math.exp(-(z * a));
                                                                                                                  	}
                                                                                                                  	return tmp;
                                                                                                                  }
                                                                                                                  
                                                                                                                  def code(x, y, z, t, a, b):
                                                                                                                  	tmp = 0
                                                                                                                  	if z <= 4.2e-49:
                                                                                                                  		tmp = x * math.exp(-(a * b))
                                                                                                                  	else:
                                                                                                                  		tmp = x * math.exp(-(z * a))
                                                                                                                  	return tmp
                                                                                                                  
                                                                                                                  function code(x, y, z, t, a, b)
                                                                                                                  	tmp = 0.0
                                                                                                                  	if (z <= 4.2e-49)
                                                                                                                  		tmp = Float64(x * exp(Float64(-Float64(a * b))));
                                                                                                                  	else
                                                                                                                  		tmp = Float64(x * exp(Float64(-Float64(z * a))));
                                                                                                                  	end
                                                                                                                  	return tmp
                                                                                                                  end
                                                                                                                  
                                                                                                                  function tmp_2 = code(x, y, z, t, a, b)
                                                                                                                  	tmp = 0.0;
                                                                                                                  	if (z <= 4.2e-49)
                                                                                                                  		tmp = x * exp(-(a * b));
                                                                                                                  	else
                                                                                                                  		tmp = x * exp(-(z * a));
                                                                                                                  	end
                                                                                                                  	tmp_2 = tmp;
                                                                                                                  end
                                                                                                                  
                                                                                                                  code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 4.2e-49], N[(x * N[Exp[(-N[(a * b), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[(-N[(z * a), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]]
                                                                                                                  
                                                                                                                  \begin{array}{l}
                                                                                                                  
                                                                                                                  \\
                                                                                                                  \begin{array}{l}
                                                                                                                  \mathbf{if}\;z \leq 4.2 \cdot 10^{-49}:\\
                                                                                                                  \;\;\;\;x \cdot e^{-a \cdot b}\\
                                                                                                                  
                                                                                                                  \mathbf{else}:\\
                                                                                                                  \;\;\;\;x \cdot e^{-z \cdot a}\\
                                                                                                                  
                                                                                                                  
                                                                                                                  \end{array}
                                                                                                                  \end{array}
                                                                                                                  
                                                                                                                  Derivation
                                                                                                                  1. Split input into 2 regimes
                                                                                                                  2. if z < 4.1999999999999998e-49

                                                                                                                    1. Initial program 97.3%

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

                                                                                                                      \[\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. lower-neg.f64N/A

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

                                                                                                                        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
                                                                                                                    5. Applied rewrites56.4%

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

                                                                                                                    if 4.1999999999999998e-49 < z

                                                                                                                    1. Initial program 88.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 0

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

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

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

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

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

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

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

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

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

                                                                                                                        \[\leadsto x \cdot e^{-1 \cdot \left(a \cdot \color{blue}{z}\right)} \]
                                                                                                                      3. Step-by-step derivation
                                                                                                                        1. Applied rewrites56.8%

                                                                                                                          \[\leadsto x \cdot e^{a \cdot \left(-z\right)} \]
                                                                                                                      4. Recombined 2 regimes into one program.
                                                                                                                      5. Final simplification56.4%

                                                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 4.2 \cdot 10^{-49}:\\ \;\;\;\;x \cdot e^{-a \cdot b}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{-z \cdot a}\\ \end{array} \]
                                                                                                                      6. Add Preprocessing

                                                                                                                      Alternative 14: 18.3% accurate, 25.2× speedup?

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

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

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

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

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

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

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

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

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

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

                                                                                                                          \[\leadsto \mathsf{fma}\left(x \cdot y, \color{blue}{\log z - t}, x\right) \]
                                                                                                                        2. Taylor expanded in t around inf

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

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

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

                                                                                                                          Reproduce

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