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

Percentage Accurate: 96.6% → 96.6%
Time: 15.9s
Alternatives: 24
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

Alternative 1: 96.6% accurate, 1.0× speedup?

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

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

Alternative 2: 64.8% accurate, 0.3× 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^{+141}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, \left(y \cdot y\right) \cdot \mathsf{fma}\left(t \cdot 0.16666666666666666, y, 0.5\right), y\right), 1\right)}\\ \mathbf{elif}\;t\_1 \leq -20000000000:\\ \;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 0.0002:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), -a\right), 1\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+164}:\\ \;\;\;\;a \cdot \left(a \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, x \cdot 0.5, \frac{x}{-a}\right), \frac{x}{a \cdot a}\right)\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+213}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(t, \left(y \cdot y\right) \cdot \mathsf{fma}\left(t \cdot -0.16666666666666666, y, 0.5\right), -y\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t, x \cdot \left(y \cdot \mathsf{fma}\left(t \cdot 0.5, y, -1\right)\right), x\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+141)
     (/
      x
      (fma t (fma t (* (* y y) (fma (* t 0.16666666666666666) y 0.5)) y) 1.0))
     (if (<= t_1 -20000000000.0)
       (* x (* b (* 0.5 (* b (* a a)))))
       (if (<= t_1 0.0002)
         (* x (fma b (fma b (* 0.5 (* a a)) (- a)) 1.0))
         (if (<= t_1 5e+164)
           (* a (* a (fma b (fma b (* x 0.5) (/ x (- a))) (/ x (* a a)))))
           (if (<= t_1 1e+213)
             (*
              x
              (fma
               t
               (fma t (* (* y y) (fma (* t -0.16666666666666666) y 0.5)) (- y))
               1.0))
             (fma t (* x (* y (fma (* t 0.5) y -1.0))) x))))))))
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+141) {
		tmp = x / fma(t, fma(t, ((y * y) * fma((t * 0.16666666666666666), y, 0.5)), y), 1.0);
	} else if (t_1 <= -20000000000.0) {
		tmp = x * (b * (0.5 * (b * (a * a))));
	} else if (t_1 <= 0.0002) {
		tmp = x * fma(b, fma(b, (0.5 * (a * a)), -a), 1.0);
	} else if (t_1 <= 5e+164) {
		tmp = a * (a * fma(b, fma(b, (x * 0.5), (x / -a)), (x / (a * a))));
	} else if (t_1 <= 1e+213) {
		tmp = x * fma(t, fma(t, ((y * y) * fma((t * -0.16666666666666666), y, 0.5)), -y), 1.0);
	} else {
		tmp = fma(t, (x * (y * fma((t * 0.5), y, -1.0))), x);
	}
	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+141)
		tmp = Float64(x / fma(t, fma(t, Float64(Float64(y * y) * fma(Float64(t * 0.16666666666666666), y, 0.5)), y), 1.0));
	elseif (t_1 <= -20000000000.0)
		tmp = Float64(x * Float64(b * Float64(0.5 * Float64(b * Float64(a * a)))));
	elseif (t_1 <= 0.0002)
		tmp = Float64(x * fma(b, fma(b, Float64(0.5 * Float64(a * a)), Float64(-a)), 1.0));
	elseif (t_1 <= 5e+164)
		tmp = Float64(a * Float64(a * fma(b, fma(b, Float64(x * 0.5), Float64(x / Float64(-a))), Float64(x / Float64(a * a)))));
	elseif (t_1 <= 1e+213)
		tmp = Float64(x * fma(t, fma(t, Float64(Float64(y * y) * fma(Float64(t * -0.16666666666666666), y, 0.5)), Float64(-y)), 1.0));
	else
		tmp = fma(t, Float64(x * Float64(y * fma(Float64(t * 0.5), y, -1.0))), x);
	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, -4e+141], N[(x / N[(t * N[(t * N[(N[(y * y), $MachinePrecision] * N[(N[(t * 0.16666666666666666), $MachinePrecision] * y + 0.5), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0002], N[(x * N[(b * N[(b * N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] + (-a)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+164], N[(a * N[(a * N[(b * N[(b * N[(x * 0.5), $MachinePrecision] + N[(x / (-a)), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+213], N[(x * N[(t * N[(t * N[(N[(y * y), $MachinePrecision] * N[(N[(t * -0.16666666666666666), $MachinePrecision] * y + 0.5), $MachinePrecision]), $MachinePrecision] + (-y)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(x * N[(y * N[(N[(t * 0.5), $MachinePrecision] * y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $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^{+141}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, \left(y \cdot y\right) \cdot \mathsf{fma}\left(t \cdot 0.16666666666666666, y, 0.5\right), y\right), 1\right)}\\

\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\

\mathbf{elif}\;t\_1 \leq 0.0002:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), -a\right), 1\right)\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+164}:\\
\;\;\;\;a \cdot \left(a \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, x \cdot 0.5, \frac{x}{-a}\right), \frac{x}{a \cdot a}\right)\right)\\

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

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


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

    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. *-commutativeN/A

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

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

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. neg-lowering-neg.f6449.3

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{{\left(e^{y}\right)}^{t}}} \]
      3. un-div-invN/A

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

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      5. pow-expN/A

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

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      7. *-lowering-*.f6449.3

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, \color{blue}{\left(\left(\frac{1}{6} \cdot t\right) \cdot y\right) \cdot {y}^{2}} + \frac{1}{2} \cdot {y}^{2}, y\right), 1\right)} \]
      9. distribute-rgt-outN/A

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

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

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

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

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

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

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, \left(y \cdot y\right) \cdot \mathsf{fma}\left(\color{blue}{t \cdot 0.16666666666666666}, y, 0.5\right), y\right), 1\right)} \]
    10. Simplified79.1%

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

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

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

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
      12. *-lowering-*.f642.7

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
    8. Simplified2.7%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{a \cdot \frac{-1}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \frac{\color{blue}{\mathsf{neg}\left(1\right)}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      9. distribute-neg-fracN/A

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{{a}^{2} \cdot \frac{1}{2}}\right)\right)\right) \]
      11. unpow2N/A

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + a \cdot \color{blue}{\left(\frac{1}{2} \cdot a\right)}\right)\right)\right) \]
      14. distribute-lft-outN/A

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

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\frac{1}{2} \cdot a - \frac{1}{b}\right)\right)}\right)\right) \]
      18. sub-negN/A

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\mathsf{fma}\left(a, \frac{1}{2}, \mathsf{neg}\left(\frac{1}{b}\right)\right)}\right)\right)\right) \]
      21. distribute-neg-fracN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \color{blue}{\frac{\mathsf{neg}\left(1\right)}{b}}\right)\right)\right)\right) \]
      22. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \frac{\color{blue}{-1}}{b}\right)\right)\right)\right) \]
      23. /-lowering-/.f6427.2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. 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)} \]
    7. 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. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \frac{1}{2} \cdot \color{blue}{\left(a \cdot a\right)}, -1 \cdot a\right), 1\right) \]
      12. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \frac{1}{2} \cdot \left(a \cdot a\right), \color{blue}{\mathsf{neg}\left(a\right)}\right), 1\right) \]
      13. neg-lowering-neg.f6489.4

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), \color{blue}{-a}\right), 1\right) \]
    8. Simplified89.4%

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

    if 2.0000000000000001e-4 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 4.9999999999999995e164

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

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

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

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

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified58.9%

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

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
      12. *-lowering-*.f6437.7

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
    8. Simplified37.7%

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

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

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

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

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

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

        \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(\left(-1 \cdot \frac{b \cdot x}{a} + \frac{1}{2} \cdot \left({b}^{2} \cdot x\right)\right) + \frac{x}{{a}^{2}}\right)}\right) \]
    11. Simplified56.3%

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

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

    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. *-commutativeN/A

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

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

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. neg-lowering-neg.f6460.8

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(t, \color{blue}{\left(\left(\frac{-1}{6} \cdot t\right) \cdot y\right) \cdot {y}^{2}} + \frac{1}{2} \cdot {y}^{2}, -1 \cdot y\right), 1\right) \]
      9. distribute-rgt-outN/A

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

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

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

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

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

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

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

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

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

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

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right) + \frac{1}{2} \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right), x\right)} \]
    8. Simplified70.4%

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

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

Alternative 3: 64.1% accurate, 0.3× 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^{+141}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, \left(y \cdot y\right) \cdot \mathsf{fma}\left(t \cdot 0.16666666666666666, y, 0.5\right), y\right), 1\right)}\\ \mathbf{elif}\;t\_1 \leq -20000000000:\\ \;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 2000000000000:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), -a\right), 1\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+80}:\\ \;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+225}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(a, \left(\left(z + b\right) \cdot \left(z + b\right)\right) \cdot \left(a \cdot 0.5\right) - \left(z + b\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t, x \cdot \left(y \cdot \mathsf{fma}\left(t \cdot 0.5, y, -1\right)\right), x\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+141)
     (/
      x
      (fma t (fma t (* (* y y) (fma (* t 0.16666666666666666) y 0.5)) y) 1.0))
     (if (<= t_1 -20000000000.0)
       (* x (* b (* 0.5 (* b (* a a)))))
       (if (<= t_1 2000000000000.0)
         (* x (fma b (fma b (* 0.5 (* a a)) (- a)) 1.0))
         (if (<= t_1 1e+80)
           (* a (* a (/ x (* a a))))
           (if (<= t_1 2e+225)
             (* x (fma a (- (* (* (+ z b) (+ z b)) (* a 0.5)) (+ z b)) 1.0))
             (fma t (* x (* y (fma (* t 0.5) y -1.0))) x))))))))
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+141) {
		tmp = x / fma(t, fma(t, ((y * y) * fma((t * 0.16666666666666666), y, 0.5)), y), 1.0);
	} else if (t_1 <= -20000000000.0) {
		tmp = x * (b * (0.5 * (b * (a * a))));
	} else if (t_1 <= 2000000000000.0) {
		tmp = x * fma(b, fma(b, (0.5 * (a * a)), -a), 1.0);
	} else if (t_1 <= 1e+80) {
		tmp = a * (a * (x / (a * a)));
	} else if (t_1 <= 2e+225) {
		tmp = x * fma(a, ((((z + b) * (z + b)) * (a * 0.5)) - (z + b)), 1.0);
	} else {
		tmp = fma(t, (x * (y * fma((t * 0.5), y, -1.0))), x);
	}
	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+141)
		tmp = Float64(x / fma(t, fma(t, Float64(Float64(y * y) * fma(Float64(t * 0.16666666666666666), y, 0.5)), y), 1.0));
	elseif (t_1 <= -20000000000.0)
		tmp = Float64(x * Float64(b * Float64(0.5 * Float64(b * Float64(a * a)))));
	elseif (t_1 <= 2000000000000.0)
		tmp = Float64(x * fma(b, fma(b, Float64(0.5 * Float64(a * a)), Float64(-a)), 1.0));
	elseif (t_1 <= 1e+80)
		tmp = Float64(a * Float64(a * Float64(x / Float64(a * a))));
	elseif (t_1 <= 2e+225)
		tmp = Float64(x * fma(a, Float64(Float64(Float64(Float64(z + b) * Float64(z + b)) * Float64(a * 0.5)) - Float64(z + b)), 1.0));
	else
		tmp = fma(t, Float64(x * Float64(y * fma(Float64(t * 0.5), y, -1.0))), x);
	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, -4e+141], N[(x / N[(t * N[(t * N[(N[(y * y), $MachinePrecision] * N[(N[(t * 0.16666666666666666), $MachinePrecision] * y + 0.5), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2000000000000.0], N[(x * N[(b * N[(b * N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] + (-a)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+80], N[(a * N[(a * N[(x / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+225], N[(x * N[(a * N[(N[(N[(N[(z + b), $MachinePrecision] * N[(z + b), $MachinePrecision]), $MachinePrecision] * N[(a * 0.5), $MachinePrecision]), $MachinePrecision] - N[(z + b), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(x * N[(y * N[(N[(t * 0.5), $MachinePrecision] * y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $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^{+141}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, \left(y \cdot y\right) \cdot \mathsf{fma}\left(t \cdot 0.16666666666666666, y, 0.5\right), y\right), 1\right)}\\

\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\

\mathbf{elif}\;t\_1 \leq 2000000000000:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), -a\right), 1\right)\\

\mathbf{elif}\;t\_1 \leq 10^{+80}:\\
\;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+225}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(a, \left(\left(z + b\right) \cdot \left(z + b\right)\right) \cdot \left(a \cdot 0.5\right) - \left(z + b\right), 1\right)\\

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


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

    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. *-commutativeN/A

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

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

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. neg-lowering-neg.f6449.3

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{{\left(e^{y}\right)}^{t}}} \]
      3. un-div-invN/A

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

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      5. pow-expN/A

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

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      7. *-lowering-*.f6449.3

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, \color{blue}{\left(\left(\frac{1}{6} \cdot t\right) \cdot y\right) \cdot {y}^{2}} + \frac{1}{2} \cdot {y}^{2}, y\right), 1\right)} \]
      9. distribute-rgt-outN/A

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

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

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

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

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

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

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, \left(y \cdot y\right) \cdot \mathsf{fma}\left(\color{blue}{t \cdot 0.16666666666666666}, y, 0.5\right), y\right), 1\right)} \]
    10. Simplified79.1%

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

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

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

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
      12. *-lowering-*.f642.7

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
    8. Simplified2.7%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{a \cdot \frac{-1}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \frac{\color{blue}{\mathsf{neg}\left(1\right)}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      9. distribute-neg-fracN/A

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{{a}^{2} \cdot \frac{1}{2}}\right)\right)\right) \]
      11. unpow2N/A

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + a \cdot \color{blue}{\left(\frac{1}{2} \cdot a\right)}\right)\right)\right) \]
      14. distribute-lft-outN/A

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

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\frac{1}{2} \cdot a - \frac{1}{b}\right)\right)}\right)\right) \]
      18. sub-negN/A

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\mathsf{fma}\left(a, \frac{1}{2}, \mathsf{neg}\left(\frac{1}{b}\right)\right)}\right)\right)\right) \]
      21. distribute-neg-fracN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \color{blue}{\frac{\mathsf{neg}\left(1\right)}{b}}\right)\right)\right)\right) \]
      22. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \frac{\color{blue}{-1}}{b}\right)\right)\right)\right) \]
      23. /-lowering-/.f6427.2

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

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

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

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

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

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

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

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

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

    1. Initial program 89.2%

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

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

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

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

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

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. 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)} \]
    7. 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. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \frac{1}{2} \cdot \color{blue}{\left(a \cdot a\right)}, -1 \cdot a\right), 1\right) \]
      12. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \frac{1}{2} \cdot \left(a \cdot a\right), \color{blue}{\mathsf{neg}\left(a\right)}\right), 1\right) \]
      13. neg-lowering-neg.f6486.5

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), \color{blue}{-a}\right), 1\right) \]
    8. Simplified86.5%

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

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

    1. Initial program 85.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. mul-1-negN/A

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

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

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified30.7%

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

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
      12. *-lowering-*.f6410.4

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
    8. Simplified10.4%

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

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

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

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

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

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

        \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(\left(-1 \cdot \frac{b \cdot x}{a} + \frac{1}{2} \cdot \left({b}^{2} \cdot x\right)\right) + \frac{x}{{a}^{2}}\right)}\right) \]
    11. Simplified51.1%

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

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

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

        \[\leadsto a \cdot \left(a \cdot \frac{x}{\color{blue}{a \cdot a}}\right) \]
      3. *-lowering-*.f6465.2

        \[\leadsto a \cdot \left(a \cdot \frac{x}{\color{blue}{a \cdot a}}\right) \]
    14. Simplified65.2%

      \[\leadsto a \cdot \left(a \cdot \color{blue}{\frac{x}{a \cdot a}}\right) \]

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

    1. Initial program 97.7%

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

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

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

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

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

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

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

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
      3. neg-lowering-neg.f6466.2

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(-z\right)} - b\right)} \]
    8. Simplified66.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{{\left(b + z\right)}^{2} \cdot \left(\frac{1}{2} \cdot a\right)} - \left(b + z\right), 1\right) \]
      12. unpow2N/A

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(b + z\right) \cdot \left(b + z\right)\right) \cdot \color{blue}{\left(a \cdot \frac{1}{2}\right)} - \left(b + z\right), 1\right) \]
      18. +-lowering-+.f6459.7

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(b + z\right) \cdot \left(b + z\right)\right) \cdot \left(a \cdot 0.5\right) - \color{blue}{\left(b + z\right)}, 1\right) \]
    11. Simplified59.7%

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

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

    1. Initial program 97.7%

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

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

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. neg-lowering-neg.f6462.6

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right) + \frac{1}{2} \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right), x\right)} \]
    8. Simplified73.7%

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

    \[\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^{+141}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, \left(y \cdot y\right) \cdot \mathsf{fma}\left(t \cdot 0.16666666666666666, y, 0.5\right), y\right), 1\right)}\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -20000000000:\\ \;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 2000000000000:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), -a\right), 1\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 10^{+80}:\\ \;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 2 \cdot 10^{+225}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(a, \left(\left(z + b\right) \cdot \left(z + b\right)\right) \cdot \left(a \cdot 0.5\right) - \left(z + b\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t, x \cdot \left(y \cdot \mathsf{fma}\left(t \cdot 0.5, y, -1\right)\right), x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 59.5% accurate, 0.3× 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^{+244}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(y, \mathsf{fma}\left(t \cdot t, y \cdot 0.5, t\right), 1\right)}\\ \mathbf{elif}\;t\_1 \leq -20000000000:\\ \;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 2000000000000:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), -a\right), 1\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+80}:\\ \;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+225}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(a, \left(\left(z + b\right) \cdot \left(z + b\right)\right) \cdot \left(a \cdot 0.5\right) - \left(z + b\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t, x \cdot \left(y \cdot \mathsf{fma}\left(t \cdot 0.5, y, -1\right)\right), x\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+244)
     (/ x (fma y (fma (* t t) (* y 0.5) t) 1.0))
     (if (<= t_1 -20000000000.0)
       (* x (* b (* 0.5 (* b (* a a)))))
       (if (<= t_1 2000000000000.0)
         (* x (fma b (fma b (* 0.5 (* a a)) (- a)) 1.0))
         (if (<= t_1 1e+80)
           (* a (* a (/ x (* a a))))
           (if (<= t_1 2e+225)
             (* x (fma a (- (* (* (+ z b) (+ z b)) (* a 0.5)) (+ z b)) 1.0))
             (fma t (* x (* y (fma (* t 0.5) y -1.0))) x))))))))
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+244) {
		tmp = x / fma(y, fma((t * t), (y * 0.5), t), 1.0);
	} else if (t_1 <= -20000000000.0) {
		tmp = x * (b * (0.5 * (b * (a * a))));
	} else if (t_1 <= 2000000000000.0) {
		tmp = x * fma(b, fma(b, (0.5 * (a * a)), -a), 1.0);
	} else if (t_1 <= 1e+80) {
		tmp = a * (a * (x / (a * a)));
	} else if (t_1 <= 2e+225) {
		tmp = x * fma(a, ((((z + b) * (z + b)) * (a * 0.5)) - (z + b)), 1.0);
	} else {
		tmp = fma(t, (x * (y * fma((t * 0.5), y, -1.0))), x);
	}
	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+244)
		tmp = Float64(x / fma(y, fma(Float64(t * t), Float64(y * 0.5), t), 1.0));
	elseif (t_1 <= -20000000000.0)
		tmp = Float64(x * Float64(b * Float64(0.5 * Float64(b * Float64(a * a)))));
	elseif (t_1 <= 2000000000000.0)
		tmp = Float64(x * fma(b, fma(b, Float64(0.5 * Float64(a * a)), Float64(-a)), 1.0));
	elseif (t_1 <= 1e+80)
		tmp = Float64(a * Float64(a * Float64(x / Float64(a * a))));
	elseif (t_1 <= 2e+225)
		tmp = Float64(x * fma(a, Float64(Float64(Float64(Float64(z + b) * Float64(z + b)) * Float64(a * 0.5)) - Float64(z + b)), 1.0));
	else
		tmp = fma(t, Float64(x * Float64(y * fma(Float64(t * 0.5), y, -1.0))), x);
	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, -4e+244], N[(x / N[(y * N[(N[(t * t), $MachinePrecision] * N[(y * 0.5), $MachinePrecision] + t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2000000000000.0], N[(x * N[(b * N[(b * N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] + (-a)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+80], N[(a * N[(a * N[(x / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+225], N[(x * N[(a * N[(N[(N[(N[(z + b), $MachinePrecision] * N[(z + b), $MachinePrecision]), $MachinePrecision] * N[(a * 0.5), $MachinePrecision]), $MachinePrecision] - N[(z + b), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(x * N[(y * N[(N[(t * 0.5), $MachinePrecision] * y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $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^{+244}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, \mathsf{fma}\left(t \cdot t, y \cdot 0.5, t\right), 1\right)}\\

\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\

\mathbf{elif}\;t\_1 \leq 2000000000000:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), -a\right), 1\right)\\

\mathbf{elif}\;t\_1 \leq 10^{+80}:\\
\;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+225}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(a, \left(\left(z + b\right) \cdot \left(z + b\right)\right) \cdot \left(a \cdot 0.5\right) - \left(z + b\right), 1\right)\\

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


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

    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. *-commutativeN/A

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{{\left(e^{y}\right)}^{t}}} \]
      3. un-div-invN/A

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

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      5. pow-expN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\mathsf{fma}\left(y, \mathsf{fma}\left(t \cdot t, \color{blue}{y \cdot 0.5}, t\right), 1\right)} \]
    10. Simplified65.5%

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

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

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

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{a \cdot \frac{-1}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \frac{\color{blue}{\mathsf{neg}\left(1\right)}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      9. distribute-neg-fracN/A

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{{a}^{2} \cdot \frac{1}{2}}\right)\right)\right) \]
      11. unpow2N/A

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + a \cdot \color{blue}{\left(\frac{1}{2} \cdot a\right)}\right)\right)\right) \]
      14. distribute-lft-outN/A

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

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\frac{1}{2} \cdot a - \frac{1}{b}\right)\right)}\right)\right) \]
      18. sub-negN/A

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\mathsf{fma}\left(a, \frac{1}{2}, \mathsf{neg}\left(\frac{1}{b}\right)\right)}\right)\right)\right) \]
      21. distribute-neg-fracN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \color{blue}{\frac{\mathsf{neg}\left(1\right)}{b}}\right)\right)\right)\right) \]
      22. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \frac{\color{blue}{-1}}{b}\right)\right)\right)\right) \]
      23. /-lowering-/.f6434.0

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

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

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

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

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

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

        \[\leadsto x \cdot \left(b \cdot \left(0.5 \cdot \left(\color{blue}{\left(a \cdot a\right)} \cdot b\right)\right)\right) \]
    14. Simplified51.1%

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

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

    1. Initial program 89.2%

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

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

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

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

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

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. 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)} \]
    7. 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. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \frac{1}{2} \cdot \color{blue}{\left(a \cdot a\right)}, -1 \cdot a\right), 1\right) \]
      12. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \frac{1}{2} \cdot \left(a \cdot a\right), \color{blue}{\mathsf{neg}\left(a\right)}\right), 1\right) \]
      13. neg-lowering-neg.f6486.5

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), \color{blue}{-a}\right), 1\right) \]
    8. Simplified86.5%

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

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

    1. Initial program 85.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. mul-1-negN/A

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

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

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified30.7%

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

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
      12. *-lowering-*.f6410.4

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
    8. Simplified10.4%

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

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

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

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

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

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

        \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(\left(-1 \cdot \frac{b \cdot x}{a} + \frac{1}{2} \cdot \left({b}^{2} \cdot x\right)\right) + \frac{x}{{a}^{2}}\right)}\right) \]
    11. Simplified51.1%

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

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

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

        \[\leadsto a \cdot \left(a \cdot \frac{x}{\color{blue}{a \cdot a}}\right) \]
      3. *-lowering-*.f6465.2

        \[\leadsto a \cdot \left(a \cdot \frac{x}{\color{blue}{a \cdot a}}\right) \]
    14. Simplified65.2%

      \[\leadsto a \cdot \left(a \cdot \color{blue}{\frac{x}{a \cdot a}}\right) \]

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

    1. Initial program 97.7%

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

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

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

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

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

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

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

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
      3. neg-lowering-neg.f6466.2

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(-z\right)} - b\right)} \]
    8. Simplified66.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{{\left(b + z\right)}^{2} \cdot \left(\frac{1}{2} \cdot a\right)} - \left(b + z\right), 1\right) \]
      12. unpow2N/A

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(b + z\right) \cdot \left(b + z\right)\right) \cdot \color{blue}{\left(a \cdot \frac{1}{2}\right)} - \left(b + z\right), 1\right) \]
      18. +-lowering-+.f6459.7

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(b + z\right) \cdot \left(b + z\right)\right) \cdot \left(a \cdot 0.5\right) - \color{blue}{\left(b + z\right)}, 1\right) \]
    11. Simplified59.7%

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

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

    1. Initial program 97.7%

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

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

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. neg-lowering-neg.f6462.6

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right) + \frac{1}{2} \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right), x\right)} \]
    8. Simplified73.7%

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

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

Alternative 5: 56.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\ t_2 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\ t_3 := a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\ \mathbf{if}\;t\_2 \leq -1.5 \cdot 10^{+286}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\ \mathbf{elif}\;t\_2 \leq -4 \cdot 10^{+244}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq -20000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2000000000000:\\ \;\;\;\;\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)\\ \mathbf{elif}\;t\_2 \leq 10^{+104}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (* b (* 0.5 (* b (* a a))))))
        (t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))
        (t_3 (* a (* a (/ x (* a a))))))
   (if (<= t_2 -1.5e+286)
     (/ x (fma t y 1.0))
     (if (<= t_2 -4e+244)
       t_3
       (if (<= t_2 -20000000000.0)
         t_1
         (if (<= t_2 2000000000000.0)
           (fma (- (- z) b) (* x a) x)
           (if (<= t_2 1e+104) t_3 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * (b * (0.5 * (b * (a * a))));
	double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
	double t_3 = a * (a * (x / (a * a)));
	double tmp;
	if (t_2 <= -1.5e+286) {
		tmp = x / fma(t, y, 1.0);
	} else if (t_2 <= -4e+244) {
		tmp = t_3;
	} else if (t_2 <= -20000000000.0) {
		tmp = t_1;
	} else if (t_2 <= 2000000000000.0) {
		tmp = fma((-z - b), (x * a), x);
	} else if (t_2 <= 1e+104) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(x * Float64(b * Float64(0.5 * Float64(b * Float64(a * a)))))
	t_2 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))
	t_3 = Float64(a * Float64(a * Float64(x / Float64(a * a))))
	tmp = 0.0
	if (t_2 <= -1.5e+286)
		tmp = Float64(x / fma(t, y, 1.0));
	elseif (t_2 <= -4e+244)
		tmp = t_3;
	elseif (t_2 <= -20000000000.0)
		tmp = t_1;
	elseif (t_2 <= 2000000000000.0)
		tmp = fma(Float64(Float64(-z) - b), Float64(x * a), x);
	elseif (t_2 <= 1e+104)
		tmp = t_3;
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $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]}, Block[{t$95$3 = N[(a * N[(a * N[(x / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1.5e+286], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -4e+244], t$95$3, If[LessEqual[t$95$2, -20000000000.0], t$95$1, If[LessEqual[t$95$2, 2000000000000.0], N[(N[((-z) - b), $MachinePrecision] * N[(x * a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$2, 1e+104], t$95$3, t$95$1]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\
t_2 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
t_3 := a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\
\mathbf{if}\;t\_2 \leq -1.5 \cdot 10^{+286}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\

\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{+244}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_2 \leq -20000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 2000000000000:\\
\;\;\;\;\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)\\

\mathbf{elif}\;t\_2 \leq 10^{+104}:\\
\;\;\;\;t\_3\\

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


\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))) < -1.4999999999999999e286

    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. *-commutativeN/A

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

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

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. neg-lowering-neg.f6466.3

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{{\left(e^{y}\right)}^{t}}} \]
      3. un-div-invN/A

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

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      5. pow-expN/A

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

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      7. *-lowering-*.f6466.3

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

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

      \[\leadsto \frac{x}{\color{blue}{1 + t \cdot y}} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{t \cdot y + 1}} \]
      2. accelerator-lowering-fma.f6459.4

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, y, 1\right)}} \]
    10. Simplified59.4%

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

    if -1.4999999999999999e286 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -4.0000000000000003e244 or 2e12 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1e104

    1. Initial program 93.8%

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

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(\left(-1 \cdot \frac{b \cdot x}{a} + \frac{1}{2} \cdot \left({b}^{2} \cdot x\right)\right) + \frac{x}{{a}^{2}}\right)}\right) \]
    11. Simplified32.6%

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

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

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

        \[\leadsto a \cdot \left(a \cdot \frac{x}{\color{blue}{a \cdot a}}\right) \]
      3. *-lowering-*.f6457.5

        \[\leadsto a \cdot \left(a \cdot \frac{x}{\color{blue}{a \cdot a}}\right) \]
    14. Simplified57.5%

      \[\leadsto a \cdot \left(a \cdot \color{blue}{\frac{x}{a \cdot a}}\right) \]

    if -4.0000000000000003e244 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10 or 1e104 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

    1. Initial program 98.6%

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

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
      12. *-lowering-*.f6429.5

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
    8. Simplified29.5%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{a \cdot \frac{-1}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \frac{\color{blue}{\mathsf{neg}\left(1\right)}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      9. distribute-neg-fracN/A

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{{a}^{2} \cdot \frac{1}{2}}\right)\right)\right) \]
      11. unpow2N/A

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + a \cdot \color{blue}{\left(\frac{1}{2} \cdot a\right)}\right)\right)\right) \]
      14. distribute-lft-outN/A

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

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\frac{1}{2} \cdot a - \frac{1}{b}\right)\right)}\right)\right) \]
      18. sub-negN/A

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\mathsf{fma}\left(a, \frac{1}{2}, \mathsf{neg}\left(\frac{1}{b}\right)\right)}\right)\right)\right) \]
      21. distribute-neg-fracN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \color{blue}{\frac{\mathsf{neg}\left(1\right)}{b}}\right)\right)\right)\right) \]
      22. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \frac{\color{blue}{-1}}{b}\right)\right)\right)\right) \]
      23. /-lowering-/.f6446.5

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \color{blue}{\frac{-1}{b}}\right)\right)\right)\right) \]
    11. Simplified46.5%

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

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

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

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

        \[\leadsto x \cdot \left(b \cdot \left(\frac{1}{2} \cdot \left(\color{blue}{\left(a \cdot a\right)} \cdot b\right)\right)\right) \]
      4. *-lowering-*.f6451.8

        \[\leadsto x \cdot \left(b \cdot \left(0.5 \cdot \left(\color{blue}{\left(a \cdot a\right)} \cdot b\right)\right)\right) \]
    14. Simplified51.8%

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

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

    1. Initial program 89.2%

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

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. *-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. sub-negN/A

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

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

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

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

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

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

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
      3. neg-lowering-neg.f6497.2

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(-z\right)} - b\right)} \]
    8. Simplified97.2%

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\left(b + z\right) \cdot x\right)} \cdot a\right)\right) + x \]
      5. associate-*l*N/A

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot \left(b + z\right)\right)} \cdot \left(a \cdot x\right) + x \]
      9. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(b + z\right), a \cdot x, x\right)} \]
      10. distribute-lft-inN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot b + -1 \cdot z}, a \cdot x, x\right) \]
      11. +-commutativeN/A

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

        \[\leadsto \mathsf{fma}\left(-1 \cdot z + \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}, a \cdot x, x\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot z - b}, a \cdot x, x\right) \]
      14. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot z - b}, a \cdot x, x\right) \]
      15. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b, a \cdot x, x\right) \]
      16. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b, a \cdot x, x\right) \]
      17. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(z\right)\right) - b, \color{blue}{x \cdot a}, x\right) \]
      18. *-lowering-*.f6482.5

        \[\leadsto \mathsf{fma}\left(\left(-z\right) - b, \color{blue}{x \cdot a}, x\right) \]
    11. Simplified82.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification59.8%

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

Alternative 6: 54.8% accurate, 0.3× 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 -1.5 \cdot 10^{+286}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\ \mathbf{elif}\;t\_1 \leq -4 \cdot 10^{+244}:\\ \;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\ \mathbf{elif}\;t\_1 \leq -20000000000:\\ \;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+225}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), -a\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t, x \cdot \left(y \cdot \mathsf{fma}\left(t \cdot 0.5, y, -1\right)\right), x\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 -1.5e+286)
     (/ x (fma t y 1.0))
     (if (<= t_1 -4e+244)
       (* a (* a (/ x (* a a))))
       (if (<= t_1 -20000000000.0)
         (* x (* b (* 0.5 (* b (* a a)))))
         (if (<= t_1 2e+225)
           (* x (fma b (fma b (* 0.5 (* a a)) (- a)) 1.0))
           (fma t (* x (* y (fma (* t 0.5) y -1.0))) x)))))))
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 <= -1.5e+286) {
		tmp = x / fma(t, y, 1.0);
	} else if (t_1 <= -4e+244) {
		tmp = a * (a * (x / (a * a)));
	} else if (t_1 <= -20000000000.0) {
		tmp = x * (b * (0.5 * (b * (a * a))));
	} else if (t_1 <= 2e+225) {
		tmp = x * fma(b, fma(b, (0.5 * (a * a)), -a), 1.0);
	} else {
		tmp = fma(t, (x * (y * fma((t * 0.5), y, -1.0))), x);
	}
	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 <= -1.5e+286)
		tmp = Float64(x / fma(t, y, 1.0));
	elseif (t_1 <= -4e+244)
		tmp = Float64(a * Float64(a * Float64(x / Float64(a * a))));
	elseif (t_1 <= -20000000000.0)
		tmp = Float64(x * Float64(b * Float64(0.5 * Float64(b * Float64(a * a)))));
	elseif (t_1 <= 2e+225)
		tmp = Float64(x * fma(b, fma(b, Float64(0.5 * Float64(a * a)), Float64(-a)), 1.0));
	else
		tmp = fma(t, Float64(x * Float64(y * fma(Float64(t * 0.5), y, -1.0))), x);
	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, -1.5e+286], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -4e+244], N[(a * N[(a * N[(x / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+225], N[(x * N[(b * N[(b * N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] + (-a)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(x * N[(y * N[(N[(t * 0.5), $MachinePrecision] * y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $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 -1.5 \cdot 10^{+286}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\

\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{+244}:\\
\;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\

\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+225}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), -a\right), 1\right)\\

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

    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. *-commutativeN/A

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

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

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. neg-lowering-neg.f6466.3

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{{\left(e^{y}\right)}^{t}}} \]
      3. un-div-invN/A

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

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      5. pow-expN/A

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

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      7. *-lowering-*.f6466.3

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

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

      \[\leadsto \frac{x}{\color{blue}{1 + t \cdot y}} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{t \cdot y + 1}} \]
      2. accelerator-lowering-fma.f6459.4

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, y, 1\right)}} \]
    10. Simplified59.4%

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

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

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

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

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

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

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified55.1%

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

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
      12. *-lowering-*.f642.3

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
    8. Simplified2.3%

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

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

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

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

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

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

        \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(\left(-1 \cdot \frac{b \cdot x}{a} + \frac{1}{2} \cdot \left({b}^{2} \cdot x\right)\right) + \frac{x}{{a}^{2}}\right)}\right) \]
    11. Simplified9.4%

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

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

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

        \[\leadsto a \cdot \left(a \cdot \frac{x}{\color{blue}{a \cdot a}}\right) \]
      3. *-lowering-*.f6455.3

        \[\leadsto a \cdot \left(a \cdot \frac{x}{\color{blue}{a \cdot a}}\right) \]
    14. Simplified55.3%

      \[\leadsto a \cdot \left(a \cdot \color{blue}{\frac{x}{a \cdot a}}\right) \]

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

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

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{a \cdot \frac{-1}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \frac{\color{blue}{\mathsf{neg}\left(1\right)}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      9. distribute-neg-fracN/A

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{{a}^{2} \cdot \frac{1}{2}}\right)\right)\right) \]
      11. unpow2N/A

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + a \cdot \color{blue}{\left(\frac{1}{2} \cdot a\right)}\right)\right)\right) \]
      14. distribute-lft-outN/A

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

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\frac{1}{2} \cdot a - \frac{1}{b}\right)\right)}\right)\right) \]
      18. sub-negN/A

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\mathsf{fma}\left(a, \frac{1}{2}, \mathsf{neg}\left(\frac{1}{b}\right)\right)}\right)\right)\right) \]
      21. distribute-neg-fracN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \color{blue}{\frac{\mathsf{neg}\left(1\right)}{b}}\right)\right)\right)\right) \]
      22. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \frac{\color{blue}{-1}}{b}\right)\right)\right)\right) \]
      23. /-lowering-/.f6434.0

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

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

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

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

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

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

        \[\leadsto x \cdot \left(b \cdot \left(0.5 \cdot \left(\color{blue}{\left(a \cdot a\right)} \cdot b\right)\right)\right) \]
    14. Simplified51.1%

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

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

    1. Initial program 92.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. mul-1-negN/A

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

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

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified69.2%

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. 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)} \]
    7. 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. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \frac{1}{2} \cdot \color{blue}{\left(a \cdot a\right)}, -1 \cdot a\right), 1\right) \]
      12. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \frac{1}{2} \cdot \left(a \cdot a\right), \color{blue}{\mathsf{neg}\left(a\right)}\right), 1\right) \]
      13. neg-lowering-neg.f6465.7

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), \color{blue}{-a}\right), 1\right) \]
    8. Simplified65.7%

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

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

    1. Initial program 97.7%

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

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

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. neg-lowering-neg.f6462.6

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right) + \frac{1}{2} \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right), x\right)} \]
    8. Simplified73.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, x \cdot \left(y \cdot \mathsf{fma}\left(0.5 \cdot t, y, -1\right)\right), x\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification62.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 -1.5 \cdot 10^{+286}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -4 \cdot 10^{+244}:\\ \;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -20000000000:\\ \;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 2 \cdot 10^{+225}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), -a\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t, x \cdot \left(y \cdot \mathsf{fma}\left(t \cdot 0.5, y, -1\right)\right), x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 54.6% accurate, 0.3× 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 -1.5 \cdot 10^{+286}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\ \mathbf{elif}\;t\_1 \leq -4 \cdot 10^{+244}:\\ \;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\ \mathbf{elif}\;t\_1 \leq -20000000000:\\ \;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+225}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t, x \cdot \left(y \cdot \mathsf{fma}\left(t \cdot 0.5, y, -1\right)\right), x\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 -1.5e+286)
     (/ x (fma t y 1.0))
     (if (<= t_1 -4e+244)
       (* a (* a (/ x (* a a))))
       (if (<= t_1 -20000000000.0)
         (* x (* b (* 0.5 (* b (* a a)))))
         (if (<= t_1 2e+225)
           (* x (fma b (* b (* 0.5 (* a a))) 1.0))
           (fma t (* x (* y (fma (* t 0.5) y -1.0))) x)))))))
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 <= -1.5e+286) {
		tmp = x / fma(t, y, 1.0);
	} else if (t_1 <= -4e+244) {
		tmp = a * (a * (x / (a * a)));
	} else if (t_1 <= -20000000000.0) {
		tmp = x * (b * (0.5 * (b * (a * a))));
	} else if (t_1 <= 2e+225) {
		tmp = x * fma(b, (b * (0.5 * (a * a))), 1.0);
	} else {
		tmp = fma(t, (x * (y * fma((t * 0.5), y, -1.0))), x);
	}
	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 <= -1.5e+286)
		tmp = Float64(x / fma(t, y, 1.0));
	elseif (t_1 <= -4e+244)
		tmp = Float64(a * Float64(a * Float64(x / Float64(a * a))));
	elseif (t_1 <= -20000000000.0)
		tmp = Float64(x * Float64(b * Float64(0.5 * Float64(b * Float64(a * a)))));
	elseif (t_1 <= 2e+225)
		tmp = Float64(x * fma(b, Float64(b * Float64(0.5 * Float64(a * a))), 1.0));
	else
		tmp = fma(t, Float64(x * Float64(y * fma(Float64(t * 0.5), y, -1.0))), x);
	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, -1.5e+286], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -4e+244], N[(a * N[(a * N[(x / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+225], N[(x * N[(b * N[(b * N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(x * N[(y * N[(N[(t * 0.5), $MachinePrecision] * y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $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 -1.5 \cdot 10^{+286}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\

\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{+244}:\\
\;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\

\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+225}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right), 1\right)\\

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

    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. *-commutativeN/A

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

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

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. neg-lowering-neg.f6466.3

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{{\left(e^{y}\right)}^{t}}} \]
      3. un-div-invN/A

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

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      5. pow-expN/A

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

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      7. *-lowering-*.f6466.3

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

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

      \[\leadsto \frac{x}{\color{blue}{1 + t \cdot y}} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{t \cdot y + 1}} \]
      2. accelerator-lowering-fma.f6459.4

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, y, 1\right)}} \]
    10. Simplified59.4%

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

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

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

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

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

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

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified55.1%

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

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
      12. *-lowering-*.f642.3

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
    8. Simplified2.3%

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

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

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

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

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

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

        \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(\left(-1 \cdot \frac{b \cdot x}{a} + \frac{1}{2} \cdot \left({b}^{2} \cdot x\right)\right) + \frac{x}{{a}^{2}}\right)}\right) \]
    11. Simplified9.4%

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

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

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

        \[\leadsto a \cdot \left(a \cdot \frac{x}{\color{blue}{a \cdot a}}\right) \]
      3. *-lowering-*.f6455.3

        \[\leadsto a \cdot \left(a \cdot \frac{x}{\color{blue}{a \cdot a}}\right) \]
    14. Simplified55.3%

      \[\leadsto a \cdot \left(a \cdot \color{blue}{\frac{x}{a \cdot a}}\right) \]

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

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

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{a \cdot \frac{-1}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \frac{\color{blue}{\mathsf{neg}\left(1\right)}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      9. distribute-neg-fracN/A

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{{a}^{2} \cdot \frac{1}{2}}\right)\right)\right) \]
      11. unpow2N/A

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + a \cdot \color{blue}{\left(\frac{1}{2} \cdot a\right)}\right)\right)\right) \]
      14. distribute-lft-outN/A

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

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\frac{1}{2} \cdot a - \frac{1}{b}\right)\right)}\right)\right) \]
      18. sub-negN/A

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\mathsf{fma}\left(a, \frac{1}{2}, \mathsf{neg}\left(\frac{1}{b}\right)\right)}\right)\right)\right) \]
      21. distribute-neg-fracN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \color{blue}{\frac{\mathsf{neg}\left(1\right)}{b}}\right)\right)\right)\right) \]
      22. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \frac{\color{blue}{-1}}{b}\right)\right)\right)\right) \]
      23. /-lowering-/.f6434.0

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

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

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

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

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

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

        \[\leadsto x \cdot \left(b \cdot \left(0.5 \cdot \left(\color{blue}{\left(a \cdot a\right)} \cdot b\right)\right)\right) \]
    14. Simplified51.1%

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

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

    1. Initial program 92.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. mul-1-negN/A

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

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

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified69.2%

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. 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)} \]
    7. 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. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \frac{1}{2} \cdot \color{blue}{\left(a \cdot a\right)}, -1 \cdot a\right), 1\right) \]
      12. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \frac{1}{2} \cdot \left(a \cdot a\right), \color{blue}{\mathsf{neg}\left(a\right)}\right), 1\right) \]
      13. neg-lowering-neg.f6465.7

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), \color{blue}{-a}\right), 1\right) \]
    8. Simplified65.7%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(b, b \cdot \color{blue}{\left(\frac{1}{2} \cdot {a}^{2}\right)}, 1\right) \]
      7. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, b \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(a \cdot a\right)}\right), 1\right) \]
      8. *-lowering-*.f6465.3

        \[\leadsto x \cdot \mathsf{fma}\left(b, b \cdot \left(0.5 \cdot \color{blue}{\left(a \cdot a\right)}\right), 1\right) \]
    11. Simplified65.3%

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

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

    1. Initial program 97.7%

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

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

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. neg-lowering-neg.f6462.6

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right) + \frac{1}{2} \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right), x\right)} \]
    8. Simplified73.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, x \cdot \left(y \cdot \mathsf{fma}\left(0.5 \cdot t, y, -1\right)\right), x\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification62.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 -1.5 \cdot 10^{+286}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -4 \cdot 10^{+244}:\\ \;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -20000000000:\\ \;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 2 \cdot 10^{+225}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t, x \cdot \left(y \cdot \mathsf{fma}\left(t \cdot 0.5, y, -1\right)\right), x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 54.6% accurate, 0.3× 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 -1.5 \cdot 10^{+286}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\ \mathbf{elif}\;t\_1 \leq -4 \cdot 10^{+244}:\\ \;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\ \mathbf{elif}\;t\_1 \leq -20000000000:\\ \;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+225}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(t, y \cdot \mathsf{fma}\left(t \cdot 0.5, y, -1\right), 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 -1.5e+286)
     (/ x (fma t y 1.0))
     (if (<= t_1 -4e+244)
       (* a (* a (/ x (* a a))))
       (if (<= t_1 -20000000000.0)
         (* x (* b (* 0.5 (* b (* a a)))))
         (if (<= t_1 2e+225)
           (* x (fma b (* b (* 0.5 (* a a))) 1.0))
           (* x (fma t (* y (fma (* t 0.5) y -1.0)) 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 <= -1.5e+286) {
		tmp = x / fma(t, y, 1.0);
	} else if (t_1 <= -4e+244) {
		tmp = a * (a * (x / (a * a)));
	} else if (t_1 <= -20000000000.0) {
		tmp = x * (b * (0.5 * (b * (a * a))));
	} else if (t_1 <= 2e+225) {
		tmp = x * fma(b, (b * (0.5 * (a * a))), 1.0);
	} else {
		tmp = x * fma(t, (y * fma((t * 0.5), y, -1.0)), 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 <= -1.5e+286)
		tmp = Float64(x / fma(t, y, 1.0));
	elseif (t_1 <= -4e+244)
		tmp = Float64(a * Float64(a * Float64(x / Float64(a * a))));
	elseif (t_1 <= -20000000000.0)
		tmp = Float64(x * Float64(b * Float64(0.5 * Float64(b * Float64(a * a)))));
	elseif (t_1 <= 2e+225)
		tmp = Float64(x * fma(b, Float64(b * Float64(0.5 * Float64(a * a))), 1.0));
	else
		tmp = Float64(x * fma(t, Float64(y * fma(Float64(t * 0.5), y, -1.0)), 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, -1.5e+286], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -4e+244], N[(a * N[(a * N[(x / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+225], N[(x * N[(b * N[(b * N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(t * N[(y * N[(N[(t * 0.5), $MachinePrecision] * y + -1.0), $MachinePrecision]), $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 -1.5 \cdot 10^{+286}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\

\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{+244}:\\
\;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\

\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+225}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right), 1\right)\\

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

    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. *-commutativeN/A

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

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

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. neg-lowering-neg.f6466.3

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{{\left(e^{y}\right)}^{t}}} \]
      3. un-div-invN/A

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

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      5. pow-expN/A

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

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      7. *-lowering-*.f6466.3

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

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

      \[\leadsto \frac{x}{\color{blue}{1 + t \cdot y}} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{t \cdot y + 1}} \]
      2. accelerator-lowering-fma.f6459.4

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, y, 1\right)}} \]
    10. Simplified59.4%

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

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

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

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

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

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

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified55.1%

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

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
      12. *-lowering-*.f642.3

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
    8. Simplified2.3%

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

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

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

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

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

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

        \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(\left(-1 \cdot \frac{b \cdot x}{a} + \frac{1}{2} \cdot \left({b}^{2} \cdot x\right)\right) + \frac{x}{{a}^{2}}\right)}\right) \]
    11. Simplified9.4%

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

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

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

        \[\leadsto a \cdot \left(a \cdot \frac{x}{\color{blue}{a \cdot a}}\right) \]
      3. *-lowering-*.f6455.3

        \[\leadsto a \cdot \left(a \cdot \frac{x}{\color{blue}{a \cdot a}}\right) \]
    14. Simplified55.3%

      \[\leadsto a \cdot \left(a \cdot \color{blue}{\frac{x}{a \cdot a}}\right) \]

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

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

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{a \cdot \frac{-1}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \frac{\color{blue}{\mathsf{neg}\left(1\right)}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      9. distribute-neg-fracN/A

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{{a}^{2} \cdot \frac{1}{2}}\right)\right)\right) \]
      11. unpow2N/A

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + a \cdot \color{blue}{\left(\frac{1}{2} \cdot a\right)}\right)\right)\right) \]
      14. distribute-lft-outN/A

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

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\frac{1}{2} \cdot a - \frac{1}{b}\right)\right)}\right)\right) \]
      18. sub-negN/A

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

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

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\mathsf{fma}\left(a, \frac{1}{2}, \mathsf{neg}\left(\frac{1}{b}\right)\right)}\right)\right)\right) \]
      21. distribute-neg-fracN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \color{blue}{\frac{\mathsf{neg}\left(1\right)}{b}}\right)\right)\right)\right) \]
      22. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \frac{\color{blue}{-1}}{b}\right)\right)\right)\right) \]
      23. /-lowering-/.f6434.0

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

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

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

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

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

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

        \[\leadsto x \cdot \left(b \cdot \left(0.5 \cdot \left(\color{blue}{\left(a \cdot a\right)} \cdot b\right)\right)\right) \]
    14. Simplified51.1%

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

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

    1. Initial program 92.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. mul-1-negN/A

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

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

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified69.2%

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. 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)} \]
    7. 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. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \frac{1}{2} \cdot \color{blue}{\left(a \cdot a\right)}, -1 \cdot a\right), 1\right) \]
      12. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \frac{1}{2} \cdot \left(a \cdot a\right), \color{blue}{\mathsf{neg}\left(a\right)}\right), 1\right) \]
      13. neg-lowering-neg.f6465.7

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), \color{blue}{-a}\right), 1\right) \]
    8. Simplified65.7%

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(b, b \cdot \color{blue}{\left(\frac{1}{2} \cdot {a}^{2}\right)}, 1\right) \]
      7. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, b \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(a \cdot a\right)}\right), 1\right) \]
      8. *-lowering-*.f6465.3

        \[\leadsto x \cdot \mathsf{fma}\left(b, b \cdot \left(0.5 \cdot \color{blue}{\left(a \cdot a\right)}\right), 1\right) \]
    11. Simplified65.3%

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

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

    1. Initial program 97.7%

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

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

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. neg-lowering-neg.f6462.6

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \color{blue}{\left(\left(\frac{1}{2} \cdot t\right) \cdot y\right) \cdot y} + -1 \cdot y, 1\right) \]
      7. distribute-rgt-outN/A

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

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

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

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

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

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

Alternative 9: 57.7% 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^{+244}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(y, \mathsf{fma}\left(t \cdot t, y \cdot 0.5, t\right), 1\right)}\\ \mathbf{elif}\;t\_1 \leq -20000000000:\\ \;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+225}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), -a\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t, x \cdot \left(y \cdot \mathsf{fma}\left(t \cdot 0.5, y, -1\right)\right), x\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+244)
     (/ x (fma y (fma (* t t) (* y 0.5) t) 1.0))
     (if (<= t_1 -20000000000.0)
       (* x (* b (* 0.5 (* b (* a a)))))
       (if (<= t_1 2e+225)
         (* x (fma b (fma b (* 0.5 (* a a)) (- a)) 1.0))
         (fma t (* x (* y (fma (* t 0.5) y -1.0))) x))))))
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+244) {
		tmp = x / fma(y, fma((t * t), (y * 0.5), t), 1.0);
	} else if (t_1 <= -20000000000.0) {
		tmp = x * (b * (0.5 * (b * (a * a))));
	} else if (t_1 <= 2e+225) {
		tmp = x * fma(b, fma(b, (0.5 * (a * a)), -a), 1.0);
	} else {
		tmp = fma(t, (x * (y * fma((t * 0.5), y, -1.0))), x);
	}
	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+244)
		tmp = Float64(x / fma(y, fma(Float64(t * t), Float64(y * 0.5), t), 1.0));
	elseif (t_1 <= -20000000000.0)
		tmp = Float64(x * Float64(b * Float64(0.5 * Float64(b * Float64(a * a)))));
	elseif (t_1 <= 2e+225)
		tmp = Float64(x * fma(b, fma(b, Float64(0.5 * Float64(a * a)), Float64(-a)), 1.0));
	else
		tmp = fma(t, Float64(x * Float64(y * fma(Float64(t * 0.5), y, -1.0))), x);
	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, -4e+244], N[(x / N[(y * N[(N[(t * t), $MachinePrecision] * N[(y * 0.5), $MachinePrecision] + t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+225], N[(x * N[(b * N[(b * N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] + (-a)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(x * N[(y * N[(N[(t * 0.5), $MachinePrecision] * y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $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^{+244}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, \mathsf{fma}\left(t \cdot t, y \cdot 0.5, t\right), 1\right)}\\

\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+225}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), -a\right), 1\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, x \cdot \left(y \cdot \mathsf{fma}\left(t \cdot 0.5, y, -1\right)\right), x\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.0000000000000003e244

    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. *-commutativeN/A

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

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. neg-lowering-neg.f6452.7

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Simplified52.7%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Step-by-step derivation
      1. exp-prodN/A

        \[\leadsto x \cdot \color{blue}{{\left(e^{y}\right)}^{\left(\mathsf{neg}\left(t\right)\right)}} \]
      2. pow-negN/A

        \[\leadsto x \cdot \color{blue}{\frac{1}{{\left(e^{y}\right)}^{t}}} \]
      3. un-div-invN/A

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      5. pow-expN/A

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      6. exp-lowering-exp.f64N/A

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      7. *-lowering-*.f6452.7

        \[\leadsto \frac{x}{e^{\color{blue}{y \cdot t}}} \]
    7. Applied egg-rr52.7%

      \[\leadsto \color{blue}{\frac{x}{e^{y \cdot t}}} \]
    8. Taylor expanded in y around 0

      \[\leadsto \frac{x}{\color{blue}{1 + y \cdot \left(t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)}} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{y \cdot \left(t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1}} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(y, t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)}} \]
      3. +-commutativeN/A

        \[\leadsto \frac{x}{\mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + t}, 1\right)} \]
      4. *-commutativeN/A

        \[\leadsto \frac{x}{\mathsf{fma}\left(y, \color{blue}{\left({t}^{2} \cdot y\right) \cdot \frac{1}{2}} + t, 1\right)} \]
      5. associate-*l*N/A

        \[\leadsto \frac{x}{\mathsf{fma}\left(y, \color{blue}{{t}^{2} \cdot \left(y \cdot \frac{1}{2}\right)} + t, 1\right)} \]
      6. accelerator-lowering-fma.f64N/A

        \[\leadsto \frac{x}{\mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left({t}^{2}, y \cdot \frac{1}{2}, t\right)}, 1\right)} \]
      7. unpow2N/A

        \[\leadsto \frac{x}{\mathsf{fma}\left(y, \mathsf{fma}\left(\color{blue}{t \cdot t}, y \cdot \frac{1}{2}, t\right), 1\right)} \]
      8. *-lowering-*.f64N/A

        \[\leadsto \frac{x}{\mathsf{fma}\left(y, \mathsf{fma}\left(\color{blue}{t \cdot t}, y \cdot \frac{1}{2}, t\right), 1\right)} \]
      9. *-lowering-*.f6465.5

        \[\leadsto \frac{x}{\mathsf{fma}\left(y, \mathsf{fma}\left(t \cdot t, \color{blue}{y \cdot 0.5}, t\right), 1\right)} \]
    10. Simplified65.5%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(t \cdot t, y \cdot 0.5, t\right), 1\right)}} \]

    if -4.0000000000000003e244 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10

    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 b around inf

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      3. *-lowering-*.f6442.4

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified42.4%

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. Taylor expanded in a around 0

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right) \]
      4. +-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right) + \left(\mathsf{neg}\left(b\right)\right)}, 1\right) \]
      5. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\frac{1}{2} \cdot a\right) \cdot \color{blue}{\left(b \cdot b\right)} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      7. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      8. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
      11. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
      12. *-lowering-*.f643.0

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
    8. Simplified3.0%

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(0.5 \cdot a, b, -1\right), 1\right)} \]
    9. Taylor expanded in b around inf

      \[\leadsto x \cdot \color{blue}{\left({b}^{2} \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)} \]
    10. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto x \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)}\right) \]
      5. associate-*r/N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{\frac{-1 \cdot a}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\frac{\color{blue}{a \cdot -1}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      7. associate-/l*N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{a \cdot \frac{-1}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \frac{\color{blue}{\mathsf{neg}\left(1\right)}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      9. distribute-neg-fracN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{1}{b}\right)\right)} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{{a}^{2} \cdot \frac{1}{2}}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{\left(a \cdot a\right)} \cdot \frac{1}{2}\right)\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{a \cdot \left(a \cdot \frac{1}{2}\right)}\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + a \cdot \color{blue}{\left(\frac{1}{2} \cdot a\right)}\right)\right)\right) \]
      14. distribute-lft-outN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \frac{1}{2} \cdot a\right)\right)}\right)\right) \]
      15. +-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)}\right)\right)\right) \]
      16. sub-negN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a - \frac{1}{b}\right)}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\frac{1}{2} \cdot a - \frac{1}{b}\right)\right)}\right)\right) \]
      18. sub-negN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)}\right)\right)\right) \]
      19. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\color{blue}{a \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)\right)\right)\right) \]
      20. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\mathsf{fma}\left(a, \frac{1}{2}, \mathsf{neg}\left(\frac{1}{b}\right)\right)}\right)\right)\right) \]
      21. distribute-neg-fracN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \color{blue}{\frac{\mathsf{neg}\left(1\right)}{b}}\right)\right)\right)\right) \]
      22. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \frac{\color{blue}{-1}}{b}\right)\right)\right)\right) \]
      23. /-lowering-/.f6434.0

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \color{blue}{\frac{-1}{b}}\right)\right)\right)\right) \]
    11. Simplified34.0%

      \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \frac{-1}{b}\right)\right)\right)\right)} \]
    12. Taylor expanded in b around inf

      \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right) \]
    13. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \left(\frac{1}{2} \cdot \color{blue}{\left({a}^{2} \cdot b\right)}\right)\right) \]
      3. unpow2N/A

        \[\leadsto x \cdot \left(b \cdot \left(\frac{1}{2} \cdot \left(\color{blue}{\left(a \cdot a\right)} \cdot b\right)\right)\right) \]
      4. *-lowering-*.f6451.1

        \[\leadsto x \cdot \left(b \cdot \left(0.5 \cdot \left(\color{blue}{\left(a \cdot a\right)} \cdot b\right)\right)\right) \]
    14. Simplified51.1%

      \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(0.5 \cdot \left(\left(a \cdot a\right) \cdot b\right)\right)}\right) \]

    if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1.99999999999999986e225

    1. Initial program 92.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. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      3. *-lowering-*.f6469.2

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified69.2%

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. 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)} \]
    7. 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. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(b, -1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right), 1\right)} \]
      3. +-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + -1 \cdot a}, 1\right) \]
      4. *-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{\left({a}^{2} \cdot b\right) \cdot \frac{1}{2}} + -1 \cdot a, 1\right) \]
      5. *-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{\left(b \cdot {a}^{2}\right)} \cdot \frac{1}{2} + -1 \cdot a, 1\right) \]
      6. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{b \cdot \left({a}^{2} \cdot \frac{1}{2}\right)} + -1 \cdot a, 1\right) \]
      7. *-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, b \cdot \color{blue}{\left(\frac{1}{2} \cdot {a}^{2}\right)} + -1 \cdot a, 1\right) \]
      8. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{\mathsf{fma}\left(b, \frac{1}{2} \cdot {a}^{2}, -1 \cdot a\right)}, 1\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \color{blue}{\frac{1}{2} \cdot {a}^{2}}, -1 \cdot a\right), 1\right) \]
      10. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \frac{1}{2} \cdot \color{blue}{\left(a \cdot a\right)}, -1 \cdot a\right), 1\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \frac{1}{2} \cdot \color{blue}{\left(a \cdot a\right)}, -1 \cdot a\right), 1\right) \]
      12. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \frac{1}{2} \cdot \left(a \cdot a\right), \color{blue}{\mathsf{neg}\left(a\right)}\right), 1\right) \]
      13. neg-lowering-neg.f6465.7

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), \color{blue}{-a}\right), 1\right) \]
    8. Simplified65.7%

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), -a\right), 1\right)} \]

    if 1.99999999999999986e225 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

    1. Initial program 97.7%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(t \cdot y\right)}} \]
      2. *-commutativeN/A

        \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. neg-lowering-neg.f6462.6

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Simplified62.6%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in t around 0

      \[\leadsto \color{blue}{x + t \cdot \left(-1 \cdot \left(x \cdot y\right) + \frac{1}{2} \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(x \cdot y\right) + \frac{1}{2} \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right)\right) + x} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right) + \frac{1}{2} \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right), x\right)} \]
    8. Simplified73.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, x \cdot \left(y \cdot \mathsf{fma}\left(0.5 \cdot t, y, -1\right)\right), x\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification63.5%

    \[\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^{+244}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(y, \mathsf{fma}\left(t \cdot t, y \cdot 0.5, t\right), 1\right)}\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -20000000000:\\ \;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 2 \cdot 10^{+225}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), -a\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t, x \cdot \left(y \cdot \mathsf{fma}\left(t \cdot 0.5, y, -1\right)\right), x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 54.8% 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 -1.5 \cdot 10^{+286}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\ \mathbf{elif}\;t\_1 \leq -4 \cdot 10^{+244}:\\ \;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\ \mathbf{elif}\;t\_1 \leq -20000000000:\\ \;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right), 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 -1.5e+286)
     (/ x (fma t y 1.0))
     (if (<= t_1 -4e+244)
       (* a (* a (/ x (* a a))))
       (if (<= t_1 -20000000000.0)
         (* x (* b (* 0.5 (* b (* a a)))))
         (* x (fma b (* b (* 0.5 (* a a))) 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 <= -1.5e+286) {
		tmp = x / fma(t, y, 1.0);
	} else if (t_1 <= -4e+244) {
		tmp = a * (a * (x / (a * a)));
	} else if (t_1 <= -20000000000.0) {
		tmp = x * (b * (0.5 * (b * (a * a))));
	} else {
		tmp = x * fma(b, (b * (0.5 * (a * a))), 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 <= -1.5e+286)
		tmp = Float64(x / fma(t, y, 1.0));
	elseif (t_1 <= -4e+244)
		tmp = Float64(a * Float64(a * Float64(x / Float64(a * a))));
	elseif (t_1 <= -20000000000.0)
		tmp = Float64(x * Float64(b * Float64(0.5 * Float64(b * Float64(a * a)))));
	else
		tmp = Float64(x * fma(b, Float64(b * Float64(0.5 * Float64(a * a))), 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, -1.5e+286], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -4e+244], N[(a * N[(a * N[(x / N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(b * N[(b * N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision]), $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 -1.5 \cdot 10^{+286}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\

\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{+244}:\\
\;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\

\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right), 1\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))) < -1.4999999999999999e286

    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. *-commutativeN/A

        \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. neg-lowering-neg.f6466.3

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Simplified66.3%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Step-by-step derivation
      1. exp-prodN/A

        \[\leadsto x \cdot \color{blue}{{\left(e^{y}\right)}^{\left(\mathsf{neg}\left(t\right)\right)}} \]
      2. pow-negN/A

        \[\leadsto x \cdot \color{blue}{\frac{1}{{\left(e^{y}\right)}^{t}}} \]
      3. un-div-invN/A

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      5. pow-expN/A

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      6. exp-lowering-exp.f64N/A

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      7. *-lowering-*.f6466.3

        \[\leadsto \frac{x}{e^{\color{blue}{y \cdot t}}} \]
    7. Applied egg-rr66.3%

      \[\leadsto \color{blue}{\frac{x}{e^{y \cdot t}}} \]
    8. Taylor expanded in y around 0

      \[\leadsto \frac{x}{\color{blue}{1 + t \cdot y}} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{t \cdot y + 1}} \]
      2. accelerator-lowering-fma.f6459.4

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, y, 1\right)}} \]
    10. Simplified59.4%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, y, 1\right)}} \]

    if -1.4999999999999999e286 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -4.0000000000000003e244

    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 b around inf

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      3. *-lowering-*.f6455.1

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified55.1%

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. Taylor expanded in a around 0

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right) \]
      4. +-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right) + \left(\mathsf{neg}\left(b\right)\right)}, 1\right) \]
      5. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\frac{1}{2} \cdot a\right) \cdot \color{blue}{\left(b \cdot b\right)} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      7. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      8. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
      11. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
      12. *-lowering-*.f642.3

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
    8. Simplified2.3%

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(0.5 \cdot a, b, -1\right), 1\right)} \]
    9. Taylor expanded in a around inf

      \[\leadsto \color{blue}{{a}^{2} \cdot \left(-1 \cdot \frac{b \cdot x}{a} + \left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right) + \frac{x}{{a}^{2}}\right)\right)} \]
    10. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \color{blue}{\left(a \cdot a\right)} \cdot \left(-1 \cdot \frac{b \cdot x}{a} + \left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right) + \frac{x}{{a}^{2}}\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto \color{blue}{a \cdot \left(a \cdot \left(-1 \cdot \frac{b \cdot x}{a} + \left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right) + \frac{x}{{a}^{2}}\right)\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{a \cdot \left(a \cdot \left(-1 \cdot \frac{b \cdot x}{a} + \left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right) + \frac{x}{{a}^{2}}\right)\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto a \cdot \color{blue}{\left(a \cdot \left(-1 \cdot \frac{b \cdot x}{a} + \left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right) + \frac{x}{{a}^{2}}\right)\right)\right)} \]
      5. associate-+r+N/A

        \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(\left(-1 \cdot \frac{b \cdot x}{a} + \frac{1}{2} \cdot \left({b}^{2} \cdot x\right)\right) + \frac{x}{{a}^{2}}\right)}\right) \]
    11. Simplified9.4%

      \[\leadsto \color{blue}{a \cdot \left(a \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, x \cdot 0.5, \frac{x}{-a}\right), \frac{x}{a \cdot a}\right)\right)} \]
    12. Taylor expanded in b around 0

      \[\leadsto a \cdot \left(a \cdot \color{blue}{\frac{x}{{a}^{2}}}\right) \]
    13. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto a \cdot \left(a \cdot \color{blue}{\frac{x}{{a}^{2}}}\right) \]
      2. unpow2N/A

        \[\leadsto a \cdot \left(a \cdot \frac{x}{\color{blue}{a \cdot a}}\right) \]
      3. *-lowering-*.f6455.3

        \[\leadsto a \cdot \left(a \cdot \frac{x}{\color{blue}{a \cdot a}}\right) \]
    14. Simplified55.3%

      \[\leadsto a \cdot \left(a \cdot \color{blue}{\frac{x}{a \cdot a}}\right) \]

    if -4.0000000000000003e244 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10

    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 b around inf

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      3. *-lowering-*.f6442.4

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified42.4%

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. Taylor expanded in a around 0

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right) \]
      4. +-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right) + \left(\mathsf{neg}\left(b\right)\right)}, 1\right) \]
      5. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\frac{1}{2} \cdot a\right) \cdot \color{blue}{\left(b \cdot b\right)} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      7. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      8. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
      11. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
      12. *-lowering-*.f643.0

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
    8. Simplified3.0%

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(0.5 \cdot a, b, -1\right), 1\right)} \]
    9. Taylor expanded in b around inf

      \[\leadsto x \cdot \color{blue}{\left({b}^{2} \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)} \]
    10. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto x \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)}\right) \]
      5. associate-*r/N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{\frac{-1 \cdot a}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\frac{\color{blue}{a \cdot -1}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      7. associate-/l*N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{a \cdot \frac{-1}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \frac{\color{blue}{\mathsf{neg}\left(1\right)}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      9. distribute-neg-fracN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{1}{b}\right)\right)} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{{a}^{2} \cdot \frac{1}{2}}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{\left(a \cdot a\right)} \cdot \frac{1}{2}\right)\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{a \cdot \left(a \cdot \frac{1}{2}\right)}\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + a \cdot \color{blue}{\left(\frac{1}{2} \cdot a\right)}\right)\right)\right) \]
      14. distribute-lft-outN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \frac{1}{2} \cdot a\right)\right)}\right)\right) \]
      15. +-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)}\right)\right)\right) \]
      16. sub-negN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a - \frac{1}{b}\right)}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\frac{1}{2} \cdot a - \frac{1}{b}\right)\right)}\right)\right) \]
      18. sub-negN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)}\right)\right)\right) \]
      19. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\color{blue}{a \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)\right)\right)\right) \]
      20. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\mathsf{fma}\left(a, \frac{1}{2}, \mathsf{neg}\left(\frac{1}{b}\right)\right)}\right)\right)\right) \]
      21. distribute-neg-fracN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \color{blue}{\frac{\mathsf{neg}\left(1\right)}{b}}\right)\right)\right)\right) \]
      22. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \frac{\color{blue}{-1}}{b}\right)\right)\right)\right) \]
      23. /-lowering-/.f6434.0

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \color{blue}{\frac{-1}{b}}\right)\right)\right)\right) \]
    11. Simplified34.0%

      \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \frac{-1}{b}\right)\right)\right)\right)} \]
    12. Taylor expanded in b around inf

      \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right) \]
    13. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \left(\frac{1}{2} \cdot \color{blue}{\left({a}^{2} \cdot b\right)}\right)\right) \]
      3. unpow2N/A

        \[\leadsto x \cdot \left(b \cdot \left(\frac{1}{2} \cdot \left(\color{blue}{\left(a \cdot a\right)} \cdot b\right)\right)\right) \]
      4. *-lowering-*.f6451.1

        \[\leadsto x \cdot \left(b \cdot \left(0.5 \cdot \left(\color{blue}{\left(a \cdot a\right)} \cdot b\right)\right)\right) \]
    14. Simplified51.1%

      \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(0.5 \cdot \left(\left(a \cdot a\right) \cdot b\right)\right)}\right) \]

    if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

    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 b around inf

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      3. *-lowering-*.f6462.3

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified62.3%

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. 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)} \]
    7. 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. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(b, -1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right), 1\right)} \]
      3. +-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + -1 \cdot a}, 1\right) \]
      4. *-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{\left({a}^{2} \cdot b\right) \cdot \frac{1}{2}} + -1 \cdot a, 1\right) \]
      5. *-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{\left(b \cdot {a}^{2}\right)} \cdot \frac{1}{2} + -1 \cdot a, 1\right) \]
      6. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{b \cdot \left({a}^{2} \cdot \frac{1}{2}\right)} + -1 \cdot a, 1\right) \]
      7. *-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, b \cdot \color{blue}{\left(\frac{1}{2} \cdot {a}^{2}\right)} + -1 \cdot a, 1\right) \]
      8. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{\mathsf{fma}\left(b, \frac{1}{2} \cdot {a}^{2}, -1 \cdot a\right)}, 1\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \color{blue}{\frac{1}{2} \cdot {a}^{2}}, -1 \cdot a\right), 1\right) \]
      10. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \frac{1}{2} \cdot \color{blue}{\left(a \cdot a\right)}, -1 \cdot a\right), 1\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \frac{1}{2} \cdot \color{blue}{\left(a \cdot a\right)}, -1 \cdot a\right), 1\right) \]
      12. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, \frac{1}{2} \cdot \left(a \cdot a\right), \color{blue}{\mathsf{neg}\left(a\right)}\right), 1\right) \]
      13. neg-lowering-neg.f6461.1

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), \color{blue}{-a}\right), 1\right) \]
    8. Simplified61.1%

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(b, \mathsf{fma}\left(b, 0.5 \cdot \left(a \cdot a\right), -a\right), 1\right)} \]
    9. Taylor expanded in b around inf

      \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)}, 1\right) \]
    10. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{\left({a}^{2} \cdot b\right) \cdot \frac{1}{2}}, 1\right) \]
      2. *-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{\left(b \cdot {a}^{2}\right)} \cdot \frac{1}{2}, 1\right) \]
      3. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{b \cdot \left({a}^{2} \cdot \frac{1}{2}\right)}, 1\right) \]
      4. *-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, b \cdot \color{blue}{\left(\frac{1}{2} \cdot {a}^{2}\right)}, 1\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{b \cdot \left(\frac{1}{2} \cdot {a}^{2}\right)}, 1\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, b \cdot \color{blue}{\left(\frac{1}{2} \cdot {a}^{2}\right)}, 1\right) \]
      7. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, b \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(a \cdot a\right)}\right), 1\right) \]
      8. *-lowering-*.f6460.8

        \[\leadsto x \cdot \mathsf{fma}\left(b, b \cdot \left(0.5 \cdot \color{blue}{\left(a \cdot a\right)}\right), 1\right) \]
    11. Simplified60.8%

      \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right)}, 1\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification58.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 -1.5 \cdot 10^{+286}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -4 \cdot 10^{+244}:\\ \;\;\;\;a \cdot \left(a \cdot \frac{x}{a \cdot a}\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -20000000000:\\ \;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right), 1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 54.5% 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 -\infty:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\ \mathbf{elif}\;t\_1 \leq -20000000000:\\ \;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 0.0002:\\ \;\;\;\;\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(a \cdot \left(x \cdot \left(0.5 \cdot \left(b \cdot b\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 (- INFINITY))
     (/ x (fma t y 1.0))
     (if (<= t_1 -20000000000.0)
       (* x (* b (* 0.5 (* b (* a a)))))
       (if (<= t_1 0.0002)
         (fma (- (- z) b) (* x a) x)
         (* a (* a (* x (* 0.5 (* b 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 <= -((double) INFINITY)) {
		tmp = x / fma(t, y, 1.0);
	} else if (t_1 <= -20000000000.0) {
		tmp = x * (b * (0.5 * (b * (a * a))));
	} else if (t_1 <= 0.0002) {
		tmp = fma((-z - b), (x * a), x);
	} else {
		tmp = a * (a * (x * (0.5 * (b * 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 <= Float64(-Inf))
		tmp = Float64(x / fma(t, y, 1.0));
	elseif (t_1 <= -20000000000.0)
		tmp = Float64(x * Float64(b * Float64(0.5 * Float64(b * Float64(a * a)))));
	elseif (t_1 <= 0.0002)
		tmp = fma(Float64(Float64(-z) - b), Float64(x * a), x);
	else
		tmp = Float64(a * Float64(a * Float64(x * Float64(0.5 * Float64(b * b)))));
	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, (-Infinity)], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0002], N[(N[((-z) - b), $MachinePrecision] * N[(x * a), $MachinePrecision] + x), $MachinePrecision], N[(a * N[(a * N[(x * N[(0.5 * N[(b * b), $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 -\infty:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\

\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\

\mathbf{elif}\;t\_1 \leq 0.0002:\\
\;\;\;\;\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)\\

\mathbf{else}:\\
\;\;\;\;a \cdot \left(a \cdot \left(x \cdot \left(0.5 \cdot \left(b \cdot b\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))) < -inf.0

    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. *-commutativeN/A

        \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. neg-lowering-neg.f6476.9

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Simplified76.9%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Step-by-step derivation
      1. exp-prodN/A

        \[\leadsto x \cdot \color{blue}{{\left(e^{y}\right)}^{\left(\mathsf{neg}\left(t\right)\right)}} \]
      2. pow-negN/A

        \[\leadsto x \cdot \color{blue}{\frac{1}{{\left(e^{y}\right)}^{t}}} \]
      3. un-div-invN/A

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      5. pow-expN/A

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      6. exp-lowering-exp.f64N/A

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      7. *-lowering-*.f6476.9

        \[\leadsto \frac{x}{e^{\color{blue}{y \cdot t}}} \]
    7. Applied egg-rr76.9%

      \[\leadsto \color{blue}{\frac{x}{e^{y \cdot t}}} \]
    8. Taylor expanded in y around 0

      \[\leadsto \frac{x}{\color{blue}{1 + t \cdot y}} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{t \cdot y + 1}} \]
      2. accelerator-lowering-fma.f6463.5

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, y, 1\right)}} \]
    10. Simplified63.5%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, y, 1\right)}} \]

    if -inf.0 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10

    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 b around inf

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      3. *-lowering-*.f6442.0

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified42.0%

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. Taylor expanded in a around 0

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right) \]
      4. +-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right) + \left(\mathsf{neg}\left(b\right)\right)}, 1\right) \]
      5. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\frac{1}{2} \cdot a\right) \cdot \color{blue}{\left(b \cdot b\right)} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      7. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      8. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
      11. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
      12. *-lowering-*.f642.9

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
    8. Simplified2.9%

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(0.5 \cdot a, b, -1\right), 1\right)} \]
    9. Taylor expanded in b around inf

      \[\leadsto x \cdot \color{blue}{\left({b}^{2} \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)} \]
    10. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto x \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)}\right) \]
      5. associate-*r/N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{\frac{-1 \cdot a}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\frac{\color{blue}{a \cdot -1}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      7. associate-/l*N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{a \cdot \frac{-1}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \frac{\color{blue}{\mathsf{neg}\left(1\right)}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      9. distribute-neg-fracN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{1}{b}\right)\right)} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{{a}^{2} \cdot \frac{1}{2}}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{\left(a \cdot a\right)} \cdot \frac{1}{2}\right)\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{a \cdot \left(a \cdot \frac{1}{2}\right)}\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + a \cdot \color{blue}{\left(\frac{1}{2} \cdot a\right)}\right)\right)\right) \]
      14. distribute-lft-outN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \frac{1}{2} \cdot a\right)\right)}\right)\right) \]
      15. +-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)}\right)\right)\right) \]
      16. sub-negN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a - \frac{1}{b}\right)}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\frac{1}{2} \cdot a - \frac{1}{b}\right)\right)}\right)\right) \]
      18. sub-negN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)}\right)\right)\right) \]
      19. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\color{blue}{a \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)\right)\right)\right) \]
      20. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\mathsf{fma}\left(a, \frac{1}{2}, \mathsf{neg}\left(\frac{1}{b}\right)\right)}\right)\right)\right) \]
      21. distribute-neg-fracN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \color{blue}{\frac{\mathsf{neg}\left(1\right)}{b}}\right)\right)\right)\right) \]
      22. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \frac{\color{blue}{-1}}{b}\right)\right)\right)\right) \]
      23. /-lowering-/.f6431.8

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \color{blue}{\frac{-1}{b}}\right)\right)\right)\right) \]
    11. Simplified31.8%

      \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \frac{-1}{b}\right)\right)\right)\right)} \]
    12. Taylor expanded in b around inf

      \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right) \]
    13. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \left(\frac{1}{2} \cdot \color{blue}{\left({a}^{2} \cdot b\right)}\right)\right) \]
      3. unpow2N/A

        \[\leadsto x \cdot \left(b \cdot \left(\frac{1}{2} \cdot \left(\color{blue}{\left(a \cdot a\right)} \cdot b\right)\right)\right) \]
      4. *-lowering-*.f6446.1

        \[\leadsto x \cdot \left(b \cdot \left(0.5 \cdot \left(\color{blue}{\left(a \cdot a\right)} \cdot b\right)\right)\right) \]
    14. Simplified46.1%

      \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(0.5 \cdot \left(\left(a \cdot a\right) \cdot b\right)\right)}\right) \]

    if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 2.0000000000000001e-4

    1. Initial program 88.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 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. sub-negN/A

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)} - b\right)} \]
      4. accelerator-lowering-log1p.f64N/A

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
      5. neg-lowering-neg.f6497.1

        \[\leadsto x \cdot e^{a \cdot \left(\mathsf{log1p}\left(\color{blue}{-z}\right) - b\right)} \]
    5. Simplified97.1%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in z around 0

      \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(-1 \cdot z - b\right)}} \]
    7. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(-1 \cdot z - b\right)}} \]
      2. mul-1-negN/A

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
      3. neg-lowering-neg.f6497.1

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(-z\right)} - b\right)} \]
    8. Simplified97.1%

      \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\left(-z\right) - b\right)}} \]
    9. Taylor expanded in a around 0

      \[\leadsto \color{blue}{x + -1 \cdot \left(a \cdot \left(x \cdot \left(b + z\right)\right)\right)} \]
    10. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(x \cdot \left(b + z\right)\right)\right) + x} \]
      2. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(x \cdot \left(b + z\right)\right)\right)\right)} + x \]
      3. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(x \cdot \left(b + z\right)\right) \cdot a}\right)\right) + x \]
      4. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\left(b + z\right) \cdot x\right)} \cdot a\right)\right) + x \]
      5. associate-*l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(b + z\right) \cdot \left(x \cdot a\right)}\right)\right) + x \]
      6. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\left(b + z\right) \cdot \color{blue}{\left(a \cdot x\right)}\right)\right) + x \]
      7. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(b + z\right)\right)\right) \cdot \left(a \cdot x\right)} + x \]
      8. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(b + z\right)\right)} \cdot \left(a \cdot x\right) + x \]
      9. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(b + z\right), a \cdot x, x\right)} \]
      10. distribute-lft-inN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot b + -1 \cdot z}, a \cdot x, x\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot z + -1 \cdot b}, a \cdot x, x\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(-1 \cdot z + \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}, a \cdot x, x\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot z - b}, a \cdot x, x\right) \]
      14. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot z - b}, a \cdot x, x\right) \]
      15. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b, a \cdot x, x\right) \]
      16. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b, a \cdot x, x\right) \]
      17. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(z\right)\right) - b, \color{blue}{x \cdot a}, x\right) \]
      18. *-lowering-*.f6485.2

        \[\leadsto \mathsf{fma}\left(\left(-z\right) - b, \color{blue}{x \cdot a}, x\right) \]
    11. Simplified85.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)} \]

    if 2.0000000000000001e-4 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

    1. Initial program 96.2%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      3. *-lowering-*.f6450.6

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified50.6%

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. Taylor expanded in a around 0

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right) \]
      4. +-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right) + \left(\mathsf{neg}\left(b\right)\right)}, 1\right) \]
      5. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\frac{1}{2} \cdot a\right) \cdot \color{blue}{\left(b \cdot b\right)} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      7. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      8. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
      11. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
      12. *-lowering-*.f6443.5

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
    8. Simplified43.5%

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(0.5 \cdot a, b, -1\right), 1\right)} \]
    9. Taylor expanded in a around inf

      \[\leadsto \color{blue}{{a}^{2} \cdot \left(-1 \cdot \frac{b \cdot x}{a} + \left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right) + \frac{x}{{a}^{2}}\right)\right)} \]
    10. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \color{blue}{\left(a \cdot a\right)} \cdot \left(-1 \cdot \frac{b \cdot x}{a} + \left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right) + \frac{x}{{a}^{2}}\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto \color{blue}{a \cdot \left(a \cdot \left(-1 \cdot \frac{b \cdot x}{a} + \left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right) + \frac{x}{{a}^{2}}\right)\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{a \cdot \left(a \cdot \left(-1 \cdot \frac{b \cdot x}{a} + \left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right) + \frac{x}{{a}^{2}}\right)\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto a \cdot \color{blue}{\left(a \cdot \left(-1 \cdot \frac{b \cdot x}{a} + \left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right) + \frac{x}{{a}^{2}}\right)\right)\right)} \]
      5. associate-+r+N/A

        \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(\left(-1 \cdot \frac{b \cdot x}{a} + \frac{1}{2} \cdot \left({b}^{2} \cdot x\right)\right) + \frac{x}{{a}^{2}}\right)}\right) \]
    11. Simplified53.2%

      \[\leadsto \color{blue}{a \cdot \left(a \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, x \cdot 0.5, \frac{x}{-a}\right), \frac{x}{a \cdot a}\right)\right)} \]
    12. Taylor expanded in b around inf

      \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right)\right)}\right) \]
    13. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(\left(\frac{1}{2} \cdot {b}^{2}\right) \cdot x\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(x \cdot \left(\frac{1}{2} \cdot {b}^{2}\right)\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(x \cdot \left(\frac{1}{2} \cdot {b}^{2}\right)\right)}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto a \cdot \left(a \cdot \left(x \cdot \color{blue}{\left(\frac{1}{2} \cdot {b}^{2}\right)}\right)\right) \]
      5. unpow2N/A

        \[\leadsto a \cdot \left(a \cdot \left(x \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(b \cdot b\right)}\right)\right)\right) \]
      6. *-lowering-*.f6448.3

        \[\leadsto a \cdot \left(a \cdot \left(x \cdot \left(0.5 \cdot \color{blue}{\left(b \cdot b\right)}\right)\right)\right) \]
    14. Simplified48.3%

      \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(x \cdot \left(0.5 \cdot \left(b \cdot b\right)\right)\right)}\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification56.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 -\infty:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -20000000000:\\ \;\;\;\;x \cdot \left(b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 0.0002:\\ \;\;\;\;\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(a \cdot \left(x \cdot \left(0.5 \cdot \left(b \cdot b\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 54.2% 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)\\ t_2 := a \cdot \left(a \cdot \left(x \cdot \left(0.5 \cdot \left(b \cdot b\right)\right)\right)\right)\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\ \mathbf{elif}\;t\_1 \leq -20000000000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 0.0002:\\ \;\;\;\;\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \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))))
        (t_2 (* a (* a (* x (* 0.5 (* b b)))))))
   (if (<= t_1 (- INFINITY))
     (/ x (fma t y 1.0))
     (if (<= t_1 -20000000000.0)
       t_2
       (if (<= t_1 0.0002) (fma (- (- z) b) (* x a) x) t_2)))))
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 t_2 = a * (a * (x * (0.5 * (b * b))));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = x / fma(t, y, 1.0);
	} else if (t_1 <= -20000000000.0) {
		tmp = t_2;
	} else if (t_1 <= 0.0002) {
		tmp = fma((-z - b), (x * a), x);
	} else {
		tmp = t_2;
	}
	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)))
	t_2 = Float64(a * Float64(a * Float64(x * Float64(0.5 * Float64(b * b)))))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(x / fma(t, y, 1.0));
	elseif (t_1 <= -20000000000.0)
		tmp = t_2;
	elseif (t_1 <= 0.0002)
		tmp = fma(Float64(Float64(-z) - b), Float64(x * a), x);
	else
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(a * N[(a * N[(x * N[(0.5 * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], t$95$2, If[LessEqual[t$95$1, 0.0002], N[(N[((-z) - b), $MachinePrecision] * N[(x * a), $MachinePrecision] + x), $MachinePrecision], t$95$2]]]]]
\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)\\
t_2 := a \cdot \left(a \cdot \left(x \cdot \left(0.5 \cdot \left(b \cdot b\right)\right)\right)\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\

\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 0.0002:\\
\;\;\;\;\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\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))) < -inf.0

    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. *-commutativeN/A

        \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. neg-lowering-neg.f6476.9

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Simplified76.9%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Step-by-step derivation
      1. exp-prodN/A

        \[\leadsto x \cdot \color{blue}{{\left(e^{y}\right)}^{\left(\mathsf{neg}\left(t\right)\right)}} \]
      2. pow-negN/A

        \[\leadsto x \cdot \color{blue}{\frac{1}{{\left(e^{y}\right)}^{t}}} \]
      3. un-div-invN/A

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      5. pow-expN/A

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      6. exp-lowering-exp.f64N/A

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      7. *-lowering-*.f6476.9

        \[\leadsto \frac{x}{e^{\color{blue}{y \cdot t}}} \]
    7. Applied egg-rr76.9%

      \[\leadsto \color{blue}{\frac{x}{e^{y \cdot t}}} \]
    8. Taylor expanded in y around 0

      \[\leadsto \frac{x}{\color{blue}{1 + t \cdot y}} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{t \cdot y + 1}} \]
      2. accelerator-lowering-fma.f6463.5

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, y, 1\right)}} \]
    10. Simplified63.5%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, y, 1\right)}} \]

    if -inf.0 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10 or 2.0000000000000001e-4 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

    1. Initial program 97.9%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      3. *-lowering-*.f6446.9

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified46.9%

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. Taylor expanded in a around 0

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right) \]
      4. +-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right) + \left(\mathsf{neg}\left(b\right)\right)}, 1\right) \]
      5. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\frac{1}{2} \cdot a\right) \cdot \color{blue}{\left(b \cdot b\right)} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      7. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      8. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
      11. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
      12. *-lowering-*.f6425.8

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
    8. Simplified25.8%

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(0.5 \cdot a, b, -1\right), 1\right)} \]
    9. Taylor expanded in a around inf

      \[\leadsto \color{blue}{{a}^{2} \cdot \left(-1 \cdot \frac{b \cdot x}{a} + \left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right) + \frac{x}{{a}^{2}}\right)\right)} \]
    10. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \color{blue}{\left(a \cdot a\right)} \cdot \left(-1 \cdot \frac{b \cdot x}{a} + \left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right) + \frac{x}{{a}^{2}}\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto \color{blue}{a \cdot \left(a \cdot \left(-1 \cdot \frac{b \cdot x}{a} + \left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right) + \frac{x}{{a}^{2}}\right)\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{a \cdot \left(a \cdot \left(-1 \cdot \frac{b \cdot x}{a} + \left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right) + \frac{x}{{a}^{2}}\right)\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto a \cdot \color{blue}{\left(a \cdot \left(-1 \cdot \frac{b \cdot x}{a} + \left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right) + \frac{x}{{a}^{2}}\right)\right)\right)} \]
      5. associate-+r+N/A

        \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(\left(-1 \cdot \frac{b \cdot x}{a} + \frac{1}{2} \cdot \left({b}^{2} \cdot x\right)\right) + \frac{x}{{a}^{2}}\right)}\right) \]
    11. Simplified35.2%

      \[\leadsto \color{blue}{a \cdot \left(a \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, x \cdot 0.5, \frac{x}{-a}\right), \frac{x}{a \cdot a}\right)\right)} \]
    12. Taylor expanded in b around inf

      \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right)\right)}\right) \]
    13. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(\left(\frac{1}{2} \cdot {b}^{2}\right) \cdot x\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(x \cdot \left(\frac{1}{2} \cdot {b}^{2}\right)\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(x \cdot \left(\frac{1}{2} \cdot {b}^{2}\right)\right)}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto a \cdot \left(a \cdot \left(x \cdot \color{blue}{\left(\frac{1}{2} \cdot {b}^{2}\right)}\right)\right) \]
      5. unpow2N/A

        \[\leadsto a \cdot \left(a \cdot \left(x \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(b \cdot b\right)}\right)\right)\right) \]
      6. *-lowering-*.f6446.8

        \[\leadsto a \cdot \left(a \cdot \left(x \cdot \left(0.5 \cdot \color{blue}{\left(b \cdot b\right)}\right)\right)\right) \]
    14. Simplified46.8%

      \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(x \cdot \left(0.5 \cdot \left(b \cdot b\right)\right)\right)}\right) \]

    if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 2.0000000000000001e-4

    1. Initial program 88.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 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. sub-negN/A

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)} - b\right)} \]
      4. accelerator-lowering-log1p.f64N/A

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
      5. neg-lowering-neg.f6497.1

        \[\leadsto x \cdot e^{a \cdot \left(\mathsf{log1p}\left(\color{blue}{-z}\right) - b\right)} \]
    5. Simplified97.1%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in z around 0

      \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(-1 \cdot z - b\right)}} \]
    7. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(-1 \cdot z - b\right)}} \]
      2. mul-1-negN/A

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
      3. neg-lowering-neg.f6497.1

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(-z\right)} - b\right)} \]
    8. Simplified97.1%

      \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\left(-z\right) - b\right)}} \]
    9. Taylor expanded in a around 0

      \[\leadsto \color{blue}{x + -1 \cdot \left(a \cdot \left(x \cdot \left(b + z\right)\right)\right)} \]
    10. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(x \cdot \left(b + z\right)\right)\right) + x} \]
      2. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(x \cdot \left(b + z\right)\right)\right)\right)} + x \]
      3. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(x \cdot \left(b + z\right)\right) \cdot a}\right)\right) + x \]
      4. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\left(b + z\right) \cdot x\right)} \cdot a\right)\right) + x \]
      5. associate-*l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(b + z\right) \cdot \left(x \cdot a\right)}\right)\right) + x \]
      6. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\left(b + z\right) \cdot \color{blue}{\left(a \cdot x\right)}\right)\right) + x \]
      7. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(b + z\right)\right)\right) \cdot \left(a \cdot x\right)} + x \]
      8. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(b + z\right)\right)} \cdot \left(a \cdot x\right) + x \]
      9. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(b + z\right), a \cdot x, x\right)} \]
      10. distribute-lft-inN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot b + -1 \cdot z}, a \cdot x, x\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot z + -1 \cdot b}, a \cdot x, x\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(-1 \cdot z + \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}, a \cdot x, x\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot z - b}, a \cdot x, x\right) \]
      14. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot z - b}, a \cdot x, x\right) \]
      15. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b, a \cdot x, x\right) \]
      16. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b, a \cdot x, x\right) \]
      17. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(z\right)\right) - b, \color{blue}{x \cdot a}, x\right) \]
      18. *-lowering-*.f6485.2

        \[\leadsto \mathsf{fma}\left(\left(-z\right) - b, \color{blue}{x \cdot a}, x\right) \]
    11. Simplified85.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 13: 39.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 -\infty:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\ \mathbf{elif}\;t\_1 \leq -20000000000:\\ \;\;\;\;-x \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+152}:\\ \;\;\;\;\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\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 (- INFINITY))
     (/ x (fma t y 1.0))
     (if (<= t_1 -20000000000.0)
       (- (* x (* a b)))
       (if (<= t_1 1e+152)
         (fma (- (- z) b) (* x a) x)
         (* x (- 1.0 (* 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 <= -((double) INFINITY)) {
		tmp = x / fma(t, y, 1.0);
	} else if (t_1 <= -20000000000.0) {
		tmp = -(x * (a * b));
	} else if (t_1 <= 1e+152) {
		tmp = fma((-z - b), (x * a), x);
	} else {
		tmp = x * (1.0 - (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 <= Float64(-Inf))
		tmp = Float64(x / fma(t, y, 1.0));
	elseif (t_1 <= -20000000000.0)
		tmp = Float64(-Float64(x * Float64(a * b)));
	elseif (t_1 <= 1e+152)
		tmp = fma(Float64(Float64(-z) - b), Float64(x * a), x);
	else
		tmp = Float64(x * Float64(1.0 - 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, (-Infinity)], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000.0], (-N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), If[LessEqual[t$95$1, 1e+152], N[(N[((-z) - b), $MachinePrecision] * N[(x * a), $MachinePrecision] + x), $MachinePrecision], N[(x * N[(1.0 - N[(y * t), $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 -\infty:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\

\mathbf{elif}\;t\_1 \leq -20000000000:\\
\;\;\;\;-x \cdot \left(a \cdot b\right)\\

\mathbf{elif}\;t\_1 \leq 10^{+152}:\\
\;\;\;\;\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\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))) < -inf.0

    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. *-commutativeN/A

        \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. neg-lowering-neg.f6476.9

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Simplified76.9%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Step-by-step derivation
      1. exp-prodN/A

        \[\leadsto x \cdot \color{blue}{{\left(e^{y}\right)}^{\left(\mathsf{neg}\left(t\right)\right)}} \]
      2. pow-negN/A

        \[\leadsto x \cdot \color{blue}{\frac{1}{{\left(e^{y}\right)}^{t}}} \]
      3. un-div-invN/A

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      5. pow-expN/A

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      6. exp-lowering-exp.f64N/A

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      7. *-lowering-*.f6476.9

        \[\leadsto \frac{x}{e^{\color{blue}{y \cdot t}}} \]
    7. Applied egg-rr76.9%

      \[\leadsto \color{blue}{\frac{x}{e^{y \cdot t}}} \]
    8. Taylor expanded in y around 0

      \[\leadsto \frac{x}{\color{blue}{1 + t \cdot y}} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{t \cdot y + 1}} \]
      2. accelerator-lowering-fma.f6463.5

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, y, 1\right)}} \]
    10. Simplified63.5%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, y, 1\right)}} \]

    if -inf.0 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e10

    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 b around inf

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      3. *-lowering-*.f6442.0

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified42.0%

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. Taylor expanded in a around 0

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right) \]
      4. +-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right) + \left(\mathsf{neg}\left(b\right)\right)}, 1\right) \]
      5. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\frac{1}{2} \cdot a\right) \cdot \color{blue}{\left(b \cdot b\right)} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      7. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      8. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
      11. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
      12. *-lowering-*.f642.9

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
    8. Simplified2.9%

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(0.5 \cdot a, b, -1\right), 1\right)} \]
    9. Taylor expanded in b around inf

      \[\leadsto x \cdot \color{blue}{\left({b}^{2} \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)} \]
    10. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto x \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)}\right) \]
      5. associate-*r/N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{\frac{-1 \cdot a}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\frac{\color{blue}{a \cdot -1}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      7. associate-/l*N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{a \cdot \frac{-1}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \frac{\color{blue}{\mathsf{neg}\left(1\right)}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      9. distribute-neg-fracN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{1}{b}\right)\right)} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{{a}^{2} \cdot \frac{1}{2}}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{\left(a \cdot a\right)} \cdot \frac{1}{2}\right)\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{a \cdot \left(a \cdot \frac{1}{2}\right)}\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + a \cdot \color{blue}{\left(\frac{1}{2} \cdot a\right)}\right)\right)\right) \]
      14. distribute-lft-outN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \frac{1}{2} \cdot a\right)\right)}\right)\right) \]
      15. +-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)}\right)\right)\right) \]
      16. sub-negN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a - \frac{1}{b}\right)}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\frac{1}{2} \cdot a - \frac{1}{b}\right)\right)}\right)\right) \]
      18. sub-negN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)}\right)\right)\right) \]
      19. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\color{blue}{a \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)\right)\right)\right) \]
      20. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\mathsf{fma}\left(a, \frac{1}{2}, \mathsf{neg}\left(\frac{1}{b}\right)\right)}\right)\right)\right) \]
      21. distribute-neg-fracN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \color{blue}{\frac{\mathsf{neg}\left(1\right)}{b}}\right)\right)\right)\right) \]
      22. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \frac{\color{blue}{-1}}{b}\right)\right)\right)\right) \]
      23. /-lowering-/.f6431.8

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \color{blue}{\frac{-1}{b}}\right)\right)\right)\right) \]
    11. Simplified31.8%

      \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \frac{-1}{b}\right)\right)\right)\right)} \]
    12. Taylor expanded in b around 0

      \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-1 \cdot a\right)}\right) \]
    13. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right) \]
      2. neg-lowering-neg.f6421.3

        \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-a\right)}\right) \]
    14. Simplified21.3%

      \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-a\right)}\right) \]

    if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1e152

    1. Initial program 91.2%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. *-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. sub-negN/A

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)} - b\right)} \]
      4. accelerator-lowering-log1p.f64N/A

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
      5. neg-lowering-neg.f6486.2

        \[\leadsto x \cdot e^{a \cdot \left(\mathsf{log1p}\left(\color{blue}{-z}\right) - b\right)} \]
    5. Simplified86.2%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in z around 0

      \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(-1 \cdot z - b\right)}} \]
    7. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(-1 \cdot z - b\right)}} \]
      2. mul-1-negN/A

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
      3. neg-lowering-neg.f6486.2

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(-z\right)} - b\right)} \]
    8. Simplified86.2%

      \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\left(-z\right) - b\right)}} \]
    9. Taylor expanded in a around 0

      \[\leadsto \color{blue}{x + -1 \cdot \left(a \cdot \left(x \cdot \left(b + z\right)\right)\right)} \]
    10. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(x \cdot \left(b + z\right)\right)\right) + x} \]
      2. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(x \cdot \left(b + z\right)\right)\right)\right)} + x \]
      3. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(x \cdot \left(b + z\right)\right) \cdot a}\right)\right) + x \]
      4. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\left(b + z\right) \cdot x\right)} \cdot a\right)\right) + x \]
      5. associate-*l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(b + z\right) \cdot \left(x \cdot a\right)}\right)\right) + x \]
      6. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\left(b + z\right) \cdot \color{blue}{\left(a \cdot x\right)}\right)\right) + x \]
      7. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(b + z\right)\right)\right) \cdot \left(a \cdot x\right)} + x \]
      8. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(b + z\right)\right)} \cdot \left(a \cdot x\right) + x \]
      9. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(b + z\right), a \cdot x, x\right)} \]
      10. distribute-lft-inN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot b + -1 \cdot z}, a \cdot x, x\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot z + -1 \cdot b}, a \cdot x, x\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(-1 \cdot z + \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}, a \cdot x, x\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot z - b}, a \cdot x, x\right) \]
      14. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot z - b}, a \cdot x, x\right) \]
      15. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b, a \cdot x, x\right) \]
      16. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b, a \cdot x, x\right) \]
      17. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(z\right)\right) - b, \color{blue}{x \cdot a}, x\right) \]
      18. *-lowering-*.f6457.8

        \[\leadsto \mathsf{fma}\left(\left(-z\right) - b, \color{blue}{x \cdot a}, x\right) \]
    11. Simplified57.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)} \]

    if 1e152 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

    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 t around inf

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(t \cdot y\right)}} \]
      2. *-commutativeN/A

        \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. neg-lowering-neg.f6457.9

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Simplified57.9%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0

      \[\leadsto x \cdot \color{blue}{\left(1 + -1 \cdot \left(t \cdot y\right)\right)} \]
    7. 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. *-lowering-*.f6433.6

        \[\leadsto x \cdot \left(1 - \color{blue}{t \cdot y}\right) \]
    8. Simplified33.6%

      \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification40.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -\infty:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -20000000000:\\ \;\;\;\;-x \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 10^{+152}:\\ \;\;\;\;\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 34.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 -20000000000:\\ \;\;\;\;-x \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+152}:\\ \;\;\;\;\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\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 -20000000000.0)
     (- (* x (* a b)))
     (if (<= t_1 1e+152) (fma (- (- z) b) (* x a) x) (* x (- 1.0 (* 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 <= -20000000000.0) {
		tmp = -(x * (a * b));
	} else if (t_1 <= 1e+152) {
		tmp = fma((-z - b), (x * a), x);
	} else {
		tmp = x * (1.0 - (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 <= -20000000000.0)
		tmp = Float64(-Float64(x * Float64(a * b)));
	elseif (t_1 <= 1e+152)
		tmp = fma(Float64(Float64(-z) - b), Float64(x * a), x);
	else
		tmp = Float64(x * Float64(1.0 - 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, -20000000000.0], (-N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), If[LessEqual[t$95$1, 1e+152], N[(N[((-z) - b), $MachinePrecision] * N[(x * a), $MachinePrecision] + x), $MachinePrecision], N[(x * N[(1.0 - N[(y * t), $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 -20000000000:\\
\;\;\;\;-x \cdot \left(a \cdot b\right)\\

\mathbf{elif}\;t\_1 \leq 10^{+152}:\\
\;\;\;\;\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\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))) < -2e10

    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 b around inf

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      3. *-lowering-*.f6444.5

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified44.5%

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. Taylor expanded in a around 0

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right) \]
      4. +-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right) + \left(\mathsf{neg}\left(b\right)\right)}, 1\right) \]
      5. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\frac{1}{2} \cdot a\right) \cdot \color{blue}{\left(b \cdot b\right)} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      7. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      8. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
      11. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
      12. *-lowering-*.f642.8

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
    8. Simplified2.8%

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(0.5 \cdot a, b, -1\right), 1\right)} \]
    9. Taylor expanded in b around inf

      \[\leadsto x \cdot \color{blue}{\left({b}^{2} \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)} \]
    10. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto x \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)}\right) \]
      5. associate-*r/N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{\frac{-1 \cdot a}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\frac{\color{blue}{a \cdot -1}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      7. associate-/l*N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{a \cdot \frac{-1}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \frac{\color{blue}{\mathsf{neg}\left(1\right)}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      9. distribute-neg-fracN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{1}{b}\right)\right)} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{{a}^{2} \cdot \frac{1}{2}}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{\left(a \cdot a\right)} \cdot \frac{1}{2}\right)\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{a \cdot \left(a \cdot \frac{1}{2}\right)}\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + a \cdot \color{blue}{\left(\frac{1}{2} \cdot a\right)}\right)\right)\right) \]
      14. distribute-lft-outN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \frac{1}{2} \cdot a\right)\right)}\right)\right) \]
      15. +-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)}\right)\right)\right) \]
      16. sub-negN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a - \frac{1}{b}\right)}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\frac{1}{2} \cdot a - \frac{1}{b}\right)\right)}\right)\right) \]
      18. sub-negN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)}\right)\right)\right) \]
      19. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\color{blue}{a \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)\right)\right)\right) \]
      20. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\mathsf{fma}\left(a, \frac{1}{2}, \mathsf{neg}\left(\frac{1}{b}\right)\right)}\right)\right)\right) \]
      21. distribute-neg-fracN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \color{blue}{\frac{\mathsf{neg}\left(1\right)}{b}}\right)\right)\right)\right) \]
      22. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \frac{\color{blue}{-1}}{b}\right)\right)\right)\right) \]
      23. /-lowering-/.f6429.7

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \color{blue}{\frac{-1}{b}}\right)\right)\right)\right) \]
    11. Simplified29.7%

      \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \frac{-1}{b}\right)\right)\right)\right)} \]
    12. Taylor expanded in b around 0

      \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-1 \cdot a\right)}\right) \]
    13. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right) \]
      2. neg-lowering-neg.f6418.5

        \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-a\right)}\right) \]
    14. Simplified18.5%

      \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-a\right)}\right) \]

    if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1e152

    1. Initial program 91.2%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. *-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. sub-negN/A

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)} - b\right)} \]
      4. accelerator-lowering-log1p.f64N/A

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
      5. neg-lowering-neg.f6486.2

        \[\leadsto x \cdot e^{a \cdot \left(\mathsf{log1p}\left(\color{blue}{-z}\right) - b\right)} \]
    5. Simplified86.2%

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
    6. Taylor expanded in z around 0

      \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(-1 \cdot z - b\right)}} \]
    7. Step-by-step derivation
      1. --lowering--.f64N/A

        \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(-1 \cdot z - b\right)}} \]
      2. mul-1-negN/A

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
      3. neg-lowering-neg.f6486.2

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(-z\right)} - b\right)} \]
    8. Simplified86.2%

      \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\left(-z\right) - b\right)}} \]
    9. Taylor expanded in a around 0

      \[\leadsto \color{blue}{x + -1 \cdot \left(a \cdot \left(x \cdot \left(b + z\right)\right)\right)} \]
    10. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(x \cdot \left(b + z\right)\right)\right) + x} \]
      2. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(x \cdot \left(b + z\right)\right)\right)\right)} + x \]
      3. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(x \cdot \left(b + z\right)\right) \cdot a}\right)\right) + x \]
      4. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(\left(b + z\right) \cdot x\right)} \cdot a\right)\right) + x \]
      5. associate-*l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(b + z\right) \cdot \left(x \cdot a\right)}\right)\right) + x \]
      6. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\left(b + z\right) \cdot \color{blue}{\left(a \cdot x\right)}\right)\right) + x \]
      7. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(b + z\right)\right)\right) \cdot \left(a \cdot x\right)} + x \]
      8. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(b + z\right)\right)} \cdot \left(a \cdot x\right) + x \]
      9. accelerator-lowering-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(b + z\right), a \cdot x, x\right)} \]
      10. distribute-lft-inN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot b + -1 \cdot z}, a \cdot x, x\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot z + -1 \cdot b}, a \cdot x, x\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(-1 \cdot z + \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}, a \cdot x, x\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot z - b}, a \cdot x, x\right) \]
      14. --lowering--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot z - b}, a \cdot x, x\right) \]
      15. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b, a \cdot x, x\right) \]
      16. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b, a \cdot x, x\right) \]
      17. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(z\right)\right) - b, \color{blue}{x \cdot a}, x\right) \]
      18. *-lowering-*.f6457.8

        \[\leadsto \mathsf{fma}\left(\left(-z\right) - b, \color{blue}{x \cdot a}, x\right) \]
    11. Simplified57.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)} \]

    if 1e152 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

    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 t around inf

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(t \cdot y\right)}} \]
      2. *-commutativeN/A

        \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. neg-lowering-neg.f6457.9

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Simplified57.9%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0

      \[\leadsto x \cdot \color{blue}{\left(1 + -1 \cdot \left(t \cdot y\right)\right)} \]
    7. 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. *-lowering-*.f6433.6

        \[\leadsto x \cdot \left(1 - \color{blue}{t \cdot y}\right) \]
    8. Simplified33.6%

      \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification36.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 -20000000000:\\ \;\;\;\;-x \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 10^{+152}:\\ \;\;\;\;\mathsf{fma}\left(\left(-z\right) - b, x \cdot a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 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 -20000000000:\\ \;\;\;\;-x \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+65}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot t\right) \cdot \left(-x\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 -20000000000.0)
     (- (* x (* a b)))
     (if (<= t_1 4e+65) x (* (* y t) (- x))))))
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 <= -20000000000.0) {
		tmp = -(x * (a * b));
	} else if (t_1 <= 4e+65) {
		tmp = x;
	} else {
		tmp = (y * t) * -x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
    if (t_1 <= (-20000000000.0d0)) then
        tmp = -(x * (a * b))
    else if (t_1 <= 4d+65) then
        tmp = x
    else
        tmp = (y * t) * -x
    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 <= -20000000000.0) {
		tmp = -(x * (a * b));
	} else if (t_1 <= 4e+65) {
		tmp = x;
	} else {
		tmp = (y * t) * -x;
	}
	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 <= -20000000000.0:
		tmp = -(x * (a * b))
	elif t_1 <= 4e+65:
		tmp = x
	else:
		tmp = (y * t) * -x
	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 <= -20000000000.0)
		tmp = Float64(-Float64(x * Float64(a * b)));
	elseif (t_1 <= 4e+65)
		tmp = x;
	else
		tmp = Float64(Float64(y * t) * Float64(-x));
	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 <= -20000000000.0)
		tmp = -(x * (a * b));
	elseif (t_1 <= 4e+65)
		tmp = x;
	else
		tmp = (y * t) * -x;
	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, -20000000000.0], (-N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), If[LessEqual[t$95$1, 4e+65], x, N[(N[(y * t), $MachinePrecision] * (-x)), $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 -20000000000:\\
\;\;\;\;-x \cdot \left(a \cdot b\right)\\

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+65}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(-x\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))) < -2e10

    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 b around inf

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      3. *-lowering-*.f6444.5

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified44.5%

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. Taylor expanded in a around 0

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
      3. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right) \]
      4. +-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right) + \left(\mathsf{neg}\left(b\right)\right)}, 1\right) \]
      5. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      6. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\frac{1}{2} \cdot a\right) \cdot \color{blue}{\left(b \cdot b\right)} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      7. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
      8. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
      9. distribute-rgt-outN/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
      11. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
      12. *-lowering-*.f642.8

        \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
    8. Simplified2.8%

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(0.5 \cdot a, b, -1\right), 1\right)} \]
    9. Taylor expanded in b around inf

      \[\leadsto x \cdot \color{blue}{\left({b}^{2} \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)} \]
    10. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto x \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)}\right) \]
      5. associate-*r/N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{\frac{-1 \cdot a}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\frac{\color{blue}{a \cdot -1}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      7. associate-/l*N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{a \cdot \frac{-1}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \frac{\color{blue}{\mathsf{neg}\left(1\right)}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      9. distribute-neg-fracN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{1}{b}\right)\right)} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{{a}^{2} \cdot \frac{1}{2}}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{\left(a \cdot a\right)} \cdot \frac{1}{2}\right)\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{a \cdot \left(a \cdot \frac{1}{2}\right)}\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + a \cdot \color{blue}{\left(\frac{1}{2} \cdot a\right)}\right)\right)\right) \]
      14. distribute-lft-outN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \frac{1}{2} \cdot a\right)\right)}\right)\right) \]
      15. +-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)}\right)\right)\right) \]
      16. sub-negN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a - \frac{1}{b}\right)}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\frac{1}{2} \cdot a - \frac{1}{b}\right)\right)}\right)\right) \]
      18. sub-negN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)}\right)\right)\right) \]
      19. *-commutativeN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\color{blue}{a \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)\right)\right)\right) \]
      20. accelerator-lowering-fma.f64N/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\mathsf{fma}\left(a, \frac{1}{2}, \mathsf{neg}\left(\frac{1}{b}\right)\right)}\right)\right)\right) \]
      21. distribute-neg-fracN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \color{blue}{\frac{\mathsf{neg}\left(1\right)}{b}}\right)\right)\right)\right) \]
      22. metadata-evalN/A

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \frac{\color{blue}{-1}}{b}\right)\right)\right)\right) \]
      23. /-lowering-/.f6429.7

        \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \color{blue}{\frac{-1}{b}}\right)\right)\right)\right) \]
    11. Simplified29.7%

      \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \frac{-1}{b}\right)\right)\right)\right)} \]
    12. Taylor expanded in b around 0

      \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-1 \cdot a\right)}\right) \]
    13. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right) \]
      2. neg-lowering-neg.f6418.5

        \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-a\right)}\right) \]
    14. Simplified18.5%

      \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-a\right)}\right) \]

    if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 4e65

    1. Initial program 89.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. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      3. *-lowering-*.f6478.6

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified78.6%

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. Taylor expanded in a around 0

      \[\leadsto \color{blue}{x} \]
    7. Step-by-step derivation
      1. Simplified66.0%

        \[\leadsto \color{blue}{x} \]

      if 4e65 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

      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. *-commutativeN/A

          \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
        3. distribute-rgt-neg-inN/A

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
        4. *-lowering-*.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
        5. neg-lowering-neg.f6453.7

          \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
      5. Simplified53.7%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
      6. Taylor expanded in y around 0

        \[\leadsto x \cdot \color{blue}{\left(1 + -1 \cdot \left(t \cdot y\right)\right)} \]
      7. 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. *-lowering-*.f6427.2

          \[\leadsto x \cdot \left(1 - \color{blue}{t \cdot y}\right) \]
      8. Simplified27.2%

        \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]
      9. Taylor expanded in t around inf

        \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot y\right)\right)} \]
      10. 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. mul-1-negN/A

          \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \left(t \cdot y\right)\right)} \]
        7. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \left(t \cdot y\right)\right)} \]
        8. mul-1-negN/A

          \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(t \cdot y\right)\right)} \]
        9. distribute-rgt-neg-inN/A

          \[\leadsto x \cdot \color{blue}{\left(t \cdot \left(\mathsf{neg}\left(y\right)\right)\right)} \]
        10. mul-1-negN/A

          \[\leadsto x \cdot \left(t \cdot \color{blue}{\left(-1 \cdot y\right)}\right) \]
        11. *-lowering-*.f64N/A

          \[\leadsto x \cdot \color{blue}{\left(t \cdot \left(-1 \cdot y\right)\right)} \]
        12. mul-1-negN/A

          \[\leadsto x \cdot \left(t \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right) \]
        13. neg-lowering-neg.f6426.7

          \[\leadsto x \cdot \left(t \cdot \color{blue}{\left(-y\right)}\right) \]
      11. Simplified26.7%

        \[\leadsto \color{blue}{x \cdot \left(t \cdot \left(-y\right)\right)} \]
    8. Recombined 3 regimes into one program.
    9. Final simplification33.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 -20000000000:\\ \;\;\;\;-x \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 4 \cdot 10^{+65}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot t\right) \cdot \left(-x\right)\\ \end{array} \]
    10. Add Preprocessing

    Alternative 16: 33.9% accurate, 0.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := -x \cdot \left(a \cdot b\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 -20000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+112}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (- (* x (* a b))))
            (t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
       (if (<= t_2 -20000000000.0) t_1 (if (<= t_2 2e+112) x t_1))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = -(x * (a * b));
    	double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
    	double tmp;
    	if (t_2 <= -20000000000.0) {
    		tmp = t_1;
    	} else if (t_2 <= 2e+112) {
    		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 = -(x * (a * b))
        t_2 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
        if (t_2 <= (-20000000000.0d0)) then
            tmp = t_1
        else if (t_2 <= 2d+112) 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 = -(x * (a * b));
    	double t_2 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
    	double tmp;
    	if (t_2 <= -20000000000.0) {
    		tmp = t_1;
    	} else if (t_2 <= 2e+112) {
    		tmp = x;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	t_1 = -(x * (a * b))
    	t_2 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))
    	tmp = 0
    	if t_2 <= -20000000000.0:
    		tmp = t_1
    	elif t_2 <= 2e+112:
    		tmp = x
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(-Float64(x * Float64(a * b)))
    	t_2 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))
    	tmp = 0.0
    	if (t_2 <= -20000000000.0)
    		tmp = t_1;
    	elseif (t_2 <= 2e+112)
    		tmp = x;
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	t_1 = -(x * (a * b));
    	t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
    	tmp = 0.0;
    	if (t_2 <= -20000000000.0)
    		tmp = t_1;
    	elseif (t_2 <= 2e+112)
    		tmp = x;
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = (-N[(x * N[(a * b), $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, -20000000000.0], t$95$1, If[LessEqual[t$95$2, 2e+112], x, t$95$1]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := -x \cdot \left(a \cdot b\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 -20000000000:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+112}:\\
    \;\;\;\;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))) < -2e10 or 1.9999999999999999e112 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

      1. Initial program 98.9%

        \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in b around inf

        \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
        2. neg-lowering-neg.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
        3. *-lowering-*.f6447.3

          \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
      5. Simplified47.3%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      6. Taylor expanded in a around 0

        \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
        3. mul-1-negN/A

          \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right) \]
        4. +-commutativeN/A

          \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right) + \left(\mathsf{neg}\left(b\right)\right)}, 1\right) \]
        5. associate-*r*N/A

          \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
        6. unpow2N/A

          \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\frac{1}{2} \cdot a\right) \cdot \color{blue}{\left(b \cdot b\right)} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
        7. associate-*r*N/A

          \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
        8. mul-1-negN/A

          \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
        9. distribute-rgt-outN/A

          \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
        11. accelerator-lowering-fma.f64N/A

          \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
        12. *-lowering-*.f6424.0

          \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
      8. Simplified24.0%

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(0.5 \cdot a, b, -1\right), 1\right)} \]
      9. Taylor expanded in b around inf

        \[\leadsto x \cdot \color{blue}{\left({b}^{2} \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)} \]
      10. Step-by-step derivation
        1. unpow2N/A

          \[\leadsto x \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right) \]
        2. associate-*l*N/A

          \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
        3. *-lowering-*.f64N/A

          \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
        4. *-lowering-*.f64N/A

          \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)}\right) \]
        5. associate-*r/N/A

          \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{\frac{-1 \cdot a}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\frac{\color{blue}{a \cdot -1}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
        7. associate-/l*N/A

          \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{a \cdot \frac{-1}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
        8. metadata-evalN/A

          \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \frac{\color{blue}{\mathsf{neg}\left(1\right)}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
        9. distribute-neg-fracN/A

          \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{1}{b}\right)\right)} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
        10. *-commutativeN/A

          \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{{a}^{2} \cdot \frac{1}{2}}\right)\right)\right) \]
        11. unpow2N/A

          \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{\left(a \cdot a\right)} \cdot \frac{1}{2}\right)\right)\right) \]
        12. associate-*l*N/A

          \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{a \cdot \left(a \cdot \frac{1}{2}\right)}\right)\right)\right) \]
        13. *-commutativeN/A

          \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + a \cdot \color{blue}{\left(\frac{1}{2} \cdot a\right)}\right)\right)\right) \]
        14. distribute-lft-outN/A

          \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \frac{1}{2} \cdot a\right)\right)}\right)\right) \]
        15. +-commutativeN/A

          \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)}\right)\right)\right) \]
        16. sub-negN/A

          \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a - \frac{1}{b}\right)}\right)\right)\right) \]
        17. *-lowering-*.f64N/A

          \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\frac{1}{2} \cdot a - \frac{1}{b}\right)\right)}\right)\right) \]
        18. sub-negN/A

          \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)}\right)\right)\right) \]
        19. *-commutativeN/A

          \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\color{blue}{a \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)\right)\right)\right) \]
        20. accelerator-lowering-fma.f64N/A

          \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\mathsf{fma}\left(a, \frac{1}{2}, \mathsf{neg}\left(\frac{1}{b}\right)\right)}\right)\right)\right) \]
        21. distribute-neg-fracN/A

          \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \color{blue}{\frac{\mathsf{neg}\left(1\right)}{b}}\right)\right)\right)\right) \]
        22. metadata-evalN/A

          \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \frac{\color{blue}{-1}}{b}\right)\right)\right)\right) \]
        23. /-lowering-/.f6441.0

          \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \color{blue}{\frac{-1}{b}}\right)\right)\right)\right) \]
      11. Simplified41.0%

        \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \frac{-1}{b}\right)\right)\right)\right)} \]
      12. Taylor expanded in b around 0

        \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-1 \cdot a\right)}\right) \]
      13. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right) \]
        2. neg-lowering-neg.f6421.8

          \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-a\right)}\right) \]
      14. Simplified21.8%

        \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-a\right)}\right) \]

      if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1.9999999999999999e112

      1. Initial program 89.8%

        \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in b around inf

        \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
        2. neg-lowering-neg.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
        3. *-lowering-*.f6474.1

          \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
      5. Simplified74.1%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      6. Taylor expanded in a around 0

        \[\leadsto \color{blue}{x} \]
      7. Step-by-step derivation
        1. Simplified57.0%

          \[\leadsto \color{blue}{x} \]
      8. Recombined 2 regimes into one program.
      9. Final simplification32.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 -20000000000:\\ \;\;\;\;-x \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 2 \cdot 10^{+112}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;-x \cdot \left(a \cdot b\right)\\ \end{array} \]
      10. Add Preprocessing

      Alternative 17: 34.3% accurate, 1.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -20000000000:\\ \;\;\;\;-x \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))) -20000000000.0)
         (- (* x (* a b)))
         (* x (- 1.0 (* y t)))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))) <= -20000000000.0) {
      		tmp = -(x * (a * b));
      	} else {
      		tmp = x * (1.0 - (y * t));
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t, a, b)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: tmp
          if (((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))) <= (-20000000000.0d0)) then
              tmp = -(x * (a * b))
          else
              tmp = x * (1.0d0 - (y * t))
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))) <= -20000000000.0) {
      		tmp = -(x * (a * b));
      	} else {
      		tmp = x * (1.0 - (y * t));
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	tmp = 0
      	if ((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))) <= -20000000000.0:
      		tmp = -(x * (a * b))
      	else:
      		tmp = x * (1.0 - (y * t))
      	return tmp
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) <= -20000000000.0)
      		tmp = Float64(-Float64(x * Float64(a * b)));
      	else
      		tmp = Float64(x * Float64(1.0 - Float64(y * t)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	tmp = 0.0;
      	if (((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))) <= -20000000000.0)
      		tmp = -(x * (a * b));
      	else
      		tmp = x * (1.0 - (y * t));
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -20000000000.0], (-N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), N[(x * N[(1.0 - N[(y * t), $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 -20000000000:\\
      \;\;\;\;-x \cdot \left(a \cdot b\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;x \cdot \left(1 - y \cdot t\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))) < -2e10

        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 b around inf

          \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          2. neg-lowering-neg.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          3. *-lowering-*.f6444.5

            \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
        5. Simplified44.5%

          \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
        6. Taylor expanded in a around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
          3. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right) \]
          4. +-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right) + \left(\mathsf{neg}\left(b\right)\right)}, 1\right) \]
          5. associate-*r*N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
          6. unpow2N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\frac{1}{2} \cdot a\right) \cdot \color{blue}{\left(b \cdot b\right)} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
          7. associate-*r*N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
          8. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
          9. distribute-rgt-outN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
          11. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
          12. *-lowering-*.f642.8

            \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
        8. Simplified2.8%

          \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(0.5 \cdot a, b, -1\right), 1\right)} \]
        9. Taylor expanded in b around inf

          \[\leadsto x \cdot \color{blue}{\left({b}^{2} \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)} \]
        10. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto x \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right) \]
          2. associate-*l*N/A

            \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
          3. *-lowering-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
          4. *-lowering-*.f64N/A

            \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)}\right) \]
          5. associate-*r/N/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{\frac{-1 \cdot a}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\frac{\color{blue}{a \cdot -1}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
          7. associate-/l*N/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{a \cdot \frac{-1}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
          8. metadata-evalN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \frac{\color{blue}{\mathsf{neg}\left(1\right)}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
          9. distribute-neg-fracN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{1}{b}\right)\right)} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
          10. *-commutativeN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{{a}^{2} \cdot \frac{1}{2}}\right)\right)\right) \]
          11. unpow2N/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{\left(a \cdot a\right)} \cdot \frac{1}{2}\right)\right)\right) \]
          12. associate-*l*N/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{a \cdot \left(a \cdot \frac{1}{2}\right)}\right)\right)\right) \]
          13. *-commutativeN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + a \cdot \color{blue}{\left(\frac{1}{2} \cdot a\right)}\right)\right)\right) \]
          14. distribute-lft-outN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \frac{1}{2} \cdot a\right)\right)}\right)\right) \]
          15. +-commutativeN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)}\right)\right)\right) \]
          16. sub-negN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a - \frac{1}{b}\right)}\right)\right)\right) \]
          17. *-lowering-*.f64N/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\frac{1}{2} \cdot a - \frac{1}{b}\right)\right)}\right)\right) \]
          18. sub-negN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)}\right)\right)\right) \]
          19. *-commutativeN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\color{blue}{a \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)\right)\right)\right) \]
          20. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\mathsf{fma}\left(a, \frac{1}{2}, \mathsf{neg}\left(\frac{1}{b}\right)\right)}\right)\right)\right) \]
          21. distribute-neg-fracN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \color{blue}{\frac{\mathsf{neg}\left(1\right)}{b}}\right)\right)\right)\right) \]
          22. metadata-evalN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \frac{\color{blue}{-1}}{b}\right)\right)\right)\right) \]
          23. /-lowering-/.f6429.7

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \color{blue}{\frac{-1}{b}}\right)\right)\right)\right) \]
        11. Simplified29.7%

          \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \frac{-1}{b}\right)\right)\right)\right)} \]
        12. Taylor expanded in b around 0

          \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-1 \cdot a\right)}\right) \]
        13. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right) \]
          2. neg-lowering-neg.f6418.5

            \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-a\right)}\right) \]
        14. Simplified18.5%

          \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-a\right)}\right) \]

        if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

        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 t around inf

          \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(t \cdot y\right)}} \]
          2. *-commutativeN/A

            \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
          3. distribute-rgt-neg-inN/A

            \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
          4. *-lowering-*.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
          5. neg-lowering-neg.f6462.6

            \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
        5. Simplified62.6%

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
        6. Taylor expanded in y around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + -1 \cdot \left(t \cdot y\right)\right)} \]
        7. 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. *-lowering-*.f6443.8

            \[\leadsto x \cdot \left(1 - \color{blue}{t \cdot y}\right) \]
        8. Simplified43.8%

          \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification33.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -20000000000:\\ \;\;\;\;-x \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 18: 34.7% 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 -20000000000:\\ \;\;\;\;-x \cdot \left(a \cdot b\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))) -20000000000.0)
         (- (* x (* a b)))
         (* 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))) <= -20000000000.0) {
      		tmp = -(x * (a * b));
      	} 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))) <= (-20000000000.0d0)) then
              tmp = -(x * (a * b))
          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))) <= -20000000000.0) {
      		tmp = -(x * (a * b));
      	} 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))) <= -20000000000.0:
      		tmp = -(x * (a * b))
      	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))) <= -20000000000.0)
      		tmp = Float64(-Float64(x * Float64(a * b)));
      	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))) <= -20000000000.0)
      		tmp = -(x * (a * b));
      	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], -20000000000.0], (-N[(x * N[(a * b), $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 -20000000000:\\
      \;\;\;\;-x \cdot \left(a \cdot b\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))) < -2e10

        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 b around inf

          \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          2. neg-lowering-neg.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          3. *-lowering-*.f6444.5

            \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
        5. Simplified44.5%

          \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
        6. Taylor expanded in a around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
          3. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right) \]
          4. +-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right) + \left(\mathsf{neg}\left(b\right)\right)}, 1\right) \]
          5. associate-*r*N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
          6. unpow2N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\frac{1}{2} \cdot a\right) \cdot \color{blue}{\left(b \cdot b\right)} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
          7. associate-*r*N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
          8. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
          9. distribute-rgt-outN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
          11. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
          12. *-lowering-*.f642.8

            \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
        8. Simplified2.8%

          \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(0.5 \cdot a, b, -1\right), 1\right)} \]
        9. Taylor expanded in b around inf

          \[\leadsto x \cdot \color{blue}{\left({b}^{2} \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)} \]
        10. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto x \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right) \]
          2. associate-*l*N/A

            \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
          3. *-lowering-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
          4. *-lowering-*.f64N/A

            \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)}\right) \]
          5. associate-*r/N/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{\frac{-1 \cdot a}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\frac{\color{blue}{a \cdot -1}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
          7. associate-/l*N/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{a \cdot \frac{-1}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
          8. metadata-evalN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \frac{\color{blue}{\mathsf{neg}\left(1\right)}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
          9. distribute-neg-fracN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{1}{b}\right)\right)} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
          10. *-commutativeN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{{a}^{2} \cdot \frac{1}{2}}\right)\right)\right) \]
          11. unpow2N/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{\left(a \cdot a\right)} \cdot \frac{1}{2}\right)\right)\right) \]
          12. associate-*l*N/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{a \cdot \left(a \cdot \frac{1}{2}\right)}\right)\right)\right) \]
          13. *-commutativeN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + a \cdot \color{blue}{\left(\frac{1}{2} \cdot a\right)}\right)\right)\right) \]
          14. distribute-lft-outN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \frac{1}{2} \cdot a\right)\right)}\right)\right) \]
          15. +-commutativeN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)}\right)\right)\right) \]
          16. sub-negN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a - \frac{1}{b}\right)}\right)\right)\right) \]
          17. *-lowering-*.f64N/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\frac{1}{2} \cdot a - \frac{1}{b}\right)\right)}\right)\right) \]
          18. sub-negN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)}\right)\right)\right) \]
          19. *-commutativeN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\color{blue}{a \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)\right)\right)\right) \]
          20. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\mathsf{fma}\left(a, \frac{1}{2}, \mathsf{neg}\left(\frac{1}{b}\right)\right)}\right)\right)\right) \]
          21. distribute-neg-fracN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \color{blue}{\frac{\mathsf{neg}\left(1\right)}{b}}\right)\right)\right)\right) \]
          22. metadata-evalN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \frac{\color{blue}{-1}}{b}\right)\right)\right)\right) \]
          23. /-lowering-/.f6429.7

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \color{blue}{\frac{-1}{b}}\right)\right)\right)\right) \]
        11. Simplified29.7%

          \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \frac{-1}{b}\right)\right)\right)\right)} \]
        12. Taylor expanded in b around 0

          \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-1 \cdot a\right)}\right) \]
        13. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right) \]
          2. neg-lowering-neg.f6418.5

            \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-a\right)}\right) \]
        14. Simplified18.5%

          \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-a\right)}\right) \]

        if -2e10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

        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 b around inf

          \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          2. neg-lowering-neg.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          3. *-lowering-*.f6462.3

            \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
        5. Simplified62.3%

          \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
        6. Taylor expanded in a around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + -1 \cdot \left(a \cdot b\right)\right)} \]
        7. Step-by-step derivation
          1. neg-mul-1N/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-*.f6441.7

            \[\leadsto x \cdot \left(1 - \color{blue}{a \cdot b}\right) \]
        8. Simplified41.7%

          \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification32.6%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -20000000000:\\ \;\;\;\;-x \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 19: 86.9% accurate, 1.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{y \cdot \left(\log z - t\right)}\\ \mathbf{if}\;y \leq -1 \cdot 10^{-43}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-13}:\\ \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* x (exp (* y (- (log z) t))))))
         (if (<= y -1e-43)
           t_1
           (if (<= y 1.4e-13) (* x (exp (- (* a (+ z b))))) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * exp((y * (log(z) - t)));
      	double tmp;
      	if (y <= -1e-43) {
      		tmp = t_1;
      	} else if (y <= 1.4e-13) {
      		tmp = x * exp(-(a * (z + b)));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t, a, b)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: tmp
          t_1 = x * exp((y * (log(z) - t)))
          if (y <= (-1d-43)) then
              tmp = t_1
          else if (y <= 1.4d-13) then
              tmp = x * exp(-(a * (z + b)))
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * Math.exp((y * (Math.log(z) - t)));
      	double tmp;
      	if (y <= -1e-43) {
      		tmp = t_1;
      	} else if (y <= 1.4e-13) {
      		tmp = x * Math.exp(-(a * (z + b)));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = x * math.exp((y * (math.log(z) - t)))
      	tmp = 0
      	if y <= -1e-43:
      		tmp = t_1
      	elif y <= 1.4e-13:
      		tmp = x * math.exp(-(a * (z + b)))
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(x * exp(Float64(y * Float64(log(z) - t))))
      	tmp = 0.0
      	if (y <= -1e-43)
      		tmp = t_1;
      	elseif (y <= 1.4e-13)
      		tmp = Float64(x * exp(Float64(-Float64(a * Float64(z + b)))));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = x * exp((y * (log(z) - t)));
      	tmp = 0.0;
      	if (y <= -1e-43)
      		tmp = t_1;
      	elseif (y <= 1.4e-13)
      		tmp = x * exp(-(a * (z + b)));
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1e-43], t$95$1, If[LessEqual[y, 1.4e-13], N[(x * N[Exp[(-N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x \cdot e^{y \cdot \left(\log z - t\right)}\\
      \mathbf{if}\;y \leq -1 \cdot 10^{-43}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq 1.4 \cdot 10^{-13}:\\
      \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < -1.00000000000000008e-43 or 1.4000000000000001e-13 < y

        1. Initial program 97.9%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in 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.4

            \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
        5. Simplified90.4%

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]

        if -1.00000000000000008e-43 < y < 1.4000000000000001e-13

        1. Initial program 93.9%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in 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. sub-negN/A

            \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)} - b\right)} \]
          4. accelerator-lowering-log1p.f64N/A

            \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
          5. neg-lowering-neg.f6488.3

            \[\leadsto x \cdot e^{a \cdot \left(\mathsf{log1p}\left(\color{blue}{-z}\right) - b\right)} \]
        5. Simplified88.3%

          \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
        6. Taylor expanded in z around 0

          \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(-1 \cdot z - b\right)}} \]
        7. Step-by-step derivation
          1. --lowering--.f64N/A

            \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(-1 \cdot z - b\right)}} \]
          2. mul-1-negN/A

            \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
          3. neg-lowering-neg.f6488.3

            \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(-z\right)} - b\right)} \]
        8. Simplified88.3%

          \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\left(-z\right) - b\right)}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification89.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{-43}:\\ \;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-13}:\\ \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 20: 71.5% accurate, 2.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{-y \cdot t}\\ \mathbf{if}\;t \leq -400:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-63}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+22}:\\ \;\;\;\;x \cdot e^{b \cdot \left(-a\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* x (exp (- (* y t))))))
         (if (<= t -400.0)
           t_1
           (if (<= t 3e-63)
             (* x (pow z y))
             (if (<= t 3e+22) (* x (exp (* b (- a)))) t_1)))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * exp(-(y * t));
      	double tmp;
      	if (t <= -400.0) {
      		tmp = t_1;
      	} else if (t <= 3e-63) {
      		tmp = x * pow(z, y);
      	} else if (t <= 3e+22) {
      		tmp = x * exp((b * -a));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t, a, b)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: tmp
          t_1 = x * exp(-(y * t))
          if (t <= (-400.0d0)) then
              tmp = t_1
          else if (t <= 3d-63) then
              tmp = x * (z ** y)
          else if (t <= 3d+22) then
              tmp = x * exp((b * -a))
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * Math.exp(-(y * t));
      	double tmp;
      	if (t <= -400.0) {
      		tmp = t_1;
      	} else if (t <= 3e-63) {
      		tmp = x * Math.pow(z, y);
      	} else if (t <= 3e+22) {
      		tmp = x * Math.exp((b * -a));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = x * math.exp(-(y * t))
      	tmp = 0
      	if t <= -400.0:
      		tmp = t_1
      	elif t <= 3e-63:
      		tmp = x * math.pow(z, y)
      	elif t <= 3e+22:
      		tmp = x * math.exp((b * -a))
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(x * exp(Float64(-Float64(y * t))))
      	tmp = 0.0
      	if (t <= -400.0)
      		tmp = t_1;
      	elseif (t <= 3e-63)
      		tmp = Float64(x * (z ^ y));
      	elseif (t <= 3e+22)
      		tmp = Float64(x * exp(Float64(b * Float64(-a))));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = x * exp(-(y * t));
      	tmp = 0.0;
      	if (t <= -400.0)
      		tmp = t_1;
      	elseif (t <= 3e-63)
      		tmp = x * (z ^ y);
      	elseif (t <= 3e+22)
      		tmp = x * exp((b * -a));
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[(-N[(y * t), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -400.0], t$95$1, If[LessEqual[t, 3e-63], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+22], N[(x * N[Exp[N[(b * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x \cdot e^{-y \cdot t}\\
      \mathbf{if}\;t \leq -400:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t \leq 3 \cdot 10^{-63}:\\
      \;\;\;\;x \cdot {z}^{y}\\
      
      \mathbf{elif}\;t \leq 3 \cdot 10^{+22}:\\
      \;\;\;\;x \cdot e^{b \cdot \left(-a\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if t < -400 or 3e22 < t

        1. Initial program 97.5%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in t around inf

          \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(t \cdot y\right)}} \]
          2. *-commutativeN/A

            \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
          3. distribute-rgt-neg-inN/A

            \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
          4. *-lowering-*.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
          5. neg-lowering-neg.f6479.4

            \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
        5. Simplified79.4%

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]

        if -400 < t < 2.99999999999999979e-63

        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 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.f6474.6

            \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
        5. Simplified74.6%

          \[\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.f6474.6

            \[\leadsto x \cdot \color{blue}{{z}^{y}} \]
        8. Simplified74.6%

          \[\leadsto \color{blue}{x \cdot {z}^{y}} \]

        if 2.99999999999999979e-63 < t < 3e22

        1. Initial program 87.8%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in b around inf

          \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          2. neg-lowering-neg.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          3. *-lowering-*.f6487.8

            \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
        5. Simplified87.8%

          \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      3. Recombined 3 regimes into one program.
      4. Final simplification77.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -400:\\ \;\;\;\;x \cdot e^{-y \cdot t}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-63}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+22}:\\ \;\;\;\;x \cdot e^{b \cdot \left(-a\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{-y \cdot t}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 21: 76.6% accurate, 2.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot {z}^{y}\\ \mathbf{if}\;y \leq -1.2 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 17:\\ \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* x (pow z y))))
         (if (<= y -1.2e+40)
           t_1
           (if (<= y 17.0) (* x (exp (- (* a (+ z b))))) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * pow(z, y);
      	double tmp;
      	if (y <= -1.2e+40) {
      		tmp = t_1;
      	} else if (y <= 17.0) {
      		tmp = x * exp(-(a * (z + b)));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t, a, b)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: tmp
          t_1 = x * (z ** y)
          if (y <= (-1.2d+40)) then
              tmp = t_1
          else if (y <= 17.0d0) then
              tmp = x * exp(-(a * (z + b)))
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * Math.pow(z, y);
      	double tmp;
      	if (y <= -1.2e+40) {
      		tmp = t_1;
      	} else if (y <= 17.0) {
      		tmp = x * Math.exp(-(a * (z + b)));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = x * math.pow(z, y)
      	tmp = 0
      	if y <= -1.2e+40:
      		tmp = t_1
      	elif y <= 17.0:
      		tmp = x * math.exp(-(a * (z + b)))
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(x * (z ^ y))
      	tmp = 0.0
      	if (y <= -1.2e+40)
      		tmp = t_1;
      	elseif (y <= 17.0)
      		tmp = Float64(x * exp(Float64(-Float64(a * Float64(z + b)))));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = x * (z ^ y);
      	tmp = 0.0;
      	if (y <= -1.2e+40)
      		tmp = t_1;
      	elseif (y <= 17.0)
      		tmp = x * exp(-(a * (z + b)));
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.2e+40], t$95$1, If[LessEqual[y, 17.0], N[(x * N[Exp[(-N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x \cdot {z}^{y}\\
      \mathbf{if}\;y \leq -1.2 \cdot 10^{+40}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq 17:\\
      \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < -1.2e40 or 17 < y

        1. Initial program 98.4%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in 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.f6492.7

            \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
        5. Simplified92.7%

          \[\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.f6475.8

            \[\leadsto x \cdot \color{blue}{{z}^{y}} \]
        8. Simplified75.8%

          \[\leadsto \color{blue}{x \cdot {z}^{y}} \]

        if -1.2e40 < y < 17

        1. Initial program 94.2%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto 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. sub-negN/A

            \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)} - b\right)} \]
          4. accelerator-lowering-log1p.f64N/A

            \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
          5. neg-lowering-neg.f6483.7

            \[\leadsto x \cdot e^{a \cdot \left(\mathsf{log1p}\left(\color{blue}{-z}\right) - b\right)} \]
        5. Simplified83.7%

          \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
        6. Taylor expanded in z around 0

          \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(-1 \cdot z - b\right)}} \]
        7. Step-by-step derivation
          1. --lowering--.f64N/A

            \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(-1 \cdot z - b\right)}} \]
          2. mul-1-negN/A

            \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
          3. neg-lowering-neg.f6483.7

            \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(-z\right)} - b\right)} \]
        8. Simplified83.7%

          \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\left(-z\right) - b\right)}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification79.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{+40}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq 17:\\ \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 22: 73.7% accurate, 2.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot {z}^{y}\\ \mathbf{if}\;y \leq -7.5 \cdot 10^{+39}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.8:\\ \;\;\;\;x \cdot e^{b \cdot \left(-a\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 -7.5e+39) t_1 (if (<= y 2.8) (* x (exp (* b (- a)))) 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 <= -7.5e+39) {
      		tmp = t_1;
      	} else if (y <= 2.8) {
      		tmp = x * exp((b * -a));
      	} 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 <= (-7.5d+39)) then
              tmp = t_1
          else if (y <= 2.8d0) then
              tmp = x * exp((b * -a))
          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 <= -7.5e+39) {
      		tmp = t_1;
      	} else if (y <= 2.8) {
      		tmp = x * Math.exp((b * -a));
      	} 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 <= -7.5e+39:
      		tmp = t_1
      	elif y <= 2.8:
      		tmp = x * math.exp((b * -a))
      	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 <= -7.5e+39)
      		tmp = t_1;
      	elseif (y <= 2.8)
      		tmp = Float64(x * exp(Float64(b * Float64(-a))));
      	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 <= -7.5e+39)
      		tmp = t_1;
      	elseif (y <= 2.8)
      		tmp = x * exp((b * -a));
      	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, -7.5e+39], t$95$1, If[LessEqual[y, 2.8], N[(x * N[Exp[N[(b * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x \cdot {z}^{y}\\
      \mathbf{if}\;y \leq -7.5 \cdot 10^{+39}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq 2.8:\\
      \;\;\;\;x \cdot e^{b \cdot \left(-a\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < -7.5000000000000005e39 or 2.7999999999999998 < y

        1. Initial program 98.4%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in 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.f6492.7

            \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
        5. Simplified92.7%

          \[\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.f6475.8

            \[\leadsto x \cdot \color{blue}{{z}^{y}} \]
        8. Simplified75.8%

          \[\leadsto \color{blue}{x \cdot {z}^{y}} \]

        if -7.5000000000000005e39 < y < 2.7999999999999998

        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. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          2. neg-lowering-neg.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          3. *-lowering-*.f6475.2

            \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
        5. Simplified75.2%

          \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification75.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{+39}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq 2.8:\\ \;\;\;\;x \cdot e^{b \cdot \left(-a\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 23: 31.2% accurate, 9.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{+88}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{-235}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(a, \left(-z\right) - b, 1\right)\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+137}:\\ \;\;\;\;a \cdot \frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;-x \cdot \left(a \cdot b\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= y -1.3e+88)
         (* x (- 1.0 (* y t)))
         (if (<= y 3.7e-235)
           (* x (fma a (- (- z) b) 1.0))
           (if (<= y 5.2e+137) (* a (/ x a)) (- (* x (* a b)))))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (y <= -1.3e+88) {
      		tmp = x * (1.0 - (y * t));
      	} else if (y <= 3.7e-235) {
      		tmp = x * fma(a, (-z - b), 1.0);
      	} else if (y <= 5.2e+137) {
      		tmp = a * (x / a);
      	} else {
      		tmp = -(x * (a * b));
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (y <= -1.3e+88)
      		tmp = Float64(x * Float64(1.0 - Float64(y * t)));
      	elseif (y <= 3.7e-235)
      		tmp = Float64(x * fma(a, Float64(Float64(-z) - b), 1.0));
      	elseif (y <= 5.2e+137)
      		tmp = Float64(a * Float64(x / a));
      	else
      		tmp = Float64(-Float64(x * Float64(a * b)));
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.3e+88], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e-235], N[(x * N[(a * N[((-z) - b), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+137], N[(a * N[(x / a), $MachinePrecision]), $MachinePrecision], (-N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision])]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq -1.3 \cdot 10^{+88}:\\
      \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
      
      \mathbf{elif}\;y \leq 3.7 \cdot 10^{-235}:\\
      \;\;\;\;x \cdot \mathsf{fma}\left(a, \left(-z\right) - b, 1\right)\\
      
      \mathbf{elif}\;y \leq 5.2 \cdot 10^{+137}:\\
      \;\;\;\;a \cdot \frac{x}{a}\\
      
      \mathbf{else}:\\
      \;\;\;\;-x \cdot \left(a \cdot b\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if y < -1.3e88

        1. Initial program 97.6%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in t around inf

          \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(t \cdot y\right)}} \]
          2. *-commutativeN/A

            \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
          3. distribute-rgt-neg-inN/A

            \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
          4. *-lowering-*.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
          5. neg-lowering-neg.f6464.4

            \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
        5. Simplified64.4%

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
        6. Taylor expanded in y around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + -1 \cdot \left(t \cdot y\right)\right)} \]
        7. 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. *-lowering-*.f6426.7

            \[\leadsto x \cdot \left(1 - \color{blue}{t \cdot y}\right) \]
        8. Simplified26.7%

          \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]

        if -1.3e88 < y < 3.7000000000000001e-235

        1. Initial program 93.9%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in 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. sub-negN/A

            \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)} - b\right)} \]
          4. accelerator-lowering-log1p.f64N/A

            \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
          5. neg-lowering-neg.f6482.2

            \[\leadsto x \cdot e^{a \cdot \left(\mathsf{log1p}\left(\color{blue}{-z}\right) - b\right)} \]
        5. Simplified82.2%

          \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
        6. Taylor expanded in z around 0

          \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(-1 \cdot z - b\right)}} \]
        7. Step-by-step derivation
          1. --lowering--.f64N/A

            \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(-1 \cdot z - b\right)}} \]
          2. mul-1-negN/A

            \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
          3. neg-lowering-neg.f6482.2

            \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(-z\right)} - b\right)} \]
        8. Simplified82.2%

          \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\left(-z\right) - b\right)}} \]
        9. Taylor expanded in a around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + -1 \cdot \left(a \cdot \left(b + z\right)\right)\right)} \]
        10. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \left(a \cdot \left(b + z\right)\right) + 1\right)} \]
          2. *-commutativeN/A

            \[\leadsto x \cdot \left(\color{blue}{\left(a \cdot \left(b + z\right)\right) \cdot -1} + 1\right) \]
          3. associate-*r*N/A

            \[\leadsto x \cdot \left(\color{blue}{a \cdot \left(\left(b + z\right) \cdot -1\right)} + 1\right) \]
          4. *-commutativeN/A

            \[\leadsto x \cdot \left(a \cdot \color{blue}{\left(-1 \cdot \left(b + z\right)\right)} + 1\right) \]
          5. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(a, -1 \cdot \left(b + z\right), 1\right)} \]
          6. distribute-lft-inN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{-1 \cdot b + -1 \cdot z}, 1\right) \]
          7. +-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{-1 \cdot z + -1 \cdot b}, 1\right) \]
          8. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, -1 \cdot z + \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}, 1\right) \]
          9. sub-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{-1 \cdot z - b}, 1\right) \]
          10. --lowering--.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{-1 \cdot z - b}, 1\right) \]
          11. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b, 1\right) \]
          12. neg-lowering-neg.f6446.7

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(-z\right)} - b, 1\right) \]
        11. Simplified46.7%

          \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(a, \left(-z\right) - b, 1\right)} \]

        if 3.7000000000000001e-235 < y < 5.1999999999999998e137

        1. Initial program 97.4%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in b around inf

          \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          2. neg-lowering-neg.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          3. *-lowering-*.f6459.7

            \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
        5. Simplified59.7%

          \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
        6. Taylor expanded in a around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
          3. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right) \]
          4. +-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right) + \left(\mathsf{neg}\left(b\right)\right)}, 1\right) \]
          5. associate-*r*N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
          6. unpow2N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\frac{1}{2} \cdot a\right) \cdot \color{blue}{\left(b \cdot b\right)} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
          7. associate-*r*N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
          8. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
          9. distribute-rgt-outN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
          11. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
          12. *-lowering-*.f6429.3

            \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
        8. Simplified29.3%

          \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(0.5 \cdot a, b, -1\right), 1\right)} \]
        9. Taylor expanded in a around inf

          \[\leadsto \color{blue}{{a}^{2} \cdot \left(-1 \cdot \frac{b \cdot x}{a} + \left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right) + \frac{x}{{a}^{2}}\right)\right)} \]
        10. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto \color{blue}{\left(a \cdot a\right)} \cdot \left(-1 \cdot \frac{b \cdot x}{a} + \left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right) + \frac{x}{{a}^{2}}\right)\right) \]
          2. associate-*l*N/A

            \[\leadsto \color{blue}{a \cdot \left(a \cdot \left(-1 \cdot \frac{b \cdot x}{a} + \left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right) + \frac{x}{{a}^{2}}\right)\right)\right)} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{a \cdot \left(a \cdot \left(-1 \cdot \frac{b \cdot x}{a} + \left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right) + \frac{x}{{a}^{2}}\right)\right)\right)} \]
          4. *-lowering-*.f64N/A

            \[\leadsto a \cdot \color{blue}{\left(a \cdot \left(-1 \cdot \frac{b \cdot x}{a} + \left(\frac{1}{2} \cdot \left({b}^{2} \cdot x\right) + \frac{x}{{a}^{2}}\right)\right)\right)} \]
          5. associate-+r+N/A

            \[\leadsto a \cdot \left(a \cdot \color{blue}{\left(\left(-1 \cdot \frac{b \cdot x}{a} + \frac{1}{2} \cdot \left({b}^{2} \cdot x\right)\right) + \frac{x}{{a}^{2}}\right)}\right) \]
        11. Simplified27.3%

          \[\leadsto \color{blue}{a \cdot \left(a \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(b, x \cdot 0.5, \frac{x}{-a}\right), \frac{x}{a \cdot a}\right)\right)} \]
        12. Taylor expanded in a around 0

          \[\leadsto a \cdot \color{blue}{\frac{x}{a}} \]
        13. Step-by-step derivation
          1. /-lowering-/.f6434.9

            \[\leadsto a \cdot \color{blue}{\frac{x}{a}} \]
        14. Simplified34.9%

          \[\leadsto a \cdot \color{blue}{\frac{x}{a}} \]

        if 5.1999999999999998e137 < y

        1. Initial program 97.8%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in b around inf

          \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          2. neg-lowering-neg.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          3. *-lowering-*.f6420.6

            \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
        5. Simplified20.6%

          \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
        6. Taylor expanded in a around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \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 + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right)} \]
          3. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right), 1\right) \]
          4. +-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right) + \left(\mathsf{neg}\left(b\right)\right)}, 1\right) \]
          5. associate-*r*N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\frac{1}{2} \cdot a\right) \cdot {b}^{2}} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
          6. unpow2N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\frac{1}{2} \cdot a\right) \cdot \color{blue}{\left(b \cdot b\right)} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
          7. associate-*r*N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b} + \left(\mathsf{neg}\left(b\right)\right), 1\right) \]
          8. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \left(\left(\frac{1}{2} \cdot a\right) \cdot b\right) \cdot b + \color{blue}{-1 \cdot b}, 1\right) \]
          9. distribute-rgt-outN/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{b \cdot \left(\left(\frac{1}{2} \cdot a\right) \cdot b + -1\right)}, 1\right) \]
          11. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot a, b, -1\right)}, 1\right) \]
          12. *-lowering-*.f6412.0

            \[\leadsto x \cdot \mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(\color{blue}{0.5 \cdot a}, b, -1\right), 1\right) \]
        8. Simplified12.0%

          \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(a, b \cdot \mathsf{fma}\left(0.5 \cdot a, b, -1\right), 1\right)} \]
        9. Taylor expanded in b around inf

          \[\leadsto x \cdot \color{blue}{\left({b}^{2} \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)} \]
        10. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto x \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right) \]
          2. associate-*l*N/A

            \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
          3. *-lowering-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right)} \]
          4. *-lowering-*.f64N/A

            \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(b \cdot \left(-1 \cdot \frac{a}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)}\right) \]
          5. associate-*r/N/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{\frac{-1 \cdot a}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\frac{\color{blue}{a \cdot -1}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
          7. associate-/l*N/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(\color{blue}{a \cdot \frac{-1}{b}} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
          8. metadata-evalN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \frac{\color{blue}{\mathsf{neg}\left(1\right)}}{b} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
          9. distribute-neg-fracN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{1}{b}\right)\right)} + \frac{1}{2} \cdot {a}^{2}\right)\right)\right) \]
          10. *-commutativeN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{{a}^{2} \cdot \frac{1}{2}}\right)\right)\right) \]
          11. unpow2N/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{\left(a \cdot a\right)} \cdot \frac{1}{2}\right)\right)\right) \]
          12. associate-*l*N/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \color{blue}{a \cdot \left(a \cdot \frac{1}{2}\right)}\right)\right)\right) \]
          13. *-commutativeN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + a \cdot \color{blue}{\left(\frac{1}{2} \cdot a\right)}\right)\right)\right) \]
          14. distribute-lft-outN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\left(\mathsf{neg}\left(\frac{1}{b}\right)\right) + \frac{1}{2} \cdot a\right)\right)}\right)\right) \]
          15. +-commutativeN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)}\right)\right)\right) \]
          16. sub-negN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a - \frac{1}{b}\right)}\right)\right)\right) \]
          17. *-lowering-*.f64N/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \color{blue}{\left(a \cdot \left(\frac{1}{2} \cdot a - \frac{1}{b}\right)\right)}\right)\right) \]
          18. sub-negN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\left(\frac{1}{2} \cdot a + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)}\right)\right)\right) \]
          19. *-commutativeN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \left(\color{blue}{a \cdot \frac{1}{2}} + \left(\mathsf{neg}\left(\frac{1}{b}\right)\right)\right)\right)\right)\right) \]
          20. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \color{blue}{\mathsf{fma}\left(a, \frac{1}{2}, \mathsf{neg}\left(\frac{1}{b}\right)\right)}\right)\right)\right) \]
          21. distribute-neg-fracN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \color{blue}{\frac{\mathsf{neg}\left(1\right)}{b}}\right)\right)\right)\right) \]
          22. metadata-evalN/A

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, \frac{1}{2}, \frac{\color{blue}{-1}}{b}\right)\right)\right)\right) \]
          23. /-lowering-/.f6444.1

            \[\leadsto x \cdot \left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \color{blue}{\frac{-1}{b}}\right)\right)\right)\right) \]
        11. Simplified44.1%

          \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(a \cdot \mathsf{fma}\left(a, 0.5, \frac{-1}{b}\right)\right)\right)\right)} \]
        12. Taylor expanded in b around 0

          \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-1 \cdot a\right)}\right) \]
        13. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right) \]
          2. neg-lowering-neg.f6429.1

            \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-a\right)}\right) \]
        14. Simplified29.1%

          \[\leadsto x \cdot \left(b \cdot \color{blue}{\left(-a\right)}\right) \]
      3. Recombined 4 regimes into one program.
      4. Final simplification37.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{+88}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{-235}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(a, \left(-z\right) - b, 1\right)\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+137}:\\ \;\;\;\;a \cdot \frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;-x \cdot \left(a \cdot b\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 24: 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 96.2%

        \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in b around inf

        \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
        2. neg-lowering-neg.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
        3. *-lowering-*.f6455.2

          \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
      5. Simplified55.2%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      6. Taylor expanded in a around 0

        \[\leadsto \color{blue}{x} \]
      7. Step-by-step derivation
        1. Simplified19.6%

          \[\leadsto \color{blue}{x} \]
        2. Add Preprocessing

        Reproduce

        ?
        herbie shell --seed 2024205 
        (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))))))