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

Percentage Accurate: 98.5% → 98.5%
Time: 14.3s
Alternatives: 22
Speedup: 1.0×

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 22 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.5% 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.5% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 41.8% accurate, 0.5× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 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

    1. Initial program 100.0%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{\frac{e^{-1 \cdot \log a + y \cdot \log z}}{e^{b}}}}{y} \]
      4. associate-/l/N/A

        \[\leadsto x \cdot \color{blue}{\frac{e^{-1 \cdot \log a + y \cdot \log z}}{y \cdot e^{b}}} \]
      5. lower-/.f64N/A

        \[\leadsto x \cdot \color{blue}{\frac{e^{-1 \cdot \log a + y \cdot \log z}}{y \cdot e^{b}}} \]
      6. +-commutativeN/A

        \[\leadsto x \cdot \frac{e^{\color{blue}{y \cdot \log z + -1 \cdot \log a}}}{y \cdot e^{b}} \]
      7. mul-1-negN/A

        \[\leadsto x \cdot \frac{e^{y \cdot \log z + \color{blue}{\left(\mathsf{neg}\left(\log a\right)\right)}}}{y \cdot e^{b}} \]
      8. unsub-negN/A

        \[\leadsto x \cdot \frac{e^{\color{blue}{y \cdot \log z - \log a}}}{y \cdot e^{b}} \]
      9. exp-diffN/A

        \[\leadsto x \cdot \frac{\color{blue}{\frac{e^{y \cdot \log z}}{e^{\log a}}}}{y \cdot e^{b}} \]
      10. lower-/.f64N/A

        \[\leadsto x \cdot \frac{\color{blue}{\frac{e^{y \cdot \log z}}{e^{\log a}}}}{y \cdot e^{b}} \]
      11. *-commutativeN/A

        \[\leadsto x \cdot \frac{\frac{e^{\color{blue}{\log z \cdot y}}}{e^{\log a}}}{y \cdot e^{b}} \]
      12. exp-to-powN/A

        \[\leadsto x \cdot \frac{\frac{\color{blue}{{z}^{y}}}{e^{\log a}}}{y \cdot e^{b}} \]
      13. lower-pow.f64N/A

        \[\leadsto x \cdot \frac{\frac{\color{blue}{{z}^{y}}}{e^{\log a}}}{y \cdot e^{b}} \]
      14. rem-exp-logN/A

        \[\leadsto x \cdot \frac{\frac{{z}^{y}}{\color{blue}{a}}}{y \cdot e^{b}} \]
      15. lower-*.f64N/A

        \[\leadsto x \cdot \frac{\frac{{z}^{y}}{a}}{\color{blue}{y \cdot e^{b}}} \]
      16. lower-exp.f6471.6

        \[\leadsto x \cdot \frac{\frac{{z}^{y}}{a}}{y \cdot \color{blue}{e^{b}}} \]
    5. Applied rewrites71.6%

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

      \[\leadsto \frac{x \cdot {z}^{y}}{\color{blue}{a \cdot y}} \]
    7. Step-by-step derivation
      1. Applied rewrites50.2%

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

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

          \[\leadsto \frac{x}{a \cdot \color{blue}{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) < 5e113

        1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{{\color{blue}{a}}^{\left(t - 1\right)} \cdot x}{y \cdot e^{b}} \]
          10. sub-negN/A

            \[\leadsto \frac{{a}^{\color{blue}{\left(t + \left(\mathsf{neg}\left(1\right)\right)\right)}} \cdot x}{y \cdot e^{b}} \]
          11. metadata-evalN/A

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

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

            \[\leadsto \frac{{a}^{\left(t + -1\right)} \cdot x}{\color{blue}{y \cdot e^{b}}} \]
          14. lower-exp.f6466.9

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

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

          \[\leadsto \frac{{a}^{\left(t + -1\right)} \cdot x}{y + \color{blue}{b \cdot y}} \]
        7. Step-by-step derivation
          1. Applied rewrites63.9%

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

            \[\leadsto \frac{\frac{1}{a} \cdot x}{\mathsf{fma}\left(b, y, y\right)} \]
          3. Step-by-step derivation
            1. Applied rewrites39.7%

              \[\leadsto \frac{\frac{1}{a} \cdot x}{\mathsf{fma}\left(b, y, y\right)} \]
            2. Taylor expanded in b around 0

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

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

              if 5e113 < (/.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.4%

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

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

                  \[\leadsto x \cdot \frac{\color{blue}{\frac{e^{-1 \cdot \log a + y \cdot \log z}}{e^{b}}}}{y} \]
                4. associate-/l/N/A

                  \[\leadsto x \cdot \color{blue}{\frac{e^{-1 \cdot \log a + y \cdot \log z}}{y \cdot e^{b}}} \]
                5. lower-/.f64N/A

                  \[\leadsto x \cdot \color{blue}{\frac{e^{-1 \cdot \log a + y \cdot \log z}}{y \cdot e^{b}}} \]
                6. +-commutativeN/A

                  \[\leadsto x \cdot \frac{e^{\color{blue}{y \cdot \log z + -1 \cdot \log a}}}{y \cdot e^{b}} \]
                7. mul-1-negN/A

                  \[\leadsto x \cdot \frac{e^{y \cdot \log z + \color{blue}{\left(\mathsf{neg}\left(\log a\right)\right)}}}{y \cdot e^{b}} \]
                8. unsub-negN/A

                  \[\leadsto x \cdot \frac{e^{\color{blue}{y \cdot \log z - \log a}}}{y \cdot e^{b}} \]
                9. exp-diffN/A

                  \[\leadsto x \cdot \frac{\color{blue}{\frac{e^{y \cdot \log z}}{e^{\log a}}}}{y \cdot e^{b}} \]
                10. lower-/.f64N/A

                  \[\leadsto x \cdot \frac{\color{blue}{\frac{e^{y \cdot \log z}}{e^{\log a}}}}{y \cdot e^{b}} \]
                11. *-commutativeN/A

                  \[\leadsto x \cdot \frac{\frac{e^{\color{blue}{\log z \cdot y}}}{e^{\log a}}}{y \cdot e^{b}} \]
                12. exp-to-powN/A

                  \[\leadsto x \cdot \frac{\frac{\color{blue}{{z}^{y}}}{e^{\log a}}}{y \cdot e^{b}} \]
                13. lower-pow.f64N/A

                  \[\leadsto x \cdot \frac{\frac{\color{blue}{{z}^{y}}}{e^{\log a}}}{y \cdot e^{b}} \]
                14. rem-exp-logN/A

                  \[\leadsto x \cdot \frac{\frac{{z}^{y}}{\color{blue}{a}}}{y \cdot e^{b}} \]
                15. lower-*.f64N/A

                  \[\leadsto x \cdot \frac{\frac{{z}^{y}}{a}}{\color{blue}{y \cdot e^{b}}} \]
                16. lower-exp.f6471.5

                  \[\leadsto x \cdot \frac{\frac{{z}^{y}}{a}}{y \cdot \color{blue}{e^{b}}} \]
              5. Applied rewrites71.5%

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

                \[\leadsto \frac{x \cdot {z}^{y}}{\color{blue}{a \cdot y}} \]
              7. Step-by-step derivation
                1. Applied rewrites50.4%

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

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

                    \[\leadsto \frac{x}{a \cdot \color{blue}{y}} \]
                  2. Step-by-step derivation
                    1. Applied rewrites31.9%

                      \[\leadsto \frac{\frac{x}{a}}{y} \]
                  3. Recombined 3 regimes into one program.
                  4. Final simplification41.8%

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

                  Developer Target 1: 71.6% 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 2024228 
                  (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))