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

Percentage Accurate: 96.3% → 96.3%
Time: 15.1s
Alternatives: 18
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 18 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 97.3%

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

Alternative 2: 50.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(y \cdot \left(y \cdot \left(0.5 \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 -2000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 0.0002:\\ \;\;\;\;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 4 \cdot 10^{+255}:\\ \;\;\;\;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 (* x (* y (* y (* 0.5 (* t t))))))
        (t_2 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
   (if (<= t_2 -2000000.0)
     t_1
     (if (<= t_2 0.0002)
       (* x (fma b (fma 0.5 (* b (* a a)) (- a)) 1.0))
       (if (<= t_2 4e+255)
         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 = x * (y * (y * (0.5 * (t * t))));
	double t_2 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
	double tmp;
	if (t_2 <= -2000000.0) {
		tmp = t_1;
	} else if (t_2 <= 0.0002) {
		tmp = x * fma(b, fma(0.5, (b * (a * a)), -a), 1.0);
	} else if (t_2 <= 4e+255) {
		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(x * Float64(y * Float64(y * Float64(0.5 * 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 <= -2000000.0)
		tmp = t_1;
	elseif (t_2 <= 0.0002)
		tmp = Float64(x * fma(b, fma(0.5, Float64(b * Float64(a * a)), Float64(-a)), 1.0));
	elseif (t_2 <= 4e+255)
		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[(x * N[(y * N[(y * N[(0.5 * 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, -2000000.0], t$95$1, If[LessEqual[t$95$2, 0.0002], 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, 4e+255], 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 := x \cdot \left(y \cdot \left(y \cdot \left(0.5 \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 -2000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 0.0002:\\
\;\;\;\;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 4 \cdot 10^{+255}:\\
\;\;\;\;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))) < -2e6 or 2.0000000000000001e-4 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < 3.99999999999999995e255

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.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-*.f6498.3

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

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

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

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

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

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

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

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

    1. Initial program 94.6%

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

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

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

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

      \[\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-*.f6469.1

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

      \[\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 3: 45.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\ t_2 := t \cdot \left(x \cdot \left(0.5 \cdot \left(y \cdot \left(y \cdot t\right)\right)\right)\right)\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+209}:\\ \;\;\;\;y \cdot \frac{x}{y}\\ \mathbf{elif}\;t\_1 \leq -2000000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+36}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))
        (t_2 (* t (* x (* 0.5 (* y (* y t)))))))
   (if (<= t_1 -2e+209)
     (* y (/ x y))
     (if (<= t_1 -2000000.0)
       t_2
       (if (<= t_1 2e+36) (* x (- 1.0 (* a b))) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
	double t_2 = t * (x * (0.5 * (y * (y * t))));
	double tmp;
	if (t_1 <= -2e+209) {
		tmp = y * (x / y);
	} else if (t_1 <= -2000000.0) {
		tmp = t_2;
	} else if (t_1 <= 2e+36) {
		tmp = x * (1.0 - (a * b));
	} else {
		tmp = t_2;
	}
	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 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
    t_2 = t * (x * (0.5d0 * (y * (y * t))))
    if (t_1 <= (-2d+209)) then
        tmp = y * (x / y)
    else if (t_1 <= (-2000000.0d0)) then
        tmp = t_2
    else if (t_1 <= 2d+36) then
        tmp = x * (1.0d0 - (a * b))
    else
        tmp = t_2
    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 t_2 = t * (x * (0.5 * (y * (y * t))));
	double tmp;
	if (t_1 <= -2e+209) {
		tmp = y * (x / y);
	} else if (t_1 <= -2000000.0) {
		tmp = t_2;
	} else if (t_1 <= 2e+36) {
		tmp = x * (1.0 - (a * b));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))
	t_2 = t * (x * (0.5 * (y * (y * t))))
	tmp = 0
	if t_1 <= -2e+209:
		tmp = y * (x / y)
	elif t_1 <= -2000000.0:
		tmp = t_2
	elif t_1 <= 2e+36:
		tmp = x * (1.0 - (a * b))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))
	t_2 = Float64(t * Float64(x * Float64(0.5 * Float64(y * Float64(y * t)))))
	tmp = 0.0
	if (t_1 <= -2e+209)
		tmp = Float64(y * Float64(x / y));
	elseif (t_1 <= -2000000.0)
		tmp = t_2;
	elseif (t_1 <= 2e+36)
		tmp = Float64(x * Float64(1.0 - Float64(a * b)));
	else
		tmp = t_2;
	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));
	t_2 = t * (x * (0.5 * (y * (y * t))));
	tmp = 0.0;
	if (t_1 <= -2e+209)
		tmp = y * (x / y);
	elseif (t_1 <= -2000000.0)
		tmp = t_2;
	elseif (t_1 <= 2e+36)
		tmp = x * (1.0 - (a * b));
	else
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(t * N[(x * N[(0.5 * N[(y * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+209], N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2000000.0], t$95$2, If[LessEqual[t$95$1, 2e+36], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(\mathsf{neg}\left(\color{blue}{-1 \cdot \left(\frac{x}{y} - t \cdot x\right)}\right)\right) \]
      3. distribute-lft-out--N/A

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

        \[\leadsto \color{blue}{y \cdot \left(\mathsf{neg}\left(\left(-1 \cdot \frac{x}{y} - -1 \cdot \left(t \cdot x\right)\right)\right)\right)} \]
      5. distribute-lft-out--N/A

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

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

        \[\leadsto y \cdot \color{blue}{\left(\frac{x}{y} - t \cdot x\right)} \]
      8. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{x}{y}} \]
    14. Simplified26.0%

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

    if -2.0000000000000001e209 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -2e6 or 2.00000000000000008e36 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.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-*.f6490.8

        \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
    5. Simplified90.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-*.f6483.1

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

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

Alternative 4: 49.7% accurate, 0.5× speedup?

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

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

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

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


\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 or 2 < (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 96.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
      2. 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.f6433.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. Simplified33.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.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-*.f6498.3

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

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

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

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

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

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

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

      \[\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)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 5: 49.6% accurate, 0.5× speedup?

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

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

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

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


\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 or 2 < (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 96.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
      2. 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.f6433.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. Simplified33.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.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-*.f6498.3

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

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

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

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

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

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

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

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

Alternative 6: 51.6% accurate, 0.7× speedup?

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;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 \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))) < -2e6

    1. Initial program 98.9%

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right) + 1\right)} \]
      2. 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.f643.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 97.5%

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

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

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

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

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

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

        \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
    5. Simplified73.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.f6469.4

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

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

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

    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 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.f6448.9

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

      \[\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-*.f6467.4

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(\mathsf{neg}\left(\color{blue}{-1 \cdot \left(\frac{x}{y} - t \cdot x\right)}\right)\right) \]
      3. distribute-lft-out--N/A

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

        \[\leadsto \color{blue}{y \cdot \left(\mathsf{neg}\left(\left(-1 \cdot \frac{x}{y} - -1 \cdot \left(t \cdot x\right)\right)\right)\right)} \]
      5. distribute-lft-out--N/A

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

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

        \[\leadsto y \cdot \color{blue}{\left(\frac{x}{y} - t \cdot x\right)} \]
      8. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{x}{y}} \]
    14. Simplified26.0%

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

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

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(t \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right) \]
      13. neg-lowering-neg.f6425.6

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(1 - t \cdot y\right)} \]
      3. --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-*.f6442.4

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -2 \cdot 10^{+209}:\\ \;\;\;\;y \cdot \frac{x}{y}\\ \mathbf{elif}\;y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right) \leq -2000000:\\ \;\;\;\;-x \cdot \left(y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 32.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+36}:\\
\;\;\;\;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))) < -2e6 or 2.00000000000000008e36 < (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b)))

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.9%

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

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

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

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

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

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

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

    Alternative 9: 82.9% accurate, 1.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\ \mathbf{if}\;a \leq -5.5 \cdot 10^{+100}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-16}:\\ \;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (* x (exp (* a (- (- z) b))))))
       (if (<= a -5.5e+100)
         t_1
         (if (<= a 1.45e-16) (* x (exp (* y (- (log z) t)))) t_1))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = x * exp((a * (-z - b)));
    	double tmp;
    	if (a <= -5.5e+100) {
    		tmp = t_1;
    	} else if (a <= 1.45e-16) {
    		tmp = x * exp((y * (log(z) - t)));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a, b)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8) :: t_1
        real(8) :: tmp
        t_1 = x * exp((a * (-z - b)))
        if (a <= (-5.5d+100)) then
            tmp = t_1
        else if (a <= 1.45d-16) then
            tmp = x * exp((y * (log(z) - t)))
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = x * Math.exp((a * (-z - b)));
    	double tmp;
    	if (a <= -5.5e+100) {
    		tmp = t_1;
    	} else if (a <= 1.45e-16) {
    		tmp = x * Math.exp((y * (Math.log(z) - t)));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	t_1 = x * math.exp((a * (-z - b)))
    	tmp = 0
    	if a <= -5.5e+100:
    		tmp = t_1
    	elif a <= 1.45e-16:
    		tmp = x * math.exp((y * (math.log(z) - t)))
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(x * exp(Float64(a * Float64(Float64(-z) - b))))
    	tmp = 0.0
    	if (a <= -5.5e+100)
    		tmp = t_1;
    	elseif (a <= 1.45e-16)
    		tmp = Float64(x * exp(Float64(y * Float64(log(z) - t))));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	t_1 = x * exp((a * (-z - b)));
    	tmp = 0.0;
    	if (a <= -5.5e+100)
    		tmp = t_1;
    	elseif (a <= 1.45e-16)
    		tmp = x * exp((y * (log(z) - t)));
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.5e+100], t$95$1, If[LessEqual[a, 1.45e-16], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
    \mathbf{if}\;a \leq -5.5 \cdot 10^{+100}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;a \leq 1.45 \cdot 10^{-16}:\\
    \;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < -5.5000000000000002e100 or 1.4499999999999999e-16 < a

      1. Initial program 94.1%

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

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

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

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

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

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

      if -5.5000000000000002e100 < a < 1.4499999999999999e-16

      1. Initial program 100.0%

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right)}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 10: 54.7% accurate, 2.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot {z}^{y}\\ \mathbf{if}\;y \leq -3.1 \cdot 10^{-34}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.95 \cdot 10^{-167}:\\ \;\;\;\;y \cdot \left(y \cdot \left(x \cdot \left(0.5 \cdot \left(t \cdot t\right)\right)\right)\right)\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+19}:\\ \;\;\;\;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 \leq 1.06 \cdot 10^{+143}:\\ \;\;\;\;x \cdot \left(\left(t \cdot t\right) \cdot \left(-0.16666666666666666 \cdot \left(t \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (* x (pow z y))))
       (if (<= y -3.1e-34)
         t_1
         (if (<= y -2.95e-167)
           (* y (* y (* x (* 0.5 (* t t)))))
           (if (<= y 2.4e+19)
             (* x (fma b (fma 0.5 (* b (* a a)) (- a)) 1.0))
             (if (<= y 1.06e+143)
               (* x (* (* t t) (* -0.16666666666666666 (* t (* y (* y y))))))
               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 <= -3.1e-34) {
    		tmp = t_1;
    	} else if (y <= -2.95e-167) {
    		tmp = y * (y * (x * (0.5 * (t * t))));
    	} else if (y <= 2.4e+19) {
    		tmp = x * fma(b, fma(0.5, (b * (a * a)), -a), 1.0);
    	} else if (y <= 1.06e+143) {
    		tmp = x * ((t * t) * (-0.16666666666666666 * (t * (y * (y * y)))));
    	} 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 <= -3.1e-34)
    		tmp = t_1;
    	elseif (y <= -2.95e-167)
    		tmp = Float64(y * Float64(y * Float64(x * Float64(0.5 * Float64(t * t)))));
    	elseif (y <= 2.4e+19)
    		tmp = Float64(x * fma(b, fma(0.5, Float64(b * Float64(a * a)), Float64(-a)), 1.0));
    	elseif (y <= 1.06e+143)
    		tmp = Float64(x * Float64(Float64(t * t) * Float64(-0.16666666666666666 * Float64(t * Float64(y * Float64(y * y))))));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.1e-34], t$95$1, If[LessEqual[y, -2.95e-167], N[(y * N[(y * N[(x * N[(0.5 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+19], N[(x * N[(b * N[(0.5 * N[(b * N[(a * a), $MachinePrecision]), $MachinePrecision] + (-a)), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.06e+143], N[(x * N[(N[(t * t), $MachinePrecision] * N[(-0.16666666666666666 * N[(t * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := x \cdot {z}^{y}\\
    \mathbf{if}\;y \leq -3.1 \cdot 10^{-34}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;y \leq -2.95 \cdot 10^{-167}:\\
    \;\;\;\;y \cdot \left(y \cdot \left(x \cdot \left(0.5 \cdot \left(t \cdot t\right)\right)\right)\right)\\
    
    \mathbf{elif}\;y \leq 2.4 \cdot 10^{+19}:\\
    \;\;\;\;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 \leq 1.06 \cdot 10^{+143}:\\
    \;\;\;\;x \cdot \left(\left(t \cdot t\right) \cdot \left(-0.16666666666666666 \cdot \left(t \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if y < -3.0999999999999998e-34 or 1.06e143 < y

      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.f6483.0

          \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
      5. Simplified83.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.f6464.0

          \[\leadsto x \cdot \color{blue}{{z}^{y}} \]
      8. Simplified64.0%

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

      if -3.0999999999999998e-34 < y < -2.95000000000000011e-167

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

          \[\leadsto x \cdot e^{y \cdot \color{blue}{\left(-t\right)}} \]
      5. Simplified51.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.f6455.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. Simplified55.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto y \cdot \color{blue}{\left(\frac{1}{2} \cdot \left({t}^{2} \cdot \left(x \cdot y\right)\right)\right)} \]
        17. 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) \]
        18. associate-*r*N/A

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

          \[\leadsto \color{blue}{y \cdot \left(\left(\frac{1}{2} \cdot \left({t}^{2} \cdot x\right)\right) \cdot y\right)} \]
        20. 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)} \]
      11. Simplified59.3%

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

      if -2.95000000000000011e-167 < y < 2.4e19

      1. Initial program 99.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-*.f6483.0

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

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

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

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

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

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

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

        \[\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 2.4e19 < y < 1.06e143

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

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

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

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

          \[\leadsto x \cdot \color{blue}{\left(t \cdot \left(-1 \cdot y + t \cdot \left(\frac{-1}{6} \cdot \left(t \cdot {y}^{3}\right) + \frac{1}{2} \cdot {y}^{2}\right)\right) + 1\right)} \]
        2. 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)} \]
      8. Simplified55.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x \cdot \left(\left(t \cdot t\right) \cdot \left(\frac{-1}{6} \cdot \left(t \cdot \left(y \cdot \color{blue}{\left(y \cdot y\right)}\right)\right)\right)\right) \]
        19. *-lowering-*.f6467.3

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

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

    Alternative 11: 74.3% accurate, 2.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{-y \cdot t}\\ \mathbf{if}\;t \leq -1.5 \cdot 10^{+65}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+136}:\\ \;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (* x (exp (- (* y t))))))
       (if (<= t -1.5e+65)
         t_1
         (if (<= t 2.25e+136) (* 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 * t));
    	double tmp;
    	if (t <= -1.5e+65) {
    		tmp = t_1;
    	} else if (t <= 2.25e+136) {
    		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 * t))
        if (t <= (-1.5d+65)) then
            tmp = t_1
        else if (t <= 2.25d+136) 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 * t));
    	double tmp;
    	if (t <= -1.5e+65) {
    		tmp = t_1;
    	} else if (t <= 2.25e+136) {
    		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 * t))
    	tmp = 0
    	if t <= -1.5e+65:
    		tmp = t_1
    	elif t <= 2.25e+136:
    		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(-Float64(y * t))))
    	tmp = 0.0
    	if (t <= -1.5e+65)
    		tmp = t_1;
    	elseif (t <= 2.25e+136)
    		tmp = Float64(x * exp(Float64(a * Float64(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 * t));
    	tmp = 0.0;
    	if (t <= -1.5e+65)
    		tmp = t_1;
    	elseif (t <= 2.25e+136)
    		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 * t), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.5e+65], t$95$1, If[LessEqual[t, 2.25e+136], 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 t}\\
    \mathbf{if}\;t \leq -1.5 \cdot 10^{+65}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq 2.25 \cdot 10^{+136}:\\
    \;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t < -1.5000000000000001e65 or 2.25e136 < t

      1. Initial program 97.0%

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

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

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

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

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

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

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

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

      if -1.5000000000000001e65 < t < 2.25e136

      1. Initial program 97.4%

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

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

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

        \[\leadsto x \cdot e^{a \cdot \color{blue}{\left(\left(-z\right) - b\right)}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification80.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{+65}:\\ \;\;\;\;x \cdot e^{-y \cdot t}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+136}:\\ \;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{-y \cdot t}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 12: 71.9% accurate, 2.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{-y \cdot t}\\ \mathbf{if}\;t \leq -1.1 \cdot 10^{+27}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+84}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-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 t))))))
       (if (<= t -1.1e+27) t_1 (if (<= t 2.1e+84) (* x (exp (* a (- b)))) t_1))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = x * exp(-(y * t));
    	double tmp;
    	if (t <= -1.1e+27) {
    		tmp = t_1;
    	} else if (t <= 2.1e+84) {
    		tmp = x * exp((a * -b));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a, b)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8) :: t_1
        real(8) :: tmp
        t_1 = x * exp(-(y * t))
        if (t <= (-1.1d+27)) then
            tmp = t_1
        else if (t <= 2.1d+84) then
            tmp = x * exp((a * -b))
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = x * Math.exp(-(y * t));
    	double tmp;
    	if (t <= -1.1e+27) {
    		tmp = t_1;
    	} else if (t <= 2.1e+84) {
    		tmp = x * Math.exp((a * -b));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	t_1 = x * math.exp(-(y * t))
    	tmp = 0
    	if t <= -1.1e+27:
    		tmp = t_1
    	elif t <= 2.1e+84:
    		tmp = x * math.exp((a * -b))
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(x * exp(Float64(-Float64(y * t))))
    	tmp = 0.0
    	if (t <= -1.1e+27)
    		tmp = t_1;
    	elseif (t <= 2.1e+84)
    		tmp = Float64(x * exp(Float64(a * Float64(-b))));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	t_1 = x * exp(-(y * t));
    	tmp = 0.0;
    	if (t <= -1.1e+27)
    		tmp = t_1;
    	elseif (t <= 2.1e+84)
    		tmp = x * exp((a * -b));
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[(-N[(y * t), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e+27], t$95$1, If[LessEqual[t, 2.1e+84], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := x \cdot e^{-y \cdot t}\\
    \mathbf{if}\;t \leq -1.1 \cdot 10^{+27}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq 2.1 \cdot 10^{+84}:\\
    \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t < -1.0999999999999999e27 or 2.10000000000000019e84 < t

      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.f6481.0

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

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

      if -1.0999999999999999e27 < t < 2.10000000000000019e84

      1. Initial program 97.9%

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

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

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification78.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{+27}:\\ \;\;\;\;x \cdot e^{-y \cdot t}\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+84}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{-y \cdot t}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 13: 69.7% accurate, 2.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot {z}^{y}\\ \mathbf{if}\;y \leq -3.2 \cdot 10^{+28}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 8.9 \cdot 10^{+164}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (* x (pow z y))))
       (if (<= y -3.2e+28) t_1 (if (<= y 8.9e+164) (* 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 <= -3.2e+28) {
    		tmp = t_1;
    	} else if (y <= 8.9e+164) {
    		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 <= (-3.2d+28)) then
            tmp = t_1
        else if (y <= 8.9d+164) 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 <= -3.2e+28) {
    		tmp = t_1;
    	} else if (y <= 8.9e+164) {
    		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 <= -3.2e+28:
    		tmp = t_1
    	elif y <= 8.9e+164:
    		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 <= -3.2e+28)
    		tmp = t_1;
    	elseif (y <= 8.9e+164)
    		tmp = Float64(x * exp(Float64(a * Float64(-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 <= -3.2e+28)
    		tmp = t_1;
    	elseif (y <= 8.9e+164)
    		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, -3.2e+28], t$95$1, If[LessEqual[y, 8.9e+164], 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 -3.2 \cdot 10^{+28}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;y \leq 8.9 \cdot 10^{+164}:\\
    \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < -3.2e28 or 8.8999999999999999e164 < y

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

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

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

        \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
        2. pow-lowering-pow.f6467.9

          \[\leadsto x \cdot \color{blue}{{z}^{y}} \]
      8. Simplified67.9%

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

      if -3.2e28 < y < 8.8999999999999999e164

      1. Initial program 98.8%

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

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

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

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

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

        \[\leadsto x \cdot e^{\color{blue}{-a \cdot b}} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification73.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+28}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq 8.9 \cdot 10^{+164}:\\ \;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \]
    5. Add Preprocessing

    Alternative 14: 33.8% accurate, 10.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.7 \cdot 10^{+29}:\\ \;\;\;\;t \cdot \mathsf{fma}\left(x, -y, \frac{x}{t}\right)\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{+20}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;-x \cdot \left(y \cdot t\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= y -4.7e+29)
       (* t (fma x (- y) (/ x t)))
       (if (<= y 2.8e+20) (* x (- 1.0 (* a b))) (- (* x (* y t))))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (y <= -4.7e+29) {
    		tmp = t * fma(x, -y, (x / t));
    	} else if (y <= 2.8e+20) {
    		tmp = x * (1.0 - (a * b));
    	} else {
    		tmp = -(x * (y * t));
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (y <= -4.7e+29)
    		tmp = Float64(t * fma(x, Float64(-y), Float64(x / t)));
    	elseif (y <= 2.8e+20)
    		tmp = Float64(x * Float64(1.0 - Float64(a * b)));
    	else
    		tmp = Float64(-Float64(x * Float64(y * t)));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.7e+29], N[(t * N[(x * (-y) + N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e+20], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision])]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq -4.7 \cdot 10^{+29}:\\
    \;\;\;\;t \cdot \mathsf{fma}\left(x, -y, \frac{x}{t}\right)\\
    
    \mathbf{elif}\;y \leq 2.8 \cdot 10^{+20}:\\
    \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;-x \cdot \left(y \cdot t\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < -4.7000000000000002e29

      1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot \left(-1 \cdot \left(\frac{x}{t} - x \cdot y\right)\right)} \]
        7. distribute-lft-out--N/A

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

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

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

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

          \[\leadsto \color{blue}{t \cdot \left(\mathsf{neg}\left(\left(-1 \cdot \frac{x}{t} - -1 \cdot \left(x \cdot y\right)\right)\right)\right)} \]
        12. distribute-lft-out--N/A

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

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

          \[\leadsto t \cdot \color{blue}{\left(\frac{x}{t} - x \cdot y\right)} \]
        15. sub-negN/A

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

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

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

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

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

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

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

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

          \[\leadsto t \cdot \mathsf{fma}\left(x, \color{blue}{\mathsf{neg}\left(y\right)}, \frac{x}{t}\right) \]
        24. /-lowering-/.f6423.3

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

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

      if -4.7000000000000002e29 < y < 2.8e20

      1. Initial program 99.3%

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

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

          \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
      5. Simplified79.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-*.f6445.4

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

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

      if 2.8e20 < y

      1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x \cdot \left(t \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right) \]
        13. neg-lowering-neg.f6432.9

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.7 \cdot 10^{+29}:\\ \;\;\;\;t \cdot \mathsf{fma}\left(x, -y, \frac{x}{t}\right)\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{+20}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;-x \cdot \left(y \cdot t\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 15: 30.7% accurate, 12.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -6.2 \cdot 10^{+112}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{elif}\;b \leq 4.8 \cdot 10^{+85}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x - a \cdot \left(x \cdot b\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= b -6.2e+112)
       (* x (- 1.0 (* a b)))
       (if (<= b 4.8e+85) (* x (- 1.0 (* y t))) (- x (* a (* x b))))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (b <= -6.2e+112) {
    		tmp = x * (1.0 - (a * b));
    	} else if (b <= 4.8e+85) {
    		tmp = x * (1.0 - (y * t));
    	} else {
    		tmp = x - (a * (x * 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 (b <= (-6.2d+112)) then
            tmp = x * (1.0d0 - (a * b))
        else if (b <= 4.8d+85) then
            tmp = x * (1.0d0 - (y * t))
        else
            tmp = x - (a * (x * 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 (b <= -6.2e+112) {
    		tmp = x * (1.0 - (a * b));
    	} else if (b <= 4.8e+85) {
    		tmp = x * (1.0 - (y * t));
    	} else {
    		tmp = x - (a * (x * b));
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	tmp = 0
    	if b <= -6.2e+112:
    		tmp = x * (1.0 - (a * b))
    	elif b <= 4.8e+85:
    		tmp = x * (1.0 - (y * t))
    	else:
    		tmp = x - (a * (x * b))
    	return tmp
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (b <= -6.2e+112)
    		tmp = Float64(x * Float64(1.0 - Float64(a * b)));
    	elseif (b <= 4.8e+85)
    		tmp = Float64(x * Float64(1.0 - Float64(y * t)));
    	else
    		tmp = Float64(x - Float64(a * Float64(x * b)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	tmp = 0.0;
    	if (b <= -6.2e+112)
    		tmp = x * (1.0 - (a * b));
    	elseif (b <= 4.8e+85)
    		tmp = x * (1.0 - (y * t));
    	else
    		tmp = x - (a * (x * b));
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6.2e+112], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.8e+85], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;b \leq -6.2 \cdot 10^{+112}:\\
    \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
    
    \mathbf{elif}\;b \leq 4.8 \cdot 10^{+85}:\\
    \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;x - a \cdot \left(x \cdot b\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if b < -6.19999999999999965e112

      1. Initial program 97.8%

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

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

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

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

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

        \[\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-*.f6437.4

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

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

      if -6.19999999999999965e112 < b < 4.79999999999999993e85

      1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 4.79999999999999993e85 < b

      1. Initial program 95.6%

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

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

        \[\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. mul-1-negN/A

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

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

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

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

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

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

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

    Alternative 16: 31.6% accurate, 12.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - a \cdot b\right)\\ \mathbf{if}\;b \leq -1 \cdot 10^{+110}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 5 \cdot 10^{+85}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (* x (- 1.0 (* a b)))))
       (if (<= b -1e+110) t_1 (if (<= b 5e+85) (* x (- 1.0 (* y t))) t_1))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = x * (1.0 - (a * b));
    	double tmp;
    	if (b <= -1e+110) {
    		tmp = t_1;
    	} else if (b <= 5e+85) {
    		tmp = x * (1.0 - (y * t));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a, b)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8) :: t_1
        real(8) :: tmp
        t_1 = x * (1.0d0 - (a * b))
        if (b <= (-1d+110)) then
            tmp = t_1
        else if (b <= 5d+85) then
            tmp = x * (1.0d0 - (y * t))
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = x * (1.0 - (a * b));
    	double tmp;
    	if (b <= -1e+110) {
    		tmp = t_1;
    	} else if (b <= 5e+85) {
    		tmp = x * (1.0 - (y * t));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	t_1 = x * (1.0 - (a * b))
    	tmp = 0
    	if b <= -1e+110:
    		tmp = t_1
    	elif b <= 5e+85:
    		tmp = x * (1.0 - (y * t))
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(x * Float64(1.0 - Float64(a * b)))
    	tmp = 0.0
    	if (b <= -1e+110)
    		tmp = t_1;
    	elseif (b <= 5e+85)
    		tmp = Float64(x * Float64(1.0 - Float64(y * t)));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	t_1 = x * (1.0 - (a * b));
    	tmp = 0.0;
    	if (b <= -1e+110)
    		tmp = t_1;
    	elseif (b <= 5e+85)
    		tmp = x * (1.0 - (y * t));
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1e+110], t$95$1, If[LessEqual[b, 5e+85], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := x \cdot \left(1 - a \cdot b\right)\\
    \mathbf{if}\;b \leq -1 \cdot 10^{+110}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;b \leq 5 \cdot 10^{+85}:\\
    \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if b < -1e110 or 5.0000000000000001e85 < b

      1. Initial program 96.7%

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

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

        \[\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-*.f6434.3

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

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

      if -1e110 < b < 5.0000000000000001e85

      1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 17: 32.1% accurate, 12.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := -x \cdot \left(y \cdot t\right)\\ \mathbf{if}\;y \leq -6.1 \cdot 10^{+29}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{+20}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (- (* x (* y t)))))
       (if (<= y -6.1e+29) t_1 (if (<= y 2.8e+20) (* x (- 1.0 (* a b))) t_1))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = -(x * (y * t));
    	double tmp;
    	if (y <= -6.1e+29) {
    		tmp = t_1;
    	} else if (y <= 2.8e+20) {
    		tmp = x * (1.0 - (a * b));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a, b)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8) :: t_1
        real(8) :: tmp
        t_1 = -(x * (y * t))
        if (y <= (-6.1d+29)) then
            tmp = t_1
        else if (y <= 2.8d+20) then
            tmp = x * (1.0d0 - (a * b))
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = -(x * (y * t));
    	double tmp;
    	if (y <= -6.1e+29) {
    		tmp = t_1;
    	} else if (y <= 2.8e+20) {
    		tmp = x * (1.0 - (a * b));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	t_1 = -(x * (y * t))
    	tmp = 0
    	if y <= -6.1e+29:
    		tmp = t_1
    	elif y <= 2.8e+20:
    		tmp = x * (1.0 - (a * b))
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(-Float64(x * Float64(y * t)))
    	tmp = 0.0
    	if (y <= -6.1e+29)
    		tmp = t_1;
    	elseif (y <= 2.8e+20)
    		tmp = Float64(x * Float64(1.0 - Float64(a * b)));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	t_1 = -(x * (y * t));
    	tmp = 0.0;
    	if (y <= -6.1e+29)
    		tmp = t_1;
    	elseif (y <= 2.8e+20)
    		tmp = x * (1.0 - (a * b));
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = (-N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision])}, If[LessEqual[y, -6.1e+29], t$95$1, If[LessEqual[y, 2.8e+20], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := -x \cdot \left(y \cdot t\right)\\
    \mathbf{if}\;y \leq -6.1 \cdot 10^{+29}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;y \leq 2.8 \cdot 10^{+20}:\\
    \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < -6.0999999999999998e29 or 2.8e20 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x \cdot \left(t \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right) \]
        13. neg-lowering-neg.f6423.9

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

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

      if -6.0999999999999998e29 < y < 2.8e20

      1. Initial program 99.3%

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

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

          \[\leadsto x \cdot e^{-\color{blue}{a \cdot b}} \]
      5. Simplified79.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-*.f6445.4

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.1 \cdot 10^{+29}:\\ \;\;\;\;-x \cdot \left(y \cdot t\right)\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{+20}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;-x \cdot \left(y \cdot t\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 18: 19.4% accurate, 328.0× speedup?

    \[\begin{array}{l} \\ x \end{array} \]
    (FPCore (x y z t a b) :precision binary64 x)
    double code(double x, double y, double z, double t, double a, double b) {
    	return x;
    }
    
    real(8) function code(x, y, z, t, a, b)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        code = x
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b) {
    	return x;
    }
    
    def code(x, y, z, t, a, b):
    	return x
    
    function code(x, y, z, t, a, b)
    	return x
    end
    
    function tmp = code(x, y, z, t, a, b)
    	tmp = x;
    end
    
    code[x_, y_, z_, t_, a_, b_] := x
    
    \begin{array}{l}
    
    \\
    x
    \end{array}
    
    Derivation
    1. Initial program 97.3%

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

        \[\leadsto x \cdot e^{y \cdot \left(\color{blue}{\log z} - t\right)} \]
    5. Simplified70.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. Simplified18.8%

        \[\leadsto \color{blue}{x} \]
      2. Add Preprocessing

      Reproduce

      ?
      herbie shell --seed 2024198 
      (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))))))