Average Error: 2.0 → 1.1
Time: 3.3m
Precision: 64
Internal Precision: 384
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}{y}\]
\[\begin{array}{l} \mathbf{if}\;\frac{\left({z}^{y} \cdot {a}^{t}\right) \cdot x}{\left({a}^{1.0} \cdot e^{b}\right) \cdot y} \le +\infty:\\ \;\;\;\;\frac{\left({z}^{y} \cdot {a}^{t}\right) \cdot x}{\left({a}^{1.0} \cdot e^{b}\right) \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{{e}^{\left(\left(\left(t - 1.0\right) \cdot \log a + y \cdot \log z\right) - b\right)} \cdot x}{y}\\ \end{array}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Derivation

  1. Split input into 2 regimes
  2. if (/ (* x (* (* (pow z y) (pow a t)) 1)) (* y (* (pow a 1.0) (exp b)))) < +inf.0

    1. Initial program 2.8

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}{y}\]
    2. Using strategy rm
    3. Applied sub-neg2.8

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

      \[\leadsto \frac{x \cdot \color{blue}{\left(e^{y \cdot \log z + \left(t - 1.0\right) \cdot \log a} \cdot e^{-b}\right)}}{y}\]
    5. Applied simplify1.9

      \[\leadsto \frac{x \cdot \left(\color{blue}{\left({z}^{y} \cdot {a}^{\left(t - 1.0\right)}\right)} \cdot e^{-b}\right)}{y}\]
    6. Using strategy rm
    7. Applied exp-neg1.9

      \[\leadsto \frac{x \cdot \left(\left({z}^{y} \cdot {a}^{\left(t - 1.0\right)}\right) \cdot \color{blue}{\frac{1}{e^{b}}}\right)}{y}\]
    8. Applied pow-sub1.8

      \[\leadsto \frac{x \cdot \left(\left({z}^{y} \cdot \color{blue}{\frac{{a}^{t}}{{a}^{1.0}}}\right) \cdot \frac{1}{e^{b}}\right)}{y}\]
    9. Applied associate-*r/1.8

      \[\leadsto \frac{x \cdot \left(\color{blue}{\frac{{z}^{y} \cdot {a}^{t}}{{a}^{1.0}}} \cdot \frac{1}{e^{b}}\right)}{y}\]
    10. Applied frac-times1.8

      \[\leadsto \frac{x \cdot \color{blue}{\frac{\left({z}^{y} \cdot {a}^{t}\right) \cdot 1}{{a}^{1.0} \cdot e^{b}}}}{y}\]
    11. Applied associate-*r/1.8

      \[\leadsto \frac{\color{blue}{\frac{x \cdot \left(\left({z}^{y} \cdot {a}^{t}\right) \cdot 1\right)}{{a}^{1.0} \cdot e^{b}}}}{y}\]
    12. Applied associate-/l/1.5

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

    if +inf.0 < (/ (* x (* (* (pow z y) (pow a t)) 1)) (* y (* (pow a 1.0) (exp b))))

    1. Initial program 0.0

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}{y}\]
    2. Using strategy rm
    3. Applied *-un-lft-identity0.0

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

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

      \[\leadsto \frac{x \cdot {\color{blue}{e}}^{\left(\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b\right)}}{y}\]
  3. Recombined 2 regimes into one program.
  4. Applied simplify1.1

    \[\leadsto \color{blue}{\begin{array}{l} \mathbf{if}\;\frac{\left({z}^{y} \cdot {a}^{t}\right) \cdot x}{\left({a}^{1.0} \cdot e^{b}\right) \cdot y} \le +\infty:\\ \;\;\;\;\frac{\left({z}^{y} \cdot {a}^{t}\right) \cdot x}{\left({a}^{1.0} \cdot e^{b}\right) \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{{e}^{\left(\left(\left(t - 1.0\right) \cdot \log a + y \cdot \log z\right) - b\right)} \cdot x}{y}\\ \end{array}}\]

Runtime

Time bar (total: 3.3m)Debug logProfile

herbie shell --seed '#(1070609872 3456127585 2380521889 2328837196 1765472538 734540918)' +o rules:numerics
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2"
  (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))