Average Error: 1.9 → 1.8
Time: 9.0s
Precision: binary64
\[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}\]
\[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\left(\log \left(\sqrt{1} + \sqrt{z}\right) + \log \left(\sqrt{1} - \sqrt{z}\right)\right) - b\right)}\]
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\left(\log \left(\sqrt{1} + \sqrt{z}\right) + \log \left(\sqrt{1} - \sqrt{z}\right)\right) - b\right)}
double code(double x, double y, double z, double t, double a, double b) {
	return ((double) (x * ((double) exp(((double) (((double) (y * ((double) (((double) log(z)) - t)))) + ((double) (a * ((double) (((double) log(((double) (1.0 - z)))) - b))))))))));
}
double code(double x, double y, double z, double t, double a, double b) {
	return ((double) (x * ((double) exp(((double) (((double) (y * ((double) (((double) log(z)) - t)))) + ((double) (a * ((double) (((double) (((double) log(((double) (((double) sqrt(1.0)) + ((double) sqrt(z)))))) + ((double) log(((double) (((double) sqrt(1.0)) - ((double) sqrt(z)))))))) - b))))))))));
}

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. Initial program 1.9

    \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt1.9

    \[\leadsto x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - \color{blue}{\sqrt{z} \cdot \sqrt{z}}\right) - b\right)}\]
  4. Applied add-sqr-sqrt1.9

    \[\leadsto x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(\color{blue}{\sqrt{1} \cdot \sqrt{1}} - \sqrt{z} \cdot \sqrt{z}\right) - b\right)}\]
  5. Applied difference-of-squares1.9

    \[\leadsto x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \color{blue}{\left(\left(\sqrt{1} + \sqrt{z}\right) \cdot \left(\sqrt{1} - \sqrt{z}\right)\right)} - b\right)}\]
  6. Applied log-prod1.8

    \[\leadsto x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\color{blue}{\left(\log \left(\sqrt{1} + \sqrt{z}\right) + \log \left(\sqrt{1} - \sqrt{z}\right)\right)} - b\right)}\]
  7. Final simplification1.8

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

Reproduce

herbie shell --seed 2020196 
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, B"
  :precision binary64
  (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))