Average Error: 1.8 → 0.7
Time: 1.9m
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{{z}^{y} \cdot {a}^{\left(-1.0\right)}}{\left(\frac{y}{x} \cdot e^{b}\right) \cdot {a}^{\left(-t\right)}} = -\infty:\\ \;\;\;\;\frac{x \cdot \left(\left({z}^{y} \cdot {a}^{\left(t - 1.0\right)}\right) \cdot e^{-b}\right)}{y}\\ \mathbf{if}\;\frac{{z}^{y} \cdot {a}^{\left(-1.0\right)}}{\left(\frac{y}{x} \cdot e^{b}\right) \cdot {a}^{\left(-t\right)}} \le +\infty:\\ \;\;\;\;\frac{{z}^{y} \cdot {a}^{\left(-1.0\right)}}{\left(\frac{y}{x} \cdot e^{b}\right) \cdot {a}^{\left(-t\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot {e}^{\left(\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b\right)}}{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 3 regimes
  2. if (/ (* (pow z y) (pow a (- 1.0))) (* (* (/ y x) (exp b)) (pow a (- t)))) < -inf.0

    1. Initial program 6.5

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

      \[\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-sum6.4

      \[\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 simplify0.8

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

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

    1. Initial program 2.6

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}{y}\]
    2. Taylor expanded around inf 2.6

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

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

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

    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 3 regimes into one program.

Runtime

Time bar (total: 1.9m)Debug logProfile

herbie shell --seed '#(1070864556 424010669 783715395 1203517814 4070606583 4107618214)' +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))