Average Error: 2.0 → 1.3
Time: 1.4m
Precision: 64
Internal Precision: 128
\[\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 \le -2.4065832688655656 \cdot 10^{-150} \lor \neg \left(y \le 6.877916927359886 \cdot 10^{-08}\right):\\ \;\;\;\;\frac{x \cdot e^{\left(\log a \cdot \left(t - 1.0\right) + \log z \cdot y\right) - b}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{\frac{y}{e^{(t \cdot \left(\log a\right) + \left(-b\right))_*} \cdot \left({z}^{y} \cdot {a}^{\left(-1.0\right)}\right)}}{x}}\\ \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 y < -2.4065832688655656e-150 or 6.877916927359886e-08 < y

    1. Initial program 0.7

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

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

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

    if -2.4065832688655656e-150 < y < 6.877916927359886e-08

    1. Initial program 4.1

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

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

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

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

      \[\leadsto \frac{x \cdot \color{blue}{\left(\left({a}^{\left(-1.0\right)} \cdot {z}^{y}\right) \cdot e^{(t \cdot \left(\log a\right) + \left(-b\right))_*}\right)}}{y}\]
    6. Using strategy rm
    7. Applied associate-/l*2.2

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \le -2.4065832688655656 \cdot 10^{-150} \lor \neg \left(y \le 6.877916927359886 \cdot 10^{-08}\right):\\ \;\;\;\;\frac{x \cdot e^{\left(\log a \cdot \left(t - 1.0\right) + \log z \cdot y\right) - b}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{\frac{y}{e^{(t \cdot \left(\log a\right) + \left(-b\right))_*} \cdot \left({z}^{y} \cdot {a}^{\left(-1.0\right)}\right)}}{x}}\\ \end{array}\]

Runtime

Time bar (total: 1.4m)Debug logProfile

herbie shell --seed 2018273 +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))