Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A

Percentage Accurate: 98.6% → 98.6%
Time: 14.4s
Alternatives: 20
Speedup: N/A×

Specification

?
\[\begin{array}{l} \\ \frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
	return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / 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 * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
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 - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b):
	return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b)
	return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y)
end
function tmp = code(x, y, z, t, a, b)
	tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\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 20 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: 98.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
	return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / 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 * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
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 - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b):
	return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b)
	return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y)
end
function tmp = code(x, y, z, t, a, b)
	tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 98.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x}{e^{b - \mathsf{fma}\left(\log a, t - 1, \log z \cdot y\right)} \cdot y} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ x (* (exp (- b (fma (log a) (- t 1.0) (* (log z) y)))) y)))
double code(double x, double y, double z, double t, double a, double b) {
	return x / (exp((b - fma(log(a), (t - 1.0), (log(z) * y)))) * y);
}
function code(x, y, z, t, a, b)
	return Float64(x / Float64(exp(Float64(b - fma(log(a), Float64(t - 1.0), Float64(log(z) * y)))) * y))
end
code[x_, y_, z_, t_, a_, b_] := N[(x / N[(N[Exp[N[(b - N[(N[Log[a], $MachinePrecision] * N[(t - 1.0), $MachinePrecision] + N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x}{e^{b - \mathsf{fma}\left(\log a, t - 1, \log z \cdot y\right)} \cdot y}
\end{array}
Derivation
  1. Initial program 97.8%

    \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-/.f64N/A

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

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

      \[\leadsto \color{blue}{x \cdot \frac{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}} \]
    4. clear-numN/A

      \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{y}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}}} \]
    5. un-div-invN/A

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

      \[\leadsto \color{blue}{\frac{x}{\frac{y}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}}} \]
    7. div-invN/A

      \[\leadsto \frac{x}{\color{blue}{y \cdot \frac{1}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}}} \]
    8. lift-exp.f64N/A

      \[\leadsto \frac{x}{y \cdot \frac{1}{\color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}}} \]
    9. lift--.f64N/A

      \[\leadsto \frac{x}{y \cdot \frac{1}{e^{\color{blue}{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}}} \]
    10. exp-diffN/A

      \[\leadsto \frac{x}{y \cdot \frac{1}{\color{blue}{\frac{e^{y \cdot \log z + \left(t - 1\right) \cdot \log a}}{e^{b}}}}} \]
    11. clear-numN/A

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

    \[\leadsto \color{blue}{\frac{x}{y \cdot e^{b - \mathsf{fma}\left(\log a, t - 1, \log z \cdot y\right)}}} \]
  5. Final simplification99.1%

    \[\leadsto \frac{x}{e^{b - \mathsf{fma}\left(\log a, t - 1, \log z \cdot y\right)} \cdot y} \]
  6. Add Preprocessing

Alternative 2: 45.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.16666666666666666, b, 0.5\right), b, 1\right), b, 1\right) \cdot y} \cdot \frac{1}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y) < -inf.0 or 0.0 < (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t #s(literal 1 binary64)) (log.f64 a))) b))) y)

    1. Initial program 99.3%

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

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

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

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

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

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

      \[\leadsto \frac{\frac{1}{a}}{y \cdot e^{b}} \cdot x \]
    7. Step-by-step derivation
      1. Applied rewrites58.7%

        \[\leadsto \frac{\frac{1}{a}}{y \cdot e^{b}} \cdot x \]
      2. Step-by-step derivation
        1. Applied rewrites58.4%

          \[\leadsto \color{blue}{\frac{1}{a} \cdot \frac{x}{e^{b} \cdot y}} \]
        2. Taylor expanded in b around 0

          \[\leadsto \frac{1}{a} \cdot \frac{x}{1 \cdot y} \]
        3. Step-by-step derivation
          1. Applied rewrites30.3%

            \[\leadsto \frac{1}{a} \cdot \frac{x}{1 \cdot y} \]

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

          1. Initial program 97.9%

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

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

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

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

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

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

            \[\leadsto \frac{\frac{1}{a}}{y \cdot e^{b}} \cdot x \]
          7. Step-by-step derivation
            1. Applied rewrites60.4%

              \[\leadsto \frac{\frac{1}{a}}{y \cdot e^{b}} \cdot x \]
            2. Step-by-step derivation
              1. Applied rewrites60.1%

                \[\leadsto \color{blue}{\frac{1}{a} \cdot \frac{x}{e^{b} \cdot y}} \]
              2. Taylor expanded in b around 0

                \[\leadsto \frac{1}{a} \cdot \frac{x}{\left(1 + b \cdot \left(1 + b \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot b\right)\right)\right) \cdot y} \]
              3. Step-by-step derivation
                1. Applied rewrites61.6%

                  \[\leadsto \frac{1}{a} \cdot \frac{x}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.16666666666666666, b, 0.5\right), b, 1\right), b, 1\right) \cdot y} \]
              4. Recombined 2 regimes into one program.
              5. Final simplification45.5%

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

              Developer Target 1: 71.8% accurate, 1.0× speedup?

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

              Reproduce

              ?
              herbie shell --seed 2024230 
              (FPCore (x y z t a b)
                :name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
                :precision binary64
              
                :alt
                (! :herbie-platform default (if (< t -8845848504127471/10000000000000000) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))) (if (< t 8520312288374073/10000000000) (/ (* (/ x y) (pow a (- t 1))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))))))
              
                (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))