Average Error: 1.9 → 0.7
Time: 2.6m
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{\frac{y}{{z}^{y}}}{\frac{{a}^{t}}{{a}^{1.0}} \cdot e^{-b}} \le -2.117059432185451 \cdot 10^{-137}:\\ \;\;\;\;\frac{x}{\frac{\frac{y}{{z}^{y}}}{\frac{{a}^{t}}{{a}^{1.0}} \cdot e^{-b}}}\\ \mathbf{if}\;\frac{\frac{y}{{z}^{y}}}{\frac{{a}^{t}}{{a}^{1.0}} \cdot e^{-b}} \le 2.980063427787192 \cdot 10^{-71}:\\ \;\;\;\;\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^{(y \cdot \left(\log z\right) + \left((\left(t - 1.0\right) \cdot \left(\log a\right) + \left(-b\right))_*\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 (/ (/ y (pow z y)) (* (/ (pow a t) (pow a 1.0)) (exp (- b)))) < -2.117059432185451e-137

    1. Initial program 2.2

      \[\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 associate-/l*0.8

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

      \[\leadsto \frac{x}{\color{blue}{\frac{\frac{y}{{z}^{y}}}{e^{(\left(t - 1.0\right) \cdot \left(\log a\right) + \left(-b\right))_*}}}}\]
    5. Using strategy rm
    6. Applied fma-udef0.8

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

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

      \[\leadsto \frac{x}{\frac{\frac{y}{{z}^{y}}}{\color{blue}{{a}^{\left(t - 1.0\right)}} \cdot e^{-b}}}\]
    9. Using strategy rm
    10. Applied pow-sub0.1

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

    if -2.117059432185451e-137 < (/ (/ y (pow z y)) (* (/ (pow a t) (pow a 1.0)) (exp (- b)))) < 2.980063427787192e-71

    1. Initial program 8.2

      \[\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 8.2

      \[\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 simplify2.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 2.980063427787192e-71 < (/ (/ y (pow z y)) (* (/ (pow a t) (pow a 1.0)) (exp (- b))))

    1. Initial program 1.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 add-exp-log1.0

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

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

Runtime

Time bar (total: 2.6m)Debug logProfile

herbie shell --seed '#(1070833653 108281690 3330367898 3632331308 3494323072 43156186)' +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))