Average Error: 2.0 → 1.0
Time: 2.7m
Precision: 64
Internal Precision: 576
\[\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(\left({z}^{y} \cdot x\right) \cdot {a}^{\left(t - 1.0\right)}\right) \cdot e^{-b}}{y} \le 2.9785242987520875 \cdot 10^{+106}:\\ \;\;\;\;\left({\left(\frac{1}{{a}^{1.0}}\right)}^{1.0} \cdot \frac{{\left(\frac{1}{a}\right)}^{\left(-t\right)}}{y \cdot e^{b}}\right) \cdot \left(x \cdot {\left(\frac{1}{z}\right)}^{\left(-y\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}{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

Try it out

  1. Inputs

  2. Original Output:

    Herbie Output:

Derivation

  1. Split input into 2 regimes
  2. if (/ (* (* (* (pow z y) x) (pow a (- t 1.0))) (exp (- b))) y) < 2.9785242987520875e+106

    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. Using strategy rm
    3. Applied sub-neg2.6

      \[\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.6

      \[\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 associate-*r*2.7

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

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

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

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

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

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

      \[\leadsto \frac{\frac{\color{blue}{\left({a}^{t} \cdot x\right) \cdot {z}^{y}}}{{a}^{1.0} \cdot e^{b}}}{y}\]
    13. Taylor expanded around inf 1.3

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

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

    if 2.9785242987520875e+106 < (/ (* (* (* (pow z y) x) (pow a (- t 1.0))) (exp (- b))) y)

    1. Initial program 0.6

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

Runtime

Time bar (total: 2.7m)Debug logProfile

herbie shell --seed '#(1072361757 3390613284 2339397988 1175251238 145061547 3101881848)' +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))