Average Error: 2.1 → 2.1
Time: 16.1s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\begin{array}{l} \mathbf{if}\;\left(t - 1\right) \cdot \log a \le -2.9642058948872463 \cdot 10^{33} \lor \neg \left(\left(t - 1\right) \cdot \log a \le -335.233961090993546\right):\\ \;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{y}{\left({z}^{y} \cdot {a}^{t}\right) \cdot \frac{{a}^{\left(-1\right)}}{e^{b}}}}\\ \end{array}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\begin{array}{l}
\mathbf{if}\;\left(t - 1\right) \cdot \log a \le -2.9642058948872463 \cdot 10^{33} \lor \neg \left(\left(t - 1\right) \cdot \log a \le -335.233961090993546\right):\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y}{\left({z}^{y} \cdot {a}^{t}\right) \cdot \frac{{a}^{\left(-1\right)}}{e^{b}}}}\\

\end{array}
double f(double x, double y, double z, double t, double a, double b) {
        double r99640 = x;
        double r99641 = y;
        double r99642 = z;
        double r99643 = log(r99642);
        double r99644 = r99641 * r99643;
        double r99645 = t;
        double r99646 = 1.0;
        double r99647 = r99645 - r99646;
        double r99648 = a;
        double r99649 = log(r99648);
        double r99650 = r99647 * r99649;
        double r99651 = r99644 + r99650;
        double r99652 = b;
        double r99653 = r99651 - r99652;
        double r99654 = exp(r99653);
        double r99655 = r99640 * r99654;
        double r99656 = r99655 / r99641;
        return r99656;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r99657 = t;
        double r99658 = 1.0;
        double r99659 = r99657 - r99658;
        double r99660 = a;
        double r99661 = log(r99660);
        double r99662 = r99659 * r99661;
        double r99663 = -2.9642058948872463e+33;
        bool r99664 = r99662 <= r99663;
        double r99665 = -335.23396109099355;
        bool r99666 = r99662 <= r99665;
        double r99667 = !r99666;
        bool r99668 = r99664 || r99667;
        double r99669 = x;
        double r99670 = y;
        double r99671 = z;
        double r99672 = log(r99671);
        double r99673 = r99670 * r99672;
        double r99674 = r99673 + r99662;
        double r99675 = b;
        double r99676 = r99674 - r99675;
        double r99677 = exp(r99676);
        double r99678 = r99669 * r99677;
        double r99679 = r99678 / r99670;
        double r99680 = pow(r99671, r99670);
        double r99681 = pow(r99660, r99657);
        double r99682 = r99680 * r99681;
        double r99683 = -r99658;
        double r99684 = pow(r99660, r99683);
        double r99685 = exp(r99675);
        double r99686 = r99684 / r99685;
        double r99687 = r99682 * r99686;
        double r99688 = r99670 / r99687;
        double r99689 = r99669 / r99688;
        double r99690 = r99668 ? r99679 : r99689;
        return r99690;
}

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

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if (* (- t 1.0) (log a)) < -2.9642058948872463e+33 or -335.23396109099355 < (* (- t 1.0) (log a))

    1. Initial program 1.1

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

    if -2.9642058948872463e+33 < (* (- t 1.0) (log a)) < -335.23396109099355

    1. Initial program 6.6

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
    2. Using strategy rm
    3. Applied associate-/l*2.1

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

      \[\leadsto \frac{x}{\color{blue}{\frac{y}{{z}^{y} \cdot \frac{{a}^{\left(t - 1\right)}}{e^{b}}}}}\]
    5. Using strategy rm
    6. Applied *-un-lft-identity6.8

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

      \[\leadsto \frac{x}{\frac{y}{{z}^{y} \cdot \frac{{a}^{\color{blue}{\left(t + \left(-1\right)\right)}}}{1 \cdot e^{b}}}}\]
    8. Applied unpow-prod-up6.7

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(t - 1\right) \cdot \log a \le -2.9642058948872463 \cdot 10^{33} \lor \neg \left(\left(t - 1\right) \cdot \log a \le -335.233961090993546\right):\\ \;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{y}{\left({z}^{y} \cdot {a}^{t}\right) \cdot \frac{{a}^{\left(-1\right)}}{e^{b}}}}\\ \end{array}\]

Reproduce

herbie shell --seed 2020045 
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2"
  :precision binary64
  (/ (* x (exp (- (+ (* y (log z)) (* (- t 1) (log a))) b))) y))