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

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

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

Initial Program: 96.7% accurate, 1.0× speedup?

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

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

Alternative 1: 96.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ 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.3%

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

Alternative 2: 63.4% 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 -2 \cdot 10^{+161}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, 0.5 \cdot \left(y \cdot y\right), y\right), 1\right)}\\ \mathbf{elif}\;t\_1 \leq -20000000000000:\\ \;\;\;\;t \cdot \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot 0.5\right)\right)\\ \mathbf{elif}\;t\_1 \leq 10^{-23}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot a, \left(-z\right) - b, x\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+124}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(y, y \cdot \left(-0.16666666666666666 \cdot \left(t \cdot \left(t \cdot t\right)\right)\right), -t\right), 1\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+295}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(0.5, t \cdot \left(y \cdot y\right), -y\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\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 -2e+161)
     (/ x (fma t (fma t (* 0.5 (* y y)) y) 1.0))
     (if (<= t_1 -20000000000000.0)
       (* t (* (* x (* y y)) (* t 0.5)))
       (if (<= t_1 1e-23)
         (fma (* x a) (- (- z) b) x)
         (if (<= t_1 1e+124)
           (*
            x
            (fma
             y
             (fma y (* y (* -0.16666666666666666 (* t (* t t)))) (- t))
             1.0))
           (if (<= t_1 5e+295)
             (* x (fma t (fma 0.5 (* t (* y y)) (- y)) 1.0))
             (* x (fma b (fma (* 0.5 (* a a)) b (- 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 <= -2e+161) {
		tmp = x / fma(t, fma(t, (0.5 * (y * y)), y), 1.0);
	} else if (t_1 <= -20000000000000.0) {
		tmp = t * ((x * (y * y)) * (t * 0.5));
	} else if (t_1 <= 1e-23) {
		tmp = fma((x * a), (-z - b), x);
	} else if (t_1 <= 1e+124) {
		tmp = x * fma(y, fma(y, (y * (-0.16666666666666666 * (t * (t * t)))), -t), 1.0);
	} else if (t_1 <= 5e+295) {
		tmp = x * fma(t, fma(0.5, (t * (y * y)), -y), 1.0);
	} else {
		tmp = x * fma(b, fma((0.5 * (a * a)), b, -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 <= -2e+161)
		tmp = Float64(x / fma(t, fma(t, Float64(0.5 * Float64(y * y)), y), 1.0));
	elseif (t_1 <= -20000000000000.0)
		tmp = Float64(t * Float64(Float64(x * Float64(y * y)) * Float64(t * 0.5)));
	elseif (t_1 <= 1e-23)
		tmp = fma(Float64(x * a), Float64(Float64(-z) - b), x);
	elseif (t_1 <= 1e+124)
		tmp = Float64(x * fma(y, fma(y, Float64(y * Float64(-0.16666666666666666 * Float64(t * Float64(t * t)))), Float64(-t)), 1.0));
	elseif (t_1 <= 5e+295)
		tmp = Float64(x * fma(t, fma(0.5, Float64(t * Float64(y * y)), Float64(-y)), 1.0));
	else
		tmp = Float64(x * fma(b, fma(Float64(0.5 * Float64(a * a)), b, Float64(-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, -2e+161], N[(x / N[(t * N[(t * N[(0.5 * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000000.0], N[(t * N[(N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-23], N[(N[(x * a), $MachinePrecision] * N[((-z) - b), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 1e+124], N[(x * N[(y * N[(y * N[(y * N[(-0.16666666666666666 * N[(t * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + (-t)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+295], N[(x * N[(t * N[(0.5 * N[(t * N[(y * y), $MachinePrecision]), $MachinePrecision] + (-y)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(b * N[(N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] * b + (-a)), $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 -2 \cdot 10^{+161}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, 0.5 \cdot \left(y \cdot y\right), y\right), 1\right)}\\

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

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

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

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

\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\right), 1\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))) < -2.0000000000000001e161

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
      3. pow-expN/A

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      8. lower-*.f6454.4

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

      \[\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. distribute-rgt-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{t \cdot \left(y + \frac{1}{2} \cdot \left(t \cdot {y}^{2}\right)\right)} + 1} \]
    10. Applied rewrites64.3%

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

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

    1. Initial program 89.1%

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

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

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

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

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

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

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

      \[\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 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{1}{2} \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
      8. lower-*.f6429.3

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

      \[\leadsto \color{blue}{\left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \left(y \cdot y\right)\right)} \]
    12. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(t \cdot \frac{1}{2}\right)}\right) \cdot t \]
      13. lower-*.f6451.7

        \[\leadsto \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(t \cdot 0.5\right)}\right) \cdot t \]
    13. Applied rewrites51.7%

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

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

    1. Initial program 92.0%

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

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

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

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

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

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

        \[\leadsto x \cdot e^{a \cdot \left(\mathsf{log1p}\left(\color{blue}{-z}\right) - b\right)} \]
    5. Applied rewrites95.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. lower--.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. lower-neg.f6495.7

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

      \[\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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x \cdot a, \color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b, x\right) \]
      15. lower-neg.f6488.9

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

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

    if 9.9999999999999996e-24 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 9.99999999999999948e123

    1. Initial program 94.6%

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

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

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

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

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

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

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

      \[\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 + y \cdot \left(-1 \cdot t + y \cdot \left(\frac{-1}{6} \cdot \left({t}^{3} \cdot y\right) + \frac{1}{2} \cdot {t}^{2}\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

      \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{\frac{-1}{6} \cdot \left({t}^{3} \cdot y\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
    10. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(y, y \cdot \left(\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot \frac{-1}{6}\right), \mathsf{neg}\left(t\right)\right), 1\right) \]
      10. lower-*.f6440.8

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2}, t \cdot \left(y \cdot y\right), \color{blue}{\mathsf{neg}\left(y\right)}\right), 1\right) \]
      9. lower-neg.f6470.7

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

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

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

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

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

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

      \[\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. lower-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. associate-*r*N/A

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(\frac{1}{2} \cdot \left(a \cdot a\right), b, \color{blue}{\mathsf{neg}\left(a\right)}\right), 1\right) \]
      10. lower-neg.f6470.0

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

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\right), 1\right)} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification66.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 -2 \cdot 10^{+161}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, 0.5 \cdot \left(y \cdot y\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 -20000000000000:\\ \;\;\;\;t \cdot \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot 0.5\right)\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 10^{-23}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot a, \left(-z\right) - b, x\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 10^{+124}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(y, y \cdot \left(-0.16666666666666666 \cdot \left(t \cdot \left(t \cdot t\right)\right)\right), -t\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^{+295}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(0.5, t \cdot \left(y \cdot y\right), -y\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\right), 1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 54.3% 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)\\ t_2 := t \cdot \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot 0.5\right)\right)\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\ \mathbf{elif}\;t\_1 \leq -20000000000000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 5:\\ \;\;\;\;\mathsf{fma}\left(x \cdot a, \left(-z\right) - b, x\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+115}:\\ \;\;\;\;y \cdot \left(y \cdot \left(0.5 \cdot \left(x \cdot \left(t \cdot t\right)\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+295}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\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))))
        (t_2 (* t (* (* x (* y y)) (* t 0.5)))))
   (if (<= t_1 (- INFINITY))
     (/ x (fma t y 1.0))
     (if (<= t_1 -20000000000000.0)
       t_2
       (if (<= t_1 5.0)
         (fma (* x a) (- (- z) b) x)
         (if (<= t_1 2e+115)
           (* y (* y (* 0.5 (* x (* t t)))))
           (if (<= t_1 5e+295)
             t_2
             (* x (fma b (fma (* 0.5 (* a a)) b (- 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 t_2 = t * ((x * (y * y)) * (t * 0.5));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = x / fma(t, y, 1.0);
	} else if (t_1 <= -20000000000000.0) {
		tmp = t_2;
	} else if (t_1 <= 5.0) {
		tmp = fma((x * a), (-z - b), x);
	} else if (t_1 <= 2e+115) {
		tmp = y * (y * (0.5 * (x * (t * t))));
	} else if (t_1 <= 5e+295) {
		tmp = t_2;
	} else {
		tmp = x * fma(b, fma((0.5 * (a * a)), b, -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)))
	t_2 = Float64(t * Float64(Float64(x * Float64(y * y)) * Float64(t * 0.5)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(x / fma(t, y, 1.0));
	elseif (t_1 <= -20000000000000.0)
		tmp = t_2;
	elseif (t_1 <= 5.0)
		tmp = fma(Float64(x * a), Float64(Float64(-z) - b), x);
	elseif (t_1 <= 2e+115)
		tmp = Float64(y * Float64(y * Float64(0.5 * Float64(x * Float64(t * t)))));
	elseif (t_1 <= 5e+295)
		tmp = t_2;
	else
		tmp = Float64(x * fma(b, fma(Float64(0.5 * Float64(a * a)), b, Float64(-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]}, Block[{t$95$2 = N[(t * N[(N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000000.0], t$95$2, If[LessEqual[t$95$1, 5.0], N[(N[(x * a), $MachinePrecision] * N[((-z) - b), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 2e+115], N[(y * N[(y * N[(0.5 * N[(x * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+295], t$95$2, N[(x * N[(b * N[(N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] * b + (-a)), $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)\\
t_2 := t \cdot \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot 0.5\right)\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\

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

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

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

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

\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\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))) < -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. lower-*.f64N/A

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
      3. pow-expN/A

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      8. lower-*.f6469.1

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

      \[\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. lower-fma.f6463.9

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

      \[\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))) < -2e13 or 2e115 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 4.99999999999999991e295

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

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

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Applied rewrites43.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 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{1}{2} \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
      8. lower-*.f6437.9

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

      \[\leadsto \color{blue}{\left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \left(y \cdot y\right)\right)} \]
    12. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(t \cdot \frac{1}{2}\right)}\right) \cdot t \]
      13. lower-*.f6454.1

        \[\leadsto \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(t \cdot 0.5\right)}\right) \cdot t \]
    13. Applied rewrites54.1%

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

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

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

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

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

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

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

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

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

      \[\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. lower--.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. lower-neg.f6491.9

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

      \[\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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x \cdot a, \color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b, x\right) \]
      15. lower-neg.f6485.6

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

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

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

    1. Initial program 93.4%

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

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

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

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

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

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

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

      \[\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 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{1}{2} \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
      8. lower-*.f6412.2

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

      \[\leadsto \color{blue}{\left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \left(y \cdot y\right)\right)} \]
    12. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(0.5 \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot x\right)}\right) \cdot y\right) \cdot y \]
    13. Applied rewrites36.2%

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

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

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

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

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

      \[\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. lower-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. associate-*r*N/A

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(\frac{1}{2} \cdot \left(a \cdot a\right), b, \color{blue}{\mathsf{neg}\left(a\right)}\right), 1\right) \]
      10. lower-neg.f6470.0

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -\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 -20000000000000:\\ \;\;\;\;t \cdot \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot 0.5\right)\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 5:\\ \;\;\;\;\mathsf{fma}\left(x \cdot a, \left(-z\right) - b, x\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 2 \cdot 10^{+115}:\\ \;\;\;\;y \cdot \left(y \cdot \left(0.5 \cdot \left(x \cdot \left(t \cdot t\right)\right)\right)\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 5 \cdot 10^{+295}:\\ \;\;\;\;t \cdot \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot 0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\right), 1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 66.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 -2 \cdot 10^{+161}:\\ \;\;\;\;\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 -20000000000000:\\ \;\;\;\;t \cdot \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot 0.5\right)\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+154}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+295}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(0.5, t \cdot \left(y \cdot y\right), -y\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\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 -2e+161)
     (/
      x
      (fma t (fma t (* (* y y) (fma (* t 0.16666666666666666) y 0.5)) y) 1.0))
     (if (<= t_1 -20000000000000.0)
       (* t (* (* x (* y y)) (* t 0.5)))
       (if (<= t_1 2e+154)
         (* x (pow z y))
         (if (<= t_1 5e+295)
           (* x (fma t (fma 0.5 (* t (* y y)) (- y)) 1.0))
           (* x (fma b (fma (* 0.5 (* a a)) b (- 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 <= -2e+161) {
		tmp = x / fma(t, fma(t, ((y * y) * fma((t * 0.16666666666666666), y, 0.5)), y), 1.0);
	} else if (t_1 <= -20000000000000.0) {
		tmp = t * ((x * (y * y)) * (t * 0.5));
	} else if (t_1 <= 2e+154) {
		tmp = x * pow(z, y);
	} else if (t_1 <= 5e+295) {
		tmp = x * fma(t, fma(0.5, (t * (y * y)), -y), 1.0);
	} else {
		tmp = x * fma(b, fma((0.5 * (a * a)), b, -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 <= -2e+161)
		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 <= -20000000000000.0)
		tmp = Float64(t * Float64(Float64(x * Float64(y * y)) * Float64(t * 0.5)));
	elseif (t_1 <= 2e+154)
		tmp = Float64(x * (z ^ y));
	elseif (t_1 <= 5e+295)
		tmp = Float64(x * fma(t, fma(0.5, Float64(t * Float64(y * y)), Float64(-y)), 1.0));
	else
		tmp = Float64(x * fma(b, fma(Float64(0.5 * Float64(a * a)), b, Float64(-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, -2e+161], 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, -20000000000000.0], N[(t * N[(N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+154], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+295], N[(x * N[(t * N[(0.5 * N[(t * N[(y * y), $MachinePrecision]), $MachinePrecision] + (-y)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(b * N[(N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] * b + (-a)), $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 -2 \cdot 10^{+161}:\\
\;\;\;\;\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 -20000000000000:\\
\;\;\;\;t \cdot \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot 0.5\right)\right)\\

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

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

\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\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))) < -2.0000000000000001e161

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
      3. pow-expN/A

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      8. lower-*.f6454.4

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

      \[\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 + y \cdot \left(\frac{1}{6} \cdot \left({t}^{3} \cdot y\right) + \frac{1}{2} \cdot {t}^{2}\right)\right)}} \]
    9. Applied rewrites65.7%

      \[\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 -2.0000000000000001e161 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e13

    1. Initial program 89.1%

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

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

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

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

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

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

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

      \[\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 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{1}{2} \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
      8. lower-*.f6429.3

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

      \[\leadsto \color{blue}{\left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \left(y \cdot y\right)\right)} \]
    12. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(t \cdot \frac{1}{2}\right)}\right) \cdot t \]
      13. lower-*.f6451.7

        \[\leadsto \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(t \cdot 0.5\right)}\right) \cdot t \]
    13. Applied rewrites51.7%

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

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

    1. Initial program 93.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
      2. lower-pow.f6462.1

        \[\leadsto x \cdot \color{blue}{{z}^{y}} \]
    8. Applied rewrites62.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2}, t \cdot \left(y \cdot y\right), \color{blue}{\mathsf{neg}\left(y\right)}\right), 1\right) \]
      9. lower-neg.f6477.1

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

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

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

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

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

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

      \[\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. lower-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. associate-*r*N/A

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(\frac{1}{2} \cdot \left(a \cdot a\right), b, \color{blue}{\mathsf{neg}\left(a\right)}\right), 1\right) \]
      10. lower-neg.f6470.0

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

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\right), 1\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification66.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 -2 \cdot 10^{+161}:\\ \;\;\;\;\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 -20000000000000:\\ \;\;\;\;t \cdot \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot 0.5\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^{+154}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 5 \cdot 10^{+295}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(0.5, t \cdot \left(y \cdot y\right), -y\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\right), 1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 64.0% 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 -2 \cdot 10^{+161}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, 0.5 \cdot \left(y \cdot y\right), y\right), 1\right)}\\ \mathbf{elif}\;t\_1 \leq -2000:\\ \;\;\;\;t \cdot \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot 0.5\right)\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+147}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(y, t \cdot \mathsf{fma}\left(t, y \cdot \mathsf{fma}\left(t, y \cdot -0.16666666666666666, 0.5\right), -1\right), 1\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+295}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(0.5, t \cdot \left(y \cdot y\right), -y\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\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 -2e+161)
     (/ x (fma t (fma t (* 0.5 (* y y)) y) 1.0))
     (if (<= t_1 -2000.0)
       (* t (* (* x (* y y)) (* t 0.5)))
       (if (<= t_1 1e+147)
         (*
          x
          (fma
           y
           (* t (fma t (* y (fma t (* y -0.16666666666666666) 0.5)) -1.0))
           1.0))
         (if (<= t_1 5e+295)
           (* x (fma t (fma 0.5 (* t (* y y)) (- y)) 1.0))
           (* x (fma b (fma (* 0.5 (* a a)) b (- 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 <= -2e+161) {
		tmp = x / fma(t, fma(t, (0.5 * (y * y)), y), 1.0);
	} else if (t_1 <= -2000.0) {
		tmp = t * ((x * (y * y)) * (t * 0.5));
	} else if (t_1 <= 1e+147) {
		tmp = x * fma(y, (t * fma(t, (y * fma(t, (y * -0.16666666666666666), 0.5)), -1.0)), 1.0);
	} else if (t_1 <= 5e+295) {
		tmp = x * fma(t, fma(0.5, (t * (y * y)), -y), 1.0);
	} else {
		tmp = x * fma(b, fma((0.5 * (a * a)), b, -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 <= -2e+161)
		tmp = Float64(x / fma(t, fma(t, Float64(0.5 * Float64(y * y)), y), 1.0));
	elseif (t_1 <= -2000.0)
		tmp = Float64(t * Float64(Float64(x * Float64(y * y)) * Float64(t * 0.5)));
	elseif (t_1 <= 1e+147)
		tmp = Float64(x * fma(y, Float64(t * fma(t, Float64(y * fma(t, Float64(y * -0.16666666666666666), 0.5)), -1.0)), 1.0));
	elseif (t_1 <= 5e+295)
		tmp = Float64(x * fma(t, fma(0.5, Float64(t * Float64(y * y)), Float64(-y)), 1.0));
	else
		tmp = Float64(x * fma(b, fma(Float64(0.5 * Float64(a * a)), b, Float64(-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, -2e+161], N[(x / N[(t * N[(t * N[(0.5 * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2000.0], N[(t * N[(N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+147], N[(x * N[(y * N[(t * N[(t * N[(y * N[(t * N[(y * -0.16666666666666666), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+295], N[(x * N[(t * N[(0.5 * N[(t * N[(y * y), $MachinePrecision]), $MachinePrecision] + (-y)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(b * N[(N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] * b + (-a)), $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 -2 \cdot 10^{+161}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, 0.5 \cdot \left(y \cdot y\right), y\right), 1\right)}\\

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

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

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

\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\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))) < -2.0000000000000001e161

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
      3. pow-expN/A

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      8. lower-*.f6454.4

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

      \[\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. distribute-rgt-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{t \cdot \left(y + \frac{1}{2} \cdot \left(t \cdot {y}^{2}\right)\right)} + 1} \]
    10. Applied rewrites64.3%

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

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

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

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

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

      \[\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 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{1}{2} \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
      8. lower-*.f6428.0

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

      \[\leadsto \color{blue}{\left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \left(y \cdot y\right)\right)} \]
    12. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(t \cdot \frac{1}{2}\right)}\right) \cdot t \]
      13. lower-*.f6449.2

        \[\leadsto \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(t \cdot 0.5\right)}\right) \cdot t \]
    13. Applied rewrites49.2%

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

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

    1. Initial program 93.4%

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

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

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

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

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

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

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

      \[\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 + y \cdot \left(-1 \cdot t + y \cdot \left(\frac{-1}{6} \cdot \left({t}^{3} \cdot y\right) + \frac{1}{2} \cdot {t}^{2}\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(y, t \cdot \mathsf{fma}\left(t, y \cdot \mathsf{fma}\left(t, \color{blue}{y \cdot \frac{-1}{6}}, \frac{1}{2}\right), -1\right), 1\right) \]
      18. lower-*.f6460.7

        \[\leadsto x \cdot \mathsf{fma}\left(y, t \cdot \mathsf{fma}\left(t, y \cdot \mathsf{fma}\left(t, \color{blue}{y \cdot -0.16666666666666666}, 0.5\right), -1\right), 1\right) \]
    11. Applied rewrites60.7%

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

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

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

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

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Applied rewrites48.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 + \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. lower-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. lower-fma.f64N/A

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2}, t \cdot \left(y \cdot y\right), \color{blue}{\mathsf{neg}\left(y\right)}\right), 1\right) \]
      9. lower-neg.f6473.4

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

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

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

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

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

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

      \[\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. lower-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. associate-*r*N/A

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(\frac{1}{2} \cdot \left(a \cdot a\right), b, \color{blue}{\mathsf{neg}\left(a\right)}\right), 1\right) \]
      10. lower-neg.f6470.0

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

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\right), 1\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification64.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 -2 \cdot 10^{+161}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, 0.5 \cdot \left(y \cdot y\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 -2000:\\ \;\;\;\;t \cdot \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot 0.5\right)\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 10^{+147}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(y, t \cdot \mathsf{fma}\left(t, y \cdot \mathsf{fma}\left(t, y \cdot -0.16666666666666666, 0.5\right), -1\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^{+295}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(0.5, t \cdot \left(y \cdot y\right), -y\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\right), 1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 54.7% 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)\\ t_2 := t \cdot \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot 0.5\right)\right)\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\ \mathbf{elif}\;t\_1 \leq -20000000000000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 5:\\ \;\;\;\;\mathsf{fma}\left(x \cdot a, \left(-z\right) - b, x\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+115}:\\ \;\;\;\;y \cdot \left(y \cdot \left(0.5 \cdot \left(x \cdot \left(t \cdot t\right)\right)\right)\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 (* t (* (* x (* y y)) (* t 0.5)))))
   (if (<= t_1 (- INFINITY))
     (/ x (fma t y 1.0))
     (if (<= t_1 -20000000000000.0)
       t_2
       (if (<= t_1 5.0)
         (fma (* x a) (- (- z) b) x)
         (if (<= t_1 2e+115) (* y (* y (* 0.5 (* x (* t t))))) 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 = t * ((x * (y * y)) * (t * 0.5));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = x / fma(t, y, 1.0);
	} else if (t_1 <= -20000000000000.0) {
		tmp = t_2;
	} else if (t_1 <= 5.0) {
		tmp = fma((x * a), (-z - b), x);
	} else if (t_1 <= 2e+115) {
		tmp = y * (y * (0.5 * (x * (t * t))));
	} 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(t * Float64(Float64(x * Float64(y * y)) * Float64(t * 0.5)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(x / fma(t, y, 1.0));
	elseif (t_1 <= -20000000000000.0)
		tmp = t_2;
	elseif (t_1 <= 5.0)
		tmp = fma(Float64(x * a), Float64(Float64(-z) - b), x);
	elseif (t_1 <= 2e+115)
		tmp = Float64(y * Float64(y * Float64(0.5 * Float64(x * Float64(t * t)))));
	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[(t * N[(N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000000.0], t$95$2, If[LessEqual[t$95$1, 5.0], N[(N[(x * a), $MachinePrecision] * N[((-z) - b), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 2e+115], N[(y * N[(y * N[(0.5 * N[(x * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := t \cdot \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot 0.5\right)\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\

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

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

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

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


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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
      3. pow-expN/A

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      8. lower-*.f6469.1

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

      \[\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. lower-fma.f6463.9

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

      \[\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))) < -2e13 or 2e115 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

    1. Initial program 97.3%

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

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

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

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

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

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

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

      \[\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 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{1}{2} \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
      8. lower-*.f6443.6

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

      \[\leadsto \color{blue}{\left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \left(y \cdot y\right)\right)} \]
    12. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(t \cdot \frac{1}{2}\right)}\right) \cdot t \]
      13. lower-*.f6454.8

        \[\leadsto \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(t \cdot 0.5\right)}\right) \cdot t \]
    13. Applied rewrites54.8%

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

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

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

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

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

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

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

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

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

      \[\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. lower--.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. lower-neg.f6491.9

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

      \[\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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x \cdot a, \color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b, x\right) \]
      15. lower-neg.f6485.6

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

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

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

    1. Initial program 93.4%

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

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

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

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

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

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

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

      \[\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 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{1}{2} \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
      8. lower-*.f6412.2

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

      \[\leadsto \color{blue}{\left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \left(y \cdot y\right)\right)} \]
    12. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(0.5 \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot x\right)}\right) \cdot y\right) \cdot y \]
    13. Applied rewrites36.2%

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

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

Alternative 7: 61.4% 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 10^{-23}:\\ \;\;\;\;\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 10^{+124}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(-0.16666666666666666 \cdot \left(t \cdot \left(t \cdot t\right)\right), y, 0.5 \cdot \left(t \cdot t\right)\right), -t\right), 1\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+295}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(0.5, t \cdot \left(y \cdot y\right), -y\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\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 1e-23)
     (/
      x
      (fma t (fma t (* (* y y) (fma (* t 0.16666666666666666) y 0.5)) y) 1.0))
     (if (<= t_1 1e+124)
       (*
        x
        (fma
         y
         (fma
          y
          (fma (* -0.16666666666666666 (* t (* t t))) y (* 0.5 (* t t)))
          (- t))
         1.0))
       (if (<= t_1 5e+295)
         (* x (fma t (fma 0.5 (* t (* y y)) (- y)) 1.0))
         (* x (fma b (fma (* 0.5 (* a a)) b (- 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 <= 1e-23) {
		tmp = x / fma(t, fma(t, ((y * y) * fma((t * 0.16666666666666666), y, 0.5)), y), 1.0);
	} else if (t_1 <= 1e+124) {
		tmp = x * fma(y, fma(y, fma((-0.16666666666666666 * (t * (t * t))), y, (0.5 * (t * t))), -t), 1.0);
	} else if (t_1 <= 5e+295) {
		tmp = x * fma(t, fma(0.5, (t * (y * y)), -y), 1.0);
	} else {
		tmp = x * fma(b, fma((0.5 * (a * a)), b, -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 <= 1e-23)
		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 <= 1e+124)
		tmp = Float64(x * fma(y, fma(y, fma(Float64(-0.16666666666666666 * Float64(t * Float64(t * t))), y, Float64(0.5 * Float64(t * t))), Float64(-t)), 1.0));
	elseif (t_1 <= 5e+295)
		tmp = Float64(x * fma(t, fma(0.5, Float64(t * Float64(y * y)), Float64(-y)), 1.0));
	else
		tmp = Float64(x * fma(b, fma(Float64(0.5 * Float64(a * a)), b, Float64(-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, 1e-23], 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, 1e+124], N[(x * N[(y * N[(y * N[(N[(-0.16666666666666666 * N[(t * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y + N[(0.5 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + (-t)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+295], N[(x * N[(t * N[(0.5 * N[(t * N[(y * y), $MachinePrecision]), $MachinePrecision] + (-y)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(b * N[(N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] * b + (-a)), $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 10^{-23}:\\
\;\;\;\;\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 10^{+124}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(-0.16666666666666666 \cdot \left(t \cdot \left(t \cdot t\right)\right), y, 0.5 \cdot \left(t \cdot t\right)\right), -t\right), 1\right)\\

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

\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\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))) < 9.9999999999999996e-24

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
      3. pow-expN/A

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      8. lower-*.f6464.2

        \[\leadsto \frac{x}{e^{\color{blue}{y \cdot t}}} \]
    7. Applied rewrites64.2%

      \[\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 + y \cdot \left(\frac{1}{6} \cdot \left({t}^{3} \cdot y\right) + \frac{1}{2} \cdot {t}^{2}\right)\right)}} \]
    9. Applied rewrites65.7%

      \[\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 9.9999999999999996e-24 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 9.99999999999999948e123

    1. Initial program 94.6%

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

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

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

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

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

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

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

      \[\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 + y \cdot \left(-1 \cdot t + y \cdot \left(\frac{-1}{6} \cdot \left({t}^{3} \cdot y\right) + \frac{1}{2} \cdot {t}^{2}\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2}, t \cdot \left(y \cdot y\right), \color{blue}{\mathsf{neg}\left(y\right)}\right), 1\right) \]
      9. lower-neg.f6470.7

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

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

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

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

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

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

      \[\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. lower-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. associate-*r*N/A

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(\frac{1}{2} \cdot \left(a \cdot a\right), b, \color{blue}{\mathsf{neg}\left(a\right)}\right), 1\right) \]
      10. lower-neg.f6470.0

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

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\right), 1\right)} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

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

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

\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\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))) < 0.5

    1. Initial program 95.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
      3. pow-expN/A

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      8. lower-*.f6464.6

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

      \[\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 + y \cdot \left(\frac{1}{6} \cdot \left({t}^{3} \cdot y\right) + \frac{1}{2} \cdot {t}^{2}\right)\right)}} \]
    9. Applied rewrites65.7%

      \[\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 0.5 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 9.99999999999999948e123

    1. Initial program 94.1%

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

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

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

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

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

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

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Applied rewrites61.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 + y \cdot \left(-1 \cdot t + y \cdot \left(\frac{-1}{6} \cdot \left({t}^{3} \cdot y\right) + \frac{1}{2} \cdot {t}^{2}\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

      \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{\frac{-1}{6} \cdot \left({t}^{3} \cdot y\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
    10. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(y, y \cdot \left(\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot \frac{-1}{6}\right), \mathsf{neg}\left(t\right)\right), 1\right) \]
      10. lower-*.f6438.8

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2}, t \cdot \left(y \cdot y\right), \color{blue}{\mathsf{neg}\left(y\right)}\right), 1\right) \]
      9. lower-neg.f6470.7

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

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

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

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

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

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

      \[\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. lower-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. associate-*r*N/A

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(\frac{1}{2} \cdot \left(a \cdot a\right), b, \color{blue}{\mathsf{neg}\left(a\right)}\right), 1\right) \]
      10. lower-neg.f6470.0

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

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\right), 1\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification63.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 0.5:\\ \;\;\;\;\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 10^{+124}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(y, y \cdot \left(-0.16666666666666666 \cdot \left(t \cdot \left(t \cdot t\right)\right)\right), -t\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^{+295}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(0.5, t \cdot \left(y \cdot y\right), -y\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\right), 1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 62.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)\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+161}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, 0.5 \cdot \left(y \cdot y\right), y\right), 1\right)}\\ \mathbf{elif}\;t\_1 \leq -20000000000000:\\ \;\;\;\;t \cdot \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot 0.5\right)\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+295}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(0.5, t \cdot \left(y \cdot y\right), -y\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\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 -2e+161)
     (/ x (fma t (fma t (* 0.5 (* y y)) y) 1.0))
     (if (<= t_1 -20000000000000.0)
       (* t (* (* x (* y y)) (* t 0.5)))
       (if (<= t_1 5e+295)
         (* x (fma t (fma 0.5 (* t (* y y)) (- y)) 1.0))
         (* x (fma b (fma (* 0.5 (* a a)) b (- 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 <= -2e+161) {
		tmp = x / fma(t, fma(t, (0.5 * (y * y)), y), 1.0);
	} else if (t_1 <= -20000000000000.0) {
		tmp = t * ((x * (y * y)) * (t * 0.5));
	} else if (t_1 <= 5e+295) {
		tmp = x * fma(t, fma(0.5, (t * (y * y)), -y), 1.0);
	} else {
		tmp = x * fma(b, fma((0.5 * (a * a)), b, -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 <= -2e+161)
		tmp = Float64(x / fma(t, fma(t, Float64(0.5 * Float64(y * y)), y), 1.0));
	elseif (t_1 <= -20000000000000.0)
		tmp = Float64(t * Float64(Float64(x * Float64(y * y)) * Float64(t * 0.5)));
	elseif (t_1 <= 5e+295)
		tmp = Float64(x * fma(t, fma(0.5, Float64(t * Float64(y * y)), Float64(-y)), 1.0));
	else
		tmp = Float64(x * fma(b, fma(Float64(0.5 * Float64(a * a)), b, Float64(-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, -2e+161], N[(x / N[(t * N[(t * N[(0.5 * N[(y * y), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000000.0], N[(t * N[(N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+295], N[(x * N[(t * N[(0.5 * N[(t * N[(y * y), $MachinePrecision]), $MachinePrecision] + (-y)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(b * N[(N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] * b + (-a)), $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 -2 \cdot 10^{+161}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, 0.5 \cdot \left(y \cdot y\right), y\right), 1\right)}\\

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

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

\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\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))) < -2.0000000000000001e161

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
      3. pow-expN/A

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      8. lower-*.f6454.4

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

      \[\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. distribute-rgt-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{t \cdot \left(y + \frac{1}{2} \cdot \left(t \cdot {y}^{2}\right)\right)} + 1} \]
    10. Applied rewrites64.3%

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

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

    1. Initial program 89.1%

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

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

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

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

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

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

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

      \[\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 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{1}{2} \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
      8. lower-*.f6429.3

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

      \[\leadsto \color{blue}{\left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \left(y \cdot y\right)\right)} \]
    12. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(t \cdot \frac{1}{2}\right)}\right) \cdot t \]
      13. lower-*.f6451.7

        \[\leadsto \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(t \cdot 0.5\right)}\right) \cdot t \]
    13. Applied rewrites51.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2}, t \cdot \left(y \cdot y\right), \color{blue}{\mathsf{neg}\left(y\right)}\right), 1\right) \]
      9. lower-neg.f6461.1

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

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

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

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

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

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

      \[\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. lower-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. associate-*r*N/A

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(\frac{1}{2} \cdot \left(a \cdot a\right), b, \color{blue}{\mathsf{neg}\left(a\right)}\right), 1\right) \]
      10. lower-neg.f6470.0

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -2 \cdot 10^{+161}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, 0.5 \cdot \left(y \cdot y\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 -20000000000000:\\ \;\;\;\;t \cdot \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot 0.5\right)\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 5 \cdot 10^{+295}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(0.5, t \cdot \left(y \cdot y\right), -y\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\right), 1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 53.4% 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 -20000000000000:\\ \;\;\;\;t \cdot \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot 0.5\right)\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+295}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(0.5, t \cdot \left(y \cdot y\right), -y\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\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 (- INFINITY))
     (/ x (fma t y 1.0))
     (if (<= t_1 -20000000000000.0)
       (* t (* (* x (* y y)) (* t 0.5)))
       (if (<= t_1 5e+295)
         (* x (fma t (fma 0.5 (* t (* y y)) (- y)) 1.0))
         (* x (fma b (fma (* 0.5 (* a a)) b (- 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 <= -((double) INFINITY)) {
		tmp = x / fma(t, y, 1.0);
	} else if (t_1 <= -20000000000000.0) {
		tmp = t * ((x * (y * y)) * (t * 0.5));
	} else if (t_1 <= 5e+295) {
		tmp = x * fma(t, fma(0.5, (t * (y * y)), -y), 1.0);
	} else {
		tmp = x * fma(b, fma((0.5 * (a * a)), b, -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 <= Float64(-Inf))
		tmp = Float64(x / fma(t, y, 1.0));
	elseif (t_1 <= -20000000000000.0)
		tmp = Float64(t * Float64(Float64(x * Float64(y * y)) * Float64(t * 0.5)));
	elseif (t_1 <= 5e+295)
		tmp = Float64(x * fma(t, fma(0.5, Float64(t * Float64(y * y)), Float64(-y)), 1.0));
	else
		tmp = Float64(x * fma(b, fma(Float64(0.5 * Float64(a * a)), b, Float64(-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, (-Infinity)], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000000.0], N[(t * N[(N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+295], N[(x * N[(t * N[(0.5 * N[(t * N[(y * y), $MachinePrecision]), $MachinePrecision] + (-y)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(b * N[(N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] * b + (-a)), $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 -\infty:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\

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

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

\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\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))) < -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. lower-*.f64N/A

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
      3. pow-expN/A

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      8. lower-*.f6469.1

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

      \[\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. lower-fma.f6463.9

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

      \[\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))) < -2e13

    1. Initial program 94.5%

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

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

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

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

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

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

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

      \[\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 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{1}{2} \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \color{blue}{\left(y \cdot y\right)}\right) \]
      8. lower-*.f6426.9

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

      \[\leadsto \color{blue}{\left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(x \cdot \left(y \cdot y\right)\right)} \]
    12. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

        \[\leadsto \left(\frac{1}{2} \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(x \cdot \left(y \cdot y\right)\right)} \]
      5. *-commutativeN/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(\frac{1}{2} \cdot \left(t \cdot t\right)\right)} \]
      6. lift-*.f64N/A

        \[\leadsto \left(x \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(t \cdot t\right)\right)} \]
      7. lift-*.f64N/A

        \[\leadsto \left(x \cdot \left(y \cdot y\right)\right) \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(t \cdot t\right)}\right) \]
      8. associate-*r*N/A

        \[\leadsto \left(x \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(\left(\frac{1}{2} \cdot t\right) \cdot t\right)} \]
      9. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(\frac{1}{2} \cdot t\right)\right) \cdot t} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(\frac{1}{2} \cdot t\right)\right) \cdot t} \]
      11. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(\frac{1}{2} \cdot t\right)\right)} \cdot t \]
      12. *-commutativeN/A

        \[\leadsto \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(t \cdot \frac{1}{2}\right)}\right) \cdot t \]
      13. lower-*.f6443.9

        \[\leadsto \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \color{blue}{\left(t \cdot 0.5\right)}\right) \cdot t \]
    13. Applied rewrites43.9%

      \[\leadsto \color{blue}{\left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot 0.5\right)\right) \cdot t} \]

    if -2e13 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 4.99999999999999991e295

    1. Initial program 95.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. lower-*.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. lower-neg.f6468.7

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Applied rewrites68.7%

      \[\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. lower-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. lower-fma.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(t, \color{blue}{\mathsf{fma}\left(\frac{1}{2}, t \cdot {y}^{2}, -1 \cdot y\right)}, 1\right) \]
      5. lower-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{t \cdot {y}^{2}}, -1 \cdot y\right), 1\right) \]
      6. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2}, t \cdot \color{blue}{\left(y \cdot y\right)}, -1 \cdot y\right), 1\right) \]
      7. lower-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2}, t \cdot \color{blue}{\left(y \cdot y\right)}, -1 \cdot y\right), 1\right) \]
      8. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2}, t \cdot \left(y \cdot y\right), \color{blue}{\mathsf{neg}\left(y\right)}\right), 1\right) \]
      9. lower-neg.f6461.1

        \[\leadsto x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(0.5, t \cdot \left(y \cdot y\right), \color{blue}{-y}\right), 1\right) \]
    8. Applied rewrites61.1%

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(0.5, t \cdot \left(y \cdot y\right), -y\right), 1\right)} \]

    if 4.99999999999999991e295 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

    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. lower-neg.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      3. lower-*.f6465.4

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Applied rewrites65.4%

      \[\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. lower-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. associate-*r*N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot b} + -1 \cdot a, 1\right) \]
      5. lower-fma.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot {a}^{2}, b, -1 \cdot a\right)}, 1\right) \]
      6. lower-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(\color{blue}{\frac{1}{2} \cdot {a}^{2}}, b, -1 \cdot a\right), 1\right) \]
      7. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(\frac{1}{2} \cdot \color{blue}{\left(a \cdot a\right)}, b, -1 \cdot a\right), 1\right) \]
      8. lower-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(\frac{1}{2} \cdot \color{blue}{\left(a \cdot a\right)}, b, -1 \cdot a\right), 1\right) \]
      9. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(\frac{1}{2} \cdot \left(a \cdot a\right), b, \color{blue}{\mathsf{neg}\left(a\right)}\right), 1\right) \]
      10. lower-neg.f6470.0

        \[\leadsto x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, \color{blue}{-a}\right), 1\right) \]
    8. Applied rewrites70.0%

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\right), 1\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification59.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 -\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 -20000000000000:\\ \;\;\;\;t \cdot \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot 0.5\right)\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 5 \cdot 10^{+295}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(t, \mathsf{fma}\left(0.5, t \cdot \left(y \cdot y\right), -y\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5 \cdot \left(a \cdot a\right), b, -a\right), 1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 53.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)\\ t_2 := x \cdot \left(0.5 \cdot \left(y \cdot \left(y \cdot \left(t \cdot t\right)\right)\right)\right)\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+279}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\ \mathbf{elif}\;t\_1 \leq -20000000000000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 0.5:\\ \;\;\;\;\mathsf{fma}\left(x \cdot a, \left(-z\right) - b, 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 (* x (* 0.5 (* y (* y (* t t)))))))
   (if (<= t_1 -5e+279)
     (/ x (fma t y 1.0))
     (if (<= t_1 -20000000000000.0)
       t_2
       (if (<= t_1 0.5) (fma (* x a) (- (- z) b) 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 = x * (0.5 * (y * (y * (t * t))));
	double tmp;
	if (t_1 <= -5e+279) {
		tmp = x / fma(t, y, 1.0);
	} else if (t_1 <= -20000000000000.0) {
		tmp = t_2;
	} else if (t_1 <= 0.5) {
		tmp = fma((x * a), (-z - b), 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(x * Float64(0.5 * Float64(y * Float64(y * Float64(t * t)))))
	tmp = 0.0
	if (t_1 <= -5e+279)
		tmp = Float64(x / fma(t, y, 1.0));
	elseif (t_1 <= -20000000000000.0)
		tmp = t_2;
	elseif (t_1 <= 0.5)
		tmp = fma(Float64(x * a), Float64(Float64(-z) - b), 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[(x * N[(0.5 * N[(y * N[(y * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+279], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -20000000000000.0], t$95$2, If[LessEqual[t$95$1, 0.5], N[(N[(x * a), $MachinePrecision] * N[((-z) - b), $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 := x \cdot \left(0.5 \cdot \left(y \cdot \left(y \cdot \left(t \cdot t\right)\right)\right)\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+279}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\

\mathbf{elif}\;t\_1 \leq -20000000000000:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 0.5:\\
\;\;\;\;\mathsf{fma}\left(x \cdot a, \left(-z\right) - b, 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))) < -5.0000000000000002e279

    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. lower-*.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. lower-neg.f6464.9

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Applied rewrites64.9%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Step-by-step derivation
      1. distribute-rgt-neg-outN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(y \cdot t\right)}} \]
      2. exp-negN/A

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
      3. pow-expN/A

        \[\leadsto x \cdot \frac{1}{\color{blue}{{\left(e^{y}\right)}^{t}}} \]
      4. un-div-invN/A

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      6. pow-expN/A

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      7. lower-exp.f64N/A

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      8. lower-*.f6464.9

        \[\leadsto \frac{x}{e^{\color{blue}{y \cdot t}}} \]
    7. Applied rewrites64.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. lower-fma.f6456.1

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, y, 1\right)}} \]
    10. Applied rewrites56.1%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, y, 1\right)}} \]

    if -5.0000000000000002e279 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e13 or 0.5 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

    1. Initial program 96.5%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(t \cdot y\right)}} \]
      2. *-commutativeN/A

        \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      4. lower-*.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. lower-neg.f6452.0

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Applied rewrites52.0%

      \[\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 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
      2. lower-fma.f64N/A

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
      3. mul-1-negN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
      4. +-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
      5. lower-fma.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(\frac{1}{2}, {t}^{2} \cdot y, \mathsf{neg}\left(t\right)\right)}, 1\right) \]
      6. *-commutativeN/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      7. lower-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      8. unpow2N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      9. lower-*.f64N/A

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
      10. lower-neg.f6435.4

        \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), \color{blue}{-t}\right), 1\right) \]
    8. Applied rewrites35.4%

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), -t\right), 1\right)} \]
    9. Taylor expanded in y around inf

      \[\leadsto x \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({t}^{2} \cdot {y}^{2}\right)\right)} \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({t}^{2} \cdot {y}^{2}\right)\right)} \]
      2. unpow2N/A

        \[\leadsto x \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot \color{blue}{\left(y \cdot y\right)}\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto x \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\left({t}^{2} \cdot y\right) \cdot y\right)}\right) \]
      4. lower-*.f64N/A

        \[\leadsto x \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\left({t}^{2} \cdot y\right) \cdot y\right)}\right) \]
      5. lower-*.f64N/A

        \[\leadsto x \cdot \left(\frac{1}{2} \cdot \left(\color{blue}{\left({t}^{2} \cdot y\right)} \cdot y\right)\right) \]
      6. unpow2N/A

        \[\leadsto x \cdot \left(\frac{1}{2} \cdot \left(\left(\color{blue}{\left(t \cdot t\right)} \cdot y\right) \cdot y\right)\right) \]
      7. lower-*.f6446.6

        \[\leadsto x \cdot \left(0.5 \cdot \left(\left(\color{blue}{\left(t \cdot t\right)} \cdot y\right) \cdot y\right)\right) \]
    11. Applied rewrites46.6%

      \[\leadsto x \cdot \color{blue}{\left(0.5 \cdot \left(\left(\left(t \cdot t\right) \cdot y\right) \cdot y\right)\right)} \]

    if -2e13 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 0.5

    1. Initial program 92.5%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
      2. lower--.f64N/A

        \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\log \left(1 - z\right) - b\right)}} \]
      3. sub-negN/A

        \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)} - b\right)} \]
      4. lower-log1p.f64N/A

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
      5. lower-neg.f6493.5

        \[\leadsto x \cdot e^{a \cdot \left(\mathsf{log1p}\left(\color{blue}{-z}\right) - b\right)} \]
    5. Applied rewrites93.5%

      \[\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. lower--.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. lower-neg.f6493.5

        \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(-z\right)} - b\right)} \]
    8. Applied rewrites93.5%

      \[\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. associate-*r*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(a \cdot x\right) \cdot \left(b + z\right)}\right)\right) + x \]
      4. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{\left(a \cdot x\right) \cdot \left(\mathsf{neg}\left(\left(b + z\right)\right)\right)} + x \]
      5. mul-1-negN/A

        \[\leadsto \left(a \cdot x\right) \cdot \color{blue}{\left(-1 \cdot \left(b + z\right)\right)} + x \]
      6. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(a \cdot x, -1 \cdot \left(b + z\right), x\right)} \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot a}, -1 \cdot \left(b + z\right), x\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot a}, -1 \cdot \left(b + z\right), x\right) \]
      9. distribute-lft-inN/A

        \[\leadsto \mathsf{fma}\left(x \cdot a, \color{blue}{-1 \cdot b + -1 \cdot z}, x\right) \]
      10. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(x \cdot a, \color{blue}{-1 \cdot z + -1 \cdot b}, x\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(x \cdot a, -1 \cdot z + \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}, x\right) \]
      12. sub-negN/A

        \[\leadsto \mathsf{fma}\left(x \cdot a, \color{blue}{-1 \cdot z - b}, x\right) \]
      13. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(x \cdot a, \color{blue}{-1 \cdot z - b}, x\right) \]
      14. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(x \cdot a, \color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b, x\right) \]
      15. lower-neg.f6487.1

        \[\leadsto \mathsf{fma}\left(x \cdot a, \color{blue}{\left(-z\right)} - b, x\right) \]
    11. Applied rewrites87.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot a, \left(-z\right) - b, x\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification55.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 -5 \cdot 10^{+279}:\\ \;\;\;\;\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 -20000000000000:\\ \;\;\;\;x \cdot \left(0.5 \cdot \left(y \cdot \left(y \cdot \left(t \cdot t\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.5:\\ \;\;\;\;\mathsf{fma}\left(x \cdot a, \left(-z\right) - b, x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(0.5 \cdot \left(y \cdot \left(y \cdot \left(t \cdot t\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 39.8% 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 -4 \cdot 10^{+278}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\ \mathbf{elif}\;t\_1 \leq -2000:\\ \;\;\;\;-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
 (let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
   (if (<= t_1 -4e+278)
     (/ x (fma t y 1.0))
     (if (<= t_1 -2000.0) (- (* x (* a b))) (* 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 <= -4e+278) {
		tmp = x / fma(t, y, 1.0);
	} else if (t_1 <= -2000.0) {
		tmp = -(x * (a * b));
	} 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 <= -4e+278)
		tmp = Float64(x / fma(t, y, 1.0));
	elseif (t_1 <= -2000.0)
		tmp = Float64(-Float64(x * Float64(a * b)));
	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, -4e+278], N[(x / N[(t * y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2000.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}
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^{+278}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(t, y, 1\right)}\\

\mathbf{elif}\;t\_1 \leq -2000:\\
\;\;\;\;-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 3 regimes
  2. if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -3.99999999999999985e278

    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. lower-*.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. lower-neg.f6463.4

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Applied rewrites63.4%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Step-by-step derivation
      1. distribute-rgt-neg-outN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(y \cdot t\right)}} \]
      2. exp-negN/A

        \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
      3. pow-expN/A

        \[\leadsto x \cdot \frac{1}{\color{blue}{{\left(e^{y}\right)}^{t}}} \]
      4. un-div-invN/A

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
      6. pow-expN/A

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      7. lower-exp.f64N/A

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      8. lower-*.f6463.4

        \[\leadsto \frac{x}{e^{\color{blue}{y \cdot t}}} \]
    7. Applied rewrites63.4%

      \[\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. lower-fma.f6454.8

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, y, 1\right)}} \]
    10. Applied rewrites54.8%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, y, 1\right)}} \]

    if -3.99999999999999985e278 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e3

    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. lower-neg.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      3. lower-*.f6448.2

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Applied rewrites48.2%

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. Taylor expanded in a around 0

      \[\leadsto \color{blue}{x + -1 \cdot \left(a \cdot \left(b \cdot x\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(b \cdot x\right)\right) + x} \]
      2. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(b \cdot x\right)\right)\right)} + x \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{a \cdot \left(\mathsf{neg}\left(b \cdot x\right)\right)} + x \]
      4. mul-1-negN/A

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(b \cdot x\right)\right)} + x \]
      5. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, -1 \cdot \left(b \cdot x\right), x\right)} \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{\mathsf{neg}\left(b \cdot x\right)}, x\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a, \mathsf{neg}\left(\color{blue}{x \cdot b}\right), x\right) \]
      8. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{x \cdot \left(\mathsf{neg}\left(b\right)\right)}, x\right) \]
      9. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{x \cdot \left(\mathsf{neg}\left(b\right)\right)}, x\right) \]
      10. lower-neg.f642.9

        \[\leadsto \mathsf{fma}\left(a, x \cdot \color{blue}{\left(-b\right)}, x\right) \]
    8. Applied rewrites2.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, x \cdot \left(-b\right), x\right)} \]
    9. Taylor expanded in a around inf

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(b \cdot x\right)\right)} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(a \cdot \left(b \cdot x\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{neg}\left(a \cdot \color{blue}{\left(x \cdot b\right)}\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{\left(a \cdot x\right) \cdot b}\right) \]
      4. distribute-lft-neg-outN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot x\right)\right) \cdot b} \]
      5. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{x \cdot a}\right)\right) \cdot b \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{\left(x \cdot \left(\mathsf{neg}\left(a\right)\right)\right)} \cdot b \]
      7. mul-1-negN/A

        \[\leadsto \left(x \cdot \color{blue}{\left(-1 \cdot a\right)}\right) \cdot b \]
      8. associate-*r*N/A

        \[\leadsto \color{blue}{x \cdot \left(\left(-1 \cdot a\right) \cdot b\right)} \]
      9. associate-*r*N/A

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \left(a \cdot b\right)\right)} \]
      11. mul-1-negN/A

        \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(a \cdot b\right)\right)} \]
      12. distribute-rgt-neg-inN/A

        \[\leadsto x \cdot \color{blue}{\left(a \cdot \left(\mathsf{neg}\left(b\right)\right)\right)} \]
      13. mul-1-negN/A

        \[\leadsto x \cdot \left(a \cdot \color{blue}{\left(-1 \cdot b\right)}\right) \]
      14. lower-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(a \cdot \left(-1 \cdot b\right)\right)} \]
      15. mul-1-negN/A

        \[\leadsto x \cdot \left(a \cdot \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}\right) \]
      16. lower-neg.f6417.4

        \[\leadsto x \cdot \left(a \cdot \color{blue}{\left(-b\right)}\right) \]
    11. Applied rewrites17.4%

      \[\leadsto \color{blue}{x \cdot \left(a \cdot \left(-b\right)\right)} \]

    if -2e3 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

    1. Initial program 96.1%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(t \cdot y\right)}} \]
      2. *-commutativeN/A

        \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      4. lower-*.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. lower-neg.f6466.4

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Applied rewrites66.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. lower--.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]
      4. *-commutativeN/A

        \[\leadsto x \cdot \left(1 - \color{blue}{y \cdot t}\right) \]
      5. lower-*.f6447.3

        \[\leadsto x \cdot \left(1 - \color{blue}{y \cdot t}\right) \]
    8. Applied rewrites47.3%

      \[\leadsto x \cdot \color{blue}{\left(1 - y \cdot t\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -4 \cdot 10^{+278}:\\ \;\;\;\;\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 -2000:\\ \;\;\;\;-x \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 33.5% 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 -2000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+74}:\\ \;\;\;\;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 -2000.0) t_1 (if (<= t_2 5e+74) 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 <= -2000.0) {
		tmp = t_1;
	} else if (t_2 <= 5e+74) {
		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 <= (-2000.0d0)) then
        tmp = t_1
    else if (t_2 <= 5d+74) 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 <= -2000.0) {
		tmp = t_1;
	} else if (t_2 <= 5e+74) {
		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 <= -2000.0:
		tmp = t_1
	elif t_2 <= 5e+74:
		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 <= -2000.0)
		tmp = t_1;
	elseif (t_2 <= 5e+74)
		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 <= -2000.0)
		tmp = t_1;
	elseif (t_2 <= 5e+74)
		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, -2000.0], t$95$1, If[LessEqual[t$95$2, 5e+74], 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 -2000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+74}:\\
\;\;\;\;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))) < -2e3 or 4.99999999999999963e74 < (+.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. lower-neg.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      3. lower-*.f6454.7

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Applied rewrites54.7%

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. Taylor expanded in a around 0

      \[\leadsto \color{blue}{x + -1 \cdot \left(a \cdot \left(b \cdot x\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(b \cdot x\right)\right) + x} \]
      2. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(b \cdot x\right)\right)\right)} + x \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{a \cdot \left(\mathsf{neg}\left(b \cdot x\right)\right)} + x \]
      4. mul-1-negN/A

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(b \cdot x\right)\right)} + x \]
      5. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, -1 \cdot \left(b \cdot x\right), x\right)} \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{\mathsf{neg}\left(b \cdot x\right)}, x\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a, \mathsf{neg}\left(\color{blue}{x \cdot b}\right), x\right) \]
      8. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{x \cdot \left(\mathsf{neg}\left(b\right)\right)}, x\right) \]
      9. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{x \cdot \left(\mathsf{neg}\left(b\right)\right)}, x\right) \]
      10. lower-neg.f6413.5

        \[\leadsto \mathsf{fma}\left(a, x \cdot \color{blue}{\left(-b\right)}, x\right) \]
    8. Applied rewrites13.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, x \cdot \left(-b\right), x\right)} \]
    9. Taylor expanded in a around inf

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(b \cdot x\right)\right)} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(a \cdot \left(b \cdot x\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{neg}\left(a \cdot \color{blue}{\left(x \cdot b\right)}\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{\left(a \cdot x\right) \cdot b}\right) \]
      4. distribute-lft-neg-outN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot x\right)\right) \cdot b} \]
      5. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{x \cdot a}\right)\right) \cdot b \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{\left(x \cdot \left(\mathsf{neg}\left(a\right)\right)\right)} \cdot b \]
      7. mul-1-negN/A

        \[\leadsto \left(x \cdot \color{blue}{\left(-1 \cdot a\right)}\right) \cdot b \]
      8. associate-*r*N/A

        \[\leadsto \color{blue}{x \cdot \left(\left(-1 \cdot a\right) \cdot b\right)} \]
      9. associate-*r*N/A

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \left(a \cdot b\right)\right)} \]
      11. mul-1-negN/A

        \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(a \cdot b\right)\right)} \]
      12. distribute-rgt-neg-inN/A

        \[\leadsto x \cdot \color{blue}{\left(a \cdot \left(\mathsf{neg}\left(b\right)\right)\right)} \]
      13. mul-1-negN/A

        \[\leadsto x \cdot \left(a \cdot \color{blue}{\left(-1 \cdot b\right)}\right) \]
      14. lower-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(a \cdot \left(-1 \cdot b\right)\right)} \]
      15. mul-1-negN/A

        \[\leadsto x \cdot \left(a \cdot \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}\right) \]
      16. lower-neg.f6425.1

        \[\leadsto x \cdot \left(a \cdot \color{blue}{\left(-b\right)}\right) \]
    11. Applied rewrites25.1%

      \[\leadsto \color{blue}{x \cdot \left(a \cdot \left(-b\right)\right)} \]

    if -2e3 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 4.99999999999999963e74

    1. Initial program 92.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. lower-*.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
      2. lower--.f64N/A

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(\log z - t\right)}} \]
      3. lower-log.f6487.5

        \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
    5. Applied rewrites87.5%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
    6. Taylor expanded in y around 0

      \[\leadsto x \cdot \color{blue}{1} \]
    7. Step-by-step derivation
      1. Applied rewrites60.4%

        \[\leadsto x \cdot \color{blue}{1} \]
      2. Step-by-step derivation
        1. *-rgt-identity60.4

          \[\leadsto \color{blue}{x} \]
      3. Applied rewrites60.4%

        \[\leadsto \color{blue}{x} \]
    8. Recombined 2 regimes into one program.
    9. Final simplification34.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 -2000:\\ \;\;\;\;-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 5 \cdot 10^{+74}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;-x \cdot \left(a \cdot b\right)\\ \end{array} \]
    10. Add Preprocessing

    Alternative 14: 34.0% 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 -2000:\\ \;\;\;\;-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))) -2000.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))) <= -2000.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))) <= (-2000.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))) <= -2000.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))) <= -2000.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))) <= -2000.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))) <= -2000.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], -2000.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 -2000:\\
    \;\;\;\;-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))) < -2e3

      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 b around inf

        \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
        2. lower-neg.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
        3. lower-*.f6453.1

          \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
      5. Applied rewrites53.1%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      6. Taylor expanded in a around 0

        \[\leadsto \color{blue}{x + -1 \cdot \left(a \cdot \left(b \cdot x\right)\right)} \]
      7. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(b \cdot x\right)\right) + x} \]
        2. mul-1-negN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(b \cdot x\right)\right)\right)} + x \]
        3. distribute-rgt-neg-inN/A

          \[\leadsto \color{blue}{a \cdot \left(\mathsf{neg}\left(b \cdot x\right)\right)} + x \]
        4. mul-1-negN/A

          \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(b \cdot x\right)\right)} + x \]
        5. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(a, -1 \cdot \left(b \cdot x\right), x\right)} \]
        6. mul-1-negN/A

          \[\leadsto \mathsf{fma}\left(a, \color{blue}{\mathsf{neg}\left(b \cdot x\right)}, x\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{fma}\left(a, \mathsf{neg}\left(\color{blue}{x \cdot b}\right), x\right) \]
        8. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{fma}\left(a, \color{blue}{x \cdot \left(\mathsf{neg}\left(b\right)\right)}, x\right) \]
        9. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(a, \color{blue}{x \cdot \left(\mathsf{neg}\left(b\right)\right)}, x\right) \]
        10. lower-neg.f642.8

          \[\leadsto \mathsf{fma}\left(a, x \cdot \color{blue}{\left(-b\right)}, x\right) \]
      8. Applied rewrites2.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, x \cdot \left(-b\right), x\right)} \]
      9. Taylor expanded in a around inf

        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(b \cdot x\right)\right)} \]
      10. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(a \cdot \left(b \cdot x\right)\right)} \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{neg}\left(a \cdot \color{blue}{\left(x \cdot b\right)}\right) \]
        3. associate-*r*N/A

          \[\leadsto \mathsf{neg}\left(\color{blue}{\left(a \cdot x\right) \cdot b}\right) \]
        4. distribute-lft-neg-outN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot x\right)\right) \cdot b} \]
        5. *-commutativeN/A

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{x \cdot a}\right)\right) \cdot b \]
        6. distribute-rgt-neg-inN/A

          \[\leadsto \color{blue}{\left(x \cdot \left(\mathsf{neg}\left(a\right)\right)\right)} \cdot b \]
        7. mul-1-negN/A

          \[\leadsto \left(x \cdot \color{blue}{\left(-1 \cdot a\right)}\right) \cdot b \]
        8. associate-*r*N/A

          \[\leadsto \color{blue}{x \cdot \left(\left(-1 \cdot a\right) \cdot b\right)} \]
        9. associate-*r*N/A

          \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)} \]
        10. lower-*.f64N/A

          \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \left(a \cdot b\right)\right)} \]
        11. mul-1-negN/A

          \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(a \cdot b\right)\right)} \]
        12. distribute-rgt-neg-inN/A

          \[\leadsto x \cdot \color{blue}{\left(a \cdot \left(\mathsf{neg}\left(b\right)\right)\right)} \]
        13. mul-1-negN/A

          \[\leadsto x \cdot \left(a \cdot \color{blue}{\left(-1 \cdot b\right)}\right) \]
        14. lower-*.f64N/A

          \[\leadsto x \cdot \color{blue}{\left(a \cdot \left(-1 \cdot b\right)\right)} \]
        15. mul-1-negN/A

          \[\leadsto x \cdot \left(a \cdot \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}\right) \]
        16. lower-neg.f6416.5

          \[\leadsto x \cdot \left(a \cdot \color{blue}{\left(-b\right)}\right) \]
      11. Applied rewrites16.5%

        \[\leadsto \color{blue}{x \cdot \left(a \cdot \left(-b\right)\right)} \]

      if -2e3 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

      1. Initial program 96.1%

        \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in b around inf

        \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
        2. lower-neg.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
        3. lower-*.f6460.8

          \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
      5. Applied rewrites60.8%

        \[\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. lower--.f64N/A

          \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
        4. lower-*.f6444.5

          \[\leadsto x \cdot \left(1 - \color{blue}{a \cdot b}\right) \]
      8. Applied rewrites44.5%

        \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification34.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 -2000:\\ \;\;\;\;-x \cdot \left(a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 15: 82.7% accurate, 1.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\ \mathbf{if}\;a \leq -2 \cdot 10^{-38}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.06 \cdot 10^{+142}:\\ \;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (* x (exp (* a (- (- z) b))))))
       (if (<= a -2e-38)
         t_1
         (if (<= a 1.06e+142) (* x (exp (* y (- (log z) t)))) t_1))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = x * exp((a * (-z - b)));
    	double tmp;
    	if (a <= -2e-38) {
    		tmp = t_1;
    	} else if (a <= 1.06e+142) {
    		tmp = x * exp((y * (log(z) - t)));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a, b)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8) :: t_1
        real(8) :: tmp
        t_1 = x * exp((a * (-z - b)))
        if (a <= (-2d-38)) then
            tmp = t_1
        else if (a <= 1.06d+142) then
            tmp = x * exp((y * (log(z) - t)))
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = x * Math.exp((a * (-z - b)));
    	double tmp;
    	if (a <= -2e-38) {
    		tmp = t_1;
    	} else if (a <= 1.06e+142) {
    		tmp = x * Math.exp((y * (Math.log(z) - t)));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	t_1 = x * math.exp((a * (-z - b)))
    	tmp = 0
    	if a <= -2e-38:
    		tmp = t_1
    	elif a <= 1.06e+142:
    		tmp = x * math.exp((y * (math.log(z) - t)))
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(x * exp(Float64(a * Float64(Float64(-z) - b))))
    	tmp = 0.0
    	if (a <= -2e-38)
    		tmp = t_1;
    	elseif (a <= 1.06e+142)
    		tmp = Float64(x * exp(Float64(y * Float64(log(z) - t))));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	t_1 = x * exp((a * (-z - b)));
    	tmp = 0.0;
    	if (a <= -2e-38)
    		tmp = t_1;
    	elseif (a <= 1.06e+142)
    		tmp = x * exp((y * (log(z) - t)));
    	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[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2e-38], t$95$1, If[LessEqual[a, 1.06e+142], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
    \mathbf{if}\;a \leq -2 \cdot 10^{-38}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;a \leq 1.06 \cdot 10^{+142}:\\
    \;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < -1.9999999999999999e-38 or 1.06e142 < a

      1. Initial program 92.9%

        \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in y around 0

        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
      4. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
        2. lower--.f64N/A

          \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\log \left(1 - z\right) - b\right)}} \]
        3. sub-negN/A

          \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)} - b\right)} \]
        4. lower-log1p.f64N/A

          \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
        5. lower-neg.f6488.9

          \[\leadsto x \cdot e^{a \cdot \left(\mathsf{log1p}\left(\color{blue}{-z}\right) - b\right)} \]
      5. Applied rewrites88.9%

        \[\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. lower--.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. lower-neg.f6488.9

          \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(-z\right)} - b\right)} \]
      8. Applied rewrites88.9%

        \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\left(-z\right) - b\right)}} \]

      if -1.9999999999999999e-38 < a < 1.06e142

      1. Initial program 98.7%

        \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
      4. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
        2. lower--.f64N/A

          \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(\log z - t\right)}} \]
        3. lower-log.f6489.6

          \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
      5. Applied rewrites89.6%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 16: 74.3% accurate, 2.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\ \mathbf{if}\;a \leq -7.8 \cdot 10^{-47}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 900000:\\ \;\;\;\;\frac{x}{e^{y \cdot t}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (* x (exp (* a (- (- z) b))))))
       (if (<= a -7.8e-47) t_1 (if (<= a 900000.0) (/ x (exp (* y t))) t_1))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = x * exp((a * (-z - b)));
    	double tmp;
    	if (a <= -7.8e-47) {
    		tmp = t_1;
    	} else if (a <= 900000.0) {
    		tmp = x / exp((y * t));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a, b)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8) :: t_1
        real(8) :: tmp
        t_1 = x * exp((a * (-z - b)))
        if (a <= (-7.8d-47)) then
            tmp = t_1
        else if (a <= 900000.0d0) then
            tmp = x / exp((y * t))
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = x * Math.exp((a * (-z - b)));
    	double tmp;
    	if (a <= -7.8e-47) {
    		tmp = t_1;
    	} else if (a <= 900000.0) {
    		tmp = x / Math.exp((y * t));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	t_1 = x * math.exp((a * (-z - b)))
    	tmp = 0
    	if a <= -7.8e-47:
    		tmp = t_1
    	elif a <= 900000.0:
    		tmp = x / math.exp((y * t))
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(x * exp(Float64(a * Float64(Float64(-z) - b))))
    	tmp = 0.0
    	if (a <= -7.8e-47)
    		tmp = t_1;
    	elseif (a <= 900000.0)
    		tmp = Float64(x / exp(Float64(y * t)));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	t_1 = x * exp((a * (-z - b)));
    	tmp = 0.0;
    	if (a <= -7.8e-47)
    		tmp = t_1;
    	elseif (a <= 900000.0)
    		tmp = x / exp((y * t));
    	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[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.8e-47], t$95$1, If[LessEqual[a, 900000.0], N[(x / N[Exp[N[(y * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
    \mathbf{if}\;a \leq -7.8 \cdot 10^{-47}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;a \leq 900000:\\
    \;\;\;\;\frac{x}{e^{y \cdot t}}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < -7.79999999999999956e-47 or 9e5 < a

      1. Initial program 93.2%

        \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in y around 0

        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
      4. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
        2. lower--.f64N/A

          \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\log \left(1 - z\right) - b\right)}} \]
        3. sub-negN/A

          \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)} - b\right)} \]
        4. lower-log1p.f64N/A

          \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
        5. lower-neg.f6481.6

          \[\leadsto x \cdot e^{a \cdot \left(\mathsf{log1p}\left(\color{blue}{-z}\right) - b\right)} \]
      5. Applied rewrites81.6%

        \[\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. lower--.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. lower-neg.f6481.6

          \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(-z\right)} - b\right)} \]
      8. Applied rewrites81.6%

        \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\left(-z\right) - b\right)}} \]

      if -7.79999999999999956e-47 < a < 9e5

      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. lower-*.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
        5. lower-neg.f6481.1

          \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
      5. Applied rewrites81.1%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
      6. Step-by-step derivation
        1. distribute-rgt-neg-outN/A

          \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(y \cdot t\right)}} \]
        2. exp-negN/A

          \[\leadsto x \cdot \color{blue}{\frac{1}{e^{y \cdot t}}} \]
        3. pow-expN/A

          \[\leadsto x \cdot \frac{1}{\color{blue}{{\left(e^{y}\right)}^{t}}} \]
        4. un-div-invN/A

          \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{x}{{\left(e^{y}\right)}^{t}}} \]
        6. pow-expN/A

          \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
        7. lower-exp.f64N/A

          \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
        8. lower-*.f6481.1

          \[\leadsto \frac{x}{e^{\color{blue}{y \cdot t}}} \]
      7. Applied rewrites81.1%

        \[\leadsto \color{blue}{\frac{x}{e^{y \cdot t}}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 17: 74.3% accurate, 2.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\ \mathbf{if}\;a \leq -7.8 \cdot 10^{-47}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 900000:\\ \;\;\;\;x \cdot e^{-y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (* x (exp (* a (- (- z) b))))))
       (if (<= a -7.8e-47) t_1 (if (<= a 900000.0) (* x (exp (- (* y t)))) t_1))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = x * exp((a * (-z - b)));
    	double tmp;
    	if (a <= -7.8e-47) {
    		tmp = t_1;
    	} else if (a <= 900000.0) {
    		tmp = x * exp(-(y * t));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a, b)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8) :: t_1
        real(8) :: tmp
        t_1 = x * exp((a * (-z - b)))
        if (a <= (-7.8d-47)) then
            tmp = t_1
        else if (a <= 900000.0d0) then
            tmp = x * exp(-(y * t))
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = x * Math.exp((a * (-z - b)));
    	double tmp;
    	if (a <= -7.8e-47) {
    		tmp = t_1;
    	} else if (a <= 900000.0) {
    		tmp = x * Math.exp(-(y * t));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	t_1 = x * math.exp((a * (-z - b)))
    	tmp = 0
    	if a <= -7.8e-47:
    		tmp = t_1
    	elif a <= 900000.0:
    		tmp = x * math.exp(-(y * t))
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(x * exp(Float64(a * Float64(Float64(-z) - b))))
    	tmp = 0.0
    	if (a <= -7.8e-47)
    		tmp = t_1;
    	elseif (a <= 900000.0)
    		tmp = Float64(x * exp(Float64(-Float64(y * t))));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	t_1 = x * exp((a * (-z - b)));
    	tmp = 0.0;
    	if (a <= -7.8e-47)
    		tmp = t_1;
    	elseif (a <= 900000.0)
    		tmp = x * exp(-(y * t));
    	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[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.8e-47], t$95$1, If[LessEqual[a, 900000.0], N[(x * N[Exp[(-N[(y * t), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
    \mathbf{if}\;a \leq -7.8 \cdot 10^{-47}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;a \leq 900000:\\
    \;\;\;\;x \cdot e^{-y \cdot t}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < -7.79999999999999956e-47 or 9e5 < a

      1. Initial program 93.2%

        \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in y around 0

        \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
      4. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
        2. lower--.f64N/A

          \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\log \left(1 - z\right) - b\right)}} \]
        3. sub-negN/A

          \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)} - b\right)} \]
        4. lower-log1p.f64N/A

          \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
        5. lower-neg.f6481.6

          \[\leadsto x \cdot e^{a \cdot \left(\mathsf{log1p}\left(\color{blue}{-z}\right) - b\right)} \]
      5. Applied rewrites81.6%

        \[\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. lower--.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. lower-neg.f6481.6

          \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(-z\right)} - b\right)} \]
      8. Applied rewrites81.6%

        \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\left(-z\right) - b\right)}} \]

      if -7.79999999999999956e-47 < a < 9e5

      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. lower-*.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
        5. lower-neg.f6481.1

          \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
      5. Applied rewrites81.1%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification81.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.8 \cdot 10^{-47}:\\ \;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\ \mathbf{elif}\;a \leq 900000:\\ \;\;\;\;x \cdot e^{-y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 18: 72.0% accurate, 2.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{-y \cdot t}\\ \mathbf{if}\;t \leq -1060000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+39}:\\ \;\;\;\;x \cdot e^{-a \cdot b}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (* x (exp (- (* y t))))))
       (if (<= t -1060000000.0)
         t_1
         (if (<= t 8e+39) (* x (exp (- (* a b)))) t_1))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = x * exp(-(y * t));
    	double tmp;
    	if (t <= -1060000000.0) {
    		tmp = t_1;
    	} else if (t <= 8e+39) {
    		tmp = x * exp(-(a * b));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a, b)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8) :: t_1
        real(8) :: tmp
        t_1 = x * exp(-(y * t))
        if (t <= (-1060000000.0d0)) then
            tmp = t_1
        else if (t <= 8d+39) then
            tmp = x * exp(-(a * b))
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = x * Math.exp(-(y * t));
    	double tmp;
    	if (t <= -1060000000.0) {
    		tmp = t_1;
    	} else if (t <= 8e+39) {
    		tmp = x * Math.exp(-(a * b));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	t_1 = x * math.exp(-(y * t))
    	tmp = 0
    	if t <= -1060000000.0:
    		tmp = t_1
    	elif t <= 8e+39:
    		tmp = x * math.exp(-(a * b))
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(x * exp(Float64(-Float64(y * t))))
    	tmp = 0.0
    	if (t <= -1060000000.0)
    		tmp = t_1;
    	elseif (t <= 8e+39)
    		tmp = Float64(x * exp(Float64(-Float64(a * b))));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	t_1 = x * exp(-(y * t));
    	tmp = 0.0;
    	if (t <= -1060000000.0)
    		tmp = t_1;
    	elseif (t <= 8e+39)
    		tmp = x * exp(-(a * b));
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[(-N[(y * t), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1060000000.0], t$95$1, If[LessEqual[t, 8e+39], N[(x * N[Exp[(-N[(a * b), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := x \cdot e^{-y \cdot t}\\
    \mathbf{if}\;t \leq -1060000000:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq 8 \cdot 10^{+39}:\\
    \;\;\;\;x \cdot e^{-a \cdot b}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t < -1.06e9 or 7.99999999999999952e39 < t

      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 t around inf

        \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(t \cdot y\right)}} \]
        2. *-commutativeN/A

          \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
        3. distribute-rgt-neg-inN/A

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
        4. lower-*.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
        5. lower-neg.f6484.6

          \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
      5. Applied rewrites84.6%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]

      if -1.06e9 < t < 7.99999999999999952e39

      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. lower-neg.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
        3. lower-*.f6469.5

          \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
      5. Applied rewrites69.5%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification77.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1060000000:\\ \;\;\;\;x \cdot e^{-y \cdot t}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+39}:\\ \;\;\;\;x \cdot e^{-a \cdot b}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{-y \cdot t}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 19: 68.5% accurate, 2.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{+68}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+25}:\\ \;\;\;\;x \cdot e^{-a \cdot b}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(0.5 \cdot \left(y \cdot \left(y \cdot \left(t \cdot t\right)\right)\right)\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= y -1.35e+68)
       (* x (pow z y))
       (if (<= y 1.4e+25)
         (* x (exp (- (* a b))))
         (* x (* 0.5 (* y (* y (* t t))))))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (y <= -1.35e+68) {
    		tmp = x * pow(z, y);
    	} else if (y <= 1.4e+25) {
    		tmp = x * exp(-(a * b));
    	} else {
    		tmp = x * (0.5 * (y * (y * (t * t))));
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a, b)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8) :: tmp
        if (y <= (-1.35d+68)) then
            tmp = x * (z ** y)
        else if (y <= 1.4d+25) then
            tmp = x * exp(-(a * b))
        else
            tmp = x * (0.5d0 * (y * (y * (t * t))))
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (y <= -1.35e+68) {
    		tmp = x * Math.pow(z, y);
    	} else if (y <= 1.4e+25) {
    		tmp = x * Math.exp(-(a * b));
    	} else {
    		tmp = x * (0.5 * (y * (y * (t * t))));
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	tmp = 0
    	if y <= -1.35e+68:
    		tmp = x * math.pow(z, y)
    	elif y <= 1.4e+25:
    		tmp = x * math.exp(-(a * b))
    	else:
    		tmp = x * (0.5 * (y * (y * (t * t))))
    	return tmp
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (y <= -1.35e+68)
    		tmp = Float64(x * (z ^ y));
    	elseif (y <= 1.4e+25)
    		tmp = Float64(x * exp(Float64(-Float64(a * b))));
    	else
    		tmp = Float64(x * Float64(0.5 * Float64(y * Float64(y * Float64(t * t)))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	tmp = 0.0;
    	if (y <= -1.35e+68)
    		tmp = x * (z ^ y);
    	elseif (y <= 1.4e+25)
    		tmp = x * exp(-(a * b));
    	else
    		tmp = x * (0.5 * (y * (y * (t * t))));
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.35e+68], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e+25], N[(x * N[Exp[(-N[(a * b), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], N[(x * N[(0.5 * N[(y * N[(y * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq -1.35 \cdot 10^{+68}:\\
    \;\;\;\;x \cdot {z}^{y}\\
    
    \mathbf{elif}\;y \leq 1.4 \cdot 10^{+25}:\\
    \;\;\;\;x \cdot e^{-a \cdot b}\\
    
    \mathbf{else}:\\
    \;\;\;\;x \cdot \left(0.5 \cdot \left(y \cdot \left(y \cdot \left(t \cdot t\right)\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < -1.34999999999999995e68

      1. Initial program 100.0%

        \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
      4. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
        2. lower--.f64N/A

          \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(\log z - t\right)}} \]
        3. lower-log.f6492.0

          \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
      5. Applied rewrites92.0%

        \[\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. lower-*.f64N/A

          \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
        2. lower-pow.f6473.9

          \[\leadsto x \cdot \color{blue}{{z}^{y}} \]
      8. Applied rewrites73.9%

        \[\leadsto \color{blue}{x \cdot {z}^{y}} \]

      if -1.34999999999999995e68 < y < 1.4000000000000001e25

      1. Initial program 94.9%

        \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in b around inf

        \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
        2. lower-neg.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
        3. lower-*.f6475.7

          \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
      5. Applied rewrites75.7%

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]

      if 1.4000000000000001e25 < y

      1. Initial program 96.7%

        \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in t around inf

        \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(t \cdot y\right)}} \]
        2. *-commutativeN/A

          \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
        3. distribute-rgt-neg-inN/A

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
        4. lower-*.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
        5. lower-neg.f6471.3

          \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
      5. Applied rewrites71.3%

        \[\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 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
      7. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
        2. lower-fma.f64N/A

          \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
        3. mul-1-negN/A

          \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
        4. +-commutativeN/A

          \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
        5. lower-fma.f64N/A

          \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(\frac{1}{2}, {t}^{2} \cdot y, \mathsf{neg}\left(t\right)\right)}, 1\right) \]
        6. *-commutativeN/A

          \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
        7. lower-*.f64N/A

          \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
        8. unpow2N/A

          \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
        9. lower-*.f64N/A

          \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
        10. lower-neg.f6444.1

          \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), \color{blue}{-t}\right), 1\right) \]
      8. Applied rewrites44.1%

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), -t\right), 1\right)} \]
      9. Taylor expanded in y around inf

        \[\leadsto x \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({t}^{2} \cdot {y}^{2}\right)\right)} \]
      10. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto x \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({t}^{2} \cdot {y}^{2}\right)\right)} \]
        2. unpow2N/A

          \[\leadsto x \cdot \left(\frac{1}{2} \cdot \left({t}^{2} \cdot \color{blue}{\left(y \cdot y\right)}\right)\right) \]
        3. associate-*r*N/A

          \[\leadsto x \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\left({t}^{2} \cdot y\right) \cdot y\right)}\right) \]
        4. lower-*.f64N/A

          \[\leadsto x \cdot \left(\frac{1}{2} \cdot \color{blue}{\left(\left({t}^{2} \cdot y\right) \cdot y\right)}\right) \]
        5. lower-*.f64N/A

          \[\leadsto x \cdot \left(\frac{1}{2} \cdot \left(\color{blue}{\left({t}^{2} \cdot y\right)} \cdot y\right)\right) \]
        6. unpow2N/A

          \[\leadsto x \cdot \left(\frac{1}{2} \cdot \left(\left(\color{blue}{\left(t \cdot t\right)} \cdot y\right) \cdot y\right)\right) \]
        7. lower-*.f6461.5

          \[\leadsto x \cdot \left(0.5 \cdot \left(\left(\color{blue}{\left(t \cdot t\right)} \cdot y\right) \cdot y\right)\right) \]
      11. Applied rewrites61.5%

        \[\leadsto x \cdot \color{blue}{\left(0.5 \cdot \left(\left(\left(t \cdot t\right) \cdot y\right) \cdot y\right)\right)} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification72.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{+68}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{+25}:\\ \;\;\;\;x \cdot e^{-a \cdot b}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(0.5 \cdot \left(y \cdot \left(y \cdot \left(t \cdot t\right)\right)\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 20: 32.0% accurate, 12.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - a \cdot b\right)\\ \mathbf{if}\;b \leq -1.95 \cdot 10^{+99}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 8.5 \cdot 10^{+85}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (* x (- 1.0 (* a b)))))
       (if (<= b -1.95e+99) t_1 (if (<= b 8.5e+85) (* x (- 1.0 (* y t))) t_1))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = x * (1.0 - (a * b));
    	double tmp;
    	if (b <= -1.95e+99) {
    		tmp = t_1;
    	} else if (b <= 8.5e+85) {
    		tmp = x * (1.0 - (y * t));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a, b)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8) :: t_1
        real(8) :: tmp
        t_1 = x * (1.0d0 - (a * b))
        if (b <= (-1.95d+99)) then
            tmp = t_1
        else if (b <= 8.5d+85) then
            tmp = x * (1.0d0 - (y * t))
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = x * (1.0 - (a * b));
    	double tmp;
    	if (b <= -1.95e+99) {
    		tmp = t_1;
    	} else if (b <= 8.5e+85) {
    		tmp = x * (1.0 - (y * t));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	t_1 = x * (1.0 - (a * b))
    	tmp = 0
    	if b <= -1.95e+99:
    		tmp = t_1
    	elif b <= 8.5e+85:
    		tmp = x * (1.0 - (y * t))
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(x * Float64(1.0 - Float64(a * b)))
    	tmp = 0.0
    	if (b <= -1.95e+99)
    		tmp = t_1;
    	elseif (b <= 8.5e+85)
    		tmp = Float64(x * Float64(1.0 - Float64(y * t)));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	t_1 = x * (1.0 - (a * b));
    	tmp = 0.0;
    	if (b <= -1.95e+99)
    		tmp = t_1;
    	elseif (b <= 8.5e+85)
    		tmp = x * (1.0 - (y * t));
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.95e+99], t$95$1, If[LessEqual[b, 8.5e+85], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := x \cdot \left(1 - a \cdot b\right)\\
    \mathbf{if}\;b \leq -1.95 \cdot 10^{+99}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;b \leq 8.5 \cdot 10^{+85}:\\
    \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if b < -1.94999999999999997e99 or 8.4999999999999994e85 < b

      1. Initial program 98.8%

        \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in b around inf

        \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
        2. lower-neg.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
        3. lower-*.f6481.9

          \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
      5. Applied rewrites81.9%

        \[\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. lower--.f64N/A

          \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
        4. lower-*.f6438.9

          \[\leadsto x \cdot \left(1 - \color{blue}{a \cdot b}\right) \]
      8. Applied rewrites38.9%

        \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]

      if -1.94999999999999997e99 < b < 8.4999999999999994e85

      1. Initial program 95.1%

        \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in t around inf

        \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(t \cdot y\right)}} \]
        2. *-commutativeN/A

          \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
        3. distribute-rgt-neg-inN/A

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
        4. lower-*.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
        5. lower-neg.f6471.2

          \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
      5. Applied rewrites71.2%

        \[\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. lower--.f64N/A

          \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]
        4. *-commutativeN/A

          \[\leadsto x \cdot \left(1 - \color{blue}{y \cdot t}\right) \]
        5. lower-*.f6438.5

          \[\leadsto x \cdot \left(1 - \color{blue}{y \cdot t}\right) \]
      8. Applied rewrites38.5%

        \[\leadsto x \cdot \color{blue}{\left(1 - y \cdot t\right)} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 21: 19.8% 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.3%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
      2. lower--.f64N/A

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(\log z - t\right)}} \]
      3. lower-log.f6473.2

        \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
    5. Applied rewrites73.2%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
    6. Taylor expanded in y around 0

      \[\leadsto x \cdot \color{blue}{1} \]
    7. Step-by-step derivation
      1. Applied rewrites18.7%

        \[\leadsto x \cdot \color{blue}{1} \]
      2. Step-by-step derivation
        1. *-rgt-identity18.7

          \[\leadsto \color{blue}{x} \]
      3. Applied rewrites18.7%

        \[\leadsto \color{blue}{x} \]
      4. Add Preprocessing

      Reproduce

      ?
      herbie shell --seed 2024219 
      (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))))))