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

Percentage Accurate: 96.6% → 96.0%
Time: 12.6s
Alternatives: 11
Speedup: N/A×

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 11 alternatives:

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

Initial Program: 96.6% accurate, 1.0× speedup?

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

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

Alternative 1: 96.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 2.5 \cdot 10^{+166}:\\ \;\;\;\;e^{\left(\log \left(1 - z\right) - b\right) \cdot a + \left(\log z - t\right) \cdot y} \cdot x\\ \mathbf{else}:\\ \;\;\;\;e^{-\mathsf{fma}\left(a, z, b \cdot a\right)} \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a 2.5e+166)
   (* (exp (+ (* (- (log (- 1.0 z)) b) a) (* (- (log z) t) y))) x)
   (* (exp (- (fma a z (* b a)))) x)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= 2.5e+166) {
		tmp = exp((((log((1.0 - z)) - b) * a) + ((log(z) - t) * y))) * x;
	} else {
		tmp = exp(-fma(a, z, (b * a))) * x;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= 2.5e+166)
		tmp = Float64(exp(Float64(Float64(Float64(log(Float64(1.0 - z)) - b) * a) + Float64(Float64(log(z) - t) * y))) * x);
	else
		tmp = Float64(exp(Float64(-fma(a, z, Float64(b * a)))) * x);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 2.5e+166], N[(N[Exp[N[(N[(N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] * a), $MachinePrecision] + N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision], N[(N[Exp[(-N[(a * z + N[(b * a), $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.5 \cdot 10^{+166}:\\
\;\;\;\;e^{\left(\log \left(1 - z\right) - b\right) \cdot a + \left(\log z - t\right) \cdot y} \cdot x\\

\mathbf{else}:\\
\;\;\;\;e^{-\mathsf{fma}\left(a, z, b \cdot a\right)} \cdot x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 2.5000000000000001e166

    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

    if 2.5000000000000001e166 < a

    1. Initial program 74.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot e^{-\mathsf{fma}\left(a, z, a \cdot b\right)} \]
    8. Recombined 2 regimes into one program.
    9. Final simplification95.0%

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

    Alternative 2: 49.2% accurate, 0.7× speedup?

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

      1. Initial program 94.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 \color{blue}{x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right)} + y \cdot \left(\frac{1}{2} \cdot \left(x \cdot \left(y \cdot \left(e^{a \cdot \left(\log \left(1 - z\right) - b\right)} \cdot {\left(\log z - t\right)}^{2}\right)\right)\right) + x \cdot \left(e^{a \cdot \left(\log \left(1 - z\right) - b\right)} \cdot \left(\log z - t\right)\right)\right)} \]
      4. Applied rewrites51.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot \left({\left(\frac{1 - z}{e^{b}}\right)}^{a} \cdot \mathsf{fma}\left(0.5 \cdot y, {\left(\log z - t\right)}^{2}, \log z - t\right)\right), y, {\left(\frac{1 - z}{e^{b}}\right)}^{a} \cdot x\right)} \]
      5. Taylor expanded in a around 0

        \[\leadsto x + \color{blue}{x \cdot \left(y \cdot \left(\left(\log z + \frac{1}{2} \cdot \left(y \cdot {\left(\log z - t\right)}^{2}\right)\right) - t\right)\right)} \]
      6. Step-by-step derivation
        1. Applied rewrites29.8%

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

          \[\leadsto \frac{1}{2} \cdot \left({t}^{2} \cdot \color{blue}{\left(x \cdot {y}^{2}\right)}\right) \]
        3. Step-by-step derivation
          1. Applied rewrites34.6%

            \[\leadsto \left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(\left(y \cdot y\right) \cdot \color{blue}{x}\right) \]
          2. Step-by-step derivation
            1. Applied rewrites40.1%

              \[\leadsto \left(\left(\left(y \cdot y\right) \cdot x\right) \cdot \left(0.5 \cdot t\right)\right) \cdot t \]

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

            1. Initial program 84.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 a around 0

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

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

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

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

                \[\leadsto x \cdot {\color{blue}{\left(\frac{e^{\log z}}{e^{t}}\right)}}^{y} \]
              5. rem-exp-logN/A

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

                \[\leadsto x \cdot {\color{blue}{\left(\frac{z}{e^{t}}\right)}}^{y} \]
              7. lower-exp.f6459.5

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

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

              \[\leadsto x \cdot 1 \]
            7. Step-by-step derivation
              1. Applied rewrites80.1%

                \[\leadsto x \cdot 1 \]
            8. Recombined 2 regimes into one program.
            9. Final simplification46.8%

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

            Alternative 3: 45.5% accurate, 0.7× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\log \left(1 - z\right) - b\right) \cdot a + \left(\log z - t\right) \cdot y\\ t_2 := \left(t \cdot t\right) \cdot 0.5\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+39}:\\ \;\;\;\;\left(t\_2 \cdot \left(y \cdot x\right)\right) \cdot y\\ \mathbf{elif}\;t\_1 \leq 0.04:\\ \;\;\;\;1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(t\_2 \cdot x\right) \cdot \left(y \cdot y\right)\\ \end{array} \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (let* ((t_1 (+ (* (- (log (- 1.0 z)) b) a) (* (- (log z) t) y)))
                    (t_2 (* (* t t) 0.5)))
               (if (<= t_1 -1e+39)
                 (* (* t_2 (* y x)) y)
                 (if (<= t_1 0.04) (* 1.0 x) (* (* t_2 x) (* y y))))))
            double code(double x, double y, double z, double t, double a, double b) {
            	double t_1 = ((log((1.0 - z)) - b) * a) + ((log(z) - t) * y);
            	double t_2 = (t * t) * 0.5;
            	double tmp;
            	if (t_1 <= -1e+39) {
            		tmp = (t_2 * (y * x)) * y;
            	} else if (t_1 <= 0.04) {
            		tmp = 1.0 * x;
            	} else {
            		tmp = (t_2 * x) * (y * y);
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z, t, a, b)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8), intent (in) :: a
                real(8), intent (in) :: b
                real(8) :: t_1
                real(8) :: t_2
                real(8) :: tmp
                t_1 = ((log((1.0d0 - z)) - b) * a) + ((log(z) - t) * y)
                t_2 = (t * t) * 0.5d0
                if (t_1 <= (-1d+39)) then
                    tmp = (t_2 * (y * x)) * y
                else if (t_1 <= 0.04d0) then
                    tmp = 1.0d0 * x
                else
                    tmp = (t_2 * x) * (y * y)
                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.log((1.0 - z)) - b) * a) + ((Math.log(z) - t) * y);
            	double t_2 = (t * t) * 0.5;
            	double tmp;
            	if (t_1 <= -1e+39) {
            		tmp = (t_2 * (y * x)) * y;
            	} else if (t_1 <= 0.04) {
            		tmp = 1.0 * x;
            	} else {
            		tmp = (t_2 * x) * (y * y);
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b):
            	t_1 = ((math.log((1.0 - z)) - b) * a) + ((math.log(z) - t) * y)
            	t_2 = (t * t) * 0.5
            	tmp = 0
            	if t_1 <= -1e+39:
            		tmp = (t_2 * (y * x)) * y
            	elif t_1 <= 0.04:
            		tmp = 1.0 * x
            	else:
            		tmp = (t_2 * x) * (y * y)
            	return tmp
            
            function code(x, y, z, t, a, b)
            	t_1 = Float64(Float64(Float64(log(Float64(1.0 - z)) - b) * a) + Float64(Float64(log(z) - t) * y))
            	t_2 = Float64(Float64(t * t) * 0.5)
            	tmp = 0.0
            	if (t_1 <= -1e+39)
            		tmp = Float64(Float64(t_2 * Float64(y * x)) * y);
            	elseif (t_1 <= 0.04)
            		tmp = Float64(1.0 * x);
            	else
            		tmp = Float64(Float64(t_2 * x) * Float64(y * y));
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b)
            	t_1 = ((log((1.0 - z)) - b) * a) + ((log(z) - t) * y);
            	t_2 = (t * t) * 0.5;
            	tmp = 0.0;
            	if (t_1 <= -1e+39)
            		tmp = (t_2 * (y * x)) * y;
            	elseif (t_1 <= 0.04)
            		tmp = 1.0 * x;
            	else
            		tmp = (t_2 * x) * (y * y);
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] * a), $MachinePrecision] + N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t * t), $MachinePrecision] * 0.5), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+39], N[(N[(t$95$2 * N[(y * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$1, 0.04], N[(1.0 * x), $MachinePrecision], N[(N[(t$95$2 * x), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \left(\log \left(1 - z\right) - b\right) \cdot a + \left(\log z - t\right) \cdot y\\
            t_2 := \left(t \cdot t\right) \cdot 0.5\\
            \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+39}:\\
            \;\;\;\;\left(t\_2 \cdot \left(y \cdot x\right)\right) \cdot y\\
            
            \mathbf{elif}\;t\_1 \leq 0.04:\\
            \;\;\;\;1 \cdot x\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(t\_2 \cdot x\right) \cdot \left(y \cdot y\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if (+.f64 (*.f64 y (-.f64 (log.f64 z) t)) (*.f64 a (-.f64 (log.f64 (-.f64 #s(literal 1 binary64) z)) b))) < -9.9999999999999994e38

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

                \[\leadsto \color{blue}{x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right)} + y \cdot \left(\frac{1}{2} \cdot \left(x \cdot \left(y \cdot \left(e^{a \cdot \left(\log \left(1 - z\right) - b\right)} \cdot {\left(\log z - t\right)}^{2}\right)\right)\right) + x \cdot \left(e^{a \cdot \left(\log \left(1 - z\right) - b\right)} \cdot \left(\log z - t\right)\right)\right)} \]
              4. Applied rewrites35.7%

                \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot \left({\left(\frac{1 - z}{e^{b}}\right)}^{a} \cdot \mathsf{fma}\left(0.5 \cdot y, {\left(\log z - t\right)}^{2}, \log z - t\right)\right), y, {\left(\frac{1 - z}{e^{b}}\right)}^{a} \cdot x\right)} \]
              5. Taylor expanded in a around 0

                \[\leadsto x + \color{blue}{x \cdot \left(y \cdot \left(\left(\log z + \frac{1}{2} \cdot \left(y \cdot {\left(\log z - t\right)}^{2}\right)\right) - t\right)\right)} \]
              6. Step-by-step derivation
                1. Applied rewrites2.2%

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

                  \[\leadsto \frac{1}{2} \cdot \left({t}^{2} \cdot \color{blue}{\left(x \cdot {y}^{2}\right)}\right) \]
                3. Step-by-step derivation
                  1. Applied rewrites29.8%

                    \[\leadsto \left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(\left(y \cdot y\right) \cdot \color{blue}{x}\right) \]
                  2. Step-by-step derivation
                    1. Applied rewrites30.3%

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

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

                    1. Initial program 83.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 a around 0

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

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

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

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

                        \[\leadsto x \cdot {\color{blue}{\left(\frac{e^{\log z}}{e^{t}}\right)}}^{y} \]
                      5. rem-exp-logN/A

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

                        \[\leadsto x \cdot {\color{blue}{\left(\frac{z}{e^{t}}\right)}}^{y} \]
                      7. lower-exp.f6457.2

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

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

                      \[\leadsto x \cdot 1 \]
                    7. Step-by-step derivation
                      1. Applied rewrites74.0%

                        \[\leadsto x \cdot 1 \]

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

                      1. Initial program 90.9%

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

                        \[\leadsto \color{blue}{x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right)} + y \cdot \left(\frac{1}{2} \cdot \left(x \cdot \left(y \cdot \left(e^{a \cdot \left(\log \left(1 - z\right) - b\right)} \cdot {\left(\log z - t\right)}^{2}\right)\right)\right) + x \cdot \left(e^{a \cdot \left(\log \left(1 - z\right) - b\right)} \cdot \left(\log z - t\right)\right)\right)} \]
                      4. Applied rewrites66.5%

                        \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot \left({\left(\frac{1 - z}{e^{b}}\right)}^{a} \cdot \mathsf{fma}\left(0.5 \cdot y, {\left(\log z - t\right)}^{2}, \log z - t\right)\right), y, {\left(\frac{1 - z}{e^{b}}\right)}^{a} \cdot x\right)} \]
                      5. Taylor expanded in a around 0

                        \[\leadsto x + \color{blue}{x \cdot \left(y \cdot \left(\left(\log z + \frac{1}{2} \cdot \left(y \cdot {\left(\log z - t\right)}^{2}\right)\right) - t\right)\right)} \]
                      6. Step-by-step derivation
                        1. Applied rewrites56.5%

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

                          \[\leadsto \frac{1}{2} \cdot \left({t}^{2} \cdot \color{blue}{\left(x \cdot {y}^{2}\right)}\right) \]
                        3. Step-by-step derivation
                          1. Applied rewrites40.2%

                            \[\leadsto \left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(\left(y \cdot y\right) \cdot \color{blue}{x}\right) \]
                          2. Step-by-step derivation
                            1. Applied rewrites43.8%

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

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

                          Alternative 4: 45.3% accurate, 0.7× speedup?

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

                            1. Initial program 94.8%

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

                              \[\leadsto \color{blue}{x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right)} + y \cdot \left(\frac{1}{2} \cdot \left(x \cdot \left(y \cdot \left(e^{a \cdot \left(\log \left(1 - z\right) - b\right)} \cdot {\left(\log z - t\right)}^{2}\right)\right)\right) + x \cdot \left(e^{a \cdot \left(\log \left(1 - z\right) - b\right)} \cdot \left(\log z - t\right)\right)\right)} \]
                            4. Applied rewrites51.6%

                              \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot \left({\left(\frac{1 - z}{e^{b}}\right)}^{a} \cdot \mathsf{fma}\left(0.5 \cdot y, {\left(\log z - t\right)}^{2}, \log z - t\right)\right), y, {\left(\frac{1 - z}{e^{b}}\right)}^{a} \cdot x\right)} \]
                            5. Taylor expanded in a around 0

                              \[\leadsto x + \color{blue}{x \cdot \left(y \cdot \left(\left(\log z + \frac{1}{2} \cdot \left(y \cdot {\left(\log z - t\right)}^{2}\right)\right) - t\right)\right)} \]
                            6. Step-by-step derivation
                              1. Applied rewrites30.3%

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

                                \[\leadsto \frac{1}{2} \cdot \left({t}^{2} \cdot \color{blue}{\left(x \cdot {y}^{2}\right)}\right) \]
                              3. Step-by-step derivation
                                1. Applied rewrites35.2%

                                  \[\leadsto \left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(\left(y \cdot y\right) \cdot \color{blue}{x}\right) \]
                                2. Step-by-step derivation
                                  1. Applied rewrites36.5%

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

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

                                  1. Initial program 83.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 a around 0

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

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

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

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

                                      \[\leadsto x \cdot {\color{blue}{\left(\frac{e^{\log z}}{e^{t}}\right)}}^{y} \]
                                    5. rem-exp-logN/A

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

                                      \[\leadsto x \cdot {\color{blue}{\left(\frac{z}{e^{t}}\right)}}^{y} \]
                                    7. lower-exp.f6457.2

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

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

                                    \[\leadsto x \cdot 1 \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites74.0%

                                      \[\leadsto x \cdot 1 \]
                                  8. Recombined 2 regimes into one program.
                                  9. Final simplification43.4%

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

                                  Alternative 5: 87.1% accurate, 1.4× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := {\left(\frac{z}{e^{t}}\right)}^{y} \cdot x\\ \mathbf{if}\;y \leq -0.0001:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{+27}:\\ \;\;\;\;e^{-\mathsf{fma}\left(a, z, b \cdot a\right)} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                  (FPCore (x y z t a b)
                                   :precision binary64
                                   (let* ((t_1 (* (pow (/ z (exp t)) y) x)))
                                     (if (<= y -0.0001)
                                       t_1
                                       (if (<= y 3.2e+27) (* (exp (- (fma a z (* b a)))) x) t_1))))
                                  double code(double x, double y, double z, double t, double a, double b) {
                                  	double t_1 = pow((z / exp(t)), y) * x;
                                  	double tmp;
                                  	if (y <= -0.0001) {
                                  		tmp = t_1;
                                  	} else if (y <= 3.2e+27) {
                                  		tmp = exp(-fma(a, z, (b * a))) * x;
                                  	} else {
                                  		tmp = t_1;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  function code(x, y, z, t, a, b)
                                  	t_1 = Float64((Float64(z / exp(t)) ^ y) * x)
                                  	tmp = 0.0
                                  	if (y <= -0.0001)
                                  		tmp = t_1;
                                  	elseif (y <= 3.2e+27)
                                  		tmp = Float64(exp(Float64(-fma(a, z, Float64(b * a)))) * x);
                                  	else
                                  		tmp = t_1;
                                  	end
                                  	return tmp
                                  end
                                  
                                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Power[N[(z / N[Exp[t], $MachinePrecision]), $MachinePrecision], y], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[y, -0.0001], t$95$1, If[LessEqual[y, 3.2e+27], N[(N[Exp[(-N[(a * z + N[(b * a), $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  t_1 := {\left(\frac{z}{e^{t}}\right)}^{y} \cdot x\\
                                  \mathbf{if}\;y \leq -0.0001:\\
                                  \;\;\;\;t\_1\\
                                  
                                  \mathbf{elif}\;y \leq 3.2 \cdot 10^{+27}:\\
                                  \;\;\;\;e^{-\mathsf{fma}\left(a, z, b \cdot a\right)} \cdot x\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if y < -1.00000000000000005e-4 or 3.20000000000000015e27 < y

                                    1. Initial program 94.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 a around 0

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

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

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

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

                                        \[\leadsto x \cdot {\color{blue}{\left(\frac{e^{\log z}}{e^{t}}\right)}}^{y} \]
                                      5. rem-exp-logN/A

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

                                        \[\leadsto x \cdot {\color{blue}{\left(\frac{z}{e^{t}}\right)}}^{y} \]
                                      7. lower-exp.f6484.1

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

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

                                    if -1.00000000000000005e-4 < y < 3.20000000000000015e27

                                    1. Initial program 91.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. *-commutativeN/A

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

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

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

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

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

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

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

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

                                        \[\leadsto x \cdot e^{-\mathsf{fma}\left(a, z, a \cdot b\right)} \]
                                    8. Recombined 2 regimes into one program.
                                    9. Final simplification86.7%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -0.0001:\\ \;\;\;\;{\left(\frac{z}{e^{t}}\right)}^{y} \cdot x\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{+27}:\\ \;\;\;\;e^{-\mathsf{fma}\left(a, z, b \cdot a\right)} \cdot x\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{z}{e^{t}}\right)}^{y} \cdot x\\ \end{array} \]
                                    10. Add Preprocessing

                                    Alternative 6: 73.6% accurate, 2.5× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := e^{-\mathsf{fma}\left(a, z, b \cdot a\right)} \cdot x\\ \mathbf{if}\;a \leq -3.4 \cdot 10^{-14}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-101}:\\ \;\;\;\;e^{\left(-t\right) \cdot y} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                    (FPCore (x y z t a b)
                                     :precision binary64
                                     (let* ((t_1 (* (exp (- (fma a z (* b a)))) x)))
                                       (if (<= a -3.4e-14) t_1 (if (<= a 5.5e-101) (* (exp (* (- t) y)) x) t_1))))
                                    double code(double x, double y, double z, double t, double a, double b) {
                                    	double t_1 = exp(-fma(a, z, (b * a))) * x;
                                    	double tmp;
                                    	if (a <= -3.4e-14) {
                                    		tmp = t_1;
                                    	} else if (a <= 5.5e-101) {
                                    		tmp = exp((-t * y)) * x;
                                    	} else {
                                    		tmp = t_1;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(x, y, z, t, a, b)
                                    	t_1 = Float64(exp(Float64(-fma(a, z, Float64(b * a)))) * x)
                                    	tmp = 0.0
                                    	if (a <= -3.4e-14)
                                    		tmp = t_1;
                                    	elseif (a <= 5.5e-101)
                                    		tmp = Float64(exp(Float64(Float64(-t) * y)) * x);
                                    	else
                                    		tmp = t_1;
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Exp[(-N[(a * z + N[(b * a), $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[a, -3.4e-14], t$95$1, If[LessEqual[a, 5.5e-101], N[(N[Exp[N[((-t) * y), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    t_1 := e^{-\mathsf{fma}\left(a, z, b \cdot a\right)} \cdot x\\
                                    \mathbf{if}\;a \leq -3.4 \cdot 10^{-14}:\\
                                    \;\;\;\;t\_1\\
                                    
                                    \mathbf{elif}\;a \leq 5.5 \cdot 10^{-101}:\\
                                    \;\;\;\;e^{\left(-t\right) \cdot y} \cdot x\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;t\_1\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if a < -3.40000000000000003e-14 or 5.49999999999999973e-101 < a

                                      1. Initial program 89.0%

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

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

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

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

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

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

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

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

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

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

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

                                        if -3.40000000000000003e-14 < a < 5.49999999999999973e-101

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

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

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

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

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

                                          \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
                                      8. Recombined 2 regimes into one program.
                                      9. Final simplification79.3%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.4 \cdot 10^{-14}:\\ \;\;\;\;e^{-\mathsf{fma}\left(a, z, b \cdot a\right)} \cdot x\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-101}:\\ \;\;\;\;e^{\left(-t\right) \cdot y} \cdot x\\ \mathbf{else}:\\ \;\;\;\;e^{-\mathsf{fma}\left(a, z, b \cdot a\right)} \cdot x\\ \end{array} \]
                                      10. Add Preprocessing

                                      Alternative 7: 70.2% accurate, 2.6× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := e^{\left(-b\right) \cdot a} \cdot x\\ \mathbf{if}\;b \leq -1.2 \cdot 10^{-69}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 7800000000000:\\ \;\;\;\;e^{\left(-t\right) \cdot y} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                      (FPCore (x y z t a b)
                                       :precision binary64
                                       (let* ((t_1 (* (exp (* (- b) a)) x)))
                                         (if (<= b -1.2e-69)
                                           t_1
                                           (if (<= b 7800000000000.0) (* (exp (* (- t) y)) x) t_1))))
                                      double code(double x, double y, double z, double t, double a, double b) {
                                      	double t_1 = exp((-b * a)) * x;
                                      	double tmp;
                                      	if (b <= -1.2e-69) {
                                      		tmp = t_1;
                                      	} else if (b <= 7800000000000.0) {
                                      		tmp = exp((-t * y)) * 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) :: tmp
                                          t_1 = exp((-b * a)) * x
                                          if (b <= (-1.2d-69)) then
                                              tmp = t_1
                                          else if (b <= 7800000000000.0d0) then
                                              tmp = exp((-t * y)) * 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 = Math.exp((-b * a)) * x;
                                      	double tmp;
                                      	if (b <= -1.2e-69) {
                                      		tmp = t_1;
                                      	} else if (b <= 7800000000000.0) {
                                      		tmp = Math.exp((-t * y)) * x;
                                      	} else {
                                      		tmp = t_1;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(x, y, z, t, a, b):
                                      	t_1 = math.exp((-b * a)) * x
                                      	tmp = 0
                                      	if b <= -1.2e-69:
                                      		tmp = t_1
                                      	elif b <= 7800000000000.0:
                                      		tmp = math.exp((-t * y)) * x
                                      	else:
                                      		tmp = t_1
                                      	return tmp
                                      
                                      function code(x, y, z, t, a, b)
                                      	t_1 = Float64(exp(Float64(Float64(-b) * a)) * x)
                                      	tmp = 0.0
                                      	if (b <= -1.2e-69)
                                      		tmp = t_1;
                                      	elseif (b <= 7800000000000.0)
                                      		tmp = Float64(exp(Float64(Float64(-t) * y)) * x);
                                      	else
                                      		tmp = t_1;
                                      	end
                                      	return tmp
                                      end
                                      
                                      function tmp_2 = code(x, y, z, t, a, b)
                                      	t_1 = exp((-b * a)) * x;
                                      	tmp = 0.0;
                                      	if (b <= -1.2e-69)
                                      		tmp = t_1;
                                      	elseif (b <= 7800000000000.0)
                                      		tmp = exp((-t * y)) * x;
                                      	else
                                      		tmp = t_1;
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Exp[N[((-b) * a), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[b, -1.2e-69], t$95$1, If[LessEqual[b, 7800000000000.0], N[(N[Exp[N[((-t) * y), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      t_1 := e^{\left(-b\right) \cdot a} \cdot x\\
                                      \mathbf{if}\;b \leq -1.2 \cdot 10^{-69}:\\
                                      \;\;\;\;t\_1\\
                                      
                                      \mathbf{elif}\;b \leq 7800000000000:\\
                                      \;\;\;\;e^{\left(-t\right) \cdot y} \cdot x\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;t\_1\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if b < -1.2000000000000001e-69 or 7.8e12 < b

                                        1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

                                          \[\leadsto x \cdot e^{-1 \cdot \color{blue}{\left(a \cdot b\right)}} \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites80.3%

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

                                          if -1.2000000000000001e-69 < b < 7.8e12

                                          1. Initial program 88.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. associate-*r*N/A

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

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

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

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

                                            \[\leadsto x \cdot e^{\color{blue}{\left(-t\right) \cdot y}} \]
                                        8. Recombined 2 regimes into one program.
                                        9. Final simplification72.8%

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.2 \cdot 10^{-69}:\\ \;\;\;\;e^{\left(-b\right) \cdot a} \cdot x\\ \mathbf{elif}\;b \leq 7800000000000:\\ \;\;\;\;e^{\left(-t\right) \cdot y} \cdot x\\ \mathbf{else}:\\ \;\;\;\;e^{\left(-b\right) \cdot a} \cdot x\\ \end{array} \]
                                        10. Add Preprocessing

                                        Alternative 8: 67.5% accurate, 2.6× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := e^{\left(-b\right) \cdot a} \cdot x\\ \mathbf{if}\;b \leq -2.4 \cdot 10^{-69}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{+53}:\\ \;\;\;\;{z}^{y} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                        (FPCore (x y z t a b)
                                         :precision binary64
                                         (let* ((t_1 (* (exp (* (- b) a)) x)))
                                           (if (<= b -2.4e-69) t_1 (if (<= b 2.8e+53) (* (pow z y) x) t_1))))
                                        double code(double x, double y, double z, double t, double a, double b) {
                                        	double t_1 = exp((-b * a)) * x;
                                        	double tmp;
                                        	if (b <= -2.4e-69) {
                                        		tmp = t_1;
                                        	} else if (b <= 2.8e+53) {
                                        		tmp = pow(z, y) * 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) :: tmp
                                            t_1 = exp((-b * a)) * x
                                            if (b <= (-2.4d-69)) then
                                                tmp = t_1
                                            else if (b <= 2.8d+53) then
                                                tmp = (z ** y) * 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 = Math.exp((-b * a)) * x;
                                        	double tmp;
                                        	if (b <= -2.4e-69) {
                                        		tmp = t_1;
                                        	} else if (b <= 2.8e+53) {
                                        		tmp = Math.pow(z, y) * x;
                                        	} else {
                                        		tmp = t_1;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        def code(x, y, z, t, a, b):
                                        	t_1 = math.exp((-b * a)) * x
                                        	tmp = 0
                                        	if b <= -2.4e-69:
                                        		tmp = t_1
                                        	elif b <= 2.8e+53:
                                        		tmp = math.pow(z, y) * x
                                        	else:
                                        		tmp = t_1
                                        	return tmp
                                        
                                        function code(x, y, z, t, a, b)
                                        	t_1 = Float64(exp(Float64(Float64(-b) * a)) * x)
                                        	tmp = 0.0
                                        	if (b <= -2.4e-69)
                                        		tmp = t_1;
                                        	elseif (b <= 2.8e+53)
                                        		tmp = Float64((z ^ y) * x);
                                        	else
                                        		tmp = t_1;
                                        	end
                                        	return tmp
                                        end
                                        
                                        function tmp_2 = code(x, y, z, t, a, b)
                                        	t_1 = exp((-b * a)) * x;
                                        	tmp = 0.0;
                                        	if (b <= -2.4e-69)
                                        		tmp = t_1;
                                        	elseif (b <= 2.8e+53)
                                        		tmp = (z ^ y) * x;
                                        	else
                                        		tmp = t_1;
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Exp[N[((-b) * a), $MachinePrecision]], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[b, -2.4e-69], t$95$1, If[LessEqual[b, 2.8e+53], N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        t_1 := e^{\left(-b\right) \cdot a} \cdot x\\
                                        \mathbf{if}\;b \leq -2.4 \cdot 10^{-69}:\\
                                        \;\;\;\;t\_1\\
                                        
                                        \mathbf{elif}\;b \leq 2.8 \cdot 10^{+53}:\\
                                        \;\;\;\;{z}^{y} \cdot x\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;t\_1\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 2 regimes
                                        2. if b < -2.4000000000000001e-69 or 2.8e53 < 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 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. *-commutativeN/A

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

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

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

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

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

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

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

                                            \[\leadsto x \cdot e^{-1 \cdot \color{blue}{\left(a \cdot b\right)}} \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites82.8%

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

                                            if -2.4000000000000001e-69 < b < 2.8e53

                                            1. Initial program 89.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 a around 0

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

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

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

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

                                                \[\leadsto x \cdot {\color{blue}{\left(\frac{e^{\log z}}{e^{t}}\right)}}^{y} \]
                                              5. rem-exp-logN/A

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

                                                \[\leadsto x \cdot {\color{blue}{\left(\frac{z}{e^{t}}\right)}}^{y} \]
                                              7. lower-exp.f6475.9

                                                \[\leadsto x \cdot {\left(\frac{z}{\color{blue}{e^{t}}}\right)}^{y} \]
                                            5. Applied rewrites75.9%

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

                                              \[\leadsto x \cdot {z}^{\color{blue}{y}} \]
                                            7. Step-by-step derivation
                                              1. Applied rewrites60.8%

                                                \[\leadsto x \cdot {z}^{\color{blue}{y}} \]
                                            8. Recombined 2 regimes into one program.
                                            9. Final simplification71.0%

                                              \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.4 \cdot 10^{-69}:\\ \;\;\;\;e^{\left(-b\right) \cdot a} \cdot x\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{+53}:\\ \;\;\;\;{z}^{y} \cdot x\\ \mathbf{else}:\\ \;\;\;\;e^{\left(-b\right) \cdot a} \cdot x\\ \end{array} \]
                                            10. Add Preprocessing

                                            Alternative 9: 58.9% accurate, 2.6× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := {z}^{y} \cdot x\\ \mathbf{if}\;y \leq -1.2:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-66}:\\ \;\;\;\;e^{-z \cdot a} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                            (FPCore (x y z t a b)
                                             :precision binary64
                                             (let* ((t_1 (* (pow z y) x)))
                                               (if (<= y -1.2) t_1 (if (<= y 3.1e-66) (* (exp (- (* z a))) x) t_1))))
                                            double code(double x, double y, double z, double t, double a, double b) {
                                            	double t_1 = pow(z, y) * x;
                                            	double tmp;
                                            	if (y <= -1.2) {
                                            		tmp = t_1;
                                            	} else if (y <= 3.1e-66) {
                                            		tmp = exp(-(z * a)) * 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) :: tmp
                                                t_1 = (z ** y) * x
                                                if (y <= (-1.2d0)) then
                                                    tmp = t_1
                                                else if (y <= 3.1d-66) then
                                                    tmp = exp(-(z * a)) * 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 = Math.pow(z, y) * x;
                                            	double tmp;
                                            	if (y <= -1.2) {
                                            		tmp = t_1;
                                            	} else if (y <= 3.1e-66) {
                                            		tmp = Math.exp(-(z * a)) * x;
                                            	} else {
                                            		tmp = t_1;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            def code(x, y, z, t, a, b):
                                            	t_1 = math.pow(z, y) * x
                                            	tmp = 0
                                            	if y <= -1.2:
                                            		tmp = t_1
                                            	elif y <= 3.1e-66:
                                            		tmp = math.exp(-(z * a)) * x
                                            	else:
                                            		tmp = t_1
                                            	return tmp
                                            
                                            function code(x, y, z, t, a, b)
                                            	t_1 = Float64((z ^ y) * x)
                                            	tmp = 0.0
                                            	if (y <= -1.2)
                                            		tmp = t_1;
                                            	elseif (y <= 3.1e-66)
                                            		tmp = Float64(exp(Float64(-Float64(z * a))) * x);
                                            	else
                                            		tmp = t_1;
                                            	end
                                            	return tmp
                                            end
                                            
                                            function tmp_2 = code(x, y, z, t, a, b)
                                            	t_1 = (z ^ y) * x;
                                            	tmp = 0.0;
                                            	if (y <= -1.2)
                                            		tmp = t_1;
                                            	elseif (y <= 3.1e-66)
                                            		tmp = exp(-(z * a)) * x;
                                            	else
                                            		tmp = t_1;
                                            	end
                                            	tmp_2 = tmp;
                                            end
                                            
                                            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[y, -1.2], t$95$1, If[LessEqual[y, 3.1e-66], N[(N[Exp[(-N[(z * a), $MachinePrecision])], $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            t_1 := {z}^{y} \cdot x\\
                                            \mathbf{if}\;y \leq -1.2:\\
                                            \;\;\;\;t\_1\\
                                            
                                            \mathbf{elif}\;y \leq 3.1 \cdot 10^{-66}:\\
                                            \;\;\;\;e^{-z \cdot a} \cdot x\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;t\_1\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 2 regimes
                                            2. if y < -1.19999999999999996 or 3.0999999999999997e-66 < y

                                              1. Initial program 95.8%

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

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

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

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

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

                                                  \[\leadsto x \cdot {\color{blue}{\left(\frac{e^{\log z}}{e^{t}}\right)}}^{y} \]
                                                5. rem-exp-logN/A

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

                                                  \[\leadsto x \cdot {\color{blue}{\left(\frac{z}{e^{t}}\right)}}^{y} \]
                                                7. lower-exp.f6480.2

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

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

                                                \[\leadsto x \cdot {z}^{\color{blue}{y}} \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites62.6%

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

                                                if -1.19999999999999996 < y < 3.0999999999999997e-66

                                                1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto x \cdot e^{-\mathsf{fma}\left(a, z, a \cdot b\right)} \]
                                                  2. Taylor expanded in z around inf

                                                    \[\leadsto x \cdot e^{-a \cdot z} \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites57.0%

                                                      \[\leadsto x \cdot e^{-z \cdot a} \]
                                                  4. Recombined 2 regimes into one program.
                                                  5. Final simplification60.1%

                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.2:\\ \;\;\;\;{z}^{y} \cdot x\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-66}:\\ \;\;\;\;e^{-z \cdot a} \cdot x\\ \mathbf{else}:\\ \;\;\;\;{z}^{y} \cdot x\\ \end{array} \]
                                                  6. Add Preprocessing

                                                  Alternative 10: 54.5% accurate, 2.8× speedup?

                                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(0.5 \cdot t\right) \cdot \left(\left(y \cdot y\right) \cdot x\right)\right) \cdot t\\ \mathbf{if}\;a \leq -1.28 \cdot 10^{+141}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{+166}:\\ \;\;\;\;{z}^{y} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                  (FPCore (x y z t a b)
                                                   :precision binary64
                                                   (let* ((t_1 (* (* (* 0.5 t) (* (* y y) x)) t)))
                                                     (if (<= a -1.28e+141) t_1 (if (<= a 1.7e+166) (* (pow z y) x) t_1))))
                                                  double code(double x, double y, double z, double t, double a, double b) {
                                                  	double t_1 = ((0.5 * t) * ((y * y) * x)) * t;
                                                  	double tmp;
                                                  	if (a <= -1.28e+141) {
                                                  		tmp = t_1;
                                                  	} else if (a <= 1.7e+166) {
                                                  		tmp = pow(z, y) * 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) :: tmp
                                                      t_1 = ((0.5d0 * t) * ((y * y) * x)) * t
                                                      if (a <= (-1.28d+141)) then
                                                          tmp = t_1
                                                      else if (a <= 1.7d+166) then
                                                          tmp = (z ** y) * 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 = ((0.5 * t) * ((y * y) * x)) * t;
                                                  	double tmp;
                                                  	if (a <= -1.28e+141) {
                                                  		tmp = t_1;
                                                  	} else if (a <= 1.7e+166) {
                                                  		tmp = Math.pow(z, y) * x;
                                                  	} else {
                                                  		tmp = t_1;
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  def code(x, y, z, t, a, b):
                                                  	t_1 = ((0.5 * t) * ((y * y) * x)) * t
                                                  	tmp = 0
                                                  	if a <= -1.28e+141:
                                                  		tmp = t_1
                                                  	elif a <= 1.7e+166:
                                                  		tmp = math.pow(z, y) * x
                                                  	else:
                                                  		tmp = t_1
                                                  	return tmp
                                                  
                                                  function code(x, y, z, t, a, b)
                                                  	t_1 = Float64(Float64(Float64(0.5 * t) * Float64(Float64(y * y) * x)) * t)
                                                  	tmp = 0.0
                                                  	if (a <= -1.28e+141)
                                                  		tmp = t_1;
                                                  	elseif (a <= 1.7e+166)
                                                  		tmp = Float64((z ^ y) * x);
                                                  	else
                                                  		tmp = t_1;
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  function tmp_2 = code(x, y, z, t, a, b)
                                                  	t_1 = ((0.5 * t) * ((y * y) * x)) * t;
                                                  	tmp = 0.0;
                                                  	if (a <= -1.28e+141)
                                                  		tmp = t_1;
                                                  	elseif (a <= 1.7e+166)
                                                  		tmp = (z ^ y) * x;
                                                  	else
                                                  		tmp = t_1;
                                                  	end
                                                  	tmp_2 = tmp;
                                                  end
                                                  
                                                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(0.5 * t), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[a, -1.28e+141], t$95$1, If[LessEqual[a, 1.7e+166], N[(N[Power[z, y], $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  \begin{array}{l}
                                                  t_1 := \left(\left(0.5 \cdot t\right) \cdot \left(\left(y \cdot y\right) \cdot x\right)\right) \cdot t\\
                                                  \mathbf{if}\;a \leq -1.28 \cdot 10^{+141}:\\
                                                  \;\;\;\;t\_1\\
                                                  
                                                  \mathbf{elif}\;a \leq 1.7 \cdot 10^{+166}:\\
                                                  \;\;\;\;{z}^{y} \cdot x\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;t\_1\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 2 regimes
                                                  2. if a < -1.28000000000000004e141 or 1.7e166 < a

                                                    1. Initial program 84.0%

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

                                                      \[\leadsto \color{blue}{x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right)} + y \cdot \left(\frac{1}{2} \cdot \left(x \cdot \left(y \cdot \left(e^{a \cdot \left(\log \left(1 - z\right) - b\right)} \cdot {\left(\log z - t\right)}^{2}\right)\right)\right) + x \cdot \left(e^{a \cdot \left(\log \left(1 - z\right) - b\right)} \cdot \left(\log z - t\right)\right)\right)} \]
                                                    4. Applied rewrites54.6%

                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot \left({\left(\frac{1 - z}{e^{b}}\right)}^{a} \cdot \mathsf{fma}\left(0.5 \cdot y, {\left(\log z - t\right)}^{2}, \log z - t\right)\right), y, {\left(\frac{1 - z}{e^{b}}\right)}^{a} \cdot x\right)} \]
                                                    5. Taylor expanded in a around 0

                                                      \[\leadsto x + \color{blue}{x \cdot \left(y \cdot \left(\left(\log z + \frac{1}{2} \cdot \left(y \cdot {\left(\log z - t\right)}^{2}\right)\right) - t\right)\right)} \]
                                                    6. Step-by-step derivation
                                                      1. Applied rewrites27.1%

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

                                                        \[\leadsto \frac{1}{2} \cdot \left({t}^{2} \cdot \color{blue}{\left(x \cdot {y}^{2}\right)}\right) \]
                                                      3. Step-by-step derivation
                                                        1. Applied rewrites42.3%

                                                          \[\leadsto \left(0.5 \cdot \left(t \cdot t\right)\right) \cdot \left(\left(y \cdot y\right) \cdot \color{blue}{x}\right) \]
                                                        2. Step-by-step derivation
                                                          1. Applied rewrites50.1%

                                                            \[\leadsto \left(\left(\left(y \cdot y\right) \cdot x\right) \cdot \left(0.5 \cdot t\right)\right) \cdot t \]

                                                          if -1.28000000000000004e141 < a < 1.7e166

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

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

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

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

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

                                                              \[\leadsto x \cdot {\color{blue}{\left(\frac{e^{\log z}}{e^{t}}\right)}}^{y} \]
                                                            5. rem-exp-logN/A

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

                                                              \[\leadsto x \cdot {\color{blue}{\left(\frac{z}{e^{t}}\right)}}^{y} \]
                                                            7. lower-exp.f6472.0

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

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

                                                            \[\leadsto x \cdot {z}^{\color{blue}{y}} \]
                                                          7. Step-by-step derivation
                                                            1. Applied rewrites59.3%

                                                              \[\leadsto x \cdot {z}^{\color{blue}{y}} \]
                                                          8. Recombined 2 regimes into one program.
                                                          9. Final simplification56.4%

                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.28 \cdot 10^{+141}:\\ \;\;\;\;\left(\left(0.5 \cdot t\right) \cdot \left(\left(y \cdot y\right) \cdot x\right)\right) \cdot t\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{+166}:\\ \;\;\;\;{z}^{y} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.5 \cdot t\right) \cdot \left(\left(y \cdot y\right) \cdot x\right)\right) \cdot t\\ \end{array} \]
                                                          10. Add Preprocessing

                                                          Alternative 11: 19.3% accurate, 54.7× speedup?

                                                          \[\begin{array}{l} \\ 1 \cdot x \end{array} \]
                                                          (FPCore (x y z t a b) :precision binary64 (* 1.0 x))
                                                          double code(double x, double y, double z, double t, double a, double b) {
                                                          	return 1.0 * 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 = 1.0d0 * x
                                                          end function
                                                          
                                                          public static double code(double x, double y, double z, double t, double a, double b) {
                                                          	return 1.0 * x;
                                                          }
                                                          
                                                          def code(x, y, z, t, a, b):
                                                          	return 1.0 * x
                                                          
                                                          function code(x, y, z, t, a, b)
                                                          	return Float64(1.0 * x)
                                                          end
                                                          
                                                          function tmp = code(x, y, z, t, a, b)
                                                          	tmp = 1.0 * x;
                                                          end
                                                          
                                                          code[x_, y_, z_, t_, a_, b_] := N[(1.0 * x), $MachinePrecision]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          1 \cdot x
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Initial program 92.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 a around 0

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

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

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

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

                                                              \[\leadsto x \cdot {\color{blue}{\left(\frac{e^{\log z}}{e^{t}}\right)}}^{y} \]
                                                            5. rem-exp-logN/A

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

                                                              \[\leadsto x \cdot {\color{blue}{\left(\frac{z}{e^{t}}\right)}}^{y} \]
                                                            7. lower-exp.f6464.4

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

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

                                                            \[\leadsto x \cdot 1 \]
                                                          7. Step-by-step derivation
                                                            1. Applied rewrites16.7%

                                                              \[\leadsto x \cdot 1 \]
                                                            2. Final simplification16.7%

                                                              \[\leadsto 1 \cdot x \]
                                                            3. Add Preprocessing

                                                            Reproduce

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