Average Error: 5.9 → 4.0
Time: 1.9m
Precision: 64
Internal precision: 1408
\[\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}\;y \cdot \log z \le -1.1154917005965662 \cdot 10^{+243}:\\ \;\;\;\;e^{\log \left(\frac{x}{y}\right) + \left(\log a \cdot \left(t - 1.0\right) - \left(b - \log z \cdot y\right)\right)}\\ \mathbf{if}\;y \cdot \log z \le -6.82937553380511 \cdot 10^{+147}:\\ \;\;\;\;\frac{\left({z}^{y} \cdot {\left(\frac{1}{{a}^{1.0}}\right)}^{1.0}\right) \cdot \left(\left(\log a \cdot \log a\right) \cdot \left(\left(t \cdot t\right) \cdot \frac{1}{2}\right) + t \cdot \log a\right) + {a}^{-1.0} \cdot {z}^{y}}{\frac{e^{b}}{\frac{x}{y}}}\\ \mathbf{if}\;y \cdot \log z \le -2.850576188986565 \cdot 10^{-16}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{{a}^{\left(t - 1.0\right)}}{e^{b - \log z \cdot y}}\\ \mathbf{if}\;y \cdot \log z \le 0.0922372319414478:\\ \;\;\;\;x \cdot \left(\frac{{z}^{y}}{y} \cdot e^{\log a \cdot \left(t - 1.0\right) - b}\right)\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left(\frac{x}{y}\right) + \left(\log a \cdot \left(t - 1.0\right) - \left(b - \log z \cdot y\right)\right)}\\ \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 4 regimes.
  2. if (* y (log z)) < -1.1154917005965662e+243 or 0.0922372319414478 < (* y (log z))

    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. Applied simplify 43.3

      \[\leadsto \color{blue}{\frac{x}{y} \cdot \frac{{a}^{\left(t - 1.0\right)}}{\frac{e^{b}}{{z}^{y}}}}\]
    3. Using strategy rm
    4. Applied pow-to-exp 43.3

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

      \[\leadsto \frac{x}{y} \cdot \frac{{a}^{\left(t - 1.0\right)}}{\color{blue}{e^{b - \log z \cdot y}}}\]
    6. Applied pow-to-exp 24.4

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

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

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

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

    if -1.1154917005965662e+243 < (* y (log z)) < -6.82937553380511e+147

    1. Initial program 5.3

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}{y}\]
    2. Applied simplify 14.6

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

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

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

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

    if -6.82937553380511e+147 < (* y (log z)) < -2.850576188986565e-16

    1. Initial program 14.9

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}{y}\]
    2. Applied simplify 4.3

      \[\leadsto \color{blue}{\frac{x}{y} \cdot \frac{{a}^{\left(t - 1.0\right)}}{\frac{e^{b}}{{z}^{y}}}}\]
    3. Using strategy rm
    4. Applied pow-to-exp 4.3

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

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

    if -2.850576188986565e-16 < (* y (log z)) < 0.0922372319414478

    1. Initial program 3.6

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}{y}\]
    2. Applied simplify 18.4

      \[\leadsto \color{blue}{\frac{x}{y} \cdot \frac{{a}^{\left(t - 1.0\right)}}{\frac{e^{b}}{{z}^{y}}}}\]
    3. Using strategy rm
    4. Applied div-inv 18.4

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

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

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

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

      \[\leadsto x \cdot \left(\frac{{z}^{y}}{y} \cdot \color{blue}{e^{\log a \cdot \left(t - 1.0\right) - b}}\right)\]
  3. Recombined 4 regimes into one program.
  4. Removed slow pow expressions

Runtime

Time bar (total: 1.9m) Debug logProfile

Please include this information when filing a bug report:

herbie shell --seed '#(1064524629 4159152179 2999149171 575749698 4006532819 692958815)'
(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))