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

Percentage Accurate: 96.3% → 96.3%
Time: 16.4s
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.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. Add Preprocessing

Alternative 2: 54.8% accurate, 0.4× speedup?

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

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

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, \mathsf{fma}\left(-0.16666666666666666, t \cdot \left(y \cdot \left(y \cdot y\right)\right), 0.5 \cdot \left(y \cdot y\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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\left(y \cdot \left(\frac{-1}{6} \cdot \left({t}^{3} \cdot y\right)\right)\right) \cdot y\right)} \]
    11. Simplified33.8%

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

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

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + -1 \cdot a}, 1\right) \]
      4. accelerator-lowering-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. *-lowering-*.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. *-lowering-*.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. neg-lowering-neg.f6481.7

        \[\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. Simplified81.7%

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

    1. Initial program 82.9%

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

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

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

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

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

      \[\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) + a \cdot \left(\frac{-1}{6} \cdot \left(a \cdot \left({b}^{3} \cdot x\right)\right) + \frac{1}{2} \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) + a \cdot \left(\frac{-1}{6} \cdot \left(a \cdot \left({b}^{3} \cdot x\right)\right) + \frac{1}{2} \cdot \left({b}^{2} \cdot x\right)\right)\right) + x} \]
      2. accelerator-lowering-fma.f64N/A

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

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

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

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 54.6% accurate, 0.5× speedup?

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

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

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(t, \mathsf{fma}\left(t, \mathsf{fma}\left(-0.16666666666666666, t \cdot \left(y \cdot \left(y \cdot y\right)\right), 0.5 \cdot \left(y \cdot y\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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(\left(y \cdot \left(\frac{-1}{6} \cdot \left({t}^{3} \cdot y\right)\right)\right) \cdot y\right)} \]
    11. Simplified33.8%

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

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

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + -1 \cdot a}, 1\right) \]
      4. accelerator-lowering-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. *-lowering-*.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. *-lowering-*.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. neg-lowering-neg.f6481.7

        \[\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. Simplified81.7%

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

    1. Initial program 82.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 53.2% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -9.9999999999999993e44 or 5e13 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 1.99999999999999996e150

    1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(\frac{1}{2} \cdot \left(y \cdot \left(x \cdot \color{blue}{\left(t \cdot t\right)}\right)\right)\right) \]
      16. *-lowering-*.f6432.7

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

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

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

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + -1 \cdot a}, 1\right) \]
      4. accelerator-lowering-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. *-lowering-*.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. *-lowering-*.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. neg-lowering-neg.f6481.7

        \[\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. Simplified81.7%

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

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 37.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\ \mathbf{if}\;t\_1 \leq -20000000000000:\\ \;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\ \mathbf{elif}\;t\_1 \leq 50000000000000:\\ \;\;\;\;\mathsf{fma}\left(a \cdot \left(z + b\right), -x, x\right)\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+303}:\\ \;\;\;\;a \cdot \mathsf{fma}\left(x, -b, \frac{x}{a}\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 -20000000000000.0)
     (* b (* x (- a)))
     (if (<= t_1 50000000000000.0)
       (fma (* a (+ z b)) (- x) x)
       (if (<= t_1 4e+303)
         (* a (fma x (- b) (/ x a)))
         (* 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 <= -20000000000000.0) {
		tmp = b * (x * -a);
	} else if (t_1 <= 50000000000000.0) {
		tmp = fma((a * (z + b)), -x, x);
	} else if (t_1 <= 4e+303) {
		tmp = a * fma(x, -b, (x / a));
	} 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 <= -20000000000000.0)
		tmp = Float64(b * Float64(x * Float64(-a)));
	elseif (t_1 <= 50000000000000.0)
		tmp = fma(Float64(a * Float64(z + b)), Float64(-x), x);
	elseif (t_1 <= 4e+303)
		tmp = Float64(a * fma(x, Float64(-b), Float64(x / a)));
	else
		tmp = Float64(x * Float64(1.0 - Float64(y * t)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -20000000000000.0], N[(b * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 50000000000000.0], N[(N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision] * (-x) + x), $MachinePrecision], If[LessEqual[t$95$1, 4e+303], N[(a * N[(x * (-b) + N[(x / a), $MachinePrecision]), $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 -20000000000000:\\
\;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a \cdot b, \color{blue}{\mathsf{neg}\left(x\right)}, x\right) \]
      9. neg-lowering-neg.f643.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(a \cdot \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}\right) \]
      14. neg-lowering-neg.f6418.4

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

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

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

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

        \[\leadsto \color{blue}{\left(x \cdot a\right)} \cdot \left(\mathsf{neg}\left(b\right)\right) \]
      4. neg-lowering-neg.f6420.4

        \[\leadsto \left(x \cdot a\right) \cdot \color{blue}{\left(-b\right)} \]
    13. Applied egg-rr20.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a \cdot b, \color{blue}{\mathsf{neg}\left(x\right)}, x\right) \]
      9. neg-lowering-neg.f6411.3

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(x, \color{blue}{\mathsf{neg}\left(b\right)}, \frac{x}{a}\right) \]
      9. /-lowering-/.f6420.7

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

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

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

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 49.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+45}:\\ \;\;\;\;y \cdot \left(0.5 \cdot \left(y \cdot \left(x \cdot \left(t \cdot t\right)\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 50000000000000:\\ \;\;\;\;x \cdot \mathsf{fma}\left(b, \mathsf{fma}\left(0.5, b \cdot \left(a \cdot a\right), -a\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(0.5 \cdot \left(y \cdot \left(y \cdot \left(t \cdot t\right)\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
   (if (<= t_1 -1e+45)
     (* y (* 0.5 (* y (* x (* t t)))))
     (if (<= t_1 50000000000000.0)
       (* x (fma b (fma 0.5 (* b (* a a)) (- a)) 1.0))
       (* x (* 0.5 (* y (* y (* 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 <= -1e+45) {
		tmp = y * (0.5 * (y * (x * (t * t))));
	} else if (t_1 <= 50000000000000.0) {
		tmp = x * fma(b, fma(0.5, (b * (a * a)), -a), 1.0);
	} else {
		tmp = x * (0.5 * (y * (y * (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 <= -1e+45)
		tmp = Float64(y * Float64(0.5 * Float64(y * Float64(x * Float64(t * t)))));
	elseif (t_1 <= 50000000000000.0)
		tmp = Float64(x * fma(b, fma(0.5, Float64(b * Float64(a * a)), Float64(-a)), 1.0));
	else
		tmp = Float64(x * Float64(0.5 * Float64(y * Float64(y * Float64(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, -1e+45], N[(y * N[(0.5 * N[(y * N[(x * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 50000000000000.0], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision] + (-a)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(0.5 * N[(y * N[(y * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

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


\end{array}
\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))) < -9.9999999999999993e44

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(0.5 \cdot \left(y \cdot \left(x \cdot \color{blue}{\left(t \cdot t\right)}\right)\right)\right) \]
    14. Simplified31.5%

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

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

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \mathsf{fma}\left(b, \color{blue}{\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + -1 \cdot a}, 1\right) \]
      4. accelerator-lowering-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. *-lowering-*.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. *-lowering-*.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. neg-lowering-neg.f6481.7

        \[\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. Simplified81.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 49.4% 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 -1 \cdot 10^{+45}:\\ \;\;\;\;y \cdot \left(0.5 \cdot \left(y \cdot \left(x \cdot \left(t \cdot t\right)\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 50000000000000:\\ \;\;\;\;\mathsf{fma}\left(a \cdot \left(z + b\right), -x, x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(0.5 \cdot \left(y \cdot \left(y \cdot \left(t \cdot t\right)\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
   (if (<= t_1 -1e+45)
     (* y (* 0.5 (* y (* x (* t t)))))
     (if (<= t_1 50000000000000.0)
       (fma (* a (+ z b)) (- x) x)
       (* x (* 0.5 (* y (* y (* 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 <= -1e+45) {
		tmp = y * (0.5 * (y * (x * (t * t))));
	} else if (t_1 <= 50000000000000.0) {
		tmp = fma((a * (z + b)), -x, x);
	} else {
		tmp = x * (0.5 * (y * (y * (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 <= -1e+45)
		tmp = Float64(y * Float64(0.5 * Float64(y * Float64(x * Float64(t * t)))));
	elseif (t_1 <= 50000000000000.0)
		tmp = fma(Float64(a * Float64(z + b)), Float64(-x), x);
	else
		tmp = Float64(x * Float64(0.5 * Float64(y * Float64(y * Float64(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, -1e+45], N[(y * N[(0.5 * N[(y * N[(x * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 50000000000000.0], N[(N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision] * (-x) + x), $MachinePrecision], N[(x * N[(0.5 * N[(y * N[(y * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

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


\end{array}
\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))) < -9.9999999999999993e44

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(0.5 \cdot \left(y \cdot \left(x \cdot \color{blue}{\left(t \cdot t\right)}\right)\right)\right) \]
    14. Simplified31.5%

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

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

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a \cdot \left(b + z\right), \color{blue}{\mathsf{neg}\left(x\right)}, x\right) \]
      11. neg-lowering-neg.f6477.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 48.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 50000000000000:\\
\;\;\;\;\mathsf{fma}\left(a \cdot \left(z + b\right), -x, x\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))) < -9.9999999999999993e44 or 5e13 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a \cdot \left(b + z\right), \color{blue}{\mathsf{neg}\left(x\right)}, x\right) \]
      11. neg-lowering-neg.f6477.9

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

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

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

Alternative 9: 33.3% accurate, 0.7× speedup?

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+37}:\\
\;\;\;\;x\\

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


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

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a \cdot b, \color{blue}{\mathsf{neg}\left(x\right)}, x\right) \]
      9. neg-lowering-neg.f643.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(a \cdot \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}\right) \]
      14. neg-lowering-neg.f6418.4

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

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

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

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

        \[\leadsto \color{blue}{\left(x \cdot a\right)} \cdot \left(\mathsf{neg}\left(b\right)\right) \]
      4. neg-lowering-neg.f6420.4

        \[\leadsto \left(x \cdot a\right) \cdot \color{blue}{\left(-b\right)} \]
    13. Applied egg-rr20.4%

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

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

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

      if 4.99999999999999989e37 < (+.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 b around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(a \cdot b, \color{blue}{\mathsf{neg}\left(x\right)}, x\right) \]
        9. neg-lowering-neg.f6428.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x \cdot \left(a \cdot \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}\right) \]
        14. neg-lowering-neg.f6428.0

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

        \[\leadsto \color{blue}{x \cdot \left(a \cdot \left(-b\right)\right)} \]
    8. Recombined 3 regimes into one program.
    9. Final simplification36.3%

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

    Alternative 10: 32.7% accurate, 0.7× speedup?

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

      1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(a \cdot b, \color{blue}{\mathsf{neg}\left(x\right)}, x\right) \]
        9. neg-lowering-neg.f6415.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x \cdot \left(a \cdot \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}\right) \]
        14. neg-lowering-neg.f6423.2

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

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

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

      1. Initial program 91.9%

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{x} \]
      8. Recombined 2 regimes into one program.
      9. Final simplification35.5%

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

      Alternative 11: 34.1% 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:\\ \;\;\;\;b \cdot \left(x \cdot \left(-a\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)
         (* b (* x (- a)))
         (* 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 = b * (x * -a);
      	} 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 = b * (x * -a)
          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 = b * (x * -a);
      	} 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 = b * (x * -a)
      	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(b * Float64(x * Float64(-a)));
      	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 = b * (x * -a);
      	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[(b * N[(x * (-a)), $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:\\
      \;\;\;\;b \cdot \left(x \cdot \left(-a\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 b around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(a \cdot b, \color{blue}{\mathsf{neg}\left(x\right)}, x\right) \]
          9. neg-lowering-neg.f643.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x \cdot \left(a \cdot \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}\right) \]
          14. neg-lowering-neg.f6418.4

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

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

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

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

            \[\leadsto \color{blue}{\left(x \cdot a\right)} \cdot \left(\mathsf{neg}\left(b\right)\right) \]
          4. neg-lowering-neg.f6420.4

            \[\leadsto \left(x \cdot a\right) \cdot \color{blue}{\left(-b\right)} \]
        13. Applied egg-rr20.4%

          \[\leadsto \color{blue}{\left(x \cdot a\right) \cdot \left(-b\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.6%

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x \cdot \left(1 - \color{blue}{y \cdot t}\right) \]
          5. *-lowering-*.f6448.3

            \[\leadsto x \cdot \left(1 - \color{blue}{y \cdot t}\right) \]
        8. Simplified48.3%

          \[\leadsto x \cdot \color{blue}{\left(1 - y \cdot t\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification37.7%

        \[\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:\\ \;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 12: 33.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:\\ \;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))) 0.0)
         (* b (* x (- a)))
         (* x (- 1.0 (* a b)))))
      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 = b * (x * -a);
      	} else {
      		tmp = x * (1.0 - (a * b));
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t, a, b)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: tmp
          if (exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b)))) <= 0.0d0) then
              tmp = b * (x * -a)
          else
              tmp = x * (1.0d0 - (a * b))
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b)))) <= 0.0) {
      		tmp = b * (x * -a);
      	} else {
      		tmp = x * (1.0 - (a * b));
      	}
      	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 = b * (x * -a)
      	else:
      		tmp = x * (1.0 - (a * b))
      	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(b * Float64(x * Float64(-a)));
      	else
      		tmp = Float64(x * Float64(1.0 - Float64(a * b)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	tmp = 0.0;
      	if (exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))) <= 0.0)
      		tmp = b * (x * -a);
      	else
      		tmp = x * (1.0 - (a * b));
      	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[(b * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * b), $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:\\
      \;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;x \cdot \left(1 - a \cdot b\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 b around inf

          \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          2. neg-lowering-neg.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          3. *-lowering-*.f6449.3

            \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
        5. Simplified49.3%

          \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
        6. Taylor expanded in a around 0

          \[\leadsto \color{blue}{x + -1 \cdot \left(a \cdot \left(b \cdot x\right)\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(b \cdot x\right)\right) + x} \]
          2. mul-1-negN/A

            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot \left(b \cdot x\right)\right)\right)} + x \]
          3. associate-*r*N/A

            \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(a \cdot b\right) \cdot x}\right)\right) + x \]
          4. distribute-rgt-neg-inN/A

            \[\leadsto \color{blue}{\left(a \cdot b\right) \cdot \left(\mathsf{neg}\left(x\right)\right)} + x \]
          5. mul-1-negN/A

            \[\leadsto \left(a \cdot b\right) \cdot \color{blue}{\left(-1 \cdot x\right)} + x \]
          6. accelerator-lowering-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(a \cdot b, -1 \cdot x, x\right)} \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{a \cdot b}, -1 \cdot x, x\right) \]
          8. mul-1-negN/A

            \[\leadsto \mathsf{fma}\left(a \cdot b, \color{blue}{\mathsf{neg}\left(x\right)}, x\right) \]
          9. neg-lowering-neg.f643.0

            \[\leadsto \mathsf{fma}\left(a \cdot b, \color{blue}{-x}, x\right) \]
        8. Simplified3.0%

          \[\leadsto \color{blue}{\mathsf{fma}\left(a \cdot b, -x, x\right)} \]
        9. Taylor expanded in a around inf

          \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(b \cdot x\right)\right)} \]
        10. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \color{blue}{\mathsf{neg}\left(a \cdot \left(b \cdot x\right)\right)} \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{neg}\left(\color{blue}{\left(b \cdot x\right) \cdot a}\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{neg}\left(\color{blue}{\left(x \cdot b\right)} \cdot a\right) \]
          4. associate-*l*N/A

            \[\leadsto \mathsf{neg}\left(\color{blue}{x \cdot \left(b \cdot a\right)}\right) \]
          5. *-commutativeN/A

            \[\leadsto \mathsf{neg}\left(x \cdot \color{blue}{\left(a \cdot b\right)}\right) \]
          6. distribute-rgt-neg-outN/A

            \[\leadsto \color{blue}{x \cdot \left(\mathsf{neg}\left(a \cdot b\right)\right)} \]
          7. mul-1-negN/A

            \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)} \]
          8. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \left(a \cdot b\right)\right)} \]
          9. mul-1-negN/A

            \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(a \cdot b\right)\right)} \]
          10. distribute-rgt-neg-inN/A

            \[\leadsto x \cdot \color{blue}{\left(a \cdot \left(\mathsf{neg}\left(b\right)\right)\right)} \]
          11. mul-1-negN/A

            \[\leadsto x \cdot \left(a \cdot \color{blue}{\left(-1 \cdot b\right)}\right) \]
          12. *-lowering-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(a \cdot \left(-1 \cdot b\right)\right)} \]
          13. mul-1-negN/A

            \[\leadsto x \cdot \left(a \cdot \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}\right) \]
          14. neg-lowering-neg.f6418.4

            \[\leadsto x \cdot \left(a \cdot \color{blue}{\left(-b\right)}\right) \]
        11. Simplified18.4%

          \[\leadsto \color{blue}{x \cdot \left(a \cdot \left(-b\right)\right)} \]
        12. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \color{blue}{\left(x \cdot a\right) \cdot \left(\mathsf{neg}\left(b\right)\right)} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{\left(x \cdot a\right) \cdot \left(\mathsf{neg}\left(b\right)\right)} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{\left(x \cdot a\right)} \cdot \left(\mathsf{neg}\left(b\right)\right) \]
          4. neg-lowering-neg.f6420.4

            \[\leadsto \left(x \cdot a\right) \cdot \color{blue}{\left(-b\right)} \]
        13. Applied egg-rr20.4%

          \[\leadsto \color{blue}{\left(x \cdot a\right) \cdot \left(-b\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.6%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in b around inf

          \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          2. neg-lowering-neg.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          3. *-lowering-*.f6461.8

            \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
        5. Simplified61.8%

          \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
        6. Taylor expanded in a around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + -1 \cdot \left(a \cdot b\right)\right)} \]
        7. Step-by-step derivation
          1. neg-mul-1N/A

            \[\leadsto x \cdot \left(1 + \color{blue}{\left(\mathsf{neg}\left(a \cdot b\right)\right)}\right) \]
          2. unsub-negN/A

            \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
          3. --lowering--.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
          4. *-lowering-*.f6446.9

            \[\leadsto x \cdot \left(1 - \color{blue}{a \cdot b}\right) \]
        8. Simplified46.9%

          \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification36.9%

        \[\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:\\ \;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 13: 87.4% accurate, 1.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{y \cdot \left(\log z - t\right)}\\ \mathbf{if}\;y \leq -1.26:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{-37}:\\ \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* x (exp (* y (- (log z) t))))))
         (if (<= y -1.26)
           t_1
           (if (<= y 5.2e-37) (* x (exp (- (* a (+ z b))))) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * exp((y * (log(z) - t)));
      	double tmp;
      	if (y <= -1.26) {
      		tmp = t_1;
      	} else if (y <= 5.2e-37) {
      		tmp = x * exp(-(a * (z + b)));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t, a, b)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: tmp
          t_1 = x * exp((y * (log(z) - t)))
          if (y <= (-1.26d0)) then
              tmp = t_1
          else if (y <= 5.2d-37) then
              tmp = x * exp(-(a * (z + b)))
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * Math.exp((y * (Math.log(z) - t)));
      	double tmp;
      	if (y <= -1.26) {
      		tmp = t_1;
      	} else if (y <= 5.2e-37) {
      		tmp = x * Math.exp(-(a * (z + b)));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = x * math.exp((y * (math.log(z) - t)))
      	tmp = 0
      	if y <= -1.26:
      		tmp = t_1
      	elif y <= 5.2e-37:
      		tmp = x * math.exp(-(a * (z + b)))
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(x * exp(Float64(y * Float64(log(z) - t))))
      	tmp = 0.0
      	if (y <= -1.26)
      		tmp = t_1;
      	elseif (y <= 5.2e-37)
      		tmp = Float64(x * exp(Float64(-Float64(a * Float64(z + b)))));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = x * exp((y * (log(z) - t)));
      	tmp = 0.0;
      	if (y <= -1.26)
      		tmp = t_1;
      	elseif (y <= 5.2e-37)
      		tmp = x * exp(-(a * (z + b)));
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.26], t$95$1, If[LessEqual[y, 5.2e-37], N[(x * N[Exp[(-N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x \cdot e^{y \cdot \left(\log z - t\right)}\\
      \mathbf{if}\;y \leq -1.26:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq 5.2 \cdot 10^{-37}:\\
      \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < -1.26000000000000001 or 5.19999999999999959e-37 < y

        1. Initial program 96.4%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in y around inf

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
        4. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
          2. --lowering--.f64N/A

            \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(\log z - t\right)}} \]
          3. log-lowering-log.f6488.7

            \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
        5. Simplified88.7%

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]

        if -1.26000000000000001 < y < 5.19999999999999959e-37

        1. Initial program 94.2%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
        4. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
          2. --lowering--.f64N/A

            \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\log \left(1 - z\right) - b\right)}} \]
          3. sub-negN/A

            \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)} - b\right)} \]
          4. accelerator-lowering-log1p.f64N/A

            \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
          5. neg-lowering-neg.f6488.0

            \[\leadsto x \cdot e^{a \cdot \left(\mathsf{log1p}\left(\color{blue}{-z}\right) - b\right)} \]
        5. Simplified88.0%

          \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
        6. Taylor expanded in z around 0

          \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(-1 \cdot z - b\right)}} \]
        7. Step-by-step derivation
          1. --lowering--.f64N/A

            \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(-1 \cdot z - b\right)}} \]
          2. mul-1-negN/A

            \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
          3. neg-lowering-neg.f6488.0

            \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(-z\right)} - b\right)} \]
        8. Simplified88.0%

          \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\left(-z\right) - b\right)}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification88.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.26:\\ \;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{-37}:\\ \;\;\;\;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 14: 74.3% accurate, 1.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+45}:\\ \;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-101}:\\ \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot {\left(e^{-1}\right)}^{\left(y \cdot t\right)}\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= t -1.05e+45)
         (* x (exp (* t (- y))))
         (if (<= t 9.5e-101)
           (* x (exp (- (* a (+ z b)))))
           (* x (pow (exp -1.0) (* y t))))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (t <= -1.05e+45) {
      		tmp = x * exp((t * -y));
      	} else if (t <= 9.5e-101) {
      		tmp = x * exp(-(a * (z + b)));
      	} else {
      		tmp = x * pow(exp(-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 (t <= (-1.05d+45)) then
              tmp = x * exp((t * -y))
          else if (t <= 9.5d-101) then
              tmp = x * exp(-(a * (z + b)))
          else
              tmp = x * (exp((-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 (t <= -1.05e+45) {
      		tmp = x * Math.exp((t * -y));
      	} else if (t <= 9.5e-101) {
      		tmp = x * Math.exp(-(a * (z + b)));
      	} else {
      		tmp = x * Math.pow(Math.exp(-1.0), (y * t));
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	tmp = 0
      	if t <= -1.05e+45:
      		tmp = x * math.exp((t * -y))
      	elif t <= 9.5e-101:
      		tmp = x * math.exp(-(a * (z + b)))
      	else:
      		tmp = x * math.pow(math.exp(-1.0), (y * t))
      	return tmp
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (t <= -1.05e+45)
      		tmp = Float64(x * exp(Float64(t * Float64(-y))));
      	elseif (t <= 9.5e-101)
      		tmp = Float64(x * exp(Float64(-Float64(a * Float64(z + b)))));
      	else
      		tmp = Float64(x * (exp(-1.0) ^ Float64(y * t)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	tmp = 0.0;
      	if (t <= -1.05e+45)
      		tmp = x * exp((t * -y));
      	elseif (t <= 9.5e-101)
      		tmp = x * exp(-(a * (z + b)));
      	else
      		tmp = x * (exp(-1.0) ^ (y * t));
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.05e+45], N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e-101], N[(x * N[Exp[(-N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], N[(x * N[Power[N[Exp[-1.0], $MachinePrecision], N[(y * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;t \leq -1.05 \cdot 10^{+45}:\\
      \;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
      
      \mathbf{elif}\;t \leq 9.5 \cdot 10^{-101}:\\
      \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;x \cdot {\left(e^{-1}\right)}^{\left(y \cdot t\right)}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if t < -1.04999999999999997e45

        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 t around inf

          \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(t \cdot y\right)}} \]
          2. *-commutativeN/A

            \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
          3. distribute-rgt-neg-inN/A

            \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
          4. *-lowering-*.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
          5. neg-lowering-neg.f6485.0

            \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
        5. Simplified85.0%

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]

        if -1.04999999999999997e45 < t < 9.49999999999999994e-101

        1. Initial program 94.6%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
        4. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
          2. --lowering--.f64N/A

            \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\log \left(1 - z\right) - b\right)}} \]
          3. sub-negN/A

            \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)} - b\right)} \]
          4. accelerator-lowering-log1p.f64N/A

            \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
          5. neg-lowering-neg.f6473.7

            \[\leadsto x \cdot e^{a \cdot \left(\mathsf{log1p}\left(\color{blue}{-z}\right) - b\right)} \]
        5. Simplified73.7%

          \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
        6. Taylor expanded in z around 0

          \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(-1 \cdot z - b\right)}} \]
        7. Step-by-step derivation
          1. --lowering--.f64N/A

            \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(-1 \cdot z - b\right)}} \]
          2. mul-1-negN/A

            \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
          3. neg-lowering-neg.f6473.7

            \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(-z\right)} - b\right)} \]
        8. Simplified73.7%

          \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\left(-z\right) - b\right)}} \]

        if 9.49999999999999994e-101 < t

        1. Initial program 93.8%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in t around inf

          \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(t \cdot y\right)}} \]
          2. *-commutativeN/A

            \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
          3. distribute-rgt-neg-inN/A

            \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
          4. *-lowering-*.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
          5. neg-lowering-neg.f6476.8

            \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
        5. Simplified76.8%

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
        6. Step-by-step derivation
          1. distribute-rgt-neg-outN/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(y \cdot t\right)}} \]
          2. neg-mul-1N/A

            \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(y \cdot t\right)}} \]
          3. exp-prodN/A

            \[\leadsto x \cdot \color{blue}{{\left(e^{-1}\right)}^{\left(y \cdot t\right)}} \]
          4. pow-lowering-pow.f64N/A

            \[\leadsto x \cdot \color{blue}{{\left(e^{-1}\right)}^{\left(y \cdot t\right)}} \]
          5. exp-lowering-exp.f64N/A

            \[\leadsto x \cdot {\color{blue}{\left(e^{-1}\right)}}^{\left(y \cdot t\right)} \]
          6. *-lowering-*.f6476.8

            \[\leadsto x \cdot {\left(e^{-1}\right)}^{\color{blue}{\left(y \cdot t\right)}} \]
        7. Applied egg-rr76.8%

          \[\leadsto x \cdot \color{blue}{{\left(e^{-1}\right)}^{\left(y \cdot t\right)}} \]
      3. Recombined 3 regimes into one program.
      4. Final simplification77.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+45}:\\ \;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-101}:\\ \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot {\left(e^{-1}\right)}^{\left(y \cdot t\right)}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 15: 74.2% accurate, 2.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{t \cdot \left(-y\right)}\\ \mathbf{if}\;t \leq -5.8 \cdot 10^{+44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-101}:\\ \;\;\;\;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 (* t (- y))))))
         (if (<= t -5.8e+44)
           t_1
           (if (<= t 9.5e-101) (* 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((t * -y));
      	double tmp;
      	if (t <= -5.8e+44) {
      		tmp = t_1;
      	} else if (t <= 9.5e-101) {
      		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((t * -y))
          if (t <= (-5.8d+44)) then
              tmp = t_1
          else if (t <= 9.5d-101) 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((t * -y));
      	double tmp;
      	if (t <= -5.8e+44) {
      		tmp = t_1;
      	} else if (t <= 9.5e-101) {
      		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((t * -y))
      	tmp = 0
      	if t <= -5.8e+44:
      		tmp = t_1
      	elif t <= 9.5e-101:
      		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(t * Float64(-y))))
      	tmp = 0.0
      	if (t <= -5.8e+44)
      		tmp = t_1;
      	elseif (t <= 9.5e-101)
      		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((t * -y));
      	tmp = 0.0;
      	if (t <= -5.8e+44)
      		tmp = t_1;
      	elseif (t <= 9.5e-101)
      		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[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.8e+44], t$95$1, If[LessEqual[t, 9.5e-101], 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^{t \cdot \left(-y\right)}\\
      \mathbf{if}\;t \leq -5.8 \cdot 10^{+44}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t \leq 9.5 \cdot 10^{-101}:\\
      \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < -5.8000000000000004e44 or 9.49999999999999994e-101 < t

        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. *-lowering-*.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
          5. neg-lowering-neg.f6480.5

            \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
        5. Simplified80.5%

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]

        if -5.8000000000000004e44 < t < 9.49999999999999994e-101

        1. Initial program 94.6%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
        4. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
          2. --lowering--.f64N/A

            \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\log \left(1 - z\right) - b\right)}} \]
          3. sub-negN/A

            \[\leadsto x \cdot e^{a \cdot \left(\log \color{blue}{\left(1 + \left(\mathsf{neg}\left(z\right)\right)\right)} - b\right)} \]
          4. accelerator-lowering-log1p.f64N/A

            \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
          5. neg-lowering-neg.f6473.7

            \[\leadsto x \cdot e^{a \cdot \left(\mathsf{log1p}\left(\color{blue}{-z}\right) - b\right)} \]
        5. Simplified73.7%

          \[\leadsto x \cdot e^{\color{blue}{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}} \]
        6. Taylor expanded in z around 0

          \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(-1 \cdot z - b\right)}} \]
        7. Step-by-step derivation
          1. --lowering--.f64N/A

            \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(-1 \cdot z - b\right)}} \]
          2. mul-1-negN/A

            \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} - b\right)} \]
          3. neg-lowering-neg.f6473.7

            \[\leadsto x \cdot e^{a \cdot \left(\color{blue}{\left(-z\right)} - b\right)} \]
        8. Simplified73.7%

          \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\left(-z\right) - b\right)}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification77.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{+44}:\\ \;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-101}:\\ \;\;\;\;x \cdot e^{-a \cdot \left(z + b\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 16: 71.3% accurate, 2.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{t \cdot \left(-y\right)}\\ \mathbf{if}\;t \leq -8.8 \cdot 10^{+89}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-105}:\\ \;\;\;\;x \cdot e^{-a \cdot b}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* x (exp (* t (- y))))))
         (if (<= t -8.8e+89) t_1 (if (<= t 2.5e-105) (* x (exp (- (* a b)))) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * exp((t * -y));
      	double tmp;
      	if (t <= -8.8e+89) {
      		tmp = t_1;
      	} else if (t <= 2.5e-105) {
      		tmp = x * exp(-(a * b));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z, t, a, b)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8) :: t_1
          real(8) :: tmp
          t_1 = x * exp((t * -y))
          if (t <= (-8.8d+89)) then
              tmp = t_1
          else if (t <= 2.5d-105) then
              tmp = x * exp(-(a * b))
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = x * Math.exp((t * -y));
      	double tmp;
      	if (t <= -8.8e+89) {
      		tmp = t_1;
      	} else if (t <= 2.5e-105) {
      		tmp = x * Math.exp(-(a * b));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b):
      	t_1 = x * math.exp((t * -y))
      	tmp = 0
      	if t <= -8.8e+89:
      		tmp = t_1
      	elif t <= 2.5e-105:
      		tmp = x * math.exp(-(a * b))
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(x * exp(Float64(t * Float64(-y))))
      	tmp = 0.0
      	if (t <= -8.8e+89)
      		tmp = t_1;
      	elseif (t <= 2.5e-105)
      		tmp = Float64(x * exp(Float64(-Float64(a * b))));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b)
      	t_1 = x * exp((t * -y));
      	tmp = 0.0;
      	if (t <= -8.8e+89)
      		tmp = t_1;
      	elseif (t <= 2.5e-105)
      		tmp = x * exp(-(a * b));
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.8e+89], t$95$1, If[LessEqual[t, 2.5e-105], N[(x * N[Exp[(-N[(a * b), $MachinePrecision])], $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 -8.8 \cdot 10^{+89}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t \leq 2.5 \cdot 10^{-105}:\\
      \;\;\;\;x \cdot e^{-a \cdot b}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < -8.8000000000000001e89 or 2.49999999999999982e-105 < t

        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 t around inf

          \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(t \cdot y\right)}} \]
          2. *-commutativeN/A

            \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
          3. distribute-rgt-neg-inN/A

            \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
          4. *-lowering-*.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
          5. neg-lowering-neg.f6480.9

            \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
        5. Simplified80.9%

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]

        if -8.8000000000000001e89 < t < 2.49999999999999982e-105

        1. Initial program 94.9%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in b around inf

          \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          2. neg-lowering-neg.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          3. *-lowering-*.f6467.7

            \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
        5. Simplified67.7%

          \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification75.1%

        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.8 \cdot 10^{+89}:\\ \;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-105}:\\ \;\;\;\;x \cdot e^{-a \cdot b}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 17: 71.2% accurate, 2.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot {z}^{y}\\ \mathbf{if}\;y \leq -5.5:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{+145}:\\ \;\;\;\;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 -5.5) t_1 (if (<= y 1.1e+145) (* 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 <= -5.5) {
      		tmp = t_1;
      	} else if (y <= 1.1e+145) {
      		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 <= (-5.5d0)) then
              tmp = t_1
          else if (y <= 1.1d+145) 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 <= -5.5) {
      		tmp = t_1;
      	} else if (y <= 1.1e+145) {
      		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 <= -5.5:
      		tmp = t_1
      	elif y <= 1.1e+145:
      		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 <= -5.5)
      		tmp = t_1;
      	elseif (y <= 1.1e+145)
      		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 <= -5.5)
      		tmp = t_1;
      	elseif (y <= 1.1e+145)
      		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, -5.5], t$95$1, If[LessEqual[y, 1.1e+145], 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 -5.5:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq 1.1 \cdot 10^{+145}:\\
      \;\;\;\;x \cdot e^{-a \cdot b}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < -5.5 or 1.10000000000000004e145 < y

        1. Initial program 96.2%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in y around inf

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
        4. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
          2. --lowering--.f64N/A

            \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(\log z - t\right)}} \]
          3. log-lowering-log.f6488.8

            \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
        5. Simplified88.8%

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
        6. Taylor expanded in t around 0

          \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
          2. pow-lowering-pow.f6463.4

            \[\leadsto x \cdot \color{blue}{{z}^{y}} \]
        8. Simplified63.4%

          \[\leadsto \color{blue}{x \cdot {z}^{y}} \]

        if -5.5 < y < 1.10000000000000004e145

        1. Initial program 94.8%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in b around inf

          \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(a \cdot b\right)}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          2. neg-lowering-neg.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(a \cdot b\right)}} \]
          3. *-lowering-*.f6473.5

            \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
        5. Simplified73.5%

          \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 18: 58.2% accurate, 2.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{+98}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), -t\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (if (<= t -3e+98)
         (* x (fma y (fma 0.5 (* y (* t t)) (- t)) 1.0))
         (* x (pow z y))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double tmp;
      	if (t <= -3e+98) {
      		tmp = x * fma(y, fma(0.5, (y * (t * t)), -t), 1.0);
      	} else {
      		tmp = x * pow(z, y);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	tmp = 0.0
      	if (t <= -3e+98)
      		tmp = Float64(x * fma(y, fma(0.5, Float64(y * Float64(t * t)), Float64(-t)), 1.0));
      	else
      		tmp = Float64(x * (z ^ y));
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3e+98], N[(x * N[(y * N[(0.5 * N[(y * N[(t * t), $MachinePrecision]), $MachinePrecision] + (-t)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;t \leq -3 \cdot 10^{+98}:\\
      \;\;\;\;x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), -t\right), 1\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;x \cdot {z}^{y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < -3.0000000000000001e98

        1. Initial program 98.3%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in t around inf

          \[\leadsto x \cdot e^{\color{blue}{-1 \cdot \left(t \cdot y\right)}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto x \cdot e^{\color{blue}{\mathsf{neg}\left(t \cdot y\right)}} \]
          2. *-commutativeN/A

            \[\leadsto x \cdot e^{\mathsf{neg}\left(\color{blue}{y \cdot t}\right)} \]
          3. distribute-rgt-neg-inN/A

            \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
          4. *-lowering-*.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\mathsf{neg}\left(t\right)\right)}} \]
          5. neg-lowering-neg.f6486.0

            \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
        5. Simplified86.0%

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(-t\right)}} \]
        6. Taylor expanded in y around 0

          \[\leadsto x \cdot \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
          2. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, -1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right)} \]
          3. mul-1-negN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\left(\mathsf{neg}\left(t\right)\right)} + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right), 1\right) \]
          4. +-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \left(\mathsf{neg}\left(t\right)\right)}, 1\right) \]
          5. accelerator-lowering-fma.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \color{blue}{\mathsf{fma}\left(\frac{1}{2}, {t}^{2} \cdot y, \mathsf{neg}\left(t\right)\right)}, 1\right) \]
          6. *-commutativeN/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, \color{blue}{y \cdot {t}^{2}}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          8. unpow2N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(\frac{1}{2}, y \cdot \color{blue}{\left(t \cdot t\right)}, \mathsf{neg}\left(t\right)\right), 1\right) \]
          10. neg-lowering-neg.f6451.1

            \[\leadsto x \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), \color{blue}{-t}\right), 1\right) \]
        8. Simplified51.1%

          \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(0.5, y \cdot \left(t \cdot t\right), -t\right), 1\right)} \]

        if -3.0000000000000001e98 < t

        1. Initial program 94.5%

          \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in y around inf

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
        4. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
          2. --lowering--.f64N/A

            \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(\log z - t\right)}} \]
          3. log-lowering-log.f6469.0

            \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
        5. Simplified69.0%

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
        6. Taylor expanded in t around 0

          \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
          2. pow-lowering-pow.f6463.4

            \[\leadsto x \cdot \color{blue}{{z}^{y}} \]
        8. Simplified63.4%

          \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 19: 19.0% accurate, 328.0× speedup?

      \[\begin{array}{l} \\ x \end{array} \]
      (FPCore (x y z t a b) :precision binary64 x)
      double code(double x, double y, double z, double t, double a, double b) {
      	return x;
      }
      
      real(8) function code(x, y, z, t, a, b)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          code = x
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b) {
      	return x;
      }
      
      def code(x, y, z, t, a, b):
      	return x
      
      function code(x, y, z, t, a, b)
      	return x
      end
      
      function tmp = code(x, y, z, t, a, b)
      	tmp = x;
      end
      
      code[x_, y_, z_, t_, a_, b_] := x
      
      \begin{array}{l}
      
      \\
      x
      \end{array}
      
      Derivation
      1. Initial program 95.4%

        \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
      4. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
        2. --lowering--.f64N/A

          \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(\log z - t\right)}} \]
        3. log-lowering-log.f6472.9

          \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
      5. Simplified72.9%

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
      6. Taylor expanded in y around 0

        \[\leadsto \color{blue}{x} \]
      7. Step-by-step derivation
        1. Simplified20.7%

          \[\leadsto \color{blue}{x} \]
        2. Add Preprocessing

        Reproduce

        ?
        herbie shell --seed 2024204 
        (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))))))