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

Percentage Accurate: 96.3% → 96.3%
Time: 10.8s
Alternatives: 9
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 9 alternatives:

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

Initial Program: 96.3% accurate, 1.0× speedup?

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

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

Alternative 1: 96.3% accurate, 1.0× speedup?

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

\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\end{array}
Derivation
  1. Initial program 96.5%

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

Alternative 2: 58.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)\\ \mathbf{if}\;t\_1 \leq -800 \lor \neg \left(t\_1 \leq 5 \cdot 10^{+15}\right):\\ \;\;\;\;x \cdot {\left(z \cdot z\right)}^{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b)))))
   (if (or (<= t_1 -800.0) (not (<= t_1 5e+15)))
     (* x (pow (* z z) y))
     (* x (pow z y)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
	double tmp;
	if ((t_1 <= -800.0) || !(t_1 <= 5e+15)) {
		tmp = x * pow((z * z), y);
	} else {
		tmp = x * pow(z, y);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))
    if ((t_1 <= (-800.0d0)) .or. (.not. (t_1 <= 5d+15))) then
        tmp = x * ((z * z) ** y)
    else
        tmp = x * (z ** y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b));
	double tmp;
	if ((t_1 <= -800.0) || !(t_1 <= 5e+15)) {
		tmp = x * Math.pow((z * z), y);
	} else {
		tmp = x * Math.pow(z, y);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b))
	tmp = 0
	if (t_1 <= -800.0) or not (t_1 <= 5e+15):
		tmp = x * math.pow((z * z), y)
	else:
		tmp = x * math.pow(z, y)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b)))
	tmp = 0.0
	if ((t_1 <= -800.0) || !(t_1 <= 5e+15))
		tmp = Float64(x * (Float64(z * z) ^ y));
	else
		tmp = Float64(x * (z ^ y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (y * (log(z) - t)) + (a * (log((1.0 - z)) - b));
	tmp = 0.0;
	if ((t_1 <= -800.0) || ~((t_1 <= 5e+15)))
		tmp = x * ((z * z) ^ y);
	else
		tmp = x * (z ^ y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -800.0], N[Not[LessEqual[t$95$1, 5e+15]], $MachinePrecision]], N[(x * N[Power[N[(z * z), $MachinePrecision], y], $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\


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

    1. Initial program 96.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.f6474.2

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

        \[\leadsto x \cdot {z}^{\color{blue}{y}} \]
      2. Step-by-step derivation
        1. Applied rewrites54.4%

          \[\leadsto x \cdot {\left(z \cdot z\right)}^{y} \]

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

        1. Initial program 95.6%

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

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

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

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

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

        Alternative 3: 68.8% accurate, 1.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{\left(-t\right) \cdot y}\\ \mathbf{if}\;t \leq -1.25 \cdot 10^{+231}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{+113}:\\ \;\;\;\;x \cdot e^{\left(\left(-z\right) - b\right) \cdot a}\\ \mathbf{elif}\;t \leq -960:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-73}:\\ \;\;\;\;x \cdot {\left({z}^{\left(-y\right)}\right)}^{-1}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-20}:\\ \;\;\;\;x \cdot e^{\left(-b\right) \cdot a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (let* ((t_1 (* x (exp (* (- t) y)))))
           (if (<= t -1.25e+231)
             t_1
             (if (<= t -1.8e+113)
               (* x (exp (* (- (- z) b) a)))
               (if (<= t -960.0)
                 t_1
                 (if (<= t 1.12e-73)
                   (* x (pow (pow z (- y)) -1.0))
                   (if (<= t 5.2e-20) (* x (exp (* (- b) a))) t_1)))))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = x * exp((-t * y));
        	double tmp;
        	if (t <= -1.25e+231) {
        		tmp = t_1;
        	} else if (t <= -1.8e+113) {
        		tmp = x * exp(((-z - b) * a));
        	} else if (t <= -960.0) {
        		tmp = t_1;
        	} else if (t <= 1.12e-73) {
        		tmp = x * pow(pow(z, -y), -1.0);
        	} else if (t <= 5.2e-20) {
        		tmp = x * exp((-b * a));
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z, t, a, b)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8), intent (in) :: a
            real(8), intent (in) :: b
            real(8) :: t_1
            real(8) :: tmp
            t_1 = x * exp((-t * y))
            if (t <= (-1.25d+231)) then
                tmp = t_1
            else if (t <= (-1.8d+113)) then
                tmp = x * exp(((-z - b) * a))
            else if (t <= (-960.0d0)) then
                tmp = t_1
            else if (t <= 1.12d-73) then
                tmp = x * ((z ** -y) ** (-1.0d0))
            else if (t <= 5.2d-20) then
                tmp = x * exp((-b * a))
            else
                tmp = t_1
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = x * Math.exp((-t * y));
        	double tmp;
        	if (t <= -1.25e+231) {
        		tmp = t_1;
        	} else if (t <= -1.8e+113) {
        		tmp = x * Math.exp(((-z - b) * a));
        	} else if (t <= -960.0) {
        		tmp = t_1;
        	} else if (t <= 1.12e-73) {
        		tmp = x * Math.pow(Math.pow(z, -y), -1.0);
        	} else if (t <= 5.2e-20) {
        		tmp = x * Math.exp((-b * a));
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a, b):
        	t_1 = x * math.exp((-t * y))
        	tmp = 0
        	if t <= -1.25e+231:
        		tmp = t_1
        	elif t <= -1.8e+113:
        		tmp = x * math.exp(((-z - b) * a))
        	elif t <= -960.0:
        		tmp = t_1
        	elif t <= 1.12e-73:
        		tmp = x * math.pow(math.pow(z, -y), -1.0)
        	elif t <= 5.2e-20:
        		tmp = x * math.exp((-b * a))
        	else:
        		tmp = t_1
        	return tmp
        
        function code(x, y, z, t, a, b)
        	t_1 = Float64(x * exp(Float64(Float64(-t) * y)))
        	tmp = 0.0
        	if (t <= -1.25e+231)
        		tmp = t_1;
        	elseif (t <= -1.8e+113)
        		tmp = Float64(x * exp(Float64(Float64(Float64(-z) - b) * a)));
        	elseif (t <= -960.0)
        		tmp = t_1;
        	elseif (t <= 1.12e-73)
        		tmp = Float64(x * ((z ^ Float64(-y)) ^ -1.0));
        	elseif (t <= 5.2e-20)
        		tmp = Float64(x * exp(Float64(Float64(-b) * a)));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a, b)
        	t_1 = x * exp((-t * y));
        	tmp = 0.0;
        	if (t <= -1.25e+231)
        		tmp = t_1;
        	elseif (t <= -1.8e+113)
        		tmp = x * exp(((-z - b) * a));
        	elseif (t <= -960.0)
        		tmp = t_1;
        	elseif (t <= 1.12e-73)
        		tmp = x * ((z ^ -y) ^ -1.0);
        	elseif (t <= 5.2e-20)
        		tmp = x * exp((-b * a));
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[((-t) * y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.25e+231], t$95$1, If[LessEqual[t, -1.8e+113], N[(x * N[Exp[N[(N[((-z) - b), $MachinePrecision] * a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -960.0], t$95$1, If[LessEqual[t, 1.12e-73], N[(x * N[Power[N[Power[z, (-y)], $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e-20], N[(x * N[Exp[N[((-b) * a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := x \cdot e^{\left(-t\right) \cdot y}\\
        \mathbf{if}\;t \leq -1.25 \cdot 10^{+231}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \leq -1.8 \cdot 10^{+113}:\\
        \;\;\;\;x \cdot e^{\left(\left(-z\right) - b\right) \cdot a}\\
        
        \mathbf{elif}\;t \leq -960:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \leq 1.12 \cdot 10^{-73}:\\
        \;\;\;\;x \cdot {\left({z}^{\left(-y\right)}\right)}^{-1}\\
        
        \mathbf{elif}\;t \leq 5.2 \cdot 10^{-20}:\\
        \;\;\;\;x \cdot e^{\left(-b\right) \cdot a}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if t < -1.25000000000000007e231 or -1.79999999999999996e113 < t < -960 or 5.1999999999999999e-20 < t

          1. Initial program 99.1%

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

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

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

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

          if -1.25000000000000007e231 < t < -1.79999999999999996e113

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

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

            \[\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^{\left(-1 \cdot z - b\right) \cdot a} \]
          7. Step-by-step derivation
            1. Applied rewrites86.5%

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

            if -960 < t < 1.11999999999999995e-73

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

                \[\leadsto x \cdot {\left(\frac{z}{\color{blue}{e^{t}}}\right)}^{y} \]
            5. Applied rewrites73.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 rewrites74.1%

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

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

              if 1.11999999999999995e-73 < t < 5.1999999999999999e-20

              1. Initial program 100.0%

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

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

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

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

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

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

                  \[\leadsto x \cdot e^{\color{blue}{\left(-b\right)} \cdot a} \]
              5. Applied rewrites100.0%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.25 \cdot 10^{+231}:\\ \;\;\;\;x \cdot e^{\left(-t\right) \cdot y}\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{+113}:\\ \;\;\;\;x \cdot e^{\left(\left(-z\right) - b\right) \cdot a}\\ \mathbf{elif}\;t \leq -960:\\ \;\;\;\;x \cdot e^{\left(-t\right) \cdot y}\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-73}:\\ \;\;\;\;x \cdot {\left({z}^{\left(-y\right)}\right)}^{-1}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-20}:\\ \;\;\;\;x \cdot e^{\left(-b\right) \cdot a}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{\left(-t\right) \cdot y}\\ \end{array} \]
            10. Add Preprocessing

            Alternative 4: 86.9% accurate, 1.4× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.65 \lor \neg \left(y \leq 45000000\right):\\ \;\;\;\;x \cdot {\left(\frac{z}{e^{t}}\right)}^{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{\left(\left(-z\right) - b\right) \cdot a}\\ \end{array} \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (if (or (<= y -2.65) (not (<= y 45000000.0)))
               (* x (pow (/ z (exp t)) y))
               (* x (exp (* (- (- z) b) a)))))
            double code(double x, double y, double z, double t, double a, double b) {
            	double tmp;
            	if ((y <= -2.65) || !(y <= 45000000.0)) {
            		tmp = x * pow((z / exp(t)), y);
            	} else {
            		tmp = x * exp(((-z - b) * a));
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z, t, a, b)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8), intent (in) :: a
                real(8), intent (in) :: b
                real(8) :: tmp
                if ((y <= (-2.65d0)) .or. (.not. (y <= 45000000.0d0))) then
                    tmp = x * ((z / exp(t)) ** y)
                else
                    tmp = x * exp(((-z - b) * a))
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a, double b) {
            	double tmp;
            	if ((y <= -2.65) || !(y <= 45000000.0)) {
            		tmp = x * Math.pow((z / Math.exp(t)), y);
            	} else {
            		tmp = x * Math.exp(((-z - b) * a));
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b):
            	tmp = 0
            	if (y <= -2.65) or not (y <= 45000000.0):
            		tmp = x * math.pow((z / math.exp(t)), y)
            	else:
            		tmp = x * math.exp(((-z - b) * a))
            	return tmp
            
            function code(x, y, z, t, a, b)
            	tmp = 0.0
            	if ((y <= -2.65) || !(y <= 45000000.0))
            		tmp = Float64(x * (Float64(z / exp(t)) ^ y));
            	else
            		tmp = Float64(x * exp(Float64(Float64(Float64(-z) - b) * a)));
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b)
            	tmp = 0.0;
            	if ((y <= -2.65) || ~((y <= 45000000.0)))
            		tmp = x * ((z / exp(t)) ^ y);
            	else
            		tmp = x * exp(((-z - b) * a));
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.65], N[Not[LessEqual[y, 45000000.0]], $MachinePrecision]], N[(x * N[Power[N[(z / N[Exp[t], $MachinePrecision]), $MachinePrecision], y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(N[((-z) - b), $MachinePrecision] * a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;y \leq -2.65 \lor \neg \left(y \leq 45000000\right):\\
            \;\;\;\;x \cdot {\left(\frac{z}{e^{t}}\right)}^{y}\\
            
            \mathbf{else}:\\
            \;\;\;\;x \cdot e^{\left(\left(-z\right) - b\right) \cdot a}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if y < -2.64999999999999991 or 4.5e7 < y

              1. Initial program 99.3%

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

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

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

              if -2.64999999999999991 < y < 4.5e7

              1. Initial program 93.5%

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

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

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

                \[\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^{\left(-1 \cdot z - b\right) \cdot a} \]
              7. Step-by-step derivation
                1. Applied rewrites84.2%

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.65 \lor \neg \left(y \leq 45000000\right):\\ \;\;\;\;x \cdot {\left(\frac{z}{e^{t}}\right)}^{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot e^{\left(\left(-z\right) - b\right) \cdot a}\\ \end{array} \]
              10. Add Preprocessing

              Alternative 5: 68.8% accurate, 2.3× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{\left(-t\right) \cdot y}\\ \mathbf{if}\;t \leq -1.25 \cdot 10^{+231}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{+113}:\\ \;\;\;\;x \cdot e^{\left(\left(-z\right) - b\right) \cdot a}\\ \mathbf{elif}\;t \leq -960:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-73}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-20}:\\ \;\;\;\;x \cdot e^{\left(-b\right) \cdot a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (x y z t a b)
               :precision binary64
               (let* ((t_1 (* x (exp (* (- t) y)))))
                 (if (<= t -1.25e+231)
                   t_1
                   (if (<= t -1.8e+113)
                     (* x (exp (* (- (- z) b) a)))
                     (if (<= t -960.0)
                       t_1
                       (if (<= t 1.12e-73)
                         (* x (pow z y))
                         (if (<= t 5.2e-20) (* x (exp (* (- b) a))) t_1)))))))
              double code(double x, double y, double z, double t, double a, double b) {
              	double t_1 = x * exp((-t * y));
              	double tmp;
              	if (t <= -1.25e+231) {
              		tmp = t_1;
              	} else if (t <= -1.8e+113) {
              		tmp = x * exp(((-z - b) * a));
              	} else if (t <= -960.0) {
              		tmp = t_1;
              	} else if (t <= 1.12e-73) {
              		tmp = x * pow(z, y);
              	} else if (t <= 5.2e-20) {
              		tmp = x * exp((-b * a));
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              real(8) function code(x, y, z, t, a, b)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8), intent (in) :: b
                  real(8) :: t_1
                  real(8) :: tmp
                  t_1 = x * exp((-t * y))
                  if (t <= (-1.25d+231)) then
                      tmp = t_1
                  else if (t <= (-1.8d+113)) then
                      tmp = x * exp(((-z - b) * a))
                  else if (t <= (-960.0d0)) then
                      tmp = t_1
                  else if (t <= 1.12d-73) then
                      tmp = x * (z ** y)
                  else if (t <= 5.2d-20) then
                      tmp = x * exp((-b * a))
                  else
                      tmp = t_1
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a, double b) {
              	double t_1 = x * Math.exp((-t * y));
              	double tmp;
              	if (t <= -1.25e+231) {
              		tmp = t_1;
              	} else if (t <= -1.8e+113) {
              		tmp = x * Math.exp(((-z - b) * a));
              	} else if (t <= -960.0) {
              		tmp = t_1;
              	} else if (t <= 1.12e-73) {
              		tmp = x * Math.pow(z, y);
              	} else if (t <= 5.2e-20) {
              		tmp = x * Math.exp((-b * a));
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b):
              	t_1 = x * math.exp((-t * y))
              	tmp = 0
              	if t <= -1.25e+231:
              		tmp = t_1
              	elif t <= -1.8e+113:
              		tmp = x * math.exp(((-z - b) * a))
              	elif t <= -960.0:
              		tmp = t_1
              	elif t <= 1.12e-73:
              		tmp = x * math.pow(z, y)
              	elif t <= 5.2e-20:
              		tmp = x * math.exp((-b * a))
              	else:
              		tmp = t_1
              	return tmp
              
              function code(x, y, z, t, a, b)
              	t_1 = Float64(x * exp(Float64(Float64(-t) * y)))
              	tmp = 0.0
              	if (t <= -1.25e+231)
              		tmp = t_1;
              	elseif (t <= -1.8e+113)
              		tmp = Float64(x * exp(Float64(Float64(Float64(-z) - b) * a)));
              	elseif (t <= -960.0)
              		tmp = t_1;
              	elseif (t <= 1.12e-73)
              		tmp = Float64(x * (z ^ y));
              	elseif (t <= 5.2e-20)
              		tmp = Float64(x * exp(Float64(Float64(-b) * a)));
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b)
              	t_1 = x * exp((-t * y));
              	tmp = 0.0;
              	if (t <= -1.25e+231)
              		tmp = t_1;
              	elseif (t <= -1.8e+113)
              		tmp = x * exp(((-z - b) * a));
              	elseif (t <= -960.0)
              		tmp = t_1;
              	elseif (t <= 1.12e-73)
              		tmp = x * (z ^ y);
              	elseif (t <= 5.2e-20)
              		tmp = x * exp((-b * a));
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[((-t) * y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.25e+231], t$95$1, If[LessEqual[t, -1.8e+113], N[(x * N[Exp[N[(N[((-z) - b), $MachinePrecision] * a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -960.0], t$95$1, If[LessEqual[t, 1.12e-73], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e-20], N[(x * N[Exp[N[((-b) * a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := x \cdot e^{\left(-t\right) \cdot y}\\
              \mathbf{if}\;t \leq -1.25 \cdot 10^{+231}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;t \leq -1.8 \cdot 10^{+113}:\\
              \;\;\;\;x \cdot e^{\left(\left(-z\right) - b\right) \cdot a}\\
              
              \mathbf{elif}\;t \leq -960:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;t \leq 1.12 \cdot 10^{-73}:\\
              \;\;\;\;x \cdot {z}^{y}\\
              
              \mathbf{elif}\;t \leq 5.2 \cdot 10^{-20}:\\
              \;\;\;\;x \cdot e^{\left(-b\right) \cdot a}\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 4 regimes
              2. if t < -1.25000000000000007e231 or -1.79999999999999996e113 < t < -960 or 5.1999999999999999e-20 < t

                1. Initial program 99.1%

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

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

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

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

                if -1.25000000000000007e231 < t < -1.79999999999999996e113

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

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

                  \[\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^{\left(-1 \cdot z - b\right) \cdot a} \]
                7. Step-by-step derivation
                  1. Applied rewrites86.5%

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

                  if -960 < t < 1.11999999999999995e-73

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

                      \[\leadsto x \cdot {\left(\frac{z}{\color{blue}{e^{t}}}\right)}^{y} \]
                  5. Applied rewrites73.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 rewrites74.1%

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

                    if 1.11999999999999995e-73 < t < 5.1999999999999999e-20

                    1. Initial program 100.0%

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

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

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

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

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

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

                        \[\leadsto x \cdot e^{\color{blue}{\left(-b\right)} \cdot a} \]
                    5. Applied rewrites100.0%

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

                  Alternative 6: 69.7% accurate, 2.3× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{\left(-b\right) \cdot a}\\ t_2 := x \cdot e^{\left(-t\right) \cdot y}\\ \mathbf{if}\;t \leq -6.2 \cdot 10^{+195}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{+113}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -960:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-73}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-20}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b)
                   :precision binary64
                   (let* ((t_1 (* x (exp (* (- b) a)))) (t_2 (* x (exp (* (- t) y)))))
                     (if (<= t -6.2e+195)
                       t_2
                       (if (<= t -2.7e+113)
                         t_1
                         (if (<= t -960.0)
                           t_2
                           (if (<= t 1.12e-73) (* x (pow z y)) (if (<= t 5.2e-20) t_1 t_2)))))))
                  double code(double x, double y, double z, double t, double a, double b) {
                  	double t_1 = x * exp((-b * a));
                  	double t_2 = x * exp((-t * y));
                  	double tmp;
                  	if (t <= -6.2e+195) {
                  		tmp = t_2;
                  	} else if (t <= -2.7e+113) {
                  		tmp = t_1;
                  	} else if (t <= -960.0) {
                  		tmp = t_2;
                  	} else if (t <= 1.12e-73) {
                  		tmp = x * pow(z, y);
                  	} else if (t <= 5.2e-20) {
                  		tmp = t_1;
                  	} else {
                  		tmp = t_2;
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(x, y, z, t, a, b)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      real(8), intent (in) :: b
                      real(8) :: t_1
                      real(8) :: t_2
                      real(8) :: tmp
                      t_1 = x * exp((-b * a))
                      t_2 = x * exp((-t * y))
                      if (t <= (-6.2d+195)) then
                          tmp = t_2
                      else if (t <= (-2.7d+113)) then
                          tmp = t_1
                      else if (t <= (-960.0d0)) then
                          tmp = t_2
                      else if (t <= 1.12d-73) then
                          tmp = x * (z ** y)
                      else if (t <= 5.2d-20) then
                          tmp = t_1
                      else
                          tmp = t_2
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b) {
                  	double t_1 = x * Math.exp((-b * a));
                  	double t_2 = x * Math.exp((-t * y));
                  	double tmp;
                  	if (t <= -6.2e+195) {
                  		tmp = t_2;
                  	} else if (t <= -2.7e+113) {
                  		tmp = t_1;
                  	} else if (t <= -960.0) {
                  		tmp = t_2;
                  	} else if (t <= 1.12e-73) {
                  		tmp = x * Math.pow(z, y);
                  	} else if (t <= 5.2e-20) {
                  		tmp = t_1;
                  	} else {
                  		tmp = t_2;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a, b):
                  	t_1 = x * math.exp((-b * a))
                  	t_2 = x * math.exp((-t * y))
                  	tmp = 0
                  	if t <= -6.2e+195:
                  		tmp = t_2
                  	elif t <= -2.7e+113:
                  		tmp = t_1
                  	elif t <= -960.0:
                  		tmp = t_2
                  	elif t <= 1.12e-73:
                  		tmp = x * math.pow(z, y)
                  	elif t <= 5.2e-20:
                  		tmp = t_1
                  	else:
                  		tmp = t_2
                  	return tmp
                  
                  function code(x, y, z, t, a, b)
                  	t_1 = Float64(x * exp(Float64(Float64(-b) * a)))
                  	t_2 = Float64(x * exp(Float64(Float64(-t) * y)))
                  	tmp = 0.0
                  	if (t <= -6.2e+195)
                  		tmp = t_2;
                  	elseif (t <= -2.7e+113)
                  		tmp = t_1;
                  	elseif (t <= -960.0)
                  		tmp = t_2;
                  	elseif (t <= 1.12e-73)
                  		tmp = Float64(x * (z ^ y));
                  	elseif (t <= 5.2e-20)
                  		tmp = t_1;
                  	else
                  		tmp = t_2;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a, b)
                  	t_1 = x * exp((-b * a));
                  	t_2 = x * exp((-t * y));
                  	tmp = 0.0;
                  	if (t <= -6.2e+195)
                  		tmp = t_2;
                  	elseif (t <= -2.7e+113)
                  		tmp = t_1;
                  	elseif (t <= -960.0)
                  		tmp = t_2;
                  	elseif (t <= 1.12e-73)
                  		tmp = x * (z ^ y);
                  	elseif (t <= 5.2e-20)
                  		tmp = t_1;
                  	else
                  		tmp = t_2;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[((-b) * a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Exp[N[((-t) * y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e+195], t$95$2, If[LessEqual[t, -2.7e+113], t$95$1, If[LessEqual[t, -960.0], t$95$2, If[LessEqual[t, 1.12e-73], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e-20], t$95$1, t$95$2]]]]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := x \cdot e^{\left(-b\right) \cdot a}\\
                  t_2 := x \cdot e^{\left(-t\right) \cdot y}\\
                  \mathbf{if}\;t \leq -6.2 \cdot 10^{+195}:\\
                  \;\;\;\;t\_2\\
                  
                  \mathbf{elif}\;t \leq -2.7 \cdot 10^{+113}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;t \leq -960:\\
                  \;\;\;\;t\_2\\
                  
                  \mathbf{elif}\;t \leq 1.12 \cdot 10^{-73}:\\
                  \;\;\;\;x \cdot {z}^{y}\\
                  
                  \mathbf{elif}\;t \leq 5.2 \cdot 10^{-20}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_2\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if t < -6.2000000000000004e195 or -2.70000000000000011e113 < t < -960 or 5.1999999999999999e-20 < t

                    1. Initial program 98.2%

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

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

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

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

                    if -6.2000000000000004e195 < t < -2.70000000000000011e113 or 1.11999999999999995e-73 < t < 5.1999999999999999e-20

                    1. Initial program 96.7%

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

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

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

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

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

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

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

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

                    if -960 < t < 1.11999999999999995e-73

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

                        \[\leadsto x \cdot {\left(\frac{z}{\color{blue}{e^{t}}}\right)}^{y} \]
                    5. Applied rewrites73.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 rewrites74.1%

                        \[\leadsto x \cdot {z}^{\color{blue}{y}} \]
                    8. Recombined 3 regimes into one program.
                    9. Add Preprocessing

                    Alternative 7: 73.1% accurate, 2.6× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6.4 \cdot 10^{+29}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq 2:\\ \;\;\;\;x \cdot e^{\left(-b\right) \cdot a}\\ \mathbf{else}:\\ \;\;\;\;x \cdot {\left(z \cdot z\right)}^{y}\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b)
                     :precision binary64
                     (if (<= y -6.4e+29)
                       (* x (pow z y))
                       (if (<= y 2.0) (* x (exp (* (- b) a))) (* x (pow (* z z) y)))))
                    double code(double x, double y, double z, double t, double a, double b) {
                    	double tmp;
                    	if (y <= -6.4e+29) {
                    		tmp = x * pow(z, y);
                    	} else if (y <= 2.0) {
                    		tmp = x * exp((-b * a));
                    	} else {
                    		tmp = x * pow((z * z), y);
                    	}
                    	return tmp;
                    }
                    
                    real(8) function code(x, y, z, t, a, b)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        real(8), intent (in) :: b
                        real(8) :: tmp
                        if (y <= (-6.4d+29)) then
                            tmp = x * (z ** y)
                        else if (y <= 2.0d0) then
                            tmp = x * exp((-b * a))
                        else
                            tmp = x * ((z * z) ** y)
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t, double a, double b) {
                    	double tmp;
                    	if (y <= -6.4e+29) {
                    		tmp = x * Math.pow(z, y);
                    	} else if (y <= 2.0) {
                    		tmp = x * Math.exp((-b * a));
                    	} else {
                    		tmp = x * Math.pow((z * z), y);
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a, b):
                    	tmp = 0
                    	if y <= -6.4e+29:
                    		tmp = x * math.pow(z, y)
                    	elif y <= 2.0:
                    		tmp = x * math.exp((-b * a))
                    	else:
                    		tmp = x * math.pow((z * z), y)
                    	return tmp
                    
                    function code(x, y, z, t, a, b)
                    	tmp = 0.0
                    	if (y <= -6.4e+29)
                    		tmp = Float64(x * (z ^ y));
                    	elseif (y <= 2.0)
                    		tmp = Float64(x * exp(Float64(Float64(-b) * a)));
                    	else
                    		tmp = Float64(x * (Float64(z * z) ^ y));
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a, b)
                    	tmp = 0.0;
                    	if (y <= -6.4e+29)
                    		tmp = x * (z ^ y);
                    	elseif (y <= 2.0)
                    		tmp = x * exp((-b * a));
                    	else
                    		tmp = x * ((z * z) ^ y);
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.4e+29], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.0], N[(x * N[Exp[N[((-b) * a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Power[N[(z * z), $MachinePrecision], y], $MachinePrecision]), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;y \leq -6.4 \cdot 10^{+29}:\\
                    \;\;\;\;x \cdot {z}^{y}\\
                    
                    \mathbf{elif}\;y \leq 2:\\
                    \;\;\;\;x \cdot e^{\left(-b\right) \cdot a}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;x \cdot {\left(z \cdot z\right)}^{y}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if y < -6.39999999999999973e29

                      1. Initial program 98.4%

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

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

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

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

                        if -6.39999999999999973e29 < y < 2

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

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

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

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

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

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

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

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

                        if 2 < y

                        1. Initial program 98.6%

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

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

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

                            \[\leadsto x \cdot {z}^{\color{blue}{y}} \]
                          2. Step-by-step derivation
                            1. Applied rewrites75.0%

                              \[\leadsto x \cdot {\left(z \cdot z\right)}^{y} \]
                          3. Recombined 3 regimes into one program.
                          4. Add Preprocessing

                          Alternative 8: 51.4% accurate, 3.1× speedup?

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

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

                              \[\leadsto x \cdot {\left(\frac{z}{\color{blue}{e^{t}}}\right)}^{y} \]
                          5. Applied rewrites74.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 rewrites52.6%

                              \[\leadsto x \cdot {z}^{\color{blue}{y}} \]
                            2. Add Preprocessing

                            Alternative 9: 18.9% accurate, 54.7× speedup?

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

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

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

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

                              Reproduce

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