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

Percentage Accurate: 96.2% → 99.7%
Time: 16.7s
Alternatives: 22
Speedup: 1.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 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.2% accurate, 1.0× speedup?

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

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

Alternative 1: 99.7% accurate, 1.5× speedup?

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

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

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

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

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

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

      \[\leadsto x \cdot e^{\color{blue}{\mathsf{fma}\left(y, \log z - t, -1 \cdot \left(a \cdot b\right) + -1 \cdot \left(a \cdot z\right)\right)}} \]
    4. --lowering--.f64N/A

      \[\leadsto x \cdot e^{\mathsf{fma}\left(y, \color{blue}{\log z - t}, -1 \cdot \left(a \cdot b\right) + -1 \cdot \left(a \cdot z\right)\right)} \]
    5. log-lowering-log.f64N/A

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

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

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

      \[\leadsto x \cdot e^{\mathsf{fma}\left(y, \log z - t, \color{blue}{\left(\mathsf{neg}\left(a \cdot b\right)\right)} - a \cdot z\right)} \]
    9. distribute-rgt-neg-inN/A

      \[\leadsto x \cdot e^{\mathsf{fma}\left(y, \log z - t, \color{blue}{a \cdot \left(\mathsf{neg}\left(b\right)\right)} - a \cdot z\right)} \]
    10. distribute-lft-out--N/A

      \[\leadsto x \cdot e^{\mathsf{fma}\left(y, \log z - t, \color{blue}{a \cdot \left(\left(\mathsf{neg}\left(b\right)\right) - z\right)}\right)} \]
    11. *-lowering-*.f64N/A

      \[\leadsto x \cdot e^{\mathsf{fma}\left(y, \log z - t, \color{blue}{a \cdot \left(\left(\mathsf{neg}\left(b\right)\right) - z\right)}\right)} \]
    12. --lowering--.f64N/A

      \[\leadsto x \cdot e^{\mathsf{fma}\left(y, \log z - t, a \cdot \color{blue}{\left(\left(\mathsf{neg}\left(b\right)\right) - z\right)}\right)} \]
    13. neg-sub0N/A

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

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

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

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

Alternative 2: 38.3% 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 -4 \cdot 10^{+230}:\\ \;\;\;\;y \cdot \frac{x}{y}\\ \mathbf{elif}\;t\_1 \leq -10000000:\\ \;\;\;\;0 - x \cdot \left(y \cdot t\right)\\ \mathbf{elif}\;t\_1 \leq 2:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+288}:\\ \;\;\;\;t \cdot \left(\frac{x}{t} - x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\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 -4e+230)
     (* y (/ x y))
     (if (<= t_1 -10000000.0)
       (- 0.0 (* x (* y t)))
       (if (<= t_1 2.0)
         (* x (- 1.0 (* y t)))
         (if (<= t_1 2e+288)
           (* t (- (/ x t) (* x y)))
           (* x (- 1.0 (* a b)))))))))
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 <= -4e+230) {
		tmp = y * (x / y);
	} else if (t_1 <= -10000000.0) {
		tmp = 0.0 - (x * (y * t));
	} else if (t_1 <= 2.0) {
		tmp = x * (1.0 - (y * t));
	} else if (t_1 <= 2e+288) {
		tmp = t * ((x / t) - (x * y));
	} else {
		tmp = x * (1.0 - (a * b));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
    if (t_1 <= (-4d+230)) then
        tmp = y * (x / y)
    else if (t_1 <= (-10000000.0d0)) then
        tmp = 0.0d0 - (x * (y * t))
    else if (t_1 <= 2.0d0) then
        tmp = x * (1.0d0 - (y * t))
    else if (t_1 <= 2d+288) then
        tmp = t * ((x / t) - (x * y))
    else
        tmp = x * (1.0d0 - (a * b))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
	double tmp;
	if (t_1 <= -4e+230) {
		tmp = y * (x / y);
	} else if (t_1 <= -10000000.0) {
		tmp = 0.0 - (x * (y * t));
	} else if (t_1 <= 2.0) {
		tmp = x * (1.0 - (y * t));
	} else if (t_1 <= 2e+288) {
		tmp = t * ((x / t) - (x * y));
	} else {
		tmp = x * (1.0 - (a * b));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))
	tmp = 0
	if t_1 <= -4e+230:
		tmp = y * (x / y)
	elif t_1 <= -10000000.0:
		tmp = 0.0 - (x * (y * t))
	elif t_1 <= 2.0:
		tmp = x * (1.0 - (y * t))
	elif t_1 <= 2e+288:
		tmp = t * ((x / t) - (x * y))
	else:
		tmp = x * (1.0 - (a * b))
	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 <= -4e+230)
		tmp = Float64(y * Float64(x / y));
	elseif (t_1 <= -10000000.0)
		tmp = Float64(0.0 - Float64(x * Float64(y * t)));
	elseif (t_1 <= 2.0)
		tmp = Float64(x * Float64(1.0 - Float64(y * t)));
	elseif (t_1 <= 2e+288)
		tmp = Float64(t * Float64(Float64(x / t) - Float64(x * y)));
	else
		tmp = Float64(x * Float64(1.0 - Float64(a * b)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
	tmp = 0.0;
	if (t_1 <= -4e+230)
		tmp = y * (x / y);
	elseif (t_1 <= -10000000.0)
		tmp = 0.0 - (x * (y * t));
	elseif (t_1 <= 2.0)
		tmp = x * (1.0 - (y * t));
	elseif (t_1 <= 2e+288)
		tmp = t * ((x / t) - (x * y));
	else
		tmp = x * (1.0 - (a * b));
	end
	tmp_2 = 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, -4e+230], N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -10000000.0], N[(0.0 - N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2.0], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+288], N[(t * N[(N[(x / t), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $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 -4 \cdot 10^{+230}:\\
\;\;\;\;y \cdot \frac{x}{y}\\

\mathbf{elif}\;t\_1 \leq -10000000:\\
\;\;\;\;0 - x \cdot \left(y \cdot t\right)\\

\mathbf{elif}\;t\_1 \leq 2:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+288}:\\
\;\;\;\;t \cdot \left(\frac{x}{t} - x \cdot y\right)\\

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


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

    1. Initial program 100.0%

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      3. --lowering--.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      4. *-commutativeN/A

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
      5. *-lowering-*.f6455.7

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
    5. Simplified55.7%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

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

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

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

        \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} + x \]
      4. mul-1-negN/A

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} + x \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right), x\right)} \]
      6. mul-1-negN/A

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

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-1 \cdot y\right)}, x\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(-1 \cdot y\right)}, x\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      11. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 - y\right)}, x\right) \]
      12. --lowering--.f642.6

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 - y\right)}, x\right) \]
    8. Simplified2.6%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(t \cdot x\right) + \frac{x}{y}\right)} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

        \[\leadsto y \cdot \left(\color{blue}{t \cdot \left(\mathsf{neg}\left(x\right)\right)} + \frac{x}{y}\right) \]
      4. mul-1-negN/A

        \[\leadsto y \cdot \left(t \cdot \color{blue}{\left(-1 \cdot x\right)} + \frac{x}{y}\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto y \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot x, \frac{x}{y}\right)} \]
      6. mul-1-negN/A

        \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(x\right)}, \frac{x}{y}\right) \]
      7. neg-sub0N/A

        \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{0 - x}, \frac{x}{y}\right) \]
      8. --lowering--.f64N/A

        \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{0 - x}, \frac{x}{y}\right) \]
      9. /-lowering-/.f646.9

        \[\leadsto y \cdot \mathsf{fma}\left(t, 0 - x, \color{blue}{\frac{x}{y}}\right) \]
    11. Simplified6.9%

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

      \[\leadsto y \cdot \color{blue}{\frac{x}{y}} \]
    13. Step-by-step derivation
      1. /-lowering-/.f6427.4

        \[\leadsto y \cdot \color{blue}{\frac{x}{y}} \]
    14. Simplified27.4%

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

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

    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 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. neg-sub0N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      3. --lowering--.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      4. *-commutativeN/A

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
      5. *-lowering-*.f6439.2

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
    5. Simplified39.2%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

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

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

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

        \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} + x \]
      4. mul-1-negN/A

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} + x \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right), x\right)} \]
      6. mul-1-negN/A

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

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-1 \cdot y\right)}, x\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(-1 \cdot y\right)}, x\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      11. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 - y\right)}, x\right) \]
      12. --lowering--.f644.8

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

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(t \cdot x\right) + \frac{x}{y}\right)} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

        \[\leadsto y \cdot \left(\color{blue}{t \cdot \left(\mathsf{neg}\left(x\right)\right)} + \frac{x}{y}\right) \]
      4. mul-1-negN/A

        \[\leadsto y \cdot \left(t \cdot \color{blue}{\left(-1 \cdot x\right)} + \frac{x}{y}\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto y \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot x, \frac{x}{y}\right)} \]
      6. mul-1-negN/A

        \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(x\right)}, \frac{x}{y}\right) \]
      7. neg-sub0N/A

        \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{0 - x}, \frac{x}{y}\right) \]
      8. --lowering--.f64N/A

        \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{0 - x}, \frac{x}{y}\right) \]
      9. /-lowering-/.f644.7

        \[\leadsto y \cdot \mathsf{fma}\left(t, 0 - x, \color{blue}{\frac{x}{y}}\right) \]
    11. Simplified4.7%

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

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

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

        \[\leadsto \mathsf{neg}\left(\color{blue}{\left(x \cdot y\right) \cdot t}\right) \]
      3. associate-*l*N/A

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(\mathsf{neg}\left(t\right)\right)\right)} \]
      8. mul-1-negN/A

        \[\leadsto x \cdot \left(y \cdot \color{blue}{\left(-1 \cdot t\right)}\right) \]
      9. *-lowering-*.f64N/A

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

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

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

        \[\leadsto x \cdot \left(\mathsf{neg}\left(\color{blue}{t \cdot y}\right)\right) \]
      13. neg-sub0N/A

        \[\leadsto x \cdot \color{blue}{\left(0 - t \cdot y\right)} \]
      14. --lowering--.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(0 - t \cdot y\right)} \]
      15. *-lowering-*.f6420.2

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

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

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

    1. Initial program 92.7%

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      3. --lowering--.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      4. *-commutativeN/A

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
      5. *-lowering-*.f6489.5

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
    5. Simplified89.5%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

      \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
      3. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
      4. +-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
      5. accelerator-lowering-fma.f64N/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      8. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      10. neg-sub0N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
      11. --lowering--.f6482.4

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
    8. Simplified82.4%

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(t \cdot y\right)\right)}\right) \]
      2. unsub-negN/A

        \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]
      3. --lowering--.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]
      4. *-commutativeN/A

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

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

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

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

    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 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. neg-sub0N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      3. --lowering--.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      4. *-commutativeN/A

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
      5. *-lowering-*.f6441.6

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
    5. Simplified41.6%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

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

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

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

        \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} + x \]
      4. mul-1-negN/A

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} + x \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right), x\right)} \]
      6. mul-1-negN/A

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

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-1 \cdot y\right)}, x\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(-1 \cdot y\right)}, x\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      11. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 - y\right)}, x\right) \]
      12. --lowering--.f6415.7

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 - y\right)}, x\right) \]
    8. Simplified15.7%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(x \cdot y\right) + \frac{x}{t}\right)} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(x \cdot y\right) + \frac{x}{t}\right)} \]
      2. +-commutativeN/A

        \[\leadsto t \cdot \color{blue}{\left(\frac{x}{t} + -1 \cdot \left(x \cdot y\right)\right)} \]
      3. mul-1-negN/A

        \[\leadsto t \cdot \left(\frac{x}{t} + \color{blue}{\left(\mathsf{neg}\left(x \cdot y\right)\right)}\right) \]
      4. unsub-negN/A

        \[\leadsto t \cdot \color{blue}{\left(\frac{x}{t} - x \cdot y\right)} \]
      5. --lowering--.f64N/A

        \[\leadsto t \cdot \color{blue}{\left(\frac{x}{t} - x \cdot y\right)} \]
      6. /-lowering-/.f64N/A

        \[\leadsto t \cdot \left(\color{blue}{\frac{x}{t}} - x \cdot y\right) \]
      7. *-commutativeN/A

        \[\leadsto t \cdot \left(\frac{x}{t} - \color{blue}{y \cdot x}\right) \]
      8. *-lowering-*.f6423.7

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

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

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

    1. Initial program 91.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 b around inf

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

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

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

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

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

        \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(0 - a\right)}} \]
      6. --lowering--.f6473.8

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

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(a \cdot b\right)\right)}\right) \]
      2. unsub-negN/A

        \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
      3. --lowering--.f64N/A

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

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

      \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification42.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 -4 \cdot 10^{+230}:\\ \;\;\;\;y \cdot \frac{x}{y}\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -10000000:\\ \;\;\;\;0 - x \cdot \left(y \cdot t\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 2:\\ \;\;\;\;x \cdot \left(1 - y \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^{+288}:\\ \;\;\;\;t \cdot \left(\frac{x}{t} - x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 48.9% accurate, 0.5× 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 -10000000:\\ \;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 2:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+125}:\\ \;\;\;\;y \cdot \mathsf{fma}\left(t, 0 - x, \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \left(y \cdot t\right)\right)\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 -10000000.0)
     (* x (* y (* y (* t (* t 0.5)))))
     (if (<= t_1 2.0)
       (* x (- 1.0 (* y t)))
       (if (<= t_1 2e+125)
         (* y (fma t (- 0.0 x) (/ x y)))
         (* 0.5 (* t (* x (* y (* 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 <= -10000000.0) {
		tmp = x * (y * (y * (t * (t * 0.5))));
	} else if (t_1 <= 2.0) {
		tmp = x * (1.0 - (y * t));
	} else if (t_1 <= 2e+125) {
		tmp = y * fma(t, (0.0 - x), (x / y));
	} else {
		tmp = 0.5 * (t * (x * (y * (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 <= -10000000.0)
		tmp = Float64(x * Float64(y * Float64(y * Float64(t * Float64(t * 0.5)))));
	elseif (t_1 <= 2.0)
		tmp = Float64(x * Float64(1.0 - Float64(y * t)));
	elseif (t_1 <= 2e+125)
		tmp = Float64(y * fma(t, Float64(0.0 - x), Float64(x / y)));
	else
		tmp = Float64(0.5 * Float64(t * Float64(x * Float64(y * Float64(y * 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, -10000000.0], N[(x * N[(y * N[(y * N[(t * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2.0], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+125], N[(y * N[(t * N[(0.0 - x), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(t * N[(x * N[(y * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -10000000:\\
\;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\right)\right)\\

\mathbf{elif}\;t\_1 \leq 2:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\

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

\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \left(y \cdot t\right)\right)\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))) < -1e7

    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 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. neg-sub0N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      3. --lowering--.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      4. *-commutativeN/A

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
      5. *-lowering-*.f6446.8

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
    5. Simplified46.8%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

      \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
      3. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
      4. +-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
      5. accelerator-lowering-fma.f64N/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      8. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      10. neg-sub0N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
      11. --lowering--.f642.4

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
    8. Simplified2.4%

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), 0 - t\right), 1\right)} \]
    9. Taylor expanded in y around inf

      \[\leadsto x \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({t}^{2} \cdot {y}^{2}\right)\right)} \]
    10. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto x \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot \color{blue}{\left(y \cdot y\right)}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto x \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\left({t}^{2} \cdot y\right) \cdot y\right)}\right) \]
      3. associate-*l*N/A

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

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
      5. *-lowering-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
      6. associate-*r*N/A

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

        \[\leadsto x \cdot \left(y \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot {t}^{2}\right)\right)}\right) \]
      8. *-lowering-*.f64N/A

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

        \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left({t}^{2} \cdot \frac{1}{2}\right)}\right)\right) \]
      10. unpow2N/A

        \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{1}{2}\right)\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left(t \cdot \left(t \cdot \frac{1}{2}\right)\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \color{blue}{\left(\frac{1}{2} \cdot t\right)}\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left(t \cdot \left(\frac{1}{2} \cdot t\right)\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \color{blue}{\left(t \cdot \frac{1}{2}\right)}\right)\right)\right) \]
      15. *-lowering-*.f6437.0

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

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

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

    1. Initial program 92.7%

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      3. --lowering--.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      4. *-commutativeN/A

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
      5. *-lowering-*.f6489.5

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
    5. Simplified89.5%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

      \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
      3. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
      4. +-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
      5. accelerator-lowering-fma.f64N/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      8. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      10. neg-sub0N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
      11. --lowering--.f6482.4

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
    8. Simplified82.4%

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(t \cdot y\right)\right)}\right) \]
      2. unsub-negN/A

        \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]
      3. --lowering--.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]
      4. *-commutativeN/A

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

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

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

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

    1. Initial program 96.8%

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      3. --lowering--.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      4. *-commutativeN/A

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
      5. *-lowering-*.f6431.3

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
    5. Simplified31.3%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

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

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

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

        \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} + x \]
      4. mul-1-negN/A

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} + x \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right), x\right)} \]
      6. mul-1-negN/A

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

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-1 \cdot y\right)}, x\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(-1 \cdot y\right)}, x\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      11. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 - y\right)}, x\right) \]
      12. --lowering--.f646.5

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 - y\right)}, x\right) \]
    8. Simplified6.5%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(t \cdot x\right) + \frac{x}{y}\right)} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

        \[\leadsto y \cdot \left(\color{blue}{t \cdot \left(\mathsf{neg}\left(x\right)\right)} + \frac{x}{y}\right) \]
      4. mul-1-negN/A

        \[\leadsto y \cdot \left(t \cdot \color{blue}{\left(-1 \cdot x\right)} + \frac{x}{y}\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto y \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot x, \frac{x}{y}\right)} \]
      6. mul-1-negN/A

        \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(x\right)}, \frac{x}{y}\right) \]
      7. neg-sub0N/A

        \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{0 - x}, \frac{x}{y}\right) \]
      8. --lowering--.f64N/A

        \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{0 - x}, \frac{x}{y}\right) \]
      9. /-lowering-/.f6431.0

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

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

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

    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 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. neg-sub0N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      3. --lowering--.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      4. *-commutativeN/A

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
      5. *-lowering-*.f6452.7

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
    5. Simplified52.7%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

      \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
      3. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
      4. +-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
      5. accelerator-lowering-fma.f64N/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      8. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      10. neg-sub0N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
      11. --lowering--.f6459.6

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
    8. Simplified59.6%

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), 0 - t\right), 1\right)} \]
    9. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)} \]
      2. unpow2N/A

        \[\leadsto \frac{1}{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \left(x \cdot {y}^{2}\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(t \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(t \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right)\right)} \]
      5. associate-*r*N/A

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

        \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(\color{blue}{\left(x \cdot t\right)} \cdot {y}^{2}\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \frac{1}{2} \cdot \left(t \cdot \color{blue}{\left(x \cdot \left(t \cdot {y}^{2}\right)\right)}\right) \]
      8. *-lowering-*.f64N/A

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

        \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(x \cdot \color{blue}{\left({y}^{2} \cdot t\right)}\right)\right) \]
      10. unpow2N/A

        \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(x \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot t\right)\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(x \cdot \color{blue}{\left(y \cdot \left(y \cdot t\right)\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(x \cdot \left(y \cdot \color{blue}{\left(t \cdot y\right)}\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(x \cdot \color{blue}{\left(y \cdot \left(t \cdot y\right)\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(x \cdot \left(y \cdot \color{blue}{\left(y \cdot t\right)}\right)\right)\right) \]
      15. *-lowering-*.f6464.0

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

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

Alternative 4: 50.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\right)\right)\\
t_2 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_2 \leq -10000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 2:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\

\mathbf{elif}\;t\_2 \leq 10^{+141}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \left(y \cdot t\right)\right)\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))) < -1e7 or 2 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1.00000000000000002e141

    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 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. neg-sub0N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      3. --lowering--.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      4. *-commutativeN/A

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
      5. *-lowering-*.f6443.9

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
    5. Simplified43.9%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

      \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
      3. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
      4. +-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
      5. accelerator-lowering-fma.f64N/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      8. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      10. neg-sub0N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
      11. --lowering--.f648.8

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

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), 0 - t\right), 1\right)} \]
    9. Taylor expanded in y around inf

      \[\leadsto x \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({t}^{2} \cdot {y}^{2}\right)\right)} \]
    10. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto x \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot \color{blue}{\left(y \cdot y\right)}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto x \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\left({t}^{2} \cdot y\right) \cdot y\right)}\right) \]
      3. associate-*l*N/A

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

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
      5. *-lowering-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
      6. associate-*r*N/A

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

        \[\leadsto x \cdot \left(y \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot {t}^{2}\right)\right)}\right) \]
      8. *-lowering-*.f64N/A

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

        \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left({t}^{2} \cdot \frac{1}{2}\right)}\right)\right) \]
      10. unpow2N/A

        \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{1}{2}\right)\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left(t \cdot \left(t \cdot \frac{1}{2}\right)\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \color{blue}{\left(\frac{1}{2} \cdot t\right)}\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left(t \cdot \left(\frac{1}{2} \cdot t\right)\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \color{blue}{\left(t \cdot \frac{1}{2}\right)}\right)\right)\right) \]
      15. *-lowering-*.f6435.0

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

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

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

    1. Initial program 92.7%

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      3. --lowering--.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      4. *-commutativeN/A

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
      5. *-lowering-*.f6489.5

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
    5. Simplified89.5%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

      \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
      3. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
      4. +-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
      5. accelerator-lowering-fma.f64N/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      8. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      10. neg-sub0N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
      11. --lowering--.f6482.4

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
    8. Simplified82.4%

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(t \cdot y\right)\right)}\right) \]
      2. unsub-negN/A

        \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]
      3. --lowering--.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]
      4. *-commutativeN/A

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

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

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

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

    1. Initial program 94.6%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in 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. neg-sub0N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      3. --lowering--.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      4. *-commutativeN/A

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
      5. *-lowering-*.f6451.4

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
    5. Simplified51.4%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

      \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
      3. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
      4. +-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
      5. accelerator-lowering-fma.f64N/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      8. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      10. neg-sub0N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
      11. --lowering--.f6459.8

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

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), 0 - t\right), 1\right)} \]
    9. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)} \]
      2. unpow2N/A

        \[\leadsto \frac{1}{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \left(x \cdot {y}^{2}\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(t \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(t \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right)\right)} \]
      5. associate-*r*N/A

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

        \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(\color{blue}{\left(x \cdot t\right)} \cdot {y}^{2}\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \frac{1}{2} \cdot \left(t \cdot \color{blue}{\left(x \cdot \left(t \cdot {y}^{2}\right)\right)}\right) \]
      8. *-lowering-*.f64N/A

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

        \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(x \cdot \color{blue}{\left({y}^{2} \cdot t\right)}\right)\right) \]
      10. unpow2N/A

        \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(x \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot t\right)\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(x \cdot \color{blue}{\left(y \cdot \left(y \cdot t\right)\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(x \cdot \left(y \cdot \color{blue}{\left(t \cdot y\right)}\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(x \cdot \color{blue}{\left(y \cdot \left(t \cdot y\right)\right)}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(x \cdot \left(y \cdot \color{blue}{\left(y \cdot t\right)}\right)\right)\right) \]
      15. *-lowering-*.f6465.6

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

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

Alternative 5: 35.9% accurate, 0.5× 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 -4 \cdot 10^{+230}:\\ \;\;\;\;y \cdot \frac{x}{y}\\ \mathbf{elif}\;t\_1 \leq -10000000:\\ \;\;\;\;0 - x \cdot \left(y \cdot t\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+250}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\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 -4e+230)
     (* y (/ x y))
     (if (<= t_1 -10000000.0)
       (- 0.0 (* x (* y t)))
       (if (<= t_1 5e+250) (* x (- 1.0 (* y t))) (* x (- 1.0 (* a b))))))))
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 <= -4e+230) {
		tmp = y * (x / y);
	} else if (t_1 <= -10000000.0) {
		tmp = 0.0 - (x * (y * t));
	} else if (t_1 <= 5e+250) {
		tmp = x * (1.0 - (y * t));
	} else {
		tmp = x * (1.0 - (a * b));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
    if (t_1 <= (-4d+230)) then
        tmp = y * (x / y)
    else if (t_1 <= (-10000000.0d0)) then
        tmp = 0.0d0 - (x * (y * t))
    else if (t_1 <= 5d+250) then
        tmp = x * (1.0d0 - (y * t))
    else
        tmp = x * (1.0d0 - (a * b))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
	double tmp;
	if (t_1 <= -4e+230) {
		tmp = y * (x / y);
	} else if (t_1 <= -10000000.0) {
		tmp = 0.0 - (x * (y * t));
	} else if (t_1 <= 5e+250) {
		tmp = x * (1.0 - (y * t));
	} else {
		tmp = x * (1.0 - (a * b));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))
	tmp = 0
	if t_1 <= -4e+230:
		tmp = y * (x / y)
	elif t_1 <= -10000000.0:
		tmp = 0.0 - (x * (y * t))
	elif t_1 <= 5e+250:
		tmp = x * (1.0 - (y * t))
	else:
		tmp = x * (1.0 - (a * b))
	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 <= -4e+230)
		tmp = Float64(y * Float64(x / y));
	elseif (t_1 <= -10000000.0)
		tmp = Float64(0.0 - Float64(x * Float64(y * t)));
	elseif (t_1 <= 5e+250)
		tmp = Float64(x * Float64(1.0 - Float64(y * t)));
	else
		tmp = Float64(x * Float64(1.0 - Float64(a * b)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
	tmp = 0.0;
	if (t_1 <= -4e+230)
		tmp = y * (x / y);
	elseif (t_1 <= -10000000.0)
		tmp = 0.0 - (x * (y * t));
	elseif (t_1 <= 5e+250)
		tmp = x * (1.0 - (y * t));
	else
		tmp = x * (1.0 - (a * b));
	end
	tmp_2 = 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, -4e+230], N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -10000000.0], N[(0.0 - N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+250], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $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 -4 \cdot 10^{+230}:\\
\;\;\;\;y \cdot \frac{x}{y}\\

\mathbf{elif}\;t\_1 \leq -10000000:\\
\;\;\;\;0 - x \cdot \left(y \cdot t\right)\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+250}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\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))) < -4.0000000000000004e230

    1. Initial program 100.0%

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      3. --lowering--.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      4. *-commutativeN/A

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
      5. *-lowering-*.f6455.7

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
    5. Simplified55.7%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

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

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

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

        \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} + x \]
      4. mul-1-negN/A

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} + x \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right), x\right)} \]
      6. mul-1-negN/A

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

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-1 \cdot y\right)}, x\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(-1 \cdot y\right)}, x\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      11. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 - y\right)}, x\right) \]
      12. --lowering--.f642.6

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 - y\right)}, x\right) \]
    8. Simplified2.6%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(t \cdot x\right) + \frac{x}{y}\right)} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

        \[\leadsto y \cdot \left(\color{blue}{t \cdot \left(\mathsf{neg}\left(x\right)\right)} + \frac{x}{y}\right) \]
      4. mul-1-negN/A

        \[\leadsto y \cdot \left(t \cdot \color{blue}{\left(-1 \cdot x\right)} + \frac{x}{y}\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto y \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot x, \frac{x}{y}\right)} \]
      6. mul-1-negN/A

        \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(x\right)}, \frac{x}{y}\right) \]
      7. neg-sub0N/A

        \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{0 - x}, \frac{x}{y}\right) \]
      8. --lowering--.f64N/A

        \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{0 - x}, \frac{x}{y}\right) \]
      9. /-lowering-/.f646.9

        \[\leadsto y \cdot \mathsf{fma}\left(t, 0 - x, \color{blue}{\frac{x}{y}}\right) \]
    11. Simplified6.9%

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

      \[\leadsto y \cdot \color{blue}{\frac{x}{y}} \]
    13. Step-by-step derivation
      1. /-lowering-/.f6427.4

        \[\leadsto y \cdot \color{blue}{\frac{x}{y}} \]
    14. Simplified27.4%

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

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

    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 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. neg-sub0N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      3. --lowering--.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      4. *-commutativeN/A

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
      5. *-lowering-*.f6439.2

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
    5. Simplified39.2%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

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

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

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

        \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} + x \]
      4. mul-1-negN/A

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} + x \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right), x\right)} \]
      6. mul-1-negN/A

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

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-1 \cdot y\right)}, x\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(-1 \cdot y\right)}, x\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      11. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 - y\right)}, x\right) \]
      12. --lowering--.f644.8

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

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(t \cdot x\right) + \frac{x}{y}\right)} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

        \[\leadsto y \cdot \left(\color{blue}{t \cdot \left(\mathsf{neg}\left(x\right)\right)} + \frac{x}{y}\right) \]
      4. mul-1-negN/A

        \[\leadsto y \cdot \left(t \cdot \color{blue}{\left(-1 \cdot x\right)} + \frac{x}{y}\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto y \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot x, \frac{x}{y}\right)} \]
      6. mul-1-negN/A

        \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(x\right)}, \frac{x}{y}\right) \]
      7. neg-sub0N/A

        \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{0 - x}, \frac{x}{y}\right) \]
      8. --lowering--.f64N/A

        \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{0 - x}, \frac{x}{y}\right) \]
      9. /-lowering-/.f644.7

        \[\leadsto y \cdot \mathsf{fma}\left(t, 0 - x, \color{blue}{\frac{x}{y}}\right) \]
    11. Simplified4.7%

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

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

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

        \[\leadsto \mathsf{neg}\left(\color{blue}{\left(x \cdot y\right) \cdot t}\right) \]
      3. associate-*l*N/A

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(\mathsf{neg}\left(t\right)\right)\right)} \]
      8. mul-1-negN/A

        \[\leadsto x \cdot \left(y \cdot \color{blue}{\left(-1 \cdot t\right)}\right) \]
      9. *-lowering-*.f64N/A

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

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

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

        \[\leadsto x \cdot \left(\mathsf{neg}\left(\color{blue}{t \cdot y}\right)\right) \]
      13. neg-sub0N/A

        \[\leadsto x \cdot \color{blue}{\left(0 - t \cdot y\right)} \]
      14. --lowering--.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(0 - t \cdot y\right)} \]
      15. *-lowering-*.f6420.2

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

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

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

    1. Initial program 94.6%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in 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. neg-sub0N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      3. --lowering--.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      4. *-commutativeN/A

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
      5. *-lowering-*.f6464.8

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
    5. Simplified64.8%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

      \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
      3. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
      4. +-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
      5. accelerator-lowering-fma.f64N/A

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

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      8. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      10. neg-sub0N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
      11. --lowering--.f6458.9

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
    8. Simplified58.9%

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(t \cdot y\right)\right)}\right) \]
      2. unsub-negN/A

        \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]
      3. --lowering--.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]
      4. *-commutativeN/A

        \[\leadsto x \cdot \left(1 - \color{blue}{y \cdot t}\right) \]
      5. *-lowering-*.f6451.8

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

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

    if 5.0000000000000002e250 < (+.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 b around inf

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(a \cdot b\right)\right)}\right) \]
      2. unsub-negN/A

        \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
      3. --lowering--.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
      4. *-lowering-*.f6445.6

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

      \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification40.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 -4 \cdot 10^{+230}:\\ \;\;\;\;y \cdot \frac{x}{y}\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -10000000:\\ \;\;\;\;0 - x \cdot \left(y \cdot t\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 5 \cdot 10^{+250}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 33.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 0 - x \cdot \left(y \cdot t\right)\\ t_2 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\ \mathbf{if}\;t\_2 \leq -10000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+32}:\\ \;\;\;\;x\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+250}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;0 - x \cdot \left(a \cdot b\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- 0.0 (* x (* y t))))
        (t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
   (if (<= t_2 -10000000.0)
     t_1
     (if (<= t_2 2e+32) x (if (<= t_2 5e+250) t_1 (- 0.0 (* x (* a b))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = 0.0 - (x * (y * t));
	double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
	double tmp;
	if (t_2 <= -10000000.0) {
		tmp = t_1;
	} else if (t_2 <= 2e+32) {
		tmp = x;
	} else if (t_2 <= 5e+250) {
		tmp = t_1;
	} else {
		tmp = 0.0 - (x * (a * b));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = 0.0d0 - (x * (y * t))
    t_2 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
    if (t_2 <= (-10000000.0d0)) then
        tmp = t_1
    else if (t_2 <= 2d+32) then
        tmp = x
    else if (t_2 <= 5d+250) then
        tmp = t_1
    else
        tmp = 0.0d0 - (x * (a * b))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = 0.0 - (x * (y * t));
	double t_2 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
	double tmp;
	if (t_2 <= -10000000.0) {
		tmp = t_1;
	} else if (t_2 <= 2e+32) {
		tmp = x;
	} else if (t_2 <= 5e+250) {
		tmp = t_1;
	} else {
		tmp = 0.0 - (x * (a * b));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = 0.0 - (x * (y * t))
	t_2 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))
	tmp = 0
	if t_2 <= -10000000.0:
		tmp = t_1
	elif t_2 <= 2e+32:
		tmp = x
	elif t_2 <= 5e+250:
		tmp = t_1
	else:
		tmp = 0.0 - (x * (a * b))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(0.0 - Float64(x * Float64(y * t)))
	t_2 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))
	tmp = 0.0
	if (t_2 <= -10000000.0)
		tmp = t_1;
	elseif (t_2 <= 2e+32)
		tmp = x;
	elseif (t_2 <= 5e+250)
		tmp = t_1;
	else
		tmp = Float64(0.0 - Float64(x * Float64(a * b)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = 0.0 - (x * (y * t));
	t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
	tmp = 0.0;
	if (t_2 <= -10000000.0)
		tmp = t_1;
	elseif (t_2 <= 2e+32)
		tmp = x;
	elseif (t_2 <= 5e+250)
		tmp = t_1;
	else
		tmp = 0.0 - (x * (a * b));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(0.0 - N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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$2, -10000000.0], t$95$1, If[LessEqual[t$95$2, 2e+32], x, If[LessEqual[t$95$2, 5e+250], t$95$1, N[(0.0 - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := 0 - x \cdot \left(y \cdot t\right)\\
t_2 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_2 \leq -10000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+32}:\\
\;\;\;\;x\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+250}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;0 - x \cdot \left(a \cdot b\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))) < -1e7 or 2.00000000000000011e32 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5.0000000000000002e250

    1. Initial program 96.6%

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

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      3. --lowering--.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
      4. *-commutativeN/A

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
      5. *-lowering-*.f6445.3

        \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
    5. Simplified45.3%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

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

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

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

        \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} + x \]
      4. mul-1-negN/A

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} + x \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right), x\right)} \]
      6. mul-1-negN/A

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

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-1 \cdot y\right)}, x\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(-1 \cdot y\right)}, x\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      11. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 - y\right)}, x\right) \]
      12. --lowering--.f648.3

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 - y\right)}, x\right) \]
    8. Simplified8.3%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(t \cdot x\right) + \frac{x}{y}\right)} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

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

        \[\leadsto y \cdot \left(\color{blue}{t \cdot \left(\mathsf{neg}\left(x\right)\right)} + \frac{x}{y}\right) \]
      4. mul-1-negN/A

        \[\leadsto y \cdot \left(t \cdot \color{blue}{\left(-1 \cdot x\right)} + \frac{x}{y}\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto y \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot x, \frac{x}{y}\right)} \]
      6. mul-1-negN/A

        \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(x\right)}, \frac{x}{y}\right) \]
      7. neg-sub0N/A

        \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{0 - x}, \frac{x}{y}\right) \]
      8. --lowering--.f64N/A

        \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{0 - x}, \frac{x}{y}\right) \]
      9. /-lowering-/.f6414.1

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

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

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

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

        \[\leadsto \mathsf{neg}\left(\color{blue}{\left(x \cdot y\right) \cdot t}\right) \]
      3. associate-*l*N/A

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(\mathsf{neg}\left(t\right)\right)\right)} \]
      8. mul-1-negN/A

        \[\leadsto x \cdot \left(y \cdot \color{blue}{\left(-1 \cdot t\right)}\right) \]
      9. *-lowering-*.f64N/A

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

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

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

        \[\leadsto x \cdot \left(\mathsf{neg}\left(\color{blue}{t \cdot y}\right)\right) \]
      13. neg-sub0N/A

        \[\leadsto x \cdot \color{blue}{\left(0 - t \cdot y\right)} \]
      14. --lowering--.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(0 - t \cdot y\right)} \]
      15. *-lowering-*.f6418.2

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x} \]
    7. Step-by-step derivation
      1. Simplified79.5%

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

      if 5.0000000000000002e250 < (+.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 b around inf

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

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

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

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

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

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

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

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

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

          \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(a \cdot b\right)\right)}\right) \]
        2. unsub-negN/A

          \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
        3. --lowering--.f64N/A

          \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
        4. *-lowering-*.f6445.6

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

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

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

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

          \[\leadsto x \cdot \color{blue}{\left(0 - a \cdot b\right)} \]
        3. --lowering--.f64N/A

          \[\leadsto x \cdot \color{blue}{\left(0 - a \cdot b\right)} \]
        4. *-lowering-*.f6445.1

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

        \[\leadsto x \cdot \color{blue}{\left(0 - a \cdot b\right)} \]
    8. Recombined 3 regimes into one program.
    9. 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 -10000000:\\ \;\;\;\;0 - x \cdot \left(y \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^{+32}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 5 \cdot 10^{+250}:\\ \;\;\;\;0 - x \cdot \left(y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;0 - x \cdot \left(a \cdot b\right)\\ \end{array} \]
    10. Add Preprocessing

    Alternative 7: 35.0% accurate, 0.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(0 - x \cdot a\right)\\ t_2 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\ \mathbf{if}\;t\_2 \leq -500000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+14}:\\ \;\;\;\;x\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+190}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;0 - x \cdot \left(a \cdot b\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (* b (- 0.0 (* x a))))
            (t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
       (if (<= t_2 -500000000.0)
         t_1
         (if (<= t_2 5e+14) x (if (<= t_2 5e+190) t_1 (- 0.0 (* x (* a b))))))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = b * (0.0 - (x * a));
    	double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
    	double tmp;
    	if (t_2 <= -500000000.0) {
    		tmp = t_1;
    	} else if (t_2 <= 5e+14) {
    		tmp = x;
    	} else if (t_2 <= 5e+190) {
    		tmp = t_1;
    	} else {
    		tmp = 0.0 - (x * (a * b));
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a, b)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8) :: t_1
        real(8) :: t_2
        real(8) :: tmp
        t_1 = b * (0.0d0 - (x * a))
        t_2 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
        if (t_2 <= (-500000000.0d0)) then
            tmp = t_1
        else if (t_2 <= 5d+14) then
            tmp = x
        else if (t_2 <= 5d+190) then
            tmp = t_1
        else
            tmp = 0.0d0 - (x * (a * b))
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = b * (0.0 - (x * a));
    	double t_2 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
    	double tmp;
    	if (t_2 <= -500000000.0) {
    		tmp = t_1;
    	} else if (t_2 <= 5e+14) {
    		tmp = x;
    	} else if (t_2 <= 5e+190) {
    		tmp = t_1;
    	} else {
    		tmp = 0.0 - (x * (a * b));
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	t_1 = b * (0.0 - (x * a))
    	t_2 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))
    	tmp = 0
    	if t_2 <= -500000000.0:
    		tmp = t_1
    	elif t_2 <= 5e+14:
    		tmp = x
    	elif t_2 <= 5e+190:
    		tmp = t_1
    	else:
    		tmp = 0.0 - (x * (a * b))
    	return tmp
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(b * Float64(0.0 - Float64(x * a)))
    	t_2 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))
    	tmp = 0.0
    	if (t_2 <= -500000000.0)
    		tmp = t_1;
    	elseif (t_2 <= 5e+14)
    		tmp = x;
    	elseif (t_2 <= 5e+190)
    		tmp = t_1;
    	else
    		tmp = Float64(0.0 - Float64(x * Float64(a * b)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	t_1 = b * (0.0 - (x * a));
    	t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
    	tmp = 0.0;
    	if (t_2 <= -500000000.0)
    		tmp = t_1;
    	elseif (t_2 <= 5e+14)
    		tmp = x;
    	elseif (t_2 <= 5e+190)
    		tmp = t_1;
    	else
    		tmp = 0.0 - (x * (a * b));
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(0.0 - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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$2, -500000000.0], t$95$1, If[LessEqual[t$95$2, 5e+14], x, If[LessEqual[t$95$2, 5e+190], t$95$1, N[(0.0 - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := b \cdot \left(0 - x \cdot a\right)\\
    t_2 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
    \mathbf{if}\;t\_2 \leq -500000000:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+14}:\\
    \;\;\;\;x\\
    
    \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+190}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{else}:\\
    \;\;\;\;0 - x \cdot \left(a \cdot b\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))) < -5e8 or 5e14 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5.00000000000000036e190

      1. Initial program 97.0%

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

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

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

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

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

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

          \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(0 - a\right)}} \]
        6. --lowering--.f6447.5

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

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

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

          \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(a \cdot b\right)\right)}\right) \]
        2. unsub-negN/A

          \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
        3. --lowering--.f64N/A

          \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
        4. *-lowering-*.f644.5

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

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

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

          \[\leadsto -1 \cdot \left(a \cdot \color{blue}{\left(x \cdot b\right)}\right) \]
        2. associate-*r*N/A

          \[\leadsto -1 \cdot \color{blue}{\left(\left(a \cdot x\right) \cdot b\right)} \]
        3. associate-*l*N/A

          \[\leadsto \color{blue}{\left(-1 \cdot \left(a \cdot x\right)\right) \cdot b} \]
        4. *-commutativeN/A

          \[\leadsto \color{blue}{b \cdot \left(-1 \cdot \left(a \cdot x\right)\right)} \]
        5. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{b \cdot \left(-1 \cdot \left(a \cdot x\right)\right)} \]
        6. mul-1-negN/A

          \[\leadsto b \cdot \color{blue}{\left(\mathsf{neg}\left(a \cdot x\right)\right)} \]
        7. neg-sub0N/A

          \[\leadsto b \cdot \color{blue}{\left(0 - a \cdot x\right)} \]
        8. --lowering--.f64N/A

          \[\leadsto b \cdot \color{blue}{\left(0 - a \cdot x\right)} \]
        9. *-lowering-*.f6417.9

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

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

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

      1. Initial program 93.3%

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

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

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

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

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

          \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(0 - a\right)}} \]
        6. --lowering--.f6486.7

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

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

        \[\leadsto \color{blue}{x} \]
      7. Step-by-step derivation
        1. Simplified82.0%

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

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

        1. Initial program 94.0%

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

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

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

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

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

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

            \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(0 - a\right)}} \]
          6. --lowering--.f6460.3

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

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

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

            \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(a \cdot b\right)\right)}\right) \]
          2. unsub-negN/A

            \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
          3. --lowering--.f64N/A

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

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

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

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

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

            \[\leadsto x \cdot \color{blue}{\left(0 - a \cdot b\right)} \]
          3. --lowering--.f64N/A

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

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

          \[\leadsto x \cdot \color{blue}{\left(0 - a \cdot b\right)} \]
      8. Recombined 3 regimes into one program.
      9. Final simplification37.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 -500000000:\\ \;\;\;\;b \cdot \left(0 - x \cdot a\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 5 \cdot 10^{+14}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 5 \cdot 10^{+190}:\\ \;\;\;\;b \cdot \left(0 - x \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;0 - x \cdot \left(a \cdot b\right)\\ \end{array} \]
      10. Add Preprocessing

      Alternative 8: 51.6% 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 -10000000:\\ \;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+118}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \left(a \cdot \mathsf{fma}\left(a, b \cdot -0.16666666666666666, 0.5\right)\right), 0 - a\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(t \cdot \mathsf{fma}\left(y, 0 - \frac{x}{t}, x \cdot \left(0.5 \cdot \left(y \cdot y\right)\right)\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 -10000000.0)
           (* x (* y (* y (* t (* t 0.5)))))
           (if (<= t_1 4e+118)
             (*
              x
              (fma
               b
               (fma b (* a (* a (fma a (* b -0.16666666666666666) 0.5))) (- 0.0 a))
               1.0))
             (* t (* t (fma y (- 0.0 (/ x t)) (* x (* 0.5 (* y y))))))))))
      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 <= -10000000.0) {
      		tmp = x * (y * (y * (t * (t * 0.5))));
      	} else if (t_1 <= 4e+118) {
      		tmp = x * fma(b, fma(b, (a * (a * fma(a, (b * -0.16666666666666666), 0.5))), (0.0 - a)), 1.0);
      	} else {
      		tmp = t * (t * fma(y, (0.0 - (x / t)), (x * (0.5 * (y * y)))));
      	}
      	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 <= -10000000.0)
      		tmp = Float64(x * Float64(y * Float64(y * Float64(t * Float64(t * 0.5)))));
      	elseif (t_1 <= 4e+118)
      		tmp = Float64(x * fma(b, fma(b, Float64(a * Float64(a * fma(a, Float64(b * -0.16666666666666666), 0.5))), Float64(0.0 - a)), 1.0));
      	else
      		tmp = Float64(t * Float64(t * fma(y, Float64(0.0 - Float64(x / t)), Float64(x * Float64(0.5 * Float64(y * y))))));
      	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, -10000000.0], N[(x * N[(y * N[(y * N[(t * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+118], N[(x * N[(b * N[(b * N[(a * N[(a * N[(a * N[(b * -0.16666666666666666), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0 - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(t * N[(y * N[(0.0 - N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(x * N[(0.5 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -10000000:\\
      \;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\right)\right)\\
      
      \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+118}:\\
      \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \left(a \cdot \mathsf{fma}\left(a, b \cdot -0.16666666666666666, 0.5\right)\right), 0 - a\right), 1\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t \cdot \left(t \cdot \mathsf{fma}\left(y, 0 - \frac{x}{t}, x \cdot \left(0.5 \cdot \left(y \cdot y\right)\right)\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))) < -1e7

        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 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. neg-sub0N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          3. --lowering--.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          4. *-commutativeN/A

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
          5. *-lowering-*.f6446.8

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
        5. Simplified46.8%

          \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
        6. Taylor expanded in y around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
          3. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
          4. +-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
          5. accelerator-lowering-fma.f64N/A

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

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          8. unpow2N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          10. neg-sub0N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
          11. --lowering--.f642.4

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
        8. Simplified2.4%

          \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), 0 - t\right), 1\right)} \]
        9. Taylor expanded in y around inf

          \[\leadsto x \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({t}^{2} \cdot {y}^{2}\right)\right)} \]
        10. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto x \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot \color{blue}{\left(y \cdot y\right)}\right)\right) \]
          2. associate-*r*N/A

            \[\leadsto x \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\left({t}^{2} \cdot y\right) \cdot y\right)}\right) \]
          3. associate-*l*N/A

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

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
          5. *-lowering-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
          6. associate-*r*N/A

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

            \[\leadsto x \cdot \left(y \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot {t}^{2}\right)\right)}\right) \]
          8. *-lowering-*.f64N/A

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

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left({t}^{2} \cdot \frac{1}{2}\right)}\right)\right) \]
          10. unpow2N/A

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{1}{2}\right)\right)\right) \]
          11. associate-*l*N/A

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left(t \cdot \left(t \cdot \frac{1}{2}\right)\right)}\right)\right) \]
          12. *-commutativeN/A

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \color{blue}{\left(\frac{1}{2} \cdot t\right)}\right)\right)\right) \]
          13. *-lowering-*.f64N/A

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left(t \cdot \left(\frac{1}{2} \cdot t\right)\right)}\right)\right) \]
          14. *-commutativeN/A

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \color{blue}{\left(t \cdot \frac{1}{2}\right)}\right)\right)\right) \]
          15. *-lowering-*.f6437.0

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

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

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

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

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

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

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

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

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

            \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(0 - a\right)}} \]
          6. --lowering--.f6475.5

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

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

          \[\leadsto x \cdot \color{blue}{\left(1 + b \cdot \left(-1 \cdot a + b \cdot \left(\frac{-1}{6} \cdot \left({a}^{3} \cdot b\right) + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(-1 \cdot a + b \cdot \left(\frac{-1}{6} \cdot \left({a}^{3} \cdot b\right) + \frac{1}{2} \cdot {a}^{2}\right)\right) + 1\right)} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(b, -1 \cdot a + b \cdot \left(\frac{-1}{6} \cdot \left({a}^{3} \cdot b\right) + \frac{1}{2} \cdot {a}^{2}\right), 1\right)} \]
        8. Simplified68.5%

          \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(0.5, a \cdot a, -0.16666666666666666 \cdot \left(b \cdot \left(a \cdot \left(a \cdot a\right)\right)\right)\right), 0 - a\right), 1\right)} \]
        9. Taylor expanded in a around 0

          \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \color{blue}{{a}^{2} \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot \left(a \cdot b\right)\right)}, 0 - a\right), 1\right) \]
        10. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \color{blue}{\left(a \cdot a\right)} \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot \left(a \cdot b\right)\right), 0 - a\right), 1\right) \]
          2. associate-*l*N/A

            \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \color{blue}{a \cdot \left(a \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot \left(a \cdot b\right)\right)\right)}, 0 - a\right), 1\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \color{blue}{a \cdot \left(a \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot \left(a \cdot b\right)\right)\right)}, 0 - a\right), 1\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \color{blue}{\left(a \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot \left(a \cdot b\right)\right)\right)}, 0 - a\right), 1\right) \]
          5. +-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \left(a \cdot \color{blue}{\left(\frac{-1}{6} \cdot \left(a \cdot b\right) + \frac{1}{2}\right)}\right), 0 - a\right), 1\right) \]
          6. *-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \left(a \cdot \left(\color{blue}{\left(a \cdot b\right) \cdot \frac{-1}{6}} + \frac{1}{2}\right)\right), 0 - a\right), 1\right) \]
          7. associate-*l*N/A

            \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \left(a \cdot \left(\color{blue}{a \cdot \left(b \cdot \frac{-1}{6}\right)} + \frac{1}{2}\right)\right), 0 - a\right), 1\right) \]
          8. *-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \left(a \cdot \left(a \cdot \color{blue}{\left(\frac{-1}{6} \cdot b\right)} + \frac{1}{2}\right)\right), 0 - a\right), 1\right) \]
          9. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \left(a \cdot \color{blue}{\mathsf{fma}\left(a, \frac{-1}{6} \cdot b, \frac{1}{2}\right)}\right), 0 - a\right), 1\right) \]
          10. *-lowering-*.f6473.2

            \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \left(a \cdot \mathsf{fma}\left(a, \color{blue}{-0.16666666666666666 \cdot b}, 0.5\right)\right), 0 - a\right), 1\right) \]
        11. Simplified73.2%

          \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \color{blue}{a \cdot \left(a \cdot \mathsf{fma}\left(a, -0.16666666666666666 \cdot b, 0.5\right)\right)}, 0 - a\right), 1\right) \]

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

        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. neg-sub0N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          3. --lowering--.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          4. *-commutativeN/A

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
          5. *-lowering-*.f6452.6

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
        5. Simplified52.6%

          \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
        6. Taylor expanded in y around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
          3. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
          4. +-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
          5. accelerator-lowering-fma.f64N/A

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

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          8. unpow2N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          10. neg-sub0N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
          11. --lowering--.f6459.4

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
        8. Simplified59.4%

          \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), 0 - t\right), 1\right)} \]
        9. Taylor expanded in t around inf

          \[\leadsto \color{blue}{{t}^{2} \cdot \left(-1 \cdot \frac{x \cdot y}{t} + \frac{1}{2} \cdot \left(x \cdot {y}^{2}\right)\right)} \]
        10. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto \color{blue}{\left(t \cdot t\right)} \cdot \left(-1 \cdot \frac{x \cdot y}{t} + \frac{1}{2} \cdot \left(x \cdot {y}^{2}\right)\right) \]
          2. associate-*l*N/A

            \[\leadsto \color{blue}{t \cdot \left(t \cdot \left(-1 \cdot \frac{x \cdot y}{t} + \frac{1}{2} \cdot \left(x \cdot {y}^{2}\right)\right)\right)} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{t \cdot \left(t \cdot \left(-1 \cdot \frac{x \cdot y}{t} + \frac{1}{2} \cdot \left(x \cdot {y}^{2}\right)\right)\right)} \]
          4. *-lowering-*.f64N/A

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

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

            \[\leadsto t \cdot \left(t \cdot \left(\left(\mathsf{neg}\left(\frac{\color{blue}{y \cdot x}}{t}\right)\right) + \frac{1}{2} \cdot \left(x \cdot {y}^{2}\right)\right)\right) \]
          7. associate-/l*N/A

            \[\leadsto t \cdot \left(t \cdot \left(\left(\mathsf{neg}\left(\color{blue}{y \cdot \frac{x}{t}}\right)\right) + \frac{1}{2} \cdot \left(x \cdot {y}^{2}\right)\right)\right) \]
          8. distribute-rgt-neg-inN/A

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

            \[\leadsto t \cdot \left(t \cdot \left(y \cdot \color{blue}{\left(-1 \cdot \frac{x}{t}\right)} + \frac{1}{2} \cdot \left(x \cdot {y}^{2}\right)\right)\right) \]
          10. accelerator-lowering-fma.f64N/A

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

            \[\leadsto t \cdot \left(t \cdot \mathsf{fma}\left(y, \color{blue}{\mathsf{neg}\left(\frac{x}{t}\right)}, \frac{1}{2} \cdot \left(x \cdot {y}^{2}\right)\right)\right) \]
          12. neg-sub0N/A

            \[\leadsto t \cdot \left(t \cdot \mathsf{fma}\left(y, \color{blue}{0 - \frac{x}{t}}, \frac{1}{2} \cdot \left(x \cdot {y}^{2}\right)\right)\right) \]
          13. --lowering--.f64N/A

            \[\leadsto t \cdot \left(t \cdot \mathsf{fma}\left(y, \color{blue}{0 - \frac{x}{t}}, \frac{1}{2} \cdot \left(x \cdot {y}^{2}\right)\right)\right) \]
          14. /-lowering-/.f64N/A

            \[\leadsto t \cdot \left(t \cdot \mathsf{fma}\left(y, 0 - \color{blue}{\frac{x}{t}}, \frac{1}{2} \cdot \left(x \cdot {y}^{2}\right)\right)\right) \]
          15. *-commutativeN/A

            \[\leadsto t \cdot \left(t \cdot \mathsf{fma}\left(y, 0 - \frac{x}{t}, \color{blue}{\left(x \cdot {y}^{2}\right) \cdot \frac{1}{2}}\right)\right) \]
          16. associate-*l*N/A

            \[\leadsto t \cdot \left(t \cdot \mathsf{fma}\left(y, 0 - \frac{x}{t}, \color{blue}{x \cdot \left({y}^{2} \cdot \frac{1}{2}\right)}\right)\right) \]
          17. *-commutativeN/A

            \[\leadsto t \cdot \left(t \cdot \mathsf{fma}\left(y, 0 - \frac{x}{t}, x \cdot \color{blue}{\left(\frac{1}{2} \cdot {y}^{2}\right)}\right)\right) \]
          18. *-lowering-*.f64N/A

            \[\leadsto t \cdot \left(t \cdot \mathsf{fma}\left(y, 0 - \frac{x}{t}, \color{blue}{x \cdot \left(\frac{1}{2} \cdot {y}^{2}\right)}\right)\right) \]
          19. *-lowering-*.f64N/A

            \[\leadsto t \cdot \left(t \cdot \mathsf{fma}\left(y, 0 - \frac{x}{t}, x \cdot \color{blue}{\left(\frac{1}{2} \cdot {y}^{2}\right)}\right)\right) \]
          20. unpow2N/A

            \[\leadsto t \cdot \left(t \cdot \mathsf{fma}\left(y, 0 - \frac{x}{t}, x \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(y \cdot y\right)}\right)\right)\right) \]
          21. *-lowering-*.f6468.6

            \[\leadsto t \cdot \left(t \cdot \mathsf{fma}\left(y, 0 - \frac{x}{t}, x \cdot \left(0.5 \cdot \color{blue}{\left(y \cdot y\right)}\right)\right)\right) \]
        11. Simplified68.6%

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

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

      Alternative 9: 52.5% 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 -10000000:\\ \;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+118}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \left(a \cdot \mathsf{fma}\left(a, b \cdot -0.16666666666666666, 0.5\right)\right), 0 - a\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(t, t \cdot \left(0.5 \cdot \left(y \cdot y\right)\right) - y, 1\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 -10000000.0)
           (* x (* y (* y (* t (* t 0.5)))))
           (if (<= t_1 4e+118)
             (*
              x
              (fma
               b
               (fma b (* a (* a (fma a (* b -0.16666666666666666) 0.5))) (- 0.0 a))
               1.0))
             (* x (fma t (- (* t (* 0.5 (* y y))) y) 1.0))))))
      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 <= -10000000.0) {
      		tmp = x * (y * (y * (t * (t * 0.5))));
      	} else if (t_1 <= 4e+118) {
      		tmp = x * fma(b, fma(b, (a * (a * fma(a, (b * -0.16666666666666666), 0.5))), (0.0 - a)), 1.0);
      	} else {
      		tmp = x * fma(t, ((t * (0.5 * (y * y))) - y), 1.0);
      	}
      	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 <= -10000000.0)
      		tmp = Float64(x * Float64(y * Float64(y * Float64(t * Float64(t * 0.5)))));
      	elseif (t_1 <= 4e+118)
      		tmp = Float64(x * fma(b, fma(b, Float64(a * Float64(a * fma(a, Float64(b * -0.16666666666666666), 0.5))), Float64(0.0 - a)), 1.0));
      	else
      		tmp = Float64(x * fma(t, Float64(Float64(t * Float64(0.5 * Float64(y * y))) - y), 1.0));
      	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, -10000000.0], N[(x * N[(y * N[(y * N[(t * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+118], N[(x * N[(b * N[(b * N[(a * N[(a * N[(a * N[(b * -0.16666666666666666), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0 - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(t * N[(N[(t * N[(0.5 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] + 1.0), $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 -10000000:\\
      \;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\right)\right)\\
      
      \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+118}:\\
      \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \left(a \cdot \mathsf{fma}\left(a, b \cdot -0.16666666666666666, 0.5\right)\right), 0 - a\right), 1\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;x \cdot \mathsf{fma}\left(t, t \cdot \left(0.5 \cdot \left(y \cdot y\right)\right) - y, 1\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))) < -1e7

        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 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. neg-sub0N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          3. --lowering--.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          4. *-commutativeN/A

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
          5. *-lowering-*.f6446.8

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
        5. Simplified46.8%

          \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
        6. Taylor expanded in y around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
          3. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
          4. +-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
          5. accelerator-lowering-fma.f64N/A

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

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          8. unpow2N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          10. neg-sub0N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
          11. --lowering--.f642.4

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
        8. Simplified2.4%

          \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), 0 - t\right), 1\right)} \]
        9. Taylor expanded in y around inf

          \[\leadsto x \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({t}^{2} \cdot {y}^{2}\right)\right)} \]
        10. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto x \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot \color{blue}{\left(y \cdot y\right)}\right)\right) \]
          2. associate-*r*N/A

            \[\leadsto x \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\left({t}^{2} \cdot y\right) \cdot y\right)}\right) \]
          3. associate-*l*N/A

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

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
          5. *-lowering-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
          6. associate-*r*N/A

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

            \[\leadsto x \cdot \left(y \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot {t}^{2}\right)\right)}\right) \]
          8. *-lowering-*.f64N/A

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

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left({t}^{2} \cdot \frac{1}{2}\right)}\right)\right) \]
          10. unpow2N/A

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{1}{2}\right)\right)\right) \]
          11. associate-*l*N/A

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left(t \cdot \left(t \cdot \frac{1}{2}\right)\right)}\right)\right) \]
          12. *-commutativeN/A

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \color{blue}{\left(\frac{1}{2} \cdot t\right)}\right)\right)\right) \]
          13. *-lowering-*.f64N/A

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left(t \cdot \left(\frac{1}{2} \cdot t\right)\right)}\right)\right) \]
          14. *-commutativeN/A

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \color{blue}{\left(t \cdot \frac{1}{2}\right)}\right)\right)\right) \]
          15. *-lowering-*.f6437.0

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

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

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

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

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

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

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

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

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

            \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(0 - a\right)}} \]
          6. --lowering--.f6475.5

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

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

          \[\leadsto x \cdot \color{blue}{\left(1 + b \cdot \left(-1 \cdot a + b \cdot \left(\frac{-1}{6} \cdot \left({a}^{3} \cdot b\right) + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(-1 \cdot a + b \cdot \left(\frac{-1}{6} \cdot \left({a}^{3} \cdot b\right) + \frac{1}{2} \cdot {a}^{2}\right)\right) + 1\right)} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(b, -1 \cdot a + b \cdot \left(\frac{-1}{6} \cdot \left({a}^{3} \cdot b\right) + \frac{1}{2} \cdot {a}^{2}\right), 1\right)} \]
        8. Simplified68.5%

          \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(0.5, a \cdot a, -0.16666666666666666 \cdot \left(b \cdot \left(a \cdot \left(a \cdot a\right)\right)\right)\right), 0 - a\right), 1\right)} \]
        9. Taylor expanded in a around 0

          \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \color{blue}{{a}^{2} \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot \left(a \cdot b\right)\right)}, 0 - a\right), 1\right) \]
        10. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \color{blue}{\left(a \cdot a\right)} \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot \left(a \cdot b\right)\right), 0 - a\right), 1\right) \]
          2. associate-*l*N/A

            \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \color{blue}{a \cdot \left(a \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot \left(a \cdot b\right)\right)\right)}, 0 - a\right), 1\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \color{blue}{a \cdot \left(a \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot \left(a \cdot b\right)\right)\right)}, 0 - a\right), 1\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \color{blue}{\left(a \cdot \left(\frac{1}{2} + \frac{-1}{6} \cdot \left(a \cdot b\right)\right)\right)}, 0 - a\right), 1\right) \]
          5. +-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \left(a \cdot \color{blue}{\left(\frac{-1}{6} \cdot \left(a \cdot b\right) + \frac{1}{2}\right)}\right), 0 - a\right), 1\right) \]
          6. *-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \left(a \cdot \left(\color{blue}{\left(a \cdot b\right) \cdot \frac{-1}{6}} + \frac{1}{2}\right)\right), 0 - a\right), 1\right) \]
          7. associate-*l*N/A

            \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \left(a \cdot \left(\color{blue}{a \cdot \left(b \cdot \frac{-1}{6}\right)} + \frac{1}{2}\right)\right), 0 - a\right), 1\right) \]
          8. *-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \left(a \cdot \left(a \cdot \color{blue}{\left(\frac{-1}{6} \cdot b\right)} + \frac{1}{2}\right)\right), 0 - a\right), 1\right) \]
          9. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \left(a \cdot \color{blue}{\mathsf{fma}\left(a, \frac{-1}{6} \cdot b, \frac{1}{2}\right)}\right), 0 - a\right), 1\right) \]
          10. *-lowering-*.f6473.2

            \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \left(a \cdot \mathsf{fma}\left(a, \color{blue}{-0.16666666666666666 \cdot b}, 0.5\right)\right), 0 - a\right), 1\right) \]
        11. Simplified73.2%

          \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \color{blue}{a \cdot \left(a \cdot \mathsf{fma}\left(a, -0.16666666666666666 \cdot b, 0.5\right)\right)}, 0 - a\right), 1\right) \]

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

        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. neg-sub0N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          3. --lowering--.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          4. *-commutativeN/A

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
          5. *-lowering-*.f6452.6

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
        5. Simplified52.6%

          \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
        6. Taylor expanded in y around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
          3. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
          4. +-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
          5. accelerator-lowering-fma.f64N/A

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

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          8. unpow2N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          10. neg-sub0N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
          11. --lowering--.f6459.4

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
        8. Simplified59.4%

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

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

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

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

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

            \[\leadsto x \cdot \left(1 + \left(\color{blue}{-1 \cdot \left(t \cdot y\right)} + \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) \cdot y\right)\right) \]
          5. associate-+r+N/A

            \[\leadsto x \cdot \color{blue}{\left(\left(1 + -1 \cdot \left(t \cdot y\right)\right) + \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) \cdot y\right)} \]
          6. associate-*l*N/A

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

            \[\leadsto x \cdot \left(\left(1 + -1 \cdot \left(t \cdot y\right)\right) + \frac{1}{2} \cdot \color{blue}{\left({t}^{2} \cdot \left(y \cdot y\right)\right)}\right) \]
          8. unpow2N/A

            \[\leadsto x \cdot \left(\left(1 + -1 \cdot \left(t \cdot y\right)\right) + \frac{1}{2} \cdot \left({t}^{2} \cdot \color{blue}{{y}^{2}}\right)\right) \]
          9. *-commutativeN/A

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

            \[\leadsto x \cdot \left(\left(1 + -1 \cdot \left(t \cdot y\right)\right) + \color{blue}{\left(\frac{1}{2} \cdot {y}^{2}\right) \cdot {t}^{2}}\right) \]
          11. unpow2N/A

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

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

            \[\leadsto x \cdot \left(\left(1 + -1 \cdot \left(t \cdot y\right)\right) + \color{blue}{\left(\frac{1}{2} \cdot \left({y}^{2} \cdot t\right)\right)} \cdot t\right) \]
          14. *-commutativeN/A

            \[\leadsto x \cdot \left(\left(1 + -1 \cdot \left(t \cdot y\right)\right) + \left(\frac{1}{2} \cdot \color{blue}{\left(t \cdot {y}^{2}\right)}\right) \cdot t\right) \]
          15. *-commutativeN/A

            \[\leadsto x \cdot \left(\left(1 + -1 \cdot \left(t \cdot y\right)\right) + \color{blue}{t \cdot \left(\frac{1}{2} \cdot \left(t \cdot {y}^{2}\right)\right)}\right) \]
        11. Simplified67.9%

          \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, t \cdot \left(0.5 \cdot \left(y \cdot y\right)\right) - y, 1\right)} \]
      3. Recombined 3 regimes into one program.
      4. Final simplification58.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 -10000000:\\ \;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\right)\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 4 \cdot 10^{+118}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, a \cdot \left(a \cdot \mathsf{fma}\left(a, b \cdot -0.16666666666666666, 0.5\right)\right), 0 - a\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(t, t \cdot \left(0.5 \cdot \left(y \cdot y\right)\right) - y, 1\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 10: 52.5% 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 -10000000:\\ \;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+118}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, a \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(a, b \cdot -0.16666666666666666, 0.5\right), -1\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(t, t \cdot \left(0.5 \cdot \left(y \cdot y\right)\right) - y, 1\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 -10000000.0)
           (* x (* y (* y (* t (* t 0.5)))))
           (if (<= t_1 4e+118)
             (*
              x
              (fma
               b
               (* a (fma a (* b (fma a (* b -0.16666666666666666) 0.5)) -1.0))
               1.0))
             (* x (fma t (- (* t (* 0.5 (* y y))) y) 1.0))))))
      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 <= -10000000.0) {
      		tmp = x * (y * (y * (t * (t * 0.5))));
      	} else if (t_1 <= 4e+118) {
      		tmp = x * fma(b, (a * fma(a, (b * fma(a, (b * -0.16666666666666666), 0.5)), -1.0)), 1.0);
      	} else {
      		tmp = x * fma(t, ((t * (0.5 * (y * y))) - y), 1.0);
      	}
      	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 <= -10000000.0)
      		tmp = Float64(x * Float64(y * Float64(y * Float64(t * Float64(t * 0.5)))));
      	elseif (t_1 <= 4e+118)
      		tmp = Float64(x * fma(b, Float64(a * fma(a, Float64(b * fma(a, Float64(b * -0.16666666666666666), 0.5)), -1.0)), 1.0));
      	else
      		tmp = Float64(x * fma(t, Float64(Float64(t * Float64(0.5 * Float64(y * y))) - y), 1.0));
      	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, -10000000.0], N[(x * N[(y * N[(y * N[(t * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+118], N[(x * N[(b * N[(a * N[(a * N[(b * N[(a * N[(b * -0.16666666666666666), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(t * N[(N[(t * N[(0.5 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] + 1.0), $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 -10000000:\\
      \;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\right)\right)\\
      
      \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+118}:\\
      \;\;\;\;x \cdot \mathsf{fma}\left(b, a \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(a, b \cdot -0.16666666666666666, 0.5\right), -1\right), 1\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;x \cdot \mathsf{fma}\left(t, t \cdot \left(0.5 \cdot \left(y \cdot y\right)\right) - y, 1\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))) < -1e7

        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 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. neg-sub0N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          3. --lowering--.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          4. *-commutativeN/A

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
          5. *-lowering-*.f6446.8

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
        5. Simplified46.8%

          \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
        6. Taylor expanded in y around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
          3. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
          4. +-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
          5. accelerator-lowering-fma.f64N/A

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

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          8. unpow2N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          10. neg-sub0N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
          11. --lowering--.f642.4

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
        8. Simplified2.4%

          \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), 0 - t\right), 1\right)} \]
        9. Taylor expanded in y around inf

          \[\leadsto x \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({t}^{2} \cdot {y}^{2}\right)\right)} \]
        10. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto x \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot \color{blue}{\left(y \cdot y\right)}\right)\right) \]
          2. associate-*r*N/A

            \[\leadsto x \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\left({t}^{2} \cdot y\right) \cdot y\right)}\right) \]
          3. associate-*l*N/A

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

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
          5. *-lowering-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
          6. associate-*r*N/A

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

            \[\leadsto x \cdot \left(y \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot {t}^{2}\right)\right)}\right) \]
          8. *-lowering-*.f64N/A

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

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left({t}^{2} \cdot \frac{1}{2}\right)}\right)\right) \]
          10. unpow2N/A

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{1}{2}\right)\right)\right) \]
          11. associate-*l*N/A

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left(t \cdot \left(t \cdot \frac{1}{2}\right)\right)}\right)\right) \]
          12. *-commutativeN/A

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \color{blue}{\left(\frac{1}{2} \cdot t\right)}\right)\right)\right) \]
          13. *-lowering-*.f64N/A

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left(t \cdot \left(\frac{1}{2} \cdot t\right)\right)}\right)\right) \]
          14. *-commutativeN/A

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \color{blue}{\left(t \cdot \frac{1}{2}\right)}\right)\right)\right) \]
          15. *-lowering-*.f6437.0

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

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

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

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

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

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

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

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

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

            \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(0 - a\right)}} \]
          6. --lowering--.f6475.5

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

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

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

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

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

          \[\leadsto x \cdot \color{blue}{\left(1 + b \cdot \left(-1 \cdot a + b \cdot \left(\frac{-1}{6} \cdot \left({a}^{3} \cdot b\right) + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
        9. Simplified69.9%

          \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(b, a \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(a, b \cdot -0.16666666666666666, 0.5\right), -1\right), 1\right)} \]

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

        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. neg-sub0N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          3. --lowering--.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          4. *-commutativeN/A

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
          5. *-lowering-*.f6452.6

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
        5. Simplified52.6%

          \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
        6. Taylor expanded in y around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
          3. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
          4. +-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
          5. accelerator-lowering-fma.f64N/A

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

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          8. unpow2N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          10. neg-sub0N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
          11. --lowering--.f6459.4

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
        8. Simplified59.4%

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

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

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

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

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

            \[\leadsto x \cdot \left(1 + \left(\color{blue}{-1 \cdot \left(t \cdot y\right)} + \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) \cdot y\right)\right) \]
          5. associate-+r+N/A

            \[\leadsto x \cdot \color{blue}{\left(\left(1 + -1 \cdot \left(t \cdot y\right)\right) + \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) \cdot y\right)} \]
          6. associate-*l*N/A

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

            \[\leadsto x \cdot \left(\left(1 + -1 \cdot \left(t \cdot y\right)\right) + \frac{1}{2} \cdot \color{blue}{\left({t}^{2} \cdot \left(y \cdot y\right)\right)}\right) \]
          8. unpow2N/A

            \[\leadsto x \cdot \left(\left(1 + -1 \cdot \left(t \cdot y\right)\right) + \frac{1}{2} \cdot \left({t}^{2} \cdot \color{blue}{{y}^{2}}\right)\right) \]
          9. *-commutativeN/A

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

            \[\leadsto x \cdot \left(\left(1 + -1 \cdot \left(t \cdot y\right)\right) + \color{blue}{\left(\frac{1}{2} \cdot {y}^{2}\right) \cdot {t}^{2}}\right) \]
          11. unpow2N/A

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

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

            \[\leadsto x \cdot \left(\left(1 + -1 \cdot \left(t \cdot y\right)\right) + \color{blue}{\left(\frac{1}{2} \cdot \left({y}^{2} \cdot t\right)\right)} \cdot t\right) \]
          14. *-commutativeN/A

            \[\leadsto x \cdot \left(\left(1 + -1 \cdot \left(t \cdot y\right)\right) + \left(\frac{1}{2} \cdot \color{blue}{\left(t \cdot {y}^{2}\right)}\right) \cdot t\right) \]
          15. *-commutativeN/A

            \[\leadsto x \cdot \left(\left(1 + -1 \cdot \left(t \cdot y\right)\right) + \color{blue}{t \cdot \left(\frac{1}{2} \cdot \left(t \cdot {y}^{2}\right)\right)}\right) \]
        11. Simplified67.9%

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

      Alternative 11: 51.5% 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 -10000000:\\ \;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+125}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(a, 0.5 \cdot \left(a \cdot \left(b \cdot b\right)\right) - b, 1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(t, t \cdot \left(0.5 \cdot \left(y \cdot y\right)\right) - y, 1\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 -10000000.0)
           (* x (* y (* y (* t (* t 0.5)))))
           (if (<= t_1 2e+125)
             (* x (fma a (- (* 0.5 (* a (* b b))) b) 1.0))
             (* x (fma t (- (* t (* 0.5 (* y y))) y) 1.0))))))
      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 <= -10000000.0) {
      		tmp = x * (y * (y * (t * (t * 0.5))));
      	} else if (t_1 <= 2e+125) {
      		tmp = x * fma(a, ((0.5 * (a * (b * b))) - b), 1.0);
      	} else {
      		tmp = x * fma(t, ((t * (0.5 * (y * y))) - y), 1.0);
      	}
      	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 <= -10000000.0)
      		tmp = Float64(x * Float64(y * Float64(y * Float64(t * Float64(t * 0.5)))));
      	elseif (t_1 <= 2e+125)
      		tmp = Float64(x * fma(a, Float64(Float64(0.5 * Float64(a * Float64(b * b))) - b), 1.0));
      	else
      		tmp = Float64(x * fma(t, Float64(Float64(t * Float64(0.5 * Float64(y * y))) - y), 1.0));
      	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, -10000000.0], N[(x * N[(y * N[(y * N[(t * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+125], N[(x * N[(a * N[(N[(0.5 * N[(a * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(t * N[(N[(t * N[(0.5 * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] + 1.0), $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 -10000000:\\
      \;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\right)\right)\\
      
      \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+125}:\\
      \;\;\;\;x \cdot \mathsf{fma}\left(a, 0.5 \cdot \left(a \cdot \left(b \cdot b\right)\right) - b, 1\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;x \cdot \mathsf{fma}\left(t, t \cdot \left(0.5 \cdot \left(y \cdot y\right)\right) - y, 1\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))) < -1e7

        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 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. neg-sub0N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          3. --lowering--.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          4. *-commutativeN/A

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
          5. *-lowering-*.f6446.8

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
        5. Simplified46.8%

          \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
        6. Taylor expanded in y around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
          3. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
          4. +-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
          5. accelerator-lowering-fma.f64N/A

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

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          8. unpow2N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          10. neg-sub0N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
          11. --lowering--.f642.4

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
        8. Simplified2.4%

          \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), 0 - t\right), 1\right)} \]
        9. Taylor expanded in y around inf

          \[\leadsto x \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({t}^{2} \cdot {y}^{2}\right)\right)} \]
        10. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto x \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot \color{blue}{\left(y \cdot y\right)}\right)\right) \]
          2. associate-*r*N/A

            \[\leadsto x \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\left({t}^{2} \cdot y\right) \cdot y\right)}\right) \]
          3. associate-*l*N/A

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

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
          5. *-lowering-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
          6. associate-*r*N/A

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

            \[\leadsto x \cdot \left(y \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot {t}^{2}\right)\right)}\right) \]
          8. *-lowering-*.f64N/A

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

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left({t}^{2} \cdot \frac{1}{2}\right)}\right)\right) \]
          10. unpow2N/A

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{1}{2}\right)\right)\right) \]
          11. associate-*l*N/A

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left(t \cdot \left(t \cdot \frac{1}{2}\right)\right)}\right)\right) \]
          12. *-commutativeN/A

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \color{blue}{\left(\frac{1}{2} \cdot t\right)}\right)\right)\right) \]
          13. *-lowering-*.f64N/A

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left(t \cdot \left(\frac{1}{2} \cdot t\right)\right)}\right)\right) \]
          14. *-commutativeN/A

            \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \color{blue}{\left(t \cdot \frac{1}{2}\right)}\right)\right)\right) \]
          15. *-lowering-*.f6437.0

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

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

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

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

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

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

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

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

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

            \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(0 - a\right)}} \]
          6. --lowering--.f6474.9

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

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

          \[\leadsto x \cdot \color{blue}{\left(1 + b \cdot \left(-1 \cdot a + b \cdot \left(\frac{-1}{6} \cdot \left({a}^{3} \cdot b\right) + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(-1 \cdot a + b \cdot \left(\frac{-1}{6} \cdot \left({a}^{3} \cdot b\right) + \frac{1}{2} \cdot {a}^{2}\right)\right) + 1\right)} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(b, -1 \cdot a + b \cdot \left(\frac{-1}{6} \cdot \left({a}^{3} \cdot b\right) + \frac{1}{2} \cdot {a}^{2}\right), 1\right)} \]
        8. Simplified68.1%

          \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(0.5, a \cdot a, -0.16666666666666666 \cdot \left(b \cdot \left(a \cdot \left(a \cdot a\right)\right)\right)\right), 0 - a\right), 1\right)} \]
        9. Taylor expanded in b around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)} \]
        10. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right) + 1\right)} \]
          2. distribute-rgt-inN/A

            \[\leadsto x \cdot \left(\color{blue}{\left(\left(-1 \cdot a\right) \cdot b + \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right) \cdot b\right)} + 1\right) \]
          3. associate-+l+N/A

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

            \[\leadsto x \cdot \left(\left(-1 \cdot a\right) \cdot b + \left(\color{blue}{\left(\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot b\right)} \cdot b + 1\right)\right) \]
          5. associate-*l*N/A

            \[\leadsto x \cdot \left(\left(-1 \cdot a\right) \cdot b + \left(\color{blue}{\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot \left(b \cdot b\right)} + 1\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto x \cdot \left(\left(-1 \cdot a\right) \cdot b + \left(\color{blue}{\left({a}^{2} \cdot \frac{1}{2}\right)} \cdot \left(b \cdot b\right) + 1\right)\right) \]
          7. unpow2N/A

            \[\leadsto x \cdot \left(\left(-1 \cdot a\right) \cdot b + \left(\left(\color{blue}{\left(a \cdot a\right)} \cdot \frac{1}{2}\right) \cdot \left(b \cdot b\right) + 1\right)\right) \]
          8. associate-*l*N/A

            \[\leadsto x \cdot \left(\left(-1 \cdot a\right) \cdot b + \left(\color{blue}{\left(a \cdot \left(a \cdot \frac{1}{2}\right)\right)} \cdot \left(b \cdot b\right) + 1\right)\right) \]
          9. *-commutativeN/A

            \[\leadsto x \cdot \left(\left(-1 \cdot a\right) \cdot b + \left(\left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a\right)}\right) \cdot \left(b \cdot b\right) + 1\right)\right) \]
          10. unpow2N/A

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

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

            \[\leadsto x \cdot \left(\left(-1 \cdot a\right) \cdot b + \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right)\right)} + 1\right)\right) \]
          13. associate-+l+N/A

            \[\leadsto x \cdot \color{blue}{\left(\left(\left(-1 \cdot a\right) \cdot b + a \cdot \left(\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right)\right)\right) + 1\right)} \]
          14. *-commutativeN/A

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

            \[\leadsto x \cdot \left(\left(\color{blue}{a \cdot \left(-1 \cdot b\right)} + a \cdot \left(\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right)\right)\right) + 1\right) \]
          16. distribute-lft-inN/A

            \[\leadsto x \cdot \left(\color{blue}{a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right)\right)} + 1\right) \]
        11. Simplified67.3%

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

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

        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 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. neg-sub0N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          3. --lowering--.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          4. *-commutativeN/A

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
          5. *-lowering-*.f6452.7

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
        5. Simplified52.7%

          \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
        6. Taylor expanded in y around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
          3. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
          4. +-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
          5. accelerator-lowering-fma.f64N/A

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

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          8. unpow2N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          10. neg-sub0N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
          11. --lowering--.f6459.6

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
        8. Simplified59.6%

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

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

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

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

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

            \[\leadsto x \cdot \left(1 + \left(\color{blue}{-1 \cdot \left(t \cdot y\right)} + \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) \cdot y\right)\right) \]
          5. associate-+r+N/A

            \[\leadsto x \cdot \color{blue}{\left(\left(1 + -1 \cdot \left(t \cdot y\right)\right) + \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) \cdot y\right)} \]
          6. associate-*l*N/A

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

            \[\leadsto x \cdot \left(\left(1 + -1 \cdot \left(t \cdot y\right)\right) + \frac{1}{2} \cdot \color{blue}{\left({t}^{2} \cdot \left(y \cdot y\right)\right)}\right) \]
          8. unpow2N/A

            \[\leadsto x \cdot \left(\left(1 + -1 \cdot \left(t \cdot y\right)\right) + \frac{1}{2} \cdot \left({t}^{2} \cdot \color{blue}{{y}^{2}}\right)\right) \]
          9. *-commutativeN/A

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

            \[\leadsto x \cdot \left(\left(1 + -1 \cdot \left(t \cdot y\right)\right) + \color{blue}{\left(\frac{1}{2} \cdot {y}^{2}\right) \cdot {t}^{2}}\right) \]
          11. unpow2N/A

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

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

            \[\leadsto x \cdot \left(\left(1 + -1 \cdot \left(t \cdot y\right)\right) + \color{blue}{\left(\frac{1}{2} \cdot \left({y}^{2} \cdot t\right)\right)} \cdot t\right) \]
          14. *-commutativeN/A

            \[\leadsto x \cdot \left(\left(1 + -1 \cdot \left(t \cdot y\right)\right) + \left(\frac{1}{2} \cdot \color{blue}{\left(t \cdot {y}^{2}\right)}\right) \cdot t\right) \]
          15. *-commutativeN/A

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

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

      Alternative 12: 45.4% accurate, 0.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := 0.5 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \left(y \cdot t\right)\right)\right)\right)\\ t_2 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\ \mathbf{if}\;t\_2 \leq -10000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+19}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* 0.5 (* t (* x (* y (* y t))))))
              (t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
         (if (<= t_2 -10000000.0)
           t_1
           (if (<= t_2 5e+19) (* x (- 1.0 (* y t))) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = 0.5 * (t * (x * (y * (y * t))));
      	double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
      	double tmp;
      	if (t_2 <= -10000000.0) {
      		tmp = t_1;
      	} else if (t_2 <= 5e+19) {
      		tmp = x * (1.0 - (y * t));
      	} 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) :: t_2
          real(8) :: tmp
          t_1 = 0.5d0 * (t * (x * (y * (y * t))))
          t_2 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
          if (t_2 <= (-10000000.0d0)) then
              tmp = t_1
          else if (t_2 <= 5d+19) then
              tmp = x * (1.0d0 - (y * t))
          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 = 0.5 * (t * (x * (y * (y * t))));
      	double t_2 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
      	double tmp;
      	if (t_2 <= -10000000.0) {
      		tmp = t_1;
      	} else if (t_2 <= 5e+19) {
      		tmp = x * (1.0 - (y * t));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = 0.5 * (t * (x * (y * (y * t))))
      	t_2 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))
      	tmp = 0
      	if t_2 <= -10000000.0:
      		tmp = t_1
      	elif t_2 <= 5e+19:
      		tmp = x * (1.0 - (y * t))
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(0.5 * Float64(t * Float64(x * Float64(y * Float64(y * t)))))
      	t_2 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))
      	tmp = 0.0
      	if (t_2 <= -10000000.0)
      		tmp = t_1;
      	elseif (t_2 <= 5e+19)
      		tmp = Float64(x * Float64(1.0 - Float64(y * t)));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = 0.5 * (t * (x * (y * (y * t))));
      	t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
      	tmp = 0.0;
      	if (t_2 <= -10000000.0)
      		tmp = t_1;
      	elseif (t_2 <= 5e+19)
      		tmp = x * (1.0 - (y * t));
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(0.5 * N[(t * N[(x * N[(y * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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$2, -10000000.0], t$95$1, If[LessEqual[t$95$2, 5e+19], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := 0.5 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \left(y \cdot t\right)\right)\right)\right)\\
      t_2 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
      \mathbf{if}\;t\_2 \leq -10000000:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+19}:\\
      \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \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))) < -1e7 or 5e19 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

        1. Initial program 96.0%

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

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

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

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          3. --lowering--.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          4. *-commutativeN/A

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
          5. *-lowering-*.f6447.2

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
        5. Simplified47.2%

          \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
        6. Taylor expanded in y around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
          3. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
          4. +-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
          5. accelerator-lowering-fma.f64N/A

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

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          8. unpow2N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          10. neg-sub0N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
          11. --lowering--.f6427.1

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

          \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), 0 - t\right), 1\right)} \]
        9. Taylor expanded in y around inf

          \[\leadsto \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)} \]
        10. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)} \]
          2. unpow2N/A

            \[\leadsto \frac{1}{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \left(x \cdot {y}^{2}\right)\right) \]
          3. associate-*l*N/A

            \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(t \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right)\right)} \]
          4. *-lowering-*.f64N/A

            \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(t \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right)\right)} \]
          5. associate-*r*N/A

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

            \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(\color{blue}{\left(x \cdot t\right)} \cdot {y}^{2}\right)\right) \]
          7. associate-*l*N/A

            \[\leadsto \frac{1}{2} \cdot \left(t \cdot \color{blue}{\left(x \cdot \left(t \cdot {y}^{2}\right)\right)}\right) \]
          8. *-lowering-*.f64N/A

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

            \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(x \cdot \color{blue}{\left({y}^{2} \cdot t\right)}\right)\right) \]
          10. unpow2N/A

            \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(x \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot t\right)\right)\right) \]
          11. associate-*l*N/A

            \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(x \cdot \color{blue}{\left(y \cdot \left(y \cdot t\right)\right)}\right)\right) \]
          12. *-commutativeN/A

            \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(x \cdot \left(y \cdot \color{blue}{\left(t \cdot y\right)}\right)\right)\right) \]
          13. *-lowering-*.f64N/A

            \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(x \cdot \color{blue}{\left(y \cdot \left(t \cdot y\right)\right)}\right)\right) \]
          14. *-commutativeN/A

            \[\leadsto \frac{1}{2} \cdot \left(t \cdot \left(x \cdot \left(y \cdot \color{blue}{\left(y \cdot t\right)}\right)\right)\right) \]
          15. *-lowering-*.f6440.0

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

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

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

        1. Initial program 93.3%

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

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          3. --lowering--.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          4. *-commutativeN/A

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
          5. *-lowering-*.f6483.8

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
        5. Simplified83.8%

          \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
        6. Taylor expanded in y around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
          3. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
          4. +-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
          5. accelerator-lowering-fma.f64N/A

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

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          8. unpow2N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          10. neg-sub0N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
          11. --lowering--.f6479.0

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

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

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

            \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(t \cdot y\right)\right)}\right) \]
          2. unsub-negN/A

            \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]
          3. --lowering--.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]
          4. *-commutativeN/A

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

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

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

      Alternative 13: 33.9% 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 -10000000:\\ \;\;\;\;0 - x \cdot \left(y \cdot t\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+250}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\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 -10000000.0)
           (- 0.0 (* x (* y t)))
           (if (<= t_1 5e+250) (* x (- 1.0 (* y t))) (* x (- 1.0 (* a b)))))))
      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 <= -10000000.0) {
      		tmp = 0.0 - (x * (y * t));
      	} else if (t_1 <= 5e+250) {
      		tmp = x * (1.0 - (y * t));
      	} else {
      		tmp = x * (1.0 - (a * b));
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t, a, b)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: tmp
          t_1 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
          if (t_1 <= (-10000000.0d0)) then
              tmp = 0.0d0 - (x * (y * t))
          else if (t_1 <= 5d+250) then
              tmp = x * (1.0d0 - (y * t))
          else
              tmp = x * (1.0d0 - (a * b))
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
      	double tmp;
      	if (t_1 <= -10000000.0) {
      		tmp = 0.0 - (x * (y * t));
      	} else if (t_1 <= 5e+250) {
      		tmp = x * (1.0 - (y * t));
      	} else {
      		tmp = x * (1.0 - (a * b));
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))
      	tmp = 0
      	if t_1 <= -10000000.0:
      		tmp = 0.0 - (x * (y * t))
      	elif t_1 <= 5e+250:
      		tmp = x * (1.0 - (y * t))
      	else:
      		tmp = x * (1.0 - (a * b))
      	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 <= -10000000.0)
      		tmp = Float64(0.0 - Float64(x * Float64(y * t)));
      	elseif (t_1 <= 5e+250)
      		tmp = Float64(x * Float64(1.0 - Float64(y * t)));
      	else
      		tmp = Float64(x * Float64(1.0 - Float64(a * b)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
      	tmp = 0.0;
      	if (t_1 <= -10000000.0)
      		tmp = 0.0 - (x * (y * t));
      	elseif (t_1 <= 5e+250)
      		tmp = x * (1.0 - (y * t));
      	else
      		tmp = x * (1.0 - (a * b));
      	end
      	tmp_2 = 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, -10000000.0], N[(0.0 - N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+250], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $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 -10000000:\\
      \;\;\;\;0 - x \cdot \left(y \cdot t\right)\\
      
      \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+250}:\\
      \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;x \cdot \left(1 - a \cdot b\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))) < -1e7

        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 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. neg-sub0N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          3. --lowering--.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          4. *-commutativeN/A

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
          5. *-lowering-*.f6446.8

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
        5. Simplified46.8%

          \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
        6. Taylor expanded in y around 0

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

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

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

            \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} + x \]
          4. mul-1-negN/A

            \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} + x \]
          5. accelerator-lowering-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right), x\right)} \]
          6. mul-1-negN/A

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

            \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
          8. mul-1-negN/A

            \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-1 \cdot y\right)}, x\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(-1 \cdot y\right)}, x\right) \]
          10. mul-1-negN/A

            \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
          11. neg-sub0N/A

            \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 - y\right)}, x\right) \]
          12. --lowering--.f643.7

            \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 - y\right)}, x\right) \]
        8. Simplified3.7%

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

          \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(t \cdot x\right) + \frac{x}{y}\right)} \]
        10. Step-by-step derivation
          1. *-lowering-*.f64N/A

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

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

            \[\leadsto y \cdot \left(\color{blue}{t \cdot \left(\mathsf{neg}\left(x\right)\right)} + \frac{x}{y}\right) \]
          4. mul-1-negN/A

            \[\leadsto y \cdot \left(t \cdot \color{blue}{\left(-1 \cdot x\right)} + \frac{x}{y}\right) \]
          5. accelerator-lowering-fma.f64N/A

            \[\leadsto y \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot x, \frac{x}{y}\right)} \]
          6. mul-1-negN/A

            \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(x\right)}, \frac{x}{y}\right) \]
          7. neg-sub0N/A

            \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{0 - x}, \frac{x}{y}\right) \]
          8. --lowering--.f64N/A

            \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{0 - x}, \frac{x}{y}\right) \]
          9. /-lowering-/.f645.7

            \[\leadsto y \cdot \mathsf{fma}\left(t, 0 - x, \color{blue}{\frac{x}{y}}\right) \]
        11. Simplified5.7%

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

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

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

            \[\leadsto \mathsf{neg}\left(\color{blue}{\left(x \cdot y\right) \cdot t}\right) \]
          3. associate-*l*N/A

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

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

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

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

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(\mathsf{neg}\left(t\right)\right)\right)} \]
          8. mul-1-negN/A

            \[\leadsto x \cdot \left(y \cdot \color{blue}{\left(-1 \cdot t\right)}\right) \]
          9. *-lowering-*.f64N/A

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

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

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

            \[\leadsto x \cdot \left(\mathsf{neg}\left(\color{blue}{t \cdot y}\right)\right) \]
          13. neg-sub0N/A

            \[\leadsto x \cdot \color{blue}{\left(0 - t \cdot y\right)} \]
          14. --lowering--.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(0 - t \cdot y\right)} \]
          15. *-lowering-*.f6418.1

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

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

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

        1. Initial program 94.6%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in 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. neg-sub0N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          3. --lowering--.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
          4. *-commutativeN/A

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
          5. *-lowering-*.f6464.8

            \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
        5. Simplified64.8%

          \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
        6. Taylor expanded in y around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
          3. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
          4. +-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
          5. accelerator-lowering-fma.f64N/A

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

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          8. unpow2N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          10. neg-sub0N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
          11. --lowering--.f6458.9

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
        8. Simplified58.9%

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

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

            \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(t \cdot y\right)\right)}\right) \]
          2. unsub-negN/A

            \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]
          3. --lowering--.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]
          4. *-commutativeN/A

            \[\leadsto x \cdot \left(1 - \color{blue}{y \cdot t}\right) \]
          5. *-lowering-*.f6451.8

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

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

        if 5.0000000000000002e250 < (+.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 b around inf

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

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

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

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

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

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

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

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

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

            \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(a \cdot b\right)\right)}\right) \]
          2. unsub-negN/A

            \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
          3. --lowering--.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
          4. *-lowering-*.f6445.6

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

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

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

      Alternative 14: 33.4% accurate, 0.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(0 - x \cdot a\right)\\ t_2 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\ \mathbf{if}\;t\_2 \leq -500000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+14}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* b (- 0.0 (* x a))))
              (t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
         (if (<= t_2 -500000000.0) t_1 (if (<= t_2 5e+14) x t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = b * (0.0 - (x * a));
      	double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
      	double tmp;
      	if (t_2 <= -500000000.0) {
      		tmp = t_1;
      	} else if (t_2 <= 5e+14) {
      		tmp = x;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t, a, b)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: t_2
          real(8) :: tmp
          t_1 = b * (0.0d0 - (x * a))
          t_2 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
          if (t_2 <= (-500000000.0d0)) then
              tmp = t_1
          else if (t_2 <= 5d+14) then
              tmp = x
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = b * (0.0 - (x * a));
      	double t_2 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
      	double tmp;
      	if (t_2 <= -500000000.0) {
      		tmp = t_1;
      	} else if (t_2 <= 5e+14) {
      		tmp = x;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = b * (0.0 - (x * a))
      	t_2 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))
      	tmp = 0
      	if t_2 <= -500000000.0:
      		tmp = t_1
      	elif t_2 <= 5e+14:
      		tmp = x
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(b * Float64(0.0 - Float64(x * a)))
      	t_2 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))
      	tmp = 0.0
      	if (t_2 <= -500000000.0)
      		tmp = t_1;
      	elseif (t_2 <= 5e+14)
      		tmp = x;
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = b * (0.0 - (x * a));
      	t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
      	tmp = 0.0;
      	if (t_2 <= -500000000.0)
      		tmp = t_1;
      	elseif (t_2 <= 5e+14)
      		tmp = x;
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(0.0 - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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$2, -500000000.0], t$95$1, If[LessEqual[t$95$2, 5e+14], x, t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := b \cdot \left(0 - x \cdot a\right)\\
      t_2 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
      \mathbf{if}\;t\_2 \leq -500000000:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+14}:\\
      \;\;\;\;x\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \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))) < -5e8 or 5e14 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

        1. Initial program 96.0%

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

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

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

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

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

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

            \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(0 - a\right)}} \]
          6. --lowering--.f6451.8

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

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

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

            \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(a \cdot b\right)\right)}\right) \]
          2. unsub-negN/A

            \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
          3. --lowering--.f64N/A

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

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

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

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

            \[\leadsto -1 \cdot \left(a \cdot \color{blue}{\left(x \cdot b\right)}\right) \]
          2. associate-*r*N/A

            \[\leadsto -1 \cdot \color{blue}{\left(\left(a \cdot x\right) \cdot b\right)} \]
          3. associate-*l*N/A

            \[\leadsto \color{blue}{\left(-1 \cdot \left(a \cdot x\right)\right) \cdot b} \]
          4. *-commutativeN/A

            \[\leadsto \color{blue}{b \cdot \left(-1 \cdot \left(a \cdot x\right)\right)} \]
          5. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{b \cdot \left(-1 \cdot \left(a \cdot x\right)\right)} \]
          6. mul-1-negN/A

            \[\leadsto b \cdot \color{blue}{\left(\mathsf{neg}\left(a \cdot x\right)\right)} \]
          7. neg-sub0N/A

            \[\leadsto b \cdot \color{blue}{\left(0 - a \cdot x\right)} \]
          8. --lowering--.f64N/A

            \[\leadsto b \cdot \color{blue}{\left(0 - a \cdot x\right)} \]
          9. *-lowering-*.f6420.9

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

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

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

        1. Initial program 93.3%

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

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

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

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

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

            \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(0 - a\right)}} \]
          6. --lowering--.f6486.7

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

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

          \[\leadsto \color{blue}{x} \]
        7. Step-by-step derivation
          1. Simplified82.0%

            \[\leadsto \color{blue}{x} \]
        8. Recombined 2 regimes into one program.
        9. Final simplification35.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 -500000000:\\ \;\;\;\;b \cdot \left(0 - x \cdot a\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 5 \cdot 10^{+14}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(0 - x \cdot a\right)\\ \end{array} \]
        10. Add Preprocessing

        Alternative 15: 49.9% accurate, 1.3× 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 -10000000:\\ \;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(a, 0.5 \cdot \left(a \cdot \left(b \cdot b\right)\right) - b, 1\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))) -10000000.0)
           (* x (* y (* y (* t (* t 0.5)))))
           (* x (fma a (- (* 0.5 (* a (* b b))) b) 1.0))))
        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))) <= -10000000.0) {
        		tmp = x * (y * (y * (t * (t * 0.5))));
        	} else {
        		tmp = x * fma(a, ((0.5 * (a * (b * b))) - b), 1.0);
        	}
        	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))) <= -10000000.0)
        		tmp = Float64(x * Float64(y * Float64(y * Float64(t * Float64(t * 0.5)))));
        	else
        		tmp = Float64(x * fma(a, Float64(Float64(0.5 * Float64(a * Float64(b * b))) - b), 1.0));
        	end
        	return 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], -10000000.0], N[(x * N[(y * N[(y * N[(t * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(a * N[(N[(0.5 * N[(a * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision] + 1.0), $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 -10000000:\\
        \;\;\;\;x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;x \cdot \mathsf{fma}\left(a, 0.5 \cdot \left(a \cdot \left(b \cdot b\right)\right) - b, 1\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -1e7

          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 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. neg-sub0N/A

              \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
            3. --lowering--.f64N/A

              \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
            4. *-commutativeN/A

              \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
            5. *-lowering-*.f6446.8

              \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
          5. Simplified46.8%

            \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
          6. Taylor expanded in y around 0

            \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
            2. accelerator-lowering-fma.f64N/A

              \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
            3. mul-1-negN/A

              \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
            4. +-commutativeN/A

              \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
            5. accelerator-lowering-fma.f64N/A

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

              \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
            8. unpow2N/A

              \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
            10. neg-sub0N/A

              \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
            11. --lowering--.f642.4

              \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), \color{blue}{0 - t}\right), 1\right) \]
          8. Simplified2.4%

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), 0 - t\right), 1\right)} \]
          9. Taylor expanded in y around inf

            \[\leadsto x \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({t}^{2} \cdot {y}^{2}\right)\right)} \]
          10. Step-by-step derivation
            1. unpow2N/A

              \[\leadsto x \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot \color{blue}{\left(y \cdot y\right)}\right)\right) \]
            2. associate-*r*N/A

              \[\leadsto x \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\left({t}^{2} \cdot y\right) \cdot y\right)}\right) \]
            3. associate-*l*N/A

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

              \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
            5. *-lowering-*.f64N/A

              \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
            6. associate-*r*N/A

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

              \[\leadsto x \cdot \left(y \cdot \color{blue}{\left(y \cdot \left(\frac{1}{2} \cdot {t}^{2}\right)\right)}\right) \]
            8. *-lowering-*.f64N/A

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

              \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left({t}^{2} \cdot \frac{1}{2}\right)}\right)\right) \]
            10. unpow2N/A

              \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot \frac{1}{2}\right)\right)\right) \]
            11. associate-*l*N/A

              \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left(t \cdot \left(t \cdot \frac{1}{2}\right)\right)}\right)\right) \]
            12. *-commutativeN/A

              \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \color{blue}{\left(\frac{1}{2} \cdot t\right)}\right)\right)\right) \]
            13. *-lowering-*.f64N/A

              \[\leadsto x \cdot \left(y \cdot \left(y \cdot \color{blue}{\left(t \cdot \left(\frac{1}{2} \cdot t\right)\right)}\right)\right) \]
            14. *-commutativeN/A

              \[\leadsto x \cdot \left(y \cdot \left(y \cdot \left(t \cdot \color{blue}{\left(t \cdot \frac{1}{2}\right)}\right)\right)\right) \]
            15. *-lowering-*.f6437.0

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

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

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

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

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

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

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

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

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

              \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(0 - a\right)}} \]
            6. --lowering--.f6465.7

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

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

            \[\leadsto x \cdot \color{blue}{\left(1 + b \cdot \left(-1 \cdot a + b \cdot \left(\frac{-1}{6} \cdot \left({a}^{3} \cdot b\right) + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(-1 \cdot a + b \cdot \left(\frac{-1}{6} \cdot \left({a}^{3} \cdot b\right) + \frac{1}{2} \cdot {a}^{2}\right)\right) + 1\right)} \]
            2. accelerator-lowering-fma.f64N/A

              \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(b, -1 \cdot a + b \cdot \left(\frac{-1}{6} \cdot \left({a}^{3} \cdot b\right) + \frac{1}{2} \cdot {a}^{2}\right), 1\right)} \]
          8. Simplified60.9%

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(b, \mathsf{fma}\left(b, \mathsf{fma}\left(0.5, a \cdot a, -0.16666666666666666 \cdot \left(b \cdot \left(a \cdot \left(a \cdot a\right)\right)\right)\right), 0 - a\right), 1\right)} \]
          9. Taylor expanded in b around 0

            \[\leadsto x \cdot \color{blue}{\left(1 + b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)} \]
          10. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right) + 1\right)} \]
            2. distribute-rgt-inN/A

              \[\leadsto x \cdot \left(\color{blue}{\left(\left(-1 \cdot a\right) \cdot b + \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right) \cdot b\right)} + 1\right) \]
            3. associate-+l+N/A

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

              \[\leadsto x \cdot \left(\left(-1 \cdot a\right) \cdot b + \left(\color{blue}{\left(\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot b\right)} \cdot b + 1\right)\right) \]
            5. associate-*l*N/A

              \[\leadsto x \cdot \left(\left(-1 \cdot a\right) \cdot b + \left(\color{blue}{\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot \left(b \cdot b\right)} + 1\right)\right) \]
            6. *-commutativeN/A

              \[\leadsto x \cdot \left(\left(-1 \cdot a\right) \cdot b + \left(\color{blue}{\left({a}^{2} \cdot \frac{1}{2}\right)} \cdot \left(b \cdot b\right) + 1\right)\right) \]
            7. unpow2N/A

              \[\leadsto x \cdot \left(\left(-1 \cdot a\right) \cdot b + \left(\left(\color{blue}{\left(a \cdot a\right)} \cdot \frac{1}{2}\right) \cdot \left(b \cdot b\right) + 1\right)\right) \]
            8. associate-*l*N/A

              \[\leadsto x \cdot \left(\left(-1 \cdot a\right) \cdot b + \left(\color{blue}{\left(a \cdot \left(a \cdot \frac{1}{2}\right)\right)} \cdot \left(b \cdot b\right) + 1\right)\right) \]
            9. *-commutativeN/A

              \[\leadsto x \cdot \left(\left(-1 \cdot a\right) \cdot b + \left(\left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a\right)}\right) \cdot \left(b \cdot b\right) + 1\right)\right) \]
            10. unpow2N/A

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

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

              \[\leadsto x \cdot \left(\left(-1 \cdot a\right) \cdot b + \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right)\right)} + 1\right)\right) \]
            13. associate-+l+N/A

              \[\leadsto x \cdot \color{blue}{\left(\left(\left(-1 \cdot a\right) \cdot b + a \cdot \left(\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right)\right)\right) + 1\right)} \]
            14. *-commutativeN/A

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

              \[\leadsto x \cdot \left(\left(\color{blue}{a \cdot \left(-1 \cdot b\right)} + a \cdot \left(\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right)\right)\right) + 1\right) \]
            16. distribute-lft-inN/A

              \[\leadsto x \cdot \left(\color{blue}{a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right)\right)} + 1\right) \]
          11. Simplified64.8%

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(a, 0.5 \cdot \left(a \cdot \left(b \cdot b\right)\right) - b, 1\right)} \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 16: 34.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 -10000000:\\ \;\;\;\;0 - x \cdot \left(y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\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))) -10000000.0)
           (- 0.0 (* x (* y t)))
           (* x (- 1.0 (* a b)))))
        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))) <= -10000000.0) {
        		tmp = 0.0 - (x * (y * t));
        	} else {
        		tmp = x * (1.0 - (a * b));
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z, t, a, b)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8), intent (in) :: a
            real(8), intent (in) :: b
            real(8) :: tmp
            if (((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))) <= (-10000000.0d0)) then
                tmp = 0.0d0 - (x * (y * t))
            else
                tmp = x * (1.0d0 - (a * b))
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t, double a, double b) {
        	double tmp;
        	if (((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))) <= -10000000.0) {
        		tmp = 0.0 - (x * (y * t));
        	} else {
        		tmp = x * (1.0 - (a * b));
        	}
        	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))) <= -10000000.0:
        		tmp = 0.0 - (x * (y * t))
        	else:
        		tmp = x * (1.0 - (a * b))
        	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))) <= -10000000.0)
        		tmp = Float64(0.0 - Float64(x * Float64(y * t)));
        	else
        		tmp = Float64(x * Float64(1.0 - Float64(a * b)));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a, b)
        	tmp = 0.0;
        	if (((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))) <= -10000000.0)
        		tmp = 0.0 - (x * (y * t));
        	else
        		tmp = x * (1.0 - (a * b));
        	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], -10000000.0], N[(0.0 - N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $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 -10000000:\\
        \;\;\;\;0 - x \cdot \left(y \cdot t\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;x \cdot \left(1 - a \cdot b\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))) < -1e7

          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 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. neg-sub0N/A

              \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
            3. --lowering--.f64N/A

              \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
            4. *-commutativeN/A

              \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
            5. *-lowering-*.f6446.8

              \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
          5. Simplified46.8%

            \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
          6. Taylor expanded in y around 0

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

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

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

              \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} + x \]
            4. mul-1-negN/A

              \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} + x \]
            5. accelerator-lowering-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right), x\right)} \]
            6. mul-1-negN/A

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

              \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
            8. mul-1-negN/A

              \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-1 \cdot y\right)}, x\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(-1 \cdot y\right)}, x\right) \]
            10. mul-1-negN/A

              \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
            11. neg-sub0N/A

              \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 - y\right)}, x\right) \]
            12. --lowering--.f643.7

              \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 - y\right)}, x\right) \]
          8. Simplified3.7%

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

            \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(t \cdot x\right) + \frac{x}{y}\right)} \]
          10. Step-by-step derivation
            1. *-lowering-*.f64N/A

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

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

              \[\leadsto y \cdot \left(\color{blue}{t \cdot \left(\mathsf{neg}\left(x\right)\right)} + \frac{x}{y}\right) \]
            4. mul-1-negN/A

              \[\leadsto y \cdot \left(t \cdot \color{blue}{\left(-1 \cdot x\right)} + \frac{x}{y}\right) \]
            5. accelerator-lowering-fma.f64N/A

              \[\leadsto y \cdot \color{blue}{\mathsf{fma}\left(t, -1 \cdot x, \frac{x}{y}\right)} \]
            6. mul-1-negN/A

              \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(x\right)}, \frac{x}{y}\right) \]
            7. neg-sub0N/A

              \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{0 - x}, \frac{x}{y}\right) \]
            8. --lowering--.f64N/A

              \[\leadsto y \cdot \mathsf{fma}\left(t, \color{blue}{0 - x}, \frac{x}{y}\right) \]
            9. /-lowering-/.f645.7

              \[\leadsto y \cdot \mathsf{fma}\left(t, 0 - x, \color{blue}{\frac{x}{y}}\right) \]
          11. Simplified5.7%

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

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

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

              \[\leadsto \mathsf{neg}\left(\color{blue}{\left(x \cdot y\right) \cdot t}\right) \]
            3. associate-*l*N/A

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

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

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

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

              \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(\mathsf{neg}\left(t\right)\right)\right)} \]
            8. mul-1-negN/A

              \[\leadsto x \cdot \left(y \cdot \color{blue}{\left(-1 \cdot t\right)}\right) \]
            9. *-lowering-*.f64N/A

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

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

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

              \[\leadsto x \cdot \left(\mathsf{neg}\left(\color{blue}{t \cdot y}\right)\right) \]
            13. neg-sub0N/A

              \[\leadsto x \cdot \color{blue}{\left(0 - t \cdot y\right)} \]
            14. --lowering--.f64N/A

              \[\leadsto x \cdot \color{blue}{\left(0 - t \cdot y\right)} \]
            15. *-lowering-*.f6418.1

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

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

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

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

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

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

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

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

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

              \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(0 - a\right)}} \]
            6. --lowering--.f6465.7

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

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

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

              \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(a \cdot b\right)\right)}\right) \]
            2. unsub-negN/A

              \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
            3. --lowering--.f64N/A

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

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

            \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
        3. Recombined 2 regimes into one program.
        4. Final simplification36.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 -10000000:\\ \;\;\;\;0 - x \cdot \left(y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \end{array} \]
        5. Add Preprocessing

        Alternative 17: 84.3% accurate, 1.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{y \cdot \left(\log z - t\right)}\\ \mathbf{if}\;y \leq -7 \cdot 10^{-93}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{-53}:\\ \;\;\;\;x \cdot e^{a \cdot \left(\log \left(1 - z\right) - 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 -7e-93)
             t_1
             (if (<= y 2.9e-53) (* x (exp (* a (- (log (- 1.0 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 <= -7e-93) {
        		tmp = t_1;
        	} else if (y <= 2.9e-53) {
        		tmp = x * exp((a * (log((1.0 - 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 <= (-7d-93)) then
                tmp = t_1
            else if (y <= 2.9d-53) then
                tmp = x * exp((a * (log((1.0d0 - 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 <= -7e-93) {
        		tmp = t_1;
        	} else if (y <= 2.9e-53) {
        		tmp = x * Math.exp((a * (Math.log((1.0 - 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 <= -7e-93:
        		tmp = t_1
        	elif y <= 2.9e-53:
        		tmp = x * math.exp((a * (math.log((1.0 - 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 <= -7e-93)
        		tmp = t_1;
        	elseif (y <= 2.9e-53)
        		tmp = Float64(x * exp(Float64(a * Float64(log(Float64(1.0 - 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 <= -7e-93)
        		tmp = t_1;
        	elseif (y <= 2.9e-53)
        		tmp = x * exp((a * (log((1.0 - 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, -7e-93], t$95$1, If[LessEqual[y, 2.9e-53], N[(x * N[Exp[N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - 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 -7 \cdot 10^{-93}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;y \leq 2.9 \cdot 10^{-53}:\\
        \;\;\;\;x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right)}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < -7e-93 or 2.8999999999999998e-53 < y

          1. Initial program 96.6%

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

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

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

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

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

          if -7e-93 < y < 2.8999999999999998e-53

          1. Initial program 93.7%

            \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in 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. *-lowering-*.f64N/A

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

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

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

              \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\log \left(e^{\log \left(1 - z\right)}\right)} - b\right)} \]
            5. rem-exp-logN/A

              \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 - z\right)} - b\right)} \]
            6. --lowering--.f6483.9

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

            \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 18: 82.4% 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 -8.5 \cdot 10^{-179}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{-54}:\\ \;\;\;\;x \cdot e^{0 - 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 (- (log z) t))))))
           (if (<= y -8.5e-179)
             t_1
             (if (<= y 3.6e-54) (* x (exp (- 0.0 (* a 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 <= -8.5e-179) {
        		tmp = t_1;
        	} else if (y <= 3.6e-54) {
        		tmp = x * exp((0.0 - (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 * (log(z) - t)))
            if (y <= (-8.5d-179)) then
                tmp = t_1
            else if (y <= 3.6d-54) then
                tmp = x * exp((0.0d0 - (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 * (Math.log(z) - t)));
        	double tmp;
        	if (y <= -8.5e-179) {
        		tmp = t_1;
        	} else if (y <= 3.6e-54) {
        		tmp = x * Math.exp((0.0 - (a * 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 <= -8.5e-179:
        		tmp = t_1
        	elif y <= 3.6e-54:
        		tmp = x * math.exp((0.0 - (a * 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 <= -8.5e-179)
        		tmp = t_1;
        	elseif (y <= 3.6e-54)
        		tmp = Float64(x * exp(Float64(0.0 - 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 * (log(z) - t)));
        	tmp = 0.0;
        	if (y <= -8.5e-179)
        		tmp = t_1;
        	elseif (y <= 3.6e-54)
        		tmp = x * exp((0.0 - (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 * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.5e-179], t$95$1, If[LessEqual[y, 3.6e-54], N[(x * N[Exp[N[(0.0 - N[(a * 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 -8.5 \cdot 10^{-179}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;y \leq 3.6 \cdot 10^{-54}:\\
        \;\;\;\;x \cdot e^{0 - a \cdot b}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < -8.49999999999999932e-179 or 3.59999999999999976e-54 < y

          1. Initial program 97.0%

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

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

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

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

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

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

          if -8.49999999999999932e-179 < y < 3.59999999999999976e-54

          1. Initial program 92.4%

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

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

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

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

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

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

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

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

              \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}} \]
            2. neg-lowering-neg.f6486.0

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{-179}:\\ \;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\ \mathbf{elif}\;y \leq 3.6 \cdot 10^{-54}:\\ \;\;\;\;x \cdot e^{0 - a \cdot b}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 19: 70.3% accurate, 2.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{0 - y \cdot t}\\ \mathbf{if}\;t \leq -4.5 \cdot 10^{+23}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-165}:\\ \;\;\;\;x \cdot e^{0 - 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 (- 0.0 (* y t))))))
           (if (<= t -4.5e+23)
             t_1
             (if (<= t 7.8e-165) (* x (exp (- 0.0 (* a b)))) t_1))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = x * exp((0.0 - (y * t)));
        	double tmp;
        	if (t <= -4.5e+23) {
        		tmp = t_1;
        	} else if (t <= 7.8e-165) {
        		tmp = x * exp((0.0 - (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((0.0d0 - (y * t)))
            if (t <= (-4.5d+23)) then
                tmp = t_1
            else if (t <= 7.8d-165) then
                tmp = x * exp((0.0d0 - (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((0.0 - (y * t)));
        	double tmp;
        	if (t <= -4.5e+23) {
        		tmp = t_1;
        	} else if (t <= 7.8e-165) {
        		tmp = x * Math.exp((0.0 - (a * b)));
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a, b):
        	t_1 = x * math.exp((0.0 - (y * t)))
        	tmp = 0
        	if t <= -4.5e+23:
        		tmp = t_1
        	elif t <= 7.8e-165:
        		tmp = x * math.exp((0.0 - (a * b)))
        	else:
        		tmp = t_1
        	return tmp
        
        function code(x, y, z, t, a, b)
        	t_1 = Float64(x * exp(Float64(0.0 - Float64(y * t))))
        	tmp = 0.0
        	if (t <= -4.5e+23)
        		tmp = t_1;
        	elseif (t <= 7.8e-165)
        		tmp = Float64(x * exp(Float64(0.0 - 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((0.0 - (y * t)));
        	tmp = 0.0;
        	if (t <= -4.5e+23)
        		tmp = t_1;
        	elseif (t <= 7.8e-165)
        		tmp = x * exp((0.0 - (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[(0.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.5e+23], t$95$1, If[LessEqual[t, 7.8e-165], N[(x * N[Exp[N[(0.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := x \cdot e^{0 - y \cdot t}\\
        \mathbf{if}\;t \leq -4.5 \cdot 10^{+23}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \leq 7.8 \cdot 10^{-165}:\\
        \;\;\;\;x \cdot e^{0 - a \cdot b}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if t < -4.49999999999999979e23 or 7.7999999999999997e-165 < t

          1. Initial program 96.7%

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

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

              \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
            3. --lowering--.f64N/A

              \[\leadsto x \cdot e^{\color{blue}{0 - t \cdot y}} \]
            4. *-commutativeN/A

              \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
            5. *-lowering-*.f6479.3

              \[\leadsto x \cdot e^{0 - \color{blue}{y \cdot t}} \]
          5. Simplified79.3%

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

          if -4.49999999999999979e23 < t < 7.7999999999999997e-165

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

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

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

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

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

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

              \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(0 - a\right)}} \]
            6. --lowering--.f6466.2

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

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

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

              \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(-a\right)}} \]
          7. Applied egg-rr66.2%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{+23}:\\ \;\;\;\;x \cdot e^{0 - y \cdot t}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-165}:\\ \;\;\;\;x \cdot e^{0 - a \cdot b}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{0 - y \cdot t}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 20: 72.0% accurate, 2.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot {z}^{y}\\ \mathbf{if}\;y \leq -2.3 \cdot 10^{-7}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.86 \cdot 10^{+109}:\\ \;\;\;\;x \cdot e^{0 - a \cdot b}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (let* ((t_1 (* x (pow z y))))
           (if (<= y -2.3e-7)
             t_1
             (if (<= y 1.86e+109) (* x (exp (- 0.0 (* a b)))) t_1))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = x * pow(z, y);
        	double tmp;
        	if (y <= -2.3e-7) {
        		tmp = t_1;
        	} else if (y <= 1.86e+109) {
        		tmp = x * exp((0.0 - (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 * (z ** y)
            if (y <= (-2.3d-7)) then
                tmp = t_1
            else if (y <= 1.86d+109) then
                tmp = x * exp((0.0d0 - (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.pow(z, y);
        	double tmp;
        	if (y <= -2.3e-7) {
        		tmp = t_1;
        	} else if (y <= 1.86e+109) {
        		tmp = x * Math.exp((0.0 - (a * b)));
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a, b):
        	t_1 = x * math.pow(z, y)
        	tmp = 0
        	if y <= -2.3e-7:
        		tmp = t_1
        	elif y <= 1.86e+109:
        		tmp = x * math.exp((0.0 - (a * b)))
        	else:
        		tmp = t_1
        	return tmp
        
        function code(x, y, z, t, a, b)
        	t_1 = Float64(x * (z ^ y))
        	tmp = 0.0
        	if (y <= -2.3e-7)
        		tmp = t_1;
        	elseif (y <= 1.86e+109)
        		tmp = Float64(x * exp(Float64(0.0 - Float64(a * b))));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a, b)
        	t_1 = x * (z ^ y);
        	tmp = 0.0;
        	if (y <= -2.3e-7)
        		tmp = t_1;
        	elseif (y <= 1.86e+109)
        		tmp = x * exp((0.0 - (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[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.3e-7], t$95$1, If[LessEqual[y, 1.86e+109], N[(x * N[Exp[N[(0.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := x \cdot {z}^{y}\\
        \mathbf{if}\;y \leq -2.3 \cdot 10^{-7}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;y \leq 1.86 \cdot 10^{+109}:\\
        \;\;\;\;x \cdot e^{0 - a \cdot b}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < -2.29999999999999995e-7 or 1.86000000000000008e109 < y

          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 inf

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

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

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

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

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

            \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
          7. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
            2. pow-lowering-pow.f6467.8

              \[\leadsto x \cdot \color{blue}{{z}^{y}} \]
          8. Simplified67.8%

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

          if -2.29999999999999995e-7 < y < 1.86000000000000008e109

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

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

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

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

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

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

              \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(0 - a\right)}} \]
            6. --lowering--.f6476.9

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

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

              \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}} \]
            2. neg-lowering-neg.f6476.9

              \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(-a\right)}} \]
          7. Applied egg-rr76.9%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.3 \cdot 10^{-7}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq 1.86 \cdot 10^{+109}:\\ \;\;\;\;x \cdot e^{0 - a \cdot b}\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 21: 58.3% accurate, 2.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot {z}^{y}\\ \mathbf{if}\;y \leq -2.5 \cdot 10^{-10}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 320000000000:\\ \;\;\;\;x \cdot \mathsf{fma}\left(a, \mathsf{fma}\left(a, \mathsf{fma}\left(0.5, b \cdot b, \left(a \cdot -0.16666666666666666\right) \cdot \left(b \cdot \left(b \cdot b\right)\right)\right), 0 - b\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (let* ((t_1 (* x (pow z y))))
           (if (<= y -2.5e-10)
             t_1
             (if (<= y 320000000000.0)
               (*
                x
                (fma
                 a
                 (fma
                  a
                  (fma 0.5 (* b b) (* (* a -0.16666666666666666) (* b (* b b))))
                  (- 0.0 b))
                 1.0))
               t_1))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = x * pow(z, y);
        	double tmp;
        	if (y <= -2.5e-10) {
        		tmp = t_1;
        	} else if (y <= 320000000000.0) {
        		tmp = x * fma(a, fma(a, fma(0.5, (b * b), ((a * -0.16666666666666666) * (b * (b * b)))), (0.0 - b)), 1.0);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	t_1 = Float64(x * (z ^ y))
        	tmp = 0.0
        	if (y <= -2.5e-10)
        		tmp = t_1;
        	elseif (y <= 320000000000.0)
        		tmp = Float64(x * fma(a, fma(a, fma(0.5, Float64(b * b), Float64(Float64(a * -0.16666666666666666) * Float64(b * Float64(b * b)))), Float64(0.0 - b)), 1.0));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.5e-10], t$95$1, If[LessEqual[y, 320000000000.0], N[(x * N[(a * N[(a * N[(0.5 * N[(b * b), $MachinePrecision] + N[(N[(a * -0.16666666666666666), $MachinePrecision] * N[(b * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0 - b), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := x \cdot {z}^{y}\\
        \mathbf{if}\;y \leq -2.5 \cdot 10^{-10}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;y \leq 320000000000:\\
        \;\;\;\;x \cdot \mathsf{fma}\left(a, \mathsf{fma}\left(a, \mathsf{fma}\left(0.5, b \cdot b, \left(a \cdot -0.16666666666666666\right) \cdot \left(b \cdot \left(b \cdot b\right)\right)\right), 0 - b\right), 1\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < -2.50000000000000016e-10 or 3.2e11 < y

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

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

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

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

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

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

            \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
          7. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
            2. pow-lowering-pow.f6465.6

              \[\leadsto x \cdot \color{blue}{{z}^{y}} \]
          8. Simplified65.6%

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

          if -2.50000000000000016e-10 < y < 3.2e11

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

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

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

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

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

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

              \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(0 - a\right)}} \]
            6. --lowering--.f6477.8

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

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

            \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + a \cdot \left(\frac{-1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right)\right)\right)} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto x \cdot \color{blue}{\left(a \cdot \left(-1 \cdot b + a \cdot \left(\frac{-1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right)\right) + 1\right)} \]
            2. accelerator-lowering-fma.f64N/A

              \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(a, -1 \cdot b + a \cdot \left(\frac{-1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right), 1\right)} \]
          8. Simplified57.1%

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(a, \mathsf{fma}\left(a, \mathsf{fma}\left(0.5, b \cdot b, \left(-0.16666666666666666 \cdot a\right) \cdot \left(b \cdot \left(b \cdot b\right)\right)\right), 0 - b\right), 1\right)} \]
        3. Recombined 2 regimes into one program.
        4. Final simplification61.2%

          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{-10}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq 320000000000:\\ \;\;\;\;x \cdot \mathsf{fma}\left(a, \mathsf{fma}\left(a, \mathsf{fma}\left(0.5, b \cdot b, \left(a \cdot -0.16666666666666666\right) \cdot \left(b \cdot \left(b \cdot b\right)\right)\right), 0 - b\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 22: 19.6% accurate, 328.0× speedup?

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

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

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

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

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

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

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

            \[\leadsto x \cdot e^{b \cdot \color{blue}{\left(0 - a\right)}} \]
          6. --lowering--.f6459.9

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

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

          \[\leadsto \color{blue}{x} \]
        7. Step-by-step derivation
          1. Simplified21.8%

            \[\leadsto \color{blue}{x} \]
          2. Add Preprocessing

          Reproduce

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