Average Error: 1.9 → 1.2
Time: 8.9s
Precision: binary64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\frac{x \cdot \left(\frac{{1}^{\left(t + y\right)}}{{1}^{1}} \cdot \frac{{a}^{\left(-1\right)}}{e^{b - \left(t \cdot \log a + y \cdot \log z\right)}}\right)}{y}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\frac{x \cdot \left(\frac{{1}^{\left(t + y\right)}}{{1}^{1}} \cdot \frac{{a}^{\left(-1\right)}}{e^{b - \left(t \cdot \log a + y \cdot \log z\right)}}\right)}{y}
(FPCore (x y z t a b)
 :precision binary64
 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
(FPCore (x y z t a b)
 :precision binary64
 (/
  (*
   x
   (*
    (/ (pow 1.0 (+ t y)) (pow 1.0 1.0))
    (/ (pow a (- 1.0)) (exp (- b (+ (* t (log a)) (* y (log z))))))))
  y))
double code(double x, double y, double z, double t, double a, double b) {
	return (((double) (x * ((double) exp(((double) (((double) (((double) (y * ((double) log(z)))) + ((double) (((double) (t - 1.0)) * ((double) log(a)))))) - b)))))) / y);
}
double code(double x, double y, double z, double t, double a, double b) {
	return (((double) (x * ((double) ((((double) pow(1.0, ((double) (t + y)))) / ((double) pow(1.0, 1.0))) * (((double) pow(a, ((double) -(1.0)))) / ((double) exp(((double) (b - ((double) (((double) (t * ((double) log(a)))) + ((double) (y * ((double) log(z))))))))))))))) / y);
}

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

Target

Original1.9
Target11.5
Herbie1.2
\[\begin{array}{l} \mathbf{if}\;t < -0.8845848504127471:\\ \;\;\;\;\frac{x \cdot \frac{{a}^{\left(t - 1\right)}}{y}}{\left(b + 1\right) - y \cdot \log z}\\ \mathbf{elif}\;t < 852031.2288374073:\\ \;\;\;\;\frac{\frac{x}{y} \cdot {a}^{\left(t - 1\right)}}{e^{b - \log z \cdot y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \frac{{a}^{\left(t - 1\right)}}{y}}{\left(b + 1\right) - y \cdot \log z}\\ \end{array}\]

Derivation

  1. Initial program Error: 1.9 bits

    \[\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 add-cbrt-cubeError: 2.0 bits

    \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \color{blue}{\sqrt[3]{\left(\log a \cdot \log a\right) \cdot \log a}}\right) - b}}{y}\]
  4. Applied add-cbrt-cubeError: 4.9 bits

    \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z + \color{blue}{\sqrt[3]{\left(\left(t - 1\right) \cdot \left(t - 1\right)\right) \cdot \left(t - 1\right)}} \cdot \sqrt[3]{\left(\log a \cdot \log a\right) \cdot \log a}\right) - b}}{y}\]
  5. Applied cbrt-unprodError: 5.0 bits

    \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z + \color{blue}{\sqrt[3]{\left(\left(\left(t - 1\right) \cdot \left(t - 1\right)\right) \cdot \left(t - 1\right)\right) \cdot \left(\left(\log a \cdot \log a\right) \cdot \log a\right)}}\right) - b}}{y}\]
  6. SimplifiedError: 5.0 bits

    \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z + \sqrt[3]{\color{blue}{{\left(\left(t - 1\right) \cdot \log a\right)}^{3}}}\right) - b}}{y}\]
  7. Taylor expanded around inf Error: 1.9 bits

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

    \[\leadsto \frac{x \cdot \color{blue}{\left(\frac{{1}^{\left(t + y\right)}}{{1}^{1}} \cdot \frac{{a}^{\left(-1\right)}}{e^{b + \left(t \cdot \left(-\log a\right) + y \cdot \left(-\log z\right)\right)}}\right)}}{y}\]
  9. Final simplificationError: 1.2 bits

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

Reproduce

herbie shell --seed 2020205 
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
  :precision binary64

  :herbie-target
  (if (< t -0.8845848504127471) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z)))) (if (< t 852031.2288374073) (/ (* (/ x y) (pow a (- t 1.0))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z))))))

  (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))