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

Percentage Accurate: 96.3% → 96.3%
Time: 16.2s
Alternatives: 19
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 19 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.3% 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.3% 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 95.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. Add Preprocessing

Alternative 2: 51.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 -5 \cdot 10^{+269}:\\ \;\;\;\;t \cdot \frac{x}{t}\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+211}:\\ \;\;\;\;\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+135}:\\ \;\;\;\;\left(0.5 \cdot \left(a \cdot a\right)\right) \cdot \left(x \cdot \left(b \cdot b\right)\right)\\ \mathbf{elif}\;t\_1 \leq -4000000000:\\ \;\;\;\;x \cdot \left(\left(y \cdot \left(y \cdot y\right)\right) \cdot \left(-0.16666666666666666 \cdot \left(t \cdot \left(t \cdot t\right)\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-10}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5, b \cdot \left(a \cdot a\right), -a\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(t \cdot \mathsf{fma}\left(x, \left(y \cdot y\right) \cdot 0.5, \frac{\mathsf{fma}\left(x, -y, \frac{x}{t}\right)}{t}\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
   (if (<= t_1 -5e+269)
     (* t (/ x t))
     (if (<= t_1 -5e+211)
       (* (* x (* y y)) (* t (* t 0.5)))
       (if (<= t_1 -5e+135)
         (* (* 0.5 (* a a)) (* x (* b b)))
         (if (<= t_1 -4000000000.0)
           (* x (* (* y (* y y)) (* -0.16666666666666666 (* t (* t t)))))
           (if (<= t_1 4e-10)
             (* x (fma b (fma 0.5 (* b (* a a)) (- a)) 1.0))
             (*
              t
              (* t (fma x (* (* y y) 0.5) (/ (fma x (- y) (/ x t)) 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 <= -5e+269) {
		tmp = t * (x / t);
	} else if (t_1 <= -5e+211) {
		tmp = (x * (y * y)) * (t * (t * 0.5));
	} else if (t_1 <= -5e+135) {
		tmp = (0.5 * (a * a)) * (x * (b * b));
	} else if (t_1 <= -4000000000.0) {
		tmp = x * ((y * (y * y)) * (-0.16666666666666666 * (t * (t * t))));
	} else if (t_1 <= 4e-10) {
		tmp = x * fma(b, fma(0.5, (b * (a * a)), -a), 1.0);
	} else {
		tmp = t * (t * fma(x, ((y * y) * 0.5), (fma(x, -y, (x / t)) / 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 <= -5e+269)
		tmp = Float64(t * Float64(x / t));
	elseif (t_1 <= -5e+211)
		tmp = Float64(Float64(x * Float64(y * y)) * Float64(t * Float64(t * 0.5)));
	elseif (t_1 <= -5e+135)
		tmp = Float64(Float64(0.5 * Float64(a * a)) * Float64(x * Float64(b * b)));
	elseif (t_1 <= -4000000000.0)
		tmp = Float64(x * Float64(Float64(y * Float64(y * y)) * Float64(-0.16666666666666666 * Float64(t * Float64(t * t)))));
	elseif (t_1 <= 4e-10)
		tmp = Float64(x * fma(b, fma(0.5, Float64(b * Float64(a * a)), Float64(-a)), 1.0));
	else
		tmp = Float64(t * Float64(t * fma(x, Float64(Float64(y * y) * 0.5), Float64(fma(x, Float64(-y), Float64(x / t)) / 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, -5e+269], N[(t * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e+211], N[(N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(t * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e+135], N[(N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(x * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -4000000000.0], N[(x * N[(N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(-0.16666666666666666 * N[(t * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e-10], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision] + (-a)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(t * N[(x * N[(N[(y * y), $MachinePrecision] * 0.5), $MachinePrecision] + N[(N[(x * (-y) + N[(x / t), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

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

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

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

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

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

    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.f6465.7

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      11. lower-neg.f642.8

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \left(\color{blue}{\frac{x}{t}} - x \cdot y\right) \]
      7. lower-*.f6411.6

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

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

      \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]
    13. Step-by-step derivation
      1. lower-/.f6437.8

        \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]
    14. Simplified37.8%

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

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

    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.f6428.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(0.5 \cdot t, x \cdot \left(y \cdot y\right), x \cdot \left(-y\right)\right), x\right)} \]
    9. Taylor expanded in t 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. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot \left(\frac{1}{2} \cdot {t}^{2}\right) \]
      9. unpow2N/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) \]
      10. 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)} \]
      11. lower-*.f64N/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)} \]
      12. lower-*.f6437.7

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

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

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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{1}{2} \cdot \left(a \cdot a\right)\right) \cdot \left(x \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
      9. lower-*.f6446.3

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

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

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

    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.f6425.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4e9 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 4.00000000000000015e-10

    1. Initial program 87.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-*.f6484.9

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 96.0%

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

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

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(t \cdot y\right)}} \]
      2. *-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.f6459.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 48.2% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \left(y \cdot y\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 -5 \cdot 10^{+269}:\\
\;\;\;\;t \cdot \frac{x}{t}\\

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{+211}:\\
\;\;\;\;\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\\

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{+135}:\\
\;\;\;\;\left(0.5 \cdot \left(a \cdot a\right)\right) \cdot \left(x \cdot \left(b \cdot b\right)\right)\\

\mathbf{elif}\;t\_2 \leq -4000000000:\\
\;\;\;\;x \cdot \left(t\_1 \cdot \left(-0.16666666666666666 \cdot \left(t \cdot \left(t \cdot t\right)\right)\right)\right)\\

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

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


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

    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.f6465.7

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      11. lower-neg.f642.8

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \left(\color{blue}{\frac{x}{t}} - x \cdot y\right) \]
      7. lower-*.f6411.6

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

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

      \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]
    13. Step-by-step derivation
      1. lower-/.f6437.8

        \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]
    14. Simplified37.8%

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

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

    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.f6428.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(0.5 \cdot t, x \cdot \left(y \cdot y\right), x \cdot \left(-y\right)\right), x\right)} \]
    9. Taylor expanded in t 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. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot \left(\frac{1}{2} \cdot {t}^{2}\right) \]
      9. unpow2N/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) \]
      10. 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)} \]
      11. lower-*.f64N/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)} \]
      12. lower-*.f6437.7

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

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

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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{1}{2} \cdot \left(a \cdot a\right)\right) \cdot \left(x \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
      9. lower-*.f6446.3

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

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

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

    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.f6425.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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.f6472.2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t, t \cdot \left(x \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot 0.5\right)\right), x\right) \]
    11. Simplified81.4%

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

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

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

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

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

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

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


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

    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.f6465.7

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      11. lower-neg.f642.8

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \left(\color{blue}{\frac{x}{t}} - x \cdot y\right) \]
      7. lower-*.f6411.6

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

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

      \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]
    13. Step-by-step derivation
      1. lower-/.f6437.8

        \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]
    14. Simplified37.8%

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

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

    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.f6428.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(0.5 \cdot t, x \cdot \left(y \cdot y\right), x \cdot \left(-y\right)\right), x\right)} \]
    9. Taylor expanded in t 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. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot \left(\frac{1}{2} \cdot {t}^{2}\right) \]
      9. unpow2N/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) \]
      10. 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)} \]
      11. lower-*.f64N/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)} \]
      12. lower-*.f6437.7

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

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

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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{1}{2} \cdot \left(a \cdot a\right)\right) \cdot \left(x \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
      9. lower-*.f6446.3

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

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

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

    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.f6425.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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 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.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t, t \cdot \left(x \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot 0.5\right)\right), x\right) \]
    11. Simplified74.4%

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

Alternative 5: 44.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\ t_2 := \left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+269}:\\ \;\;\;\;t \cdot \frac{x}{t}\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+211}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -4 \cdot 10^{+16}:\\ \;\;\;\;\left(0.5 \cdot \left(a \cdot a\right)\right) \cdot \left(x \cdot \left(b \cdot b\right)\right)\\ \mathbf{elif}\;t\_1 \leq 5000000000:\\ \;\;\;\;x \cdot \mathsf{fma}\left(a, \left(-z\right) - b, 1\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 (* y y)) (* t (* t 0.5)))))
   (if (<= t_1 -5e+269)
     (* t (/ x t))
     (if (<= t_1 -5e+211)
       t_2
       (if (<= t_1 -4e+16)
         (* (* 0.5 (* a a)) (* x (* b b)))
         (if (<= t_1 5000000000.0) (* x (fma a (- (- z) b) 1.0)) 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 * (y * y)) * (t * (t * 0.5));
	double tmp;
	if (t_1 <= -5e+269) {
		tmp = t * (x / t);
	} else if (t_1 <= -5e+211) {
		tmp = t_2;
	} else if (t_1 <= -4e+16) {
		tmp = (0.5 * (a * a)) * (x * (b * b));
	} else if (t_1 <= 5000000000.0) {
		tmp = x * fma(a, (-z - b), 1.0);
	} 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(Float64(x * Float64(y * y)) * Float64(t * Float64(t * 0.5)))
	tmp = 0.0
	if (t_1 <= -5e+269)
		tmp = Float64(t * Float64(x / t));
	elseif (t_1 <= -5e+211)
		tmp = t_2;
	elseif (t_1 <= -4e+16)
		tmp = Float64(Float64(0.5 * Float64(a * a)) * Float64(x * Float64(b * b)));
	elseif (t_1 <= 5000000000.0)
		tmp = Float64(x * fma(a, Float64(Float64(-z) - b), 1.0));
	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[(N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(t * N[(t * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+269], N[(t * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e+211], t$95$2, If[LessEqual[t$95$1, -4e+16], N[(N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(x * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5000000000.0], N[(x * N[(a * N[((-z) - b), $MachinePrecision] + 1.0), $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 := \left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \cdot \left(t \cdot 0.5\right)\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+269}:\\
\;\;\;\;t \cdot \frac{x}{t}\\

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

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

\mathbf{elif}\;t\_1 \leq 5000000000:\\
\;\;\;\;x \cdot \mathsf{fma}\left(a, \left(-z\right) - b, 1\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))) < -5.0000000000000002e269

    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.f6465.7

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      11. lower-neg.f642.8

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \left(\color{blue}{\frac{x}{t}} - x \cdot y\right) \]
      7. lower-*.f6411.6

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

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

      \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]
    13. Step-by-step derivation
      1. lower-/.f6437.8

        \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]
    14. Simplified37.8%

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

    if -5.0000000000000002e269 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -4.9999999999999995e211 or 5e9 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

    1. Initial program 96.6%

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

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

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(t \cdot y\right)}} \]
      2. *-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.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(0.5 \cdot t, x \cdot \left(y \cdot y\right), x \cdot \left(-y\right)\right), x\right)} \]
    9. Taylor expanded in t 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. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \left(x \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot \left(\frac{1}{2} \cdot {t}^{2}\right) \]
      9. unpow2N/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) \]
      10. 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)} \]
      11. lower-*.f64N/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)} \]
      12. lower-*.f6457.4

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

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

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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{1}{2} \cdot \left(a \cdot a\right)\right) \cdot \left(x \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
      9. lower-*.f6443.8

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot e^{\left(-1 \cdot a\right) \cdot z + \color{blue}{\left(-1 \cdot a\right) \cdot b}} \]
      4. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(a, \color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b, 1\right) \]
      12. lower-neg.f6481.2

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

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

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

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

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+242}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(x, -t, \frac{x}{y}\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))) < -3.99999999999999963e215

    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.f6455.1

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      11. lower-neg.f643.0

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]
    13. Step-by-step derivation
      1. lower-/.f6431.6

        \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]
    14. Simplified31.6%

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

    if -3.99999999999999963e215 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -4e16 or 5.0000000000000004e242 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.5 \cdot \left(a \cdot a\right)\right) \cdot \left(x \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
    11. Simplified53.4%

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

    if -4e16 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 4.00000000000000015e-10

    1. Initial program 87.7%

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

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

        \[\leadsto x \cdot e^{a \cdot \left(\mathsf{log1p}\left(\color{blue}{-z}\right) - b\right)} \]
    5. Simplified93.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^{\color{blue}{-1 \cdot \left(a \cdot b\right) + -1 \cdot \left(a \cdot z\right)}} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto x \cdot e^{\left(-1 \cdot a\right) \cdot z + \color{blue}{\left(-1 \cdot a\right) \cdot b}} \]
      4. distribute-lft-outN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000015e-10 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5.0000000000000004e242

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      11. lower-neg.f6425.8

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 46.8% accurate, 0.5× speedup?

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

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

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

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

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


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

    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.f6465.7

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      11. lower-neg.f642.8

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \left(\color{blue}{\frac{x}{t}} - x \cdot y\right) \]
      7. lower-*.f6411.6

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

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

      \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]
    13. Step-by-step derivation
      1. lower-/.f6437.8

        \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]
    14. Simplified37.8%

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

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

    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.f6428.5

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2} \cdot t, x \cdot \left(y \cdot y\right), \color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}\right), x\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2} \cdot t, x \cdot \left(y \cdot y\right), x \cdot \color{blue}{\left(-1 \cdot y\right)}\right), x\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2} \cdot t, x \cdot \left(y \cdot y\right), \color{blue}{x \cdot \left(-1 \cdot y\right)}\right), x\right) \]
      14. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2} \cdot t, x \cdot \left(y \cdot y\right), x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right), x\right) \]
      15. lower-neg.f642.6

        \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(0.5 \cdot t, x \cdot \left(y \cdot y\right), x \cdot \color{blue}{\left(-y\right)}\right), x\right) \]
    8. Simplified2.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(0.5 \cdot t, x \cdot \left(y \cdot y\right), x \cdot \left(-y\right)\right), x\right)} \]
    9. Taylor expanded in t 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. *-commutativeN/A

        \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(\left(x \cdot {y}^{2}\right) \cdot {t}^{2}\right)} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot \left(x \cdot {y}^{2}\right)\right) \cdot {t}^{2}} \]
      3. *-commutativeN/A

        \[\leadsto \color{blue}{\left(\left(x \cdot {y}^{2}\right) \cdot \frac{1}{2}\right)} \cdot {t}^{2} \]
      4. associate-*l*N/A

        \[\leadsto \color{blue}{\left(x \cdot {y}^{2}\right) \cdot \left(\frac{1}{2} \cdot {t}^{2}\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(x \cdot {y}^{2}\right) \cdot \left(\frac{1}{2} \cdot {t}^{2}\right)} \]
      6. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(x \cdot {y}^{2}\right)} \cdot \left(\frac{1}{2} \cdot {t}^{2}\right) \]
      7. unpow2N/A

        \[\leadsto \left(x \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot \left(\frac{1}{2} \cdot {t}^{2}\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(x \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot \left(\frac{1}{2} \cdot {t}^{2}\right) \]
      9. unpow2N/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) \]
      10. 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)} \]
      11. lower-*.f64N/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)} \]
      12. lower-*.f6437.7

        \[\leadsto \left(x \cdot \left(y \cdot y\right)\right) \cdot \left(\color{blue}{\left(0.5 \cdot t\right)} \cdot t\right) \]
    11. Simplified37.7%

      \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(\left(0.5 \cdot t\right) \cdot t\right)} \]

    if -4.9999999999999995e211 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -4e16

    1. Initial program 100.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      2. lower-neg.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      3. lower-*.f6435.5

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified35.5%

      \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    6. Taylor expanded in a around 0

      \[\leadsto \color{blue}{x + a \cdot \left(-1 \cdot \left(b \cdot x\right) + \frac{1}{2} \cdot \left(a \cdot \left({b}^{2} \cdot x\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(b \cdot x\right) + \frac{1}{2} \cdot \left(a \cdot \left({b}^{2} \cdot x\right)\right)\right) + x} \]
      2. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, -1 \cdot \left(b \cdot x\right) + \frac{1}{2} \cdot \left(a \cdot \left({b}^{2} \cdot x\right)\right), x\right)} \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{\frac{1}{2} \cdot \left(a \cdot \left({b}^{2} \cdot x\right)\right) + -1 \cdot \left(b \cdot x\right)}, x\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(a, \frac{1}{2} \cdot \left(a \cdot \left({b}^{2} \cdot x\right)\right) + \color{blue}{\left(\mathsf{neg}\left(b \cdot x\right)\right)}, x\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{\frac{1}{2} \cdot \left(a \cdot \left({b}^{2} \cdot x\right)\right) - b \cdot x}, x\right) \]
      6. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{\frac{1}{2} \cdot \left(a \cdot \left({b}^{2} \cdot x\right)\right) - b \cdot x}, x\right) \]
      7. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{\frac{1}{2} \cdot \left(a \cdot \left({b}^{2} \cdot x\right)\right)} - b \cdot x, x\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a, \frac{1}{2} \cdot \color{blue}{\left(a \cdot \left({b}^{2} \cdot x\right)\right)} - b \cdot x, x\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a, \frac{1}{2} \cdot \left(a \cdot \color{blue}{\left(x \cdot {b}^{2}\right)}\right) - b \cdot x, x\right) \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a, \frac{1}{2} \cdot \left(a \cdot \color{blue}{\left(x \cdot {b}^{2}\right)}\right) - b \cdot x, x\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{fma}\left(a, \frac{1}{2} \cdot \left(a \cdot \left(x \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) - b \cdot x, x\right) \]
      12. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a, \frac{1}{2} \cdot \left(a \cdot \left(x \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) - b \cdot x, x\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(a, \frac{1}{2} \cdot \left(a \cdot \left(x \cdot \left(b \cdot b\right)\right)\right) - \color{blue}{x \cdot b}, x\right) \]
      14. lower-*.f642.7

        \[\leadsto \mathsf{fma}\left(a, 0.5 \cdot \left(a \cdot \left(x \cdot \left(b \cdot b\right)\right)\right) - \color{blue}{x \cdot b}, x\right) \]
    8. Simplified2.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, 0.5 \cdot \left(a \cdot \left(x \cdot \left(b \cdot b\right)\right)\right) - x \cdot b, x\right)} \]
    9. Taylor expanded in a around inf

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \left({a}^{2} \cdot \left({b}^{2} \cdot x\right)\right)} \]
    10. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot \left({b}^{2} \cdot x\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot \left({b}^{2} \cdot x\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot {a}^{2}\right)} \cdot \left({b}^{2} \cdot x\right) \]
      4. unpow2N/A

        \[\leadsto \left(\frac{1}{2} \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot \left({b}^{2} \cdot x\right) \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{2} \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot \left({b}^{2} \cdot x\right) \]
      6. *-commutativeN/A

        \[\leadsto \left(\frac{1}{2} \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(x \cdot {b}^{2}\right)} \]
      7. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{2} \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(x \cdot {b}^{2}\right)} \]
      8. unpow2N/A

        \[\leadsto \left(\frac{1}{2} \cdot \left(a \cdot a\right)\right) \cdot \left(x \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
      9. lower-*.f6443.8

        \[\leadsto \left(0.5 \cdot \left(a \cdot a\right)\right) \cdot \left(x \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
    11. Simplified43.8%

      \[\leadsto \color{blue}{\left(0.5 \cdot \left(a \cdot a\right)\right) \cdot \left(x \cdot \left(b \cdot b\right)\right)} \]

    if -4e16 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

    1. Initial program 93.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.f6467.6

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Simplified67.6%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in t around 0

      \[\leadsto \color{blue}{x + t \cdot \left(-1 \cdot \left(x \cdot y\right) + \frac{1}{2} \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(x \cdot y\right) + \frac{1}{2} \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right)\right) + x} \]
      2. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right) + \frac{1}{2} \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right), x\right)} \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{\frac{1}{2} \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right) + -1 \cdot \left(x \cdot y\right)}, x\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{\left(\frac{1}{2} \cdot t\right) \cdot \left(x \cdot {y}^{2}\right)} + -1 \cdot \left(x \cdot y\right), x\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot t, x \cdot {y}^{2}, -1 \cdot \left(x \cdot y\right)\right)}, x\right) \]
      6. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\color{blue}{\frac{1}{2} \cdot t}, x \cdot {y}^{2}, -1 \cdot \left(x \cdot y\right)\right), x\right) \]
      7. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2} \cdot t, \color{blue}{x \cdot {y}^{2}}, -1 \cdot \left(x \cdot y\right)\right), x\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2} \cdot t, x \cdot \color{blue}{\left(y \cdot y\right)}, -1 \cdot \left(x \cdot y\right)\right), x\right) \]
      9. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2} \cdot t, x \cdot \color{blue}{\left(y \cdot y\right)}, -1 \cdot \left(x \cdot y\right)\right), x\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2} \cdot t, x \cdot \left(y \cdot y\right), \color{blue}{\mathsf{neg}\left(x \cdot y\right)}\right), x\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2} \cdot t, x \cdot \left(y \cdot y\right), \color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}\right), x\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2} \cdot t, x \cdot \left(y \cdot y\right), x \cdot \color{blue}{\left(-1 \cdot y\right)}\right), x\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2} \cdot t, x \cdot \left(y \cdot y\right), \color{blue}{x \cdot \left(-1 \cdot y\right)}\right), x\right) \]
      14. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2} \cdot t, x \cdot \left(y \cdot y\right), x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right), x\right) \]
      15. lower-neg.f6469.5

        \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(0.5 \cdot t, x \cdot \left(y \cdot y\right), x \cdot \color{blue}{\left(-y\right)}\right), x\right) \]
    8. Simplified69.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(0.5 \cdot t, x \cdot \left(y \cdot y\right), x \cdot \left(-y\right)\right), x\right)} \]
    9. Taylor expanded in t around inf

      \[\leadsto \mathsf{fma}\left(t, \color{blue}{\frac{1}{2} \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right)}, x\right) \]
    10. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{\left(\frac{1}{2} \cdot t\right) \cdot \left(x \cdot {y}^{2}\right)}, x\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{\left(t \cdot \frac{1}{2}\right)} \cdot \left(x \cdot {y}^{2}\right), x\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{t \cdot \left(\frac{1}{2} \cdot \left(x \cdot {y}^{2}\right)\right)}, x\right) \]
      4. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{t \cdot \left(\frac{1}{2} \cdot \left(x \cdot {y}^{2}\right)\right)}, x\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(t, t \cdot \color{blue}{\left(\left(x \cdot {y}^{2}\right) \cdot \frac{1}{2}\right)}, x\right) \]
      6. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(t, t \cdot \color{blue}{\left(x \cdot \left({y}^{2} \cdot \frac{1}{2}\right)\right)}, x\right) \]
      7. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, t \cdot \color{blue}{\left(x \cdot \left({y}^{2} \cdot \frac{1}{2}\right)\right)}, x\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, t \cdot \left(x \cdot \color{blue}{\left({y}^{2} \cdot \frac{1}{2}\right)}\right), x\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{fma}\left(t, t \cdot \left(x \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot \frac{1}{2}\right)\right), x\right) \]
      10. lower-*.f6473.4

        \[\leadsto \mathsf{fma}\left(t, t \cdot \left(x \cdot \left(\color{blue}{\left(y \cdot y\right)} \cdot 0.5\right)\right), x\right) \]
    11. Simplified73.4%

      \[\leadsto \mathsf{fma}\left(t, \color{blue}{t \cdot \left(x \cdot \left(\left(y \cdot y\right) \cdot 0.5\right)\right)}, x\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification60.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 -5 \cdot 10^{+269}:\\ \;\;\;\;t \cdot \frac{x}{t}\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -5 \cdot 10^{+211}:\\ \;\;\;\;\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(t \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 -4 \cdot 10^{+16}:\\ \;\;\;\;\left(0.5 \cdot \left(a \cdot a\right)\right) \cdot \left(x \cdot \left(b \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t, t \cdot \left(x \cdot \left(\left(y \cdot y\right) \cdot 0.5\right)\right), x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 33.7% 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 -5 \cdot 10^{+269}:\\ \;\;\;\;t \cdot \frac{x}{t}\\ \mathbf{elif}\;t\_1 \leq -4000000000:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\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 -5e+269)
     (* t (/ x t))
     (if (<= t_1 -4000000000.0) (* t (* x (- y))) (* 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 <= -5e+269) {
		tmp = t * (x / t);
	} else if (t_1 <= -4000000000.0) {
		tmp = t * (x * -y);
	} else {
		tmp = x * (1.0 - (y * t));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
    if (t_1 <= (-5d+269)) then
        tmp = t * (x / t)
    else if (t_1 <= (-4000000000.0d0)) then
        tmp = t * (x * -y)
    else
        tmp = x * (1.0d0 - (y * t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
	double tmp;
	if (t_1 <= -5e+269) {
		tmp = t * (x / t);
	} else if (t_1 <= -4000000000.0) {
		tmp = t * (x * -y);
	} else {
		tmp = x * (1.0 - (y * t));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))
	tmp = 0
	if t_1 <= -5e+269:
		tmp = t * (x / t)
	elif t_1 <= -4000000000.0:
		tmp = t * (x * -y)
	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 <= -5e+269)
		tmp = Float64(t * Float64(x / t));
	elseif (t_1 <= -4000000000.0)
		tmp = Float64(t * Float64(x * Float64(-y)));
	else
		tmp = Float64(x * Float64(1.0 - Float64(y * t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
	tmp = 0.0;
	if (t_1 <= -5e+269)
		tmp = t * (x / t);
	elseif (t_1 <= -4000000000.0)
		tmp = t * (x * -y);
	else
		tmp = x * (1.0 - (y * t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+269], N[(t * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -4000000000.0], N[(t * N[(x * (-y)), $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 -5 \cdot 10^{+269}:\\
\;\;\;\;t \cdot \frac{x}{t}\\

\mathbf{elif}\;t\_1 \leq -4000000000:\\
\;\;\;\;t \cdot \left(x \cdot \left(-y\right)\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))) < -5.0000000000000002e269

    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.f6465.7

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Simplified65.7%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0

      \[\leadsto \color{blue}{x + -1 \cdot \left(t \cdot \left(x \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot y\right)\right) + x} \]
      2. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot y\right)\right)\right)} + x \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} + x \]
      4. mul-1-negN/A

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} + x \]
      5. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right), x\right)} \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(x \cdot y\right)}, x\right) \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-1 \cdot y\right)}, x\right) \]
      9. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(-1 \cdot y\right)}, x\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      11. lower-neg.f642.8

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-y\right)}, x\right) \]
    8. Simplified2.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, x \cdot \left(-y\right), x\right)} \]
    9. Taylor expanded in t around inf

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(x \cdot y\right) + \frac{x}{t}\right)} \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(x \cdot y\right) + \frac{x}{t}\right)} \]
      2. +-commutativeN/A

        \[\leadsto t \cdot \color{blue}{\left(\frac{x}{t} + -1 \cdot \left(x \cdot y\right)\right)} \]
      3. mul-1-negN/A

        \[\leadsto t \cdot \left(\frac{x}{t} + \color{blue}{\left(\mathsf{neg}\left(x \cdot y\right)\right)}\right) \]
      4. unsub-negN/A

        \[\leadsto t \cdot \color{blue}{\left(\frac{x}{t} - x \cdot y\right)} \]
      5. lower--.f64N/A

        \[\leadsto t \cdot \color{blue}{\left(\frac{x}{t} - x \cdot y\right)} \]
      6. lower-/.f64N/A

        \[\leadsto t \cdot \left(\color{blue}{\frac{x}{t}} - x \cdot y\right) \]
      7. lower-*.f6411.6

        \[\leadsto t \cdot \left(\frac{x}{t} - \color{blue}{x \cdot y}\right) \]
    11. Simplified11.6%

      \[\leadsto \color{blue}{t \cdot \left(\frac{x}{t} - x \cdot y\right)} \]
    12. Taylor expanded in t around 0

      \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]
    13. Step-by-step derivation
      1. lower-/.f6437.8

        \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]
    14. Simplified37.8%

      \[\leadsto t \cdot \color{blue}{\frac{x}{t}} \]

    if -5.0000000000000002e269 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -4e9

    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.f6441.7

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Simplified41.7%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0

      \[\leadsto \color{blue}{x + -1 \cdot \left(t \cdot \left(x \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot y\right)\right) + x} \]
      2. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot y\right)\right)\right)} + x \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} + x \]
      4. mul-1-negN/A

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} + x \]
      5. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right), x\right)} \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(x \cdot y\right)}, x\right) \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-1 \cdot y\right)}, x\right) \]
      9. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(-1 \cdot y\right)}, x\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      11. lower-neg.f643.2

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-y\right)}, x\right) \]
    8. Simplified3.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, x \cdot \left(-y\right), x\right)} \]
    9. Taylor expanded in t around inf

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot y\right)\right)} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(t \cdot \left(x \cdot y\right)\right)} \]
      2. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} \]
      3. mul-1-negN/A

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(x \cdot y\right)\right)} \]
      5. mul-1-negN/A

        \[\leadsto t \cdot \color{blue}{\left(\mathsf{neg}\left(x \cdot y\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto t \cdot \left(\mathsf{neg}\left(\color{blue}{y \cdot x}\right)\right) \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto t \cdot \color{blue}{\left(y \cdot \left(\mathsf{neg}\left(x\right)\right)\right)} \]
      8. neg-mul-1N/A

        \[\leadsto t \cdot \left(y \cdot \color{blue}{\left(-1 \cdot x\right)}\right) \]
      9. lower-*.f64N/A

        \[\leadsto t \cdot \color{blue}{\left(y \cdot \left(-1 \cdot x\right)\right)} \]
      10. neg-mul-1N/A

        \[\leadsto t \cdot \left(y \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      11. lower-neg.f6422.4

        \[\leadsto t \cdot \left(y \cdot \color{blue}{\left(-x\right)}\right) \]
    11. Simplified22.4%

      \[\leadsto \color{blue}{t \cdot \left(y \cdot \left(-x\right)\right)} \]

    if -4e9 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

    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 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.5

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Simplified68.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 + -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-*.f6451.6

        \[\leadsto x \cdot \left(1 - \color{blue}{y \cdot t}\right) \]
    8. Simplified51.6%

      \[\leadsto x \cdot \color{blue}{\left(1 - y \cdot t\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification42.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 -5 \cdot 10^{+269}:\\ \;\;\;\;t \cdot \frac{x}{t}\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -4000000000:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 31.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(x \cdot \left(-y\right)\right)\\ t_2 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\ \mathbf{if}\;t\_2 \leq -4000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5000000000:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* t (* x (- y))))
        (t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
   (if (<= t_2 -4000000000.0)
     t_1
     (if (<= t_2 5000000000.0) (* x (- 1.0 (* a b))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * (x * -y);
	double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
	double tmp;
	if (t_2 <= -4000000000.0) {
		tmp = t_1;
	} else if (t_2 <= 5000000000.0) {
		tmp = x * (1.0 - (a * b));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * (x * -y)
    t_2 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
    if (t_2 <= (-4000000000.0d0)) then
        tmp = t_1
    else if (t_2 <= 5000000000.0d0) then
        tmp = x * (1.0d0 - (a * b))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * (x * -y);
	double t_2 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
	double tmp;
	if (t_2 <= -4000000000.0) {
		tmp = t_1;
	} else if (t_2 <= 5000000000.0) {
		tmp = x * (1.0 - (a * b));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t * (x * -y)
	t_2 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))
	tmp = 0
	if t_2 <= -4000000000.0:
		tmp = t_1
	elif t_2 <= 5000000000.0:
		tmp = x * (1.0 - (a * b))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t * Float64(x * Float64(-y)))
	t_2 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))
	tmp = 0.0
	if (t_2 <= -4000000000.0)
		tmp = t_1;
	elseif (t_2 <= 5000000000.0)
		tmp = Float64(x * Float64(1.0 - Float64(a * b)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t * (x * -y);
	t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
	tmp = 0.0;
	if (t_2 <= -4000000000.0)
		tmp = t_1;
	elseif (t_2 <= 5000000000.0)
		tmp = x * (1.0 - (a * b));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(x * (-y)), $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, -4000000000.0], t$95$1, If[LessEqual[t$95$2, 5000000000.0], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \left(x \cdot \left(-y\right)\right)\\
t_2 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_2 \leq -4000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 5000000000:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -4e9 or 5e9 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

    1. Initial program 98.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(t \cdot y\right)}} \]
      2. *-commutativeN/A

        \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      4. lower-*.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. lower-neg.f6455.4

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Simplified55.4%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0

      \[\leadsto \color{blue}{x + -1 \cdot \left(t \cdot \left(x \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot y\right)\right) + x} \]
      2. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot y\right)\right)\right)} + x \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} + x \]
      4. mul-1-negN/A

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} + x \]
      5. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right), x\right)} \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(x \cdot y\right)}, x\right) \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-1 \cdot y\right)}, x\right) \]
      9. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(-1 \cdot y\right)}, x\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      11. lower-neg.f6417.6

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-y\right)}, x\right) \]
    8. Simplified17.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, x \cdot \left(-y\right), x\right)} \]
    9. Taylor expanded in t around inf

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot y\right)\right)} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(t \cdot \left(x \cdot y\right)\right)} \]
      2. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} \]
      3. mul-1-negN/A

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(x \cdot y\right)\right)} \]
      5. mul-1-negN/A

        \[\leadsto t \cdot \color{blue}{\left(\mathsf{neg}\left(x \cdot y\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto t \cdot \left(\mathsf{neg}\left(\color{blue}{y \cdot x}\right)\right) \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto t \cdot \color{blue}{\left(y \cdot \left(\mathsf{neg}\left(x\right)\right)\right)} \]
      8. neg-mul-1N/A

        \[\leadsto t \cdot \left(y \cdot \color{blue}{\left(-1 \cdot x\right)}\right) \]
      9. lower-*.f64N/A

        \[\leadsto t \cdot \color{blue}{\left(y \cdot \left(-1 \cdot x\right)\right)} \]
      10. neg-mul-1N/A

        \[\leadsto t \cdot \left(y \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      11. lower-neg.f6426.8

        \[\leadsto t \cdot \left(y \cdot \color{blue}{\left(-x\right)}\right) \]
    11. Simplified26.8%

      \[\leadsto \color{blue}{t \cdot \left(y \cdot \left(-x\right)\right)} \]

    if -4e9 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5e9

    1. Initial program 87.5%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      2. lower-neg.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
      3. lower-*.f6485.1

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified85.1%

      \[\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-*.f6483.4

        \[\leadsto x \cdot \left(1 - \color{blue}{a \cdot b}\right) \]
    8. Simplified83.4%

      \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification38.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 -4000000000:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 5000000000:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 31.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(x \cdot \left(-y\right)\right)\\ t_2 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\ \mathbf{if}\;t\_2 \leq -4000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5000000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* t (* x (- y))))
        (t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
   (if (<= t_2 -4000000000.0) t_1 (if (<= t_2 5000000000.0) x t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * (x * -y);
	double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
	double tmp;
	if (t_2 <= -4000000000.0) {
		tmp = t_1;
	} else if (t_2 <= 5000000000.0) {
		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 = t * (x * -y)
    t_2 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
    if (t_2 <= (-4000000000.0d0)) then
        tmp = t_1
    else if (t_2 <= 5000000000.0d0) 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 = t * (x * -y);
	double t_2 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
	double tmp;
	if (t_2 <= -4000000000.0) {
		tmp = t_1;
	} else if (t_2 <= 5000000000.0) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t * (x * -y)
	t_2 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))
	tmp = 0
	if t_2 <= -4000000000.0:
		tmp = t_1
	elif t_2 <= 5000000000.0:
		tmp = x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t * Float64(x * Float64(-y)))
	t_2 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))
	tmp = 0.0
	if (t_2 <= -4000000000.0)
		tmp = t_1;
	elseif (t_2 <= 5000000000.0)
		tmp = x;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t * (x * -y);
	t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
	tmp = 0.0;
	if (t_2 <= -4000000000.0)
		tmp = t_1;
	elseif (t_2 <= 5000000000.0)
		tmp = x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(x * (-y)), $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, -4000000000.0], t$95$1, If[LessEqual[t$95$2, 5000000000.0], x, t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \left(x \cdot \left(-y\right)\right)\\
t_2 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\
\mathbf{if}\;t\_2 \leq -4000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 5000000000:\\
\;\;\;\;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))) < -4e9 or 5e9 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

    1. Initial program 98.0%

      \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(t \cdot y\right)}} \]
      2. *-commutativeN/A

        \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      4. lower-*.f64N/A

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
      5. lower-neg.f6455.4

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Simplified55.4%

      \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
    6. Taylor expanded in y around 0

      \[\leadsto \color{blue}{x + -1 \cdot \left(t \cdot \left(x \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot y\right)\right) + x} \]
      2. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot y\right)\right)\right)} + x \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} + x \]
      4. mul-1-negN/A

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} + x \]
      5. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right), x\right)} \]
      6. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(x \cdot y\right)}, x\right) \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-1 \cdot y\right)}, x\right) \]
      9. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(-1 \cdot y\right)}, x\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
      11. lower-neg.f6417.6

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-y\right)}, x\right) \]
    8. Simplified17.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t, x \cdot \left(-y\right), x\right)} \]
    9. Taylor expanded in t around inf

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot y\right)\right)} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(t \cdot \left(x \cdot y\right)\right)} \]
      2. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} \]
      3. mul-1-negN/A

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(x \cdot y\right)\right)} \]
      5. mul-1-negN/A

        \[\leadsto t \cdot \color{blue}{\left(\mathsf{neg}\left(x \cdot y\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto t \cdot \left(\mathsf{neg}\left(\color{blue}{y \cdot x}\right)\right) \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto t \cdot \color{blue}{\left(y \cdot \left(\mathsf{neg}\left(x\right)\right)\right)} \]
      8. neg-mul-1N/A

        \[\leadsto t \cdot \left(y \cdot \color{blue}{\left(-1 \cdot x\right)}\right) \]
      9. lower-*.f64N/A

        \[\leadsto t \cdot \color{blue}{\left(y \cdot \left(-1 \cdot x\right)\right)} \]
      10. neg-mul-1N/A

        \[\leadsto t \cdot \left(y \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
      11. lower-neg.f6426.8

        \[\leadsto t \cdot \left(y \cdot \color{blue}{\left(-x\right)}\right) \]
    11. Simplified26.8%

      \[\leadsto \color{blue}{t \cdot \left(y \cdot \left(-x\right)\right)} \]

    if -4e9 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 5e9

    1. Initial program 87.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 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.f6484.1

        \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
    5. Simplified84.1%

      \[\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. Simplified81.8%

        \[\leadsto x \cdot \color{blue}{1} \]
      2. Step-by-step derivation
        1. *-rgt-identity81.8

          \[\leadsto \color{blue}{x} \]
      3. Applied egg-rr81.8%

        \[\leadsto \color{blue}{x} \]
    8. Recombined 2 regimes into one program.
    9. Final simplification38.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 -4000000000:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 5000000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \end{array} \]
    10. Add Preprocessing

    Alternative 11: 32.9% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \leq 0:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))) 0.0)
       (* t (* x (- y)))
       (* x (- 1.0 (* y t)))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))) <= 0.0) {
    		tmp = t * (x * -y);
    	} else {
    		tmp = x * (1.0 - (y * t));
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a, b)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8) :: tmp
        if (exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b)))) <= 0.0d0) then
            tmp = t * (x * -y)
        else
            tmp = x * (1.0d0 - (y * t))
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b)))) <= 0.0) {
    		tmp = t * (x * -y);
    	} else {
    		tmp = x * (1.0 - (y * t));
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	tmp = 0
    	if math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b)))) <= 0.0:
    		tmp = t * (x * -y)
    	else:
    		tmp = x * (1.0 - (y * t))
    	return tmp
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))) <= 0.0)
    		tmp = Float64(t * Float64(x * Float64(-y)));
    	else
    		tmp = Float64(x * Float64(1.0 - Float64(y * t)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	tmp = 0.0;
    	if (exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))) <= 0.0)
    		tmp = t * (x * -y);
    	else
    		tmp = x * (1.0 - (y * t));
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[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], 0.0], N[(t * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \leq 0:\\
    \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))) < 0.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.f6451.3

          \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
      5. Simplified51.3%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
      6. Taylor expanded in y around 0

        \[\leadsto \color{blue}{x + -1 \cdot \left(t \cdot \left(x \cdot y\right)\right)} \]
      7. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot y\right)\right) + x} \]
        2. mul-1-negN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot y\right)\right)\right)} + x \]
        3. distribute-rgt-neg-inN/A

          \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} + x \]
        4. mul-1-negN/A

          \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} + x \]
        5. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right), x\right)} \]
        6. mul-1-negN/A

          \[\leadsto \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(x \cdot y\right)}, x\right) \]
        7. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
        8. mul-1-negN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-1 \cdot y\right)}, x\right) \]
        9. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(-1 \cdot y\right)}, x\right) \]
        10. mul-1-negN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
        11. lower-neg.f643.0

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-y\right)}, x\right) \]
      8. Simplified3.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, x \cdot \left(-y\right), x\right)} \]
      9. Taylor expanded in t around inf

        \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot y\right)\right)} \]
      10. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(t \cdot \left(x \cdot y\right)\right)} \]
        2. distribute-rgt-neg-inN/A

          \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} \]
        3. mul-1-negN/A

          \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} \]
        4. lower-*.f64N/A

          \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(x \cdot y\right)\right)} \]
        5. mul-1-negN/A

          \[\leadsto t \cdot \color{blue}{\left(\mathsf{neg}\left(x \cdot y\right)\right)} \]
        6. *-commutativeN/A

          \[\leadsto t \cdot \left(\mathsf{neg}\left(\color{blue}{y \cdot x}\right)\right) \]
        7. distribute-rgt-neg-inN/A

          \[\leadsto t \cdot \color{blue}{\left(y \cdot \left(\mathsf{neg}\left(x\right)\right)\right)} \]
        8. neg-mul-1N/A

          \[\leadsto t \cdot \left(y \cdot \color{blue}{\left(-1 \cdot x\right)}\right) \]
        9. lower-*.f64N/A

          \[\leadsto t \cdot \color{blue}{\left(y \cdot \left(-1 \cdot x\right)\right)} \]
        10. neg-mul-1N/A

          \[\leadsto t \cdot \left(y \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \]
        11. lower-neg.f6420.9

          \[\leadsto t \cdot \left(y \cdot \color{blue}{\left(-x\right)}\right) \]
      11. Simplified20.9%

        \[\leadsto \color{blue}{t \cdot \left(y \cdot \left(-x\right)\right)} \]

      if 0.0 < (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))

      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 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.5

          \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
      5. Simplified68.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 + -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-*.f6451.6

          \[\leadsto x \cdot \left(1 - \color{blue}{y \cdot t}\right) \]
      8. Simplified51.6%

        \[\leadsto x \cdot \color{blue}{\left(1 - y \cdot t\right)} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification39.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \leq 0:\\ \;\;\;\;t \cdot \left(x \cdot \left(-y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 12: 25.3% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \leq 0:\\ \;\;\;\;y \cdot \left(x \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot y, t, x\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))) 0.0)
       (* y (* x t))
       (fma (* x y) t x)))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))) <= 0.0) {
    		tmp = y * (x * t);
    	} else {
    		tmp = fma((x * y), t, x);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))) <= 0.0)
    		tmp = Float64(y * Float64(x * t));
    	else
    		tmp = fma(Float64(x * y), t, x);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[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], 0.0], N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] * t + x), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \leq 0:\\
    \;\;\;\;y \cdot \left(x \cdot t\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(x \cdot y, t, x\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))) < 0.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.f6451.3

          \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
      5. Simplified51.3%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
      6. Taylor expanded in y around 0

        \[\leadsto \color{blue}{x + -1 \cdot \left(t \cdot \left(x \cdot y\right)\right)} \]
      7. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot y\right)\right) + x} \]
        2. mul-1-negN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot y\right)\right)\right)} + x \]
        3. distribute-rgt-neg-inN/A

          \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} + x \]
        4. mul-1-negN/A

          \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} + x \]
        5. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right), x\right)} \]
        6. mul-1-negN/A

          \[\leadsto \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(x \cdot y\right)}, x\right) \]
        7. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
        8. mul-1-negN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-1 \cdot y\right)}, x\right) \]
        9. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(-1 \cdot y\right)}, x\right) \]
        10. mul-1-negN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
        11. lower-neg.f643.0

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-y\right)}, x\right) \]
      8. Simplified3.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, x \cdot \left(-y\right), x\right)} \]
      9. Step-by-step derivation
        1. neg-sub0N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 - y\right)}, x\right) \]
        2. sub-negN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 + \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        3. lift-neg.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \left(0 + \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right), x\right) \]
        4. flip3-+N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\frac{{0}^{3} + {\left(\mathsf{neg}\left(y\right)\right)}^{3}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}}, x\right) \]
        5. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\frac{{0}^{3} + {\left(\mathsf{neg}\left(y\right)\right)}^{3}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}}, x\right) \]
        6. metadata-evalN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{\color{blue}{0} + {\left(\mathsf{neg}\left(y\right)\right)}^{3}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        7. sqr-powN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + \color{blue}{{\left(\mathsf{neg}\left(y\right)\right)}^{\left(\frac{3}{2}\right)} \cdot {\left(\mathsf{neg}\left(y\right)\right)}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        8. pow-prod-downN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + \color{blue}{{\left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        9. lift-neg.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + {\left(\color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}^{\left(\frac{3}{2}\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        10. lift-neg.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + {\left(\left(\mathsf{neg}\left(y\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right)}^{\left(\frac{3}{2}\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        11. sqr-negN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + {\color{blue}{\left(y \cdot y\right)}}^{\left(\frac{3}{2}\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        12. pow-prod-downN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + \color{blue}{{y}^{\left(\frac{3}{2}\right)} \cdot {y}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        13. sqr-powN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + \color{blue}{{y}^{3}}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        14. cube-unmultN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + \color{blue}{y \cdot \left(y \cdot y\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        15. lift-*.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \color{blue}{\left(y \cdot y\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        16. lift-*.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + \color{blue}{y \cdot \left(y \cdot y\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        17. lower-+.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{\color{blue}{0 + y \cdot \left(y \cdot y\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        18. metadata-evalN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{\color{blue}{0} + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        19. lower-+.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{\color{blue}{0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}}, x\right) \]
        20. lift-neg.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(\color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        21. lift-neg.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        22. sqr-negN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(\color{blue}{y \cdot y} - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        23. lift-*.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(\color{blue}{y \cdot y} - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
      10. Applied egg-rr1.5%

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(y \cdot y - 0 \cdot \left(-y\right)\right)}}, x\right) \]
      11. Taylor expanded in t around inf

        \[\leadsto \color{blue}{t \cdot \left(x \cdot y\right)} \]
      12. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\left(x \cdot y\right) \cdot t} \]
        2. *-commutativeN/A

          \[\leadsto \color{blue}{\left(y \cdot x\right)} \cdot t \]
        3. associate-*r*N/A

          \[\leadsto \color{blue}{y \cdot \left(x \cdot t\right)} \]
        4. *-commutativeN/A

          \[\leadsto y \cdot \color{blue}{\left(t \cdot x\right)} \]
        5. lower-*.f64N/A

          \[\leadsto \color{blue}{y \cdot \left(t \cdot x\right)} \]
        6. *-commutativeN/A

          \[\leadsto y \cdot \color{blue}{\left(x \cdot t\right)} \]
        7. lower-*.f6417.2

          \[\leadsto y \cdot \color{blue}{\left(x \cdot t\right)} \]
      13. Simplified17.2%

        \[\leadsto \color{blue}{y \cdot \left(x \cdot t\right)} \]

      if 0.0 < (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))

      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 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.5

          \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
      5. Simplified68.5%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
      6. Taylor expanded in y around 0

        \[\leadsto \color{blue}{x + -1 \cdot \left(t \cdot \left(x \cdot y\right)\right)} \]
      7. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot y\right)\right) + x} \]
        2. mul-1-negN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot y\right)\right)\right)} + x \]
        3. distribute-rgt-neg-inN/A

          \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} + x \]
        4. mul-1-negN/A

          \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} + x \]
        5. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right), x\right)} \]
        6. mul-1-negN/A

          \[\leadsto \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(x \cdot y\right)}, x\right) \]
        7. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
        8. mul-1-negN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-1 \cdot y\right)}, x\right) \]
        9. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(-1 \cdot y\right)}, x\right) \]
        10. mul-1-negN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
        11. lower-neg.f6450.8

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-y\right)}, x\right) \]
      8. Simplified50.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, x \cdot \left(-y\right), x\right)} \]
      9. Step-by-step derivation
        1. neg-sub0N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 - y\right)}, x\right) \]
        2. sub-negN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 + \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        3. lift-neg.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \left(0 + \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right), x\right) \]
        4. flip3-+N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\frac{{0}^{3} + {\left(\mathsf{neg}\left(y\right)\right)}^{3}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}}, x\right) \]
        5. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\frac{{0}^{3} + {\left(\mathsf{neg}\left(y\right)\right)}^{3}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}}, x\right) \]
        6. metadata-evalN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{\color{blue}{0} + {\left(\mathsf{neg}\left(y\right)\right)}^{3}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        7. sqr-powN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + \color{blue}{{\left(\mathsf{neg}\left(y\right)\right)}^{\left(\frac{3}{2}\right)} \cdot {\left(\mathsf{neg}\left(y\right)\right)}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        8. pow-prod-downN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + \color{blue}{{\left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        9. lift-neg.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + {\left(\color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}^{\left(\frac{3}{2}\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        10. lift-neg.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + {\left(\left(\mathsf{neg}\left(y\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right)}^{\left(\frac{3}{2}\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        11. sqr-negN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + {\color{blue}{\left(y \cdot y\right)}}^{\left(\frac{3}{2}\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        12. pow-prod-downN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + \color{blue}{{y}^{\left(\frac{3}{2}\right)} \cdot {y}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        13. sqr-powN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + \color{blue}{{y}^{3}}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        14. cube-unmultN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + \color{blue}{y \cdot \left(y \cdot y\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        15. lift-*.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \color{blue}{\left(y \cdot y\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        16. lift-*.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + \color{blue}{y \cdot \left(y \cdot y\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        17. lower-+.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{\color{blue}{0 + y \cdot \left(y \cdot y\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        18. metadata-evalN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{\color{blue}{0} + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        19. lower-+.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{\color{blue}{0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}}, x\right) \]
        20. lift-neg.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(\color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        21. lift-neg.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        22. sqr-negN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(\color{blue}{y \cdot y} - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        23. lift-*.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(\color{blue}{y \cdot y} - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
      10. Applied egg-rr11.8%

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(y \cdot y - 0 \cdot \left(-y\right)\right)}}, x\right) \]
      11. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto t \cdot \left(x \cdot \frac{0 + y \cdot \color{blue}{\left(y \cdot y\right)}}{0 + \left(y \cdot y - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}\right) + x \]
        2. lift-*.f64N/A

          \[\leadsto t \cdot \left(x \cdot \frac{0 + \color{blue}{y \cdot \left(y \cdot y\right)}}{0 + \left(y \cdot y - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}\right) + x \]
        3. lift-+.f64N/A

          \[\leadsto t \cdot \left(x \cdot \frac{\color{blue}{0 + y \cdot \left(y \cdot y\right)}}{0 + \left(y \cdot y - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}\right) + x \]
        4. lift-*.f64N/A

          \[\leadsto t \cdot \left(x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(\color{blue}{y \cdot y} - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}\right) + x \]
        5. lift-neg.f64N/A

          \[\leadsto t \cdot \left(x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(y \cdot y - 0 \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right)}\right) + x \]
        6. lift-*.f64N/A

          \[\leadsto t \cdot \left(x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(y \cdot y - \color{blue}{0 \cdot \left(\mathsf{neg}\left(y\right)\right)}\right)}\right) + x \]
        7. lift--.f64N/A

          \[\leadsto t \cdot \left(x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \color{blue}{\left(y \cdot y - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}}\right) + x \]
        8. lift-+.f64N/A

          \[\leadsto t \cdot \left(x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{\color{blue}{0 + \left(y \cdot y - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}}\right) + x \]
        9. lift-/.f64N/A

          \[\leadsto t \cdot \left(x \cdot \color{blue}{\frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(y \cdot y - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}}\right) + x \]
        10. lift-*.f64N/A

          \[\leadsto t \cdot \color{blue}{\left(x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(y \cdot y - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}\right)} + x \]
      12. Applied egg-rr34.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot y, t, x\right)} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 13: 24.2% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \leq 0:\\ \;\;\;\;y \cdot \left(x \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))) 0.0)
       (* y (* x t))
       x))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))) <= 0.0) {
    		tmp = y * (x * t);
    	} else {
    		tmp = x;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a, b)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8) :: tmp
        if (exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b)))) <= 0.0d0) then
            tmp = y * (x * t)
        else
            tmp = x
        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 (Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b)))) <= 0.0) {
    		tmp = y * (x * t);
    	} else {
    		tmp = x;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	tmp = 0
    	if math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b)))) <= 0.0:
    		tmp = y * (x * t)
    	else:
    		tmp = x
    	return tmp
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))) <= 0.0)
    		tmp = Float64(y * Float64(x * t));
    	else
    		tmp = x;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	tmp = 0.0;
    	if (exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))) <= 0.0)
    		tmp = y * (x * t);
    	else
    		tmp = x;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[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], 0.0], N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision], x]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \leq 0:\\
    \;\;\;\;y \cdot \left(x \cdot t\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;x\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))) < 0.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.f6451.3

          \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
      5. Simplified51.3%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
      6. Taylor expanded in y around 0

        \[\leadsto \color{blue}{x + -1 \cdot \left(t \cdot \left(x \cdot y\right)\right)} \]
      7. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(x \cdot y\right)\right) + x} \]
        2. mul-1-negN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(t \cdot \left(x \cdot y\right)\right)\right)} + x \]
        3. distribute-rgt-neg-inN/A

          \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(x \cdot y\right)\right)} + x \]
        4. mul-1-negN/A

          \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} + x \]
        5. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right), x\right)} \]
        6. mul-1-negN/A

          \[\leadsto \mathsf{fma}\left(t, \color{blue}{\mathsf{neg}\left(x \cdot y\right)}, x\right) \]
        7. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
        8. mul-1-negN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-1 \cdot y\right)}, x\right) \]
        9. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(t, \color{blue}{x \cdot \left(-1 \cdot y\right)}, x\right) \]
        10. mul-1-negN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}, x\right) \]
        11. lower-neg.f643.0

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(-y\right)}, x\right) \]
      8. Simplified3.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, x \cdot \left(-y\right), x\right)} \]
      9. Step-by-step derivation
        1. neg-sub0N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 - y\right)}, x\right) \]
        2. sub-negN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\left(0 + \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        3. lift-neg.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \left(0 + \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right), x\right) \]
        4. flip3-+N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\frac{{0}^{3} + {\left(\mathsf{neg}\left(y\right)\right)}^{3}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}}, x\right) \]
        5. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\frac{{0}^{3} + {\left(\mathsf{neg}\left(y\right)\right)}^{3}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}}, x\right) \]
        6. metadata-evalN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{\color{blue}{0} + {\left(\mathsf{neg}\left(y\right)\right)}^{3}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        7. sqr-powN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + \color{blue}{{\left(\mathsf{neg}\left(y\right)\right)}^{\left(\frac{3}{2}\right)} \cdot {\left(\mathsf{neg}\left(y\right)\right)}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        8. pow-prod-downN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + \color{blue}{{\left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        9. lift-neg.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + {\left(\color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}^{\left(\frac{3}{2}\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        10. lift-neg.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + {\left(\left(\mathsf{neg}\left(y\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right)}^{\left(\frac{3}{2}\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        11. sqr-negN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + {\color{blue}{\left(y \cdot y\right)}}^{\left(\frac{3}{2}\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        12. pow-prod-downN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + \color{blue}{{y}^{\left(\frac{3}{2}\right)} \cdot {y}^{\left(\frac{3}{2}\right)}}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        13. sqr-powN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + \color{blue}{{y}^{3}}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        14. cube-unmultN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + \color{blue}{y \cdot \left(y \cdot y\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        15. lift-*.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \color{blue}{\left(y \cdot y\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        16. lift-*.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + \color{blue}{y \cdot \left(y \cdot y\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        17. lower-+.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{\color{blue}{0 + y \cdot \left(y \cdot y\right)}}{0 \cdot 0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        18. metadata-evalN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{\color{blue}{0} + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        19. lower-+.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{\color{blue}{0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}}, x\right) \]
        20. lift-neg.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(\color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \cdot \left(\mathsf{neg}\left(y\right)\right) - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        21. lift-neg.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        22. sqr-negN/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(\color{blue}{y \cdot y} - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
        23. lift-*.f64N/A

          \[\leadsto \mathsf{fma}\left(t, x \cdot \frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(\color{blue}{y \cdot y} - 0 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}, x\right) \]
      10. Applied egg-rr1.5%

        \[\leadsto \mathsf{fma}\left(t, x \cdot \color{blue}{\frac{0 + y \cdot \left(y \cdot y\right)}{0 + \left(y \cdot y - 0 \cdot \left(-y\right)\right)}}, x\right) \]
      11. Taylor expanded in t around inf

        \[\leadsto \color{blue}{t \cdot \left(x \cdot y\right)} \]
      12. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\left(x \cdot y\right) \cdot t} \]
        2. *-commutativeN/A

          \[\leadsto \color{blue}{\left(y \cdot x\right)} \cdot t \]
        3. associate-*r*N/A

          \[\leadsto \color{blue}{y \cdot \left(x \cdot t\right)} \]
        4. *-commutativeN/A

          \[\leadsto y \cdot \color{blue}{\left(t \cdot x\right)} \]
        5. lower-*.f64N/A

          \[\leadsto \color{blue}{y \cdot \left(t \cdot x\right)} \]
        6. *-commutativeN/A

          \[\leadsto y \cdot \color{blue}{\left(x \cdot t\right)} \]
        7. lower-*.f6417.2

          \[\leadsto y \cdot \color{blue}{\left(x \cdot t\right)} \]
      13. Simplified17.2%

        \[\leadsto \color{blue}{y \cdot \left(x \cdot t\right)} \]

      if 0.0 < (exp.f64 (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))))

      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 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.f6476.8

          \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
      5. Simplified76.8%

        \[\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. Simplified32.1%

          \[\leadsto x \cdot \color{blue}{1} \]
        2. Step-by-step derivation
          1. *-rgt-identity32.1

            \[\leadsto \color{blue}{x} \]
        3. Applied egg-rr32.1%

          \[\leadsto \color{blue}{x} \]
      8. Recombined 2 regimes into one program.
      9. Add Preprocessing

      Alternative 14: 58.9% accurate, 1.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq 2 \cdot 10^{+75}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(t \cdot \mathsf{fma}\left(x, \left(y \cdot y\right) \cdot 0.5, \frac{\mathsf{fma}\left(x, -y, \frac{x}{t}\right)}{t}\right)\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))) 2e+75)
         (* x (pow z y))
         (* t (* t (fma x (* (* y y) 0.5) (/ (fma x (- y) (/ x t)) t))))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))) <= 2e+75) {
      		tmp = x * pow(z, y);
      	} else {
      		tmp = t * (t * fma(x, ((y * y) * 0.5), (fma(x, -y, (x / t)) / t)));
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))) <= 2e+75)
      		tmp = Float64(x * (z ^ y));
      	else
      		tmp = Float64(t * Float64(t * fma(x, Float64(Float64(y * y) * 0.5), Float64(fma(x, Float64(-y), Float64(x / t)) / t))));
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+75], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(t * N[(t * N[(x * N[(N[(y * y), $MachinePrecision] * 0.5), $MachinePrecision] + N[(N[(x * (-y) + N[(x / t), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $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 2 \cdot 10^{+75}:\\
      \;\;\;\;x \cdot {z}^{y}\\
      
      \mathbf{else}:\\
      \;\;\;\;t \cdot \left(t \cdot \mathsf{fma}\left(x, \left(y \cdot y\right) \cdot 0.5, \frac{\mathsf{fma}\left(x, -y, \frac{x}{t}\right)}{t}\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1.99999999999999985e75

        1. Initial program 95.4%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in y around inf

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
        4. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
          2. lower--.f64N/A

            \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(\log z - t\right)}} \]
          3. lower-log.f6475.9

            \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
        5. Simplified75.9%

          \[\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.f6457.9

            \[\leadsto x \cdot \color{blue}{{z}^{y}} \]
        8. Simplified57.9%

          \[\leadsto \color{blue}{x \cdot {z}^{y}} \]

        if 1.99999999999999985e75 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

        1. Initial program 96.6%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in t around inf

          \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(t \cdot y\right)}} \]
          2. *-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.f6462.5

            \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
        5. Simplified62.5%

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
        6. Taylor expanded in t around 0

          \[\leadsto \color{blue}{x + t \cdot \left(-1 \cdot \left(x \cdot y\right) + \frac{1}{2} \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right)\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(x \cdot y\right) + \frac{1}{2} \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right)\right) + x} \]
          2. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(t, -1 \cdot \left(x \cdot y\right) + \frac{1}{2} \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right), x\right)} \]
          3. +-commutativeN/A

            \[\leadsto \mathsf{fma}\left(t, \color{blue}{\frac{1}{2} \cdot \left(t \cdot \left(x \cdot {y}^{2}\right)\right) + -1 \cdot \left(x \cdot y\right)}, x\right) \]
          4. associate-*r*N/A

            \[\leadsto \mathsf{fma}\left(t, \color{blue}{\left(\frac{1}{2} \cdot t\right) \cdot \left(x \cdot {y}^{2}\right)} + -1 \cdot \left(x \cdot y\right), x\right) \]
          5. lower-fma.f64N/A

            \[\leadsto \mathsf{fma}\left(t, \color{blue}{\mathsf{fma}\left(\frac{1}{2} \cdot t, x \cdot {y}^{2}, -1 \cdot \left(x \cdot y\right)\right)}, x\right) \]
          6. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\color{blue}{\frac{1}{2} \cdot t}, x \cdot {y}^{2}, -1 \cdot \left(x \cdot y\right)\right), x\right) \]
          7. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2} \cdot t, \color{blue}{x \cdot {y}^{2}}, -1 \cdot \left(x \cdot y\right)\right), x\right) \]
          8. unpow2N/A

            \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2} \cdot t, x \cdot \color{blue}{\left(y \cdot y\right)}, -1 \cdot \left(x \cdot y\right)\right), x\right) \]
          9. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2} \cdot t, x \cdot \color{blue}{\left(y \cdot y\right)}, -1 \cdot \left(x \cdot y\right)\right), x\right) \]
          10. mul-1-negN/A

            \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2} \cdot t, x \cdot \left(y \cdot y\right), \color{blue}{\mathsf{neg}\left(x \cdot y\right)}\right), x\right) \]
          11. distribute-rgt-neg-inN/A

            \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2} \cdot t, x \cdot \left(y \cdot y\right), \color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}\right), x\right) \]
          12. mul-1-negN/A

            \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2} \cdot t, x \cdot \left(y \cdot y\right), x \cdot \color{blue}{\left(-1 \cdot y\right)}\right), x\right) \]
          13. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2} \cdot t, x \cdot \left(y \cdot y\right), \color{blue}{x \cdot \left(-1 \cdot y\right)}\right), x\right) \]
          14. mul-1-negN/A

            \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(\frac{1}{2} \cdot t, x \cdot \left(y \cdot y\right), x \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right), x\right) \]
          15. lower-neg.f6469.2

            \[\leadsto \mathsf{fma}\left(t, \mathsf{fma}\left(0.5 \cdot t, x \cdot \left(y \cdot y\right), x \cdot \color{blue}{\left(-y\right)}\right), x\right) \]
        8. Simplified69.2%

          \[\leadsto \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(0.5 \cdot t, x \cdot \left(y \cdot y\right), x \cdot \left(-y\right)\right), x\right)} \]
        9. Taylor expanded in t around -inf

          \[\leadsto \color{blue}{{t}^{2} \cdot \left(-1 \cdot \frac{-1 \cdot \frac{x}{t} + x \cdot y}{t} + \frac{1}{2} \cdot \left(x \cdot {y}^{2}\right)\right)} \]
        10. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto \color{blue}{\left(t \cdot t\right)} \cdot \left(-1 \cdot \frac{-1 \cdot \frac{x}{t} + x \cdot y}{t} + \frac{1}{2} \cdot \left(x \cdot {y}^{2}\right)\right) \]
          2. associate-*l*N/A

            \[\leadsto \color{blue}{t \cdot \left(t \cdot \left(-1 \cdot \frac{-1 \cdot \frac{x}{t} + x \cdot y}{t} + \frac{1}{2} \cdot \left(x \cdot {y}^{2}\right)\right)\right)} \]
          3. lower-*.f64N/A

            \[\leadsto \color{blue}{t \cdot \left(t \cdot \left(-1 \cdot \frac{-1 \cdot \frac{x}{t} + x \cdot y}{t} + \frac{1}{2} \cdot \left(x \cdot {y}^{2}\right)\right)\right)} \]
          4. lower-*.f64N/A

            \[\leadsto t \cdot \color{blue}{\left(t \cdot \left(-1 \cdot \frac{-1 \cdot \frac{x}{t} + x \cdot y}{t} + \frac{1}{2} \cdot \left(x \cdot {y}^{2}\right)\right)\right)} \]
          5. +-commutativeN/A

            \[\leadsto t \cdot \left(t \cdot \color{blue}{\left(\frac{1}{2} \cdot \left(x \cdot {y}^{2}\right) + -1 \cdot \frac{-1 \cdot \frac{x}{t} + x \cdot y}{t}\right)}\right) \]
          6. *-commutativeN/A

            \[\leadsto t \cdot \left(t \cdot \left(\color{blue}{\left(x \cdot {y}^{2}\right) \cdot \frac{1}{2}} + -1 \cdot \frac{-1 \cdot \frac{x}{t} + x \cdot y}{t}\right)\right) \]
          7. associate-*l*N/A

            \[\leadsto t \cdot \left(t \cdot \left(\color{blue}{x \cdot \left({y}^{2} \cdot \frac{1}{2}\right)} + -1 \cdot \frac{-1 \cdot \frac{x}{t} + x \cdot y}{t}\right)\right) \]
          8. lower-fma.f64N/A

            \[\leadsto t \cdot \left(t \cdot \color{blue}{\mathsf{fma}\left(x, {y}^{2} \cdot \frac{1}{2}, -1 \cdot \frac{-1 \cdot \frac{x}{t} + x \cdot y}{t}\right)}\right) \]
          9. lower-*.f64N/A

            \[\leadsto t \cdot \left(t \cdot \mathsf{fma}\left(x, \color{blue}{{y}^{2} \cdot \frac{1}{2}}, -1 \cdot \frac{-1 \cdot \frac{x}{t} + x \cdot y}{t}\right)\right) \]
          10. unpow2N/A

            \[\leadsto t \cdot \left(t \cdot \mathsf{fma}\left(x, \color{blue}{\left(y \cdot y\right)} \cdot \frac{1}{2}, -1 \cdot \frac{-1 \cdot \frac{x}{t} + x \cdot y}{t}\right)\right) \]
          11. lower-*.f64N/A

            \[\leadsto t \cdot \left(t \cdot \mathsf{fma}\left(x, \color{blue}{\left(y \cdot y\right)} \cdot \frac{1}{2}, -1 \cdot \frac{-1 \cdot \frac{x}{t} + x \cdot y}{t}\right)\right) \]
          12. associate-*r/N/A

            \[\leadsto t \cdot \left(t \cdot \mathsf{fma}\left(x, \left(y \cdot y\right) \cdot \frac{1}{2}, \color{blue}{\frac{-1 \cdot \left(-1 \cdot \frac{x}{t} + x \cdot y\right)}{t}}\right)\right) \]
        11. Simplified79.1%

          \[\leadsto \color{blue}{t \cdot \left(t \cdot \mathsf{fma}\left(x, \left(y \cdot y\right) \cdot 0.5, \frac{\mathsf{fma}\left(x, -y, \frac{x}{t}\right)}{t}\right)\right)} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 15: 86.7% accurate, 1.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{y \cdot \left(\log z - t\right)}\\ \mathbf{if}\;y \leq -6.8 \cdot 10^{-45}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-47}:\\ \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* x (exp (* y (- (log z) t))))))
         (if (<= y -6.8e-45)
           t_1
           (if (<= y 2.2e-47) (* x (exp (- (* a (+ z b))))) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * exp((y * (log(z) - t)));
      	double tmp;
      	if (y <= -6.8e-45) {
      		tmp = t_1;
      	} else if (y <= 2.2e-47) {
      		tmp = x * exp(-(a * (z + b)));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t, a, b)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: tmp
          t_1 = x * exp((y * (log(z) - t)))
          if (y <= (-6.8d-45)) then
              tmp = t_1
          else if (y <= 2.2d-47) then
              tmp = x * exp(-(a * (z + b)))
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * Math.exp((y * (Math.log(z) - t)));
      	double tmp;
      	if (y <= -6.8e-45) {
      		tmp = t_1;
      	} else if (y <= 2.2e-47) {
      		tmp = x * Math.exp(-(a * (z + b)));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = x * math.exp((y * (math.log(z) - t)))
      	tmp = 0
      	if y <= -6.8e-45:
      		tmp = t_1
      	elif y <= 2.2e-47:
      		tmp = x * math.exp(-(a * (z + b)))
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(x * exp(Float64(y * Float64(log(z) - t))))
      	tmp = 0.0
      	if (y <= -6.8e-45)
      		tmp = t_1;
      	elseif (y <= 2.2e-47)
      		tmp = Float64(x * exp(Float64(-Float64(a * Float64(z + b)))));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = x * exp((y * (log(z) - t)));
      	tmp = 0.0;
      	if (y <= -6.8e-45)
      		tmp = t_1;
      	elseif (y <= 2.2e-47)
      		tmp = x * exp(-(a * (z + b)));
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.8e-45], t$95$1, If[LessEqual[y, 2.2e-47], N[(x * N[Exp[(-N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x \cdot e^{y \cdot \left(\log z - t\right)}\\
      \mathbf{if}\;y \leq -6.8 \cdot 10^{-45}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq 2.2 \cdot 10^{-47}:\\
      \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < -6.80000000000000008e-45 or 2.20000000000000019e-47 < y

        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.f6488.2

            \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
        5. Simplified88.2%

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]

        if -6.80000000000000008e-45 < y < 2.20000000000000019e-47

        1. Initial program 91.8%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto 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.f6490.1

            \[\leadsto x \cdot e^{a \cdot \left(\mathsf{log1p}\left(\color{blue}{-z}\right) - b\right)} \]
        5. Simplified90.1%

          \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
        6. Taylor expanded in z around 0

          \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right) + -1 \cdot \left(a \cdot z\right)}} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot z\right) + -1 \cdot \left(a \cdot b\right)}} \]
          2. associate-*r*N/A

            \[\leadsto x \cdot e^{\color{blue}{\left(-1 \cdot a\right) \cdot z} + -1 \cdot \left(a \cdot b\right)} \]
          3. associate-*r*N/A

            \[\leadsto x \cdot e^{\left(-1 \cdot a\right) \cdot z + \color{blue}{\left(-1 \cdot a\right) \cdot b}} \]
          4. distribute-lft-outN/A

            \[\leadsto x \cdot e^{\color{blue}{\left(-1 \cdot a\right) \cdot \left(z + b\right)}} \]
          5. lower-*.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{\left(-1 \cdot a\right) \cdot \left(z + b\right)}} \]
          6. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot \left(z + b\right)} \]
          7. lower-neg.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot \left(z + b\right)} \]
          8. lower-+.f6490.1

            \[\leadsto x \cdot e^{\left(-a\right) \cdot \color{blue}{\left(z + b\right)}} \]
        8. Simplified90.1%

          \[\leadsto x \cdot e^{\color{blue}{\left(-a\right) \cdot \left(z + b\right)}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification89.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{-45}:\\ \;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-47}:\\ \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 16: 74.1% accurate, 2.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{-45}:\\ \;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\ \mathbf{elif}\;y \leq 3.7:\\ \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= y -6.8e-45)
         (* x (exp (* t (- y))))
         (if (<= y 3.7) (* x (exp (- (* a (+ z b))))) (* x (pow z y)))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (y <= -6.8e-45) {
      		tmp = x * exp((t * -y));
      	} else if (y <= 3.7) {
      		tmp = x * exp(-(a * (z + b)));
      	} else {
      		tmp = x * pow(z, y);
      	}
      	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 <= (-6.8d-45)) then
              tmp = x * exp((t * -y))
          else if (y <= 3.7d0) then
              tmp = x * exp(-(a * (z + b)))
          else
              tmp = x * (z ** y)
          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 <= -6.8e-45) {
      		tmp = x * Math.exp((t * -y));
      	} else if (y <= 3.7) {
      		tmp = x * Math.exp(-(a * (z + b)));
      	} else {
      		tmp = x * Math.pow(z, y);
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	tmp = 0
      	if y <= -6.8e-45:
      		tmp = x * math.exp((t * -y))
      	elif y <= 3.7:
      		tmp = x * math.exp(-(a * (z + b)))
      	else:
      		tmp = x * math.pow(z, y)
      	return tmp
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (y <= -6.8e-45)
      		tmp = Float64(x * exp(Float64(t * Float64(-y))));
      	elseif (y <= 3.7)
      		tmp = Float64(x * exp(Float64(-Float64(a * Float64(z + b)))));
      	else
      		tmp = Float64(x * (z ^ y));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	tmp = 0.0;
      	if (y <= -6.8e-45)
      		tmp = x * exp((t * -y));
      	elseif (y <= 3.7)
      		tmp = x * exp(-(a * (z + b)));
      	else
      		tmp = x * (z ^ y);
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.8e-45], N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7], N[(x * N[Exp[(-N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq -6.8 \cdot 10^{-45}:\\
      \;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
      
      \mathbf{elif}\;y \leq 3.7:\\
      \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;x \cdot {z}^{y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y < -6.80000000000000008e-45

        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.f6469.6

            \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
        5. Simplified69.6%

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]

        if -6.80000000000000008e-45 < y < 3.7000000000000002

        1. Initial program 92.1%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in 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.8

            \[\leadsto x \cdot e^{a \cdot \left(\mathsf{log1p}\left(\color{blue}{-z}\right) - b\right)} \]
        5. Simplified88.8%

          \[\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^{\color{blue}{-1 \cdot \left(a \cdot b\right) + -1 \cdot \left(a \cdot z\right)}} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot z\right) + -1 \cdot \left(a \cdot b\right)}} \]
          2. associate-*r*N/A

            \[\leadsto x \cdot e^{\color{blue}{\left(-1 \cdot a\right) \cdot z} + -1 \cdot \left(a \cdot b\right)} \]
          3. associate-*r*N/A

            \[\leadsto x \cdot e^{\left(-1 \cdot a\right) \cdot z + \color{blue}{\left(-1 \cdot a\right) \cdot b}} \]
          4. distribute-lft-outN/A

            \[\leadsto x \cdot e^{\color{blue}{\left(-1 \cdot a\right) \cdot \left(z + b\right)}} \]
          5. lower-*.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{\left(-1 \cdot a\right) \cdot \left(z + b\right)}} \]
          6. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot \left(z + b\right)} \]
          7. lower-neg.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot \left(z + b\right)} \]
          8. lower-+.f6488.8

            \[\leadsto x \cdot e^{\left(-a\right) \cdot \color{blue}{\left(z + b\right)}} \]
        8. Simplified88.8%

          \[\leadsto x \cdot e^{\color{blue}{\left(-a\right) \cdot \left(z + b\right)}} \]

        if 3.7000000000000002 < y

        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.f6487.5

            \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
        5. Simplified87.5%

          \[\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.f6468.1

            \[\leadsto x \cdot \color{blue}{{z}^{y}} \]
        8. Simplified68.1%

          \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
      3. Recombined 3 regimes into one program.
      4. Final simplification77.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{-45}:\\ \;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\ \mathbf{elif}\;y \leq 3.7:\\ \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 17: 72.1% accurate, 2.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{t \cdot \left(-y\right)}\\ \mathbf{if}\;t \leq -270000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-48}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* x (exp (* t (- y))))))
         (if (<= t -270000000.0) t_1 (if (<= t 5e-48) (* x (pow z y)) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * exp((t * -y));
      	double tmp;
      	if (t <= -270000000.0) {
      		tmp = t_1;
      	} else if (t <= 5e-48) {
      		tmp = x * pow(z, y);
      	} 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((t * -y))
          if (t <= (-270000000.0d0)) then
              tmp = t_1
          else if (t <= 5d-48) then
              tmp = x * (z ** y)
          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((t * -y));
      	double tmp;
      	if (t <= -270000000.0) {
      		tmp = t_1;
      	} else if (t <= 5e-48) {
      		tmp = x * Math.pow(z, y);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = x * math.exp((t * -y))
      	tmp = 0
      	if t <= -270000000.0:
      		tmp = t_1
      	elif t <= 5e-48:
      		tmp = x * math.pow(z, y)
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(x * exp(Float64(t * Float64(-y))))
      	tmp = 0.0
      	if (t <= -270000000.0)
      		tmp = t_1;
      	elseif (t <= 5e-48)
      		tmp = Float64(x * (z ^ y));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = x * exp((t * -y));
      	tmp = 0.0;
      	if (t <= -270000000.0)
      		tmp = t_1;
      	elseif (t <= 5e-48)
      		tmp = x * (z ^ y);
      	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[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -270000000.0], t$95$1, If[LessEqual[t, 5e-48], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x \cdot e^{t \cdot \left(-y\right)}\\
      \mathbf{if}\;t \leq -270000000:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t \leq 5 \cdot 10^{-48}:\\
      \;\;\;\;x \cdot {z}^{y}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < -2.7e8 or 4.9999999999999999e-48 < t

        1. Initial program 95.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.f6482.5

            \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
        5. Simplified82.5%

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]

        if -2.7e8 < t < 4.9999999999999999e-48

        1. Initial program 95.9%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in y around inf

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
        4. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
          2. lower--.f64N/A

            \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(\log z - t\right)}} \]
          3. lower-log.f6467.2

            \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
        5. Simplified67.2%

          \[\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.f6467.1

            \[\leadsto x \cdot \color{blue}{{z}^{y}} \]
        8. Simplified67.1%

          \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification75.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -270000000:\\ \;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-48}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 18: 73.2% accurate, 2.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot {z}^{y}\\ \mathbf{if}\;y \leq -1.4 \cdot 10^{+22}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 0.002:\\ \;\;\;\;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 (pow z y))))
         (if (<= y -1.4e+22) t_1 (if (<= y 0.002) (* x (exp (- (* a b)))) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * pow(z, y);
      	double tmp;
      	if (y <= -1.4e+22) {
      		tmp = t_1;
      	} else if (y <= 0.002) {
      		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 * (z ** y)
          if (y <= (-1.4d+22)) then
              tmp = t_1
          else if (y <= 0.002d0) 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.pow(z, y);
      	double tmp;
      	if (y <= -1.4e+22) {
      		tmp = t_1;
      	} else if (y <= 0.002) {
      		tmp = x * Math.exp(-(a * b));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = x * math.pow(z, y)
      	tmp = 0
      	if y <= -1.4e+22:
      		tmp = t_1
      	elif y <= 0.002:
      		tmp = x * math.exp(-(a * b))
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(x * (z ^ y))
      	tmp = 0.0
      	if (y <= -1.4e+22)
      		tmp = t_1;
      	elseif (y <= 0.002)
      		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 * (z ^ y);
      	tmp = 0.0;
      	if (y <= -1.4e+22)
      		tmp = t_1;
      	elseif (y <= 0.002)
      		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[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.4e+22], t$95$1, If[LessEqual[y, 0.002], N[(x * N[Exp[(-N[(a * b), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x \cdot {z}^{y}\\
      \mathbf{if}\;y \leq -1.4 \cdot 10^{+22}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq 0.002:\\
      \;\;\;\;x \cdot e^{-a \cdot b}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < -1.4e22 or 2e-3 < y

        1. Initial program 98.5%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 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. Simplified89.6%

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
        6. Taylor expanded in t around 0

          \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
        7. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
          2. lower-pow.f6469.4

            \[\leadsto x \cdot \color{blue}{{z}^{y}} \]
        8. Simplified69.4%

          \[\leadsto \color{blue}{x \cdot {z}^{y}} \]

        if -1.4e22 < y < 2e-3

        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 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-*.f6477.3

            \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
        5. Simplified77.3%

          \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 19: 18.4% accurate, 328.0× speedup?

      \[\begin{array}{l} \\ x \end{array} \]
      (FPCore (x y z t a b) :precision binary64 x)
      double code(double x, double y, double z, double t, double a, double b) {
      	return x;
      }
      
      real(8) function code(x, y, z, t, a, b)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          code = x
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	return x;
      }
      
      def code(x, y, z, t, a, b):
      	return x
      
      function code(x, y, z, t, a, b)
      	return x
      end
      
      function tmp = code(x, y, z, t, a, b)
      	tmp = x;
      end
      
      code[x_, y_, z_, t_, a_, b_] := x
      
      \begin{array}{l}
      
      \\
      x
      \end{array}
      
      Derivation
      1. Initial program 95.8%

        \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
      4. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
        2. lower--.f64N/A

          \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(\log z - t\right)}} \]
        3. lower-log.f6475.4

          \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
      5. Simplified75.4%

        \[\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. Simplified20.5%

          \[\leadsto x \cdot \color{blue}{1} \]
        2. Step-by-step derivation
          1. *-rgt-identity20.5

            \[\leadsto \color{blue}{x} \]
        3. Applied egg-rr20.5%

          \[\leadsto \color{blue}{x} \]
        4. Add Preprocessing

        Reproduce

        ?
        herbie shell --seed 2024207 
        (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))))))