Average Error: 0.0 → 2.5
Time: 3.7s
Precision: 64
\[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b\]
\[\begin{array}{l} \mathbf{if}\;b \le -1.0750263452155605 \cdot 10^{117} \lor \neg \left(b \le 4.21205586174965365 \cdot 10^{22}\right):\\ \;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(b, \frac{\left(y + t\right) \cdot \left(y + t\right) - 2 \cdot 2}{\left(y + t\right) + 2}, x\right) - \left(t - 1\right) \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(b, y, \mathsf{fma}\left(b, t, x\right)\right) - \left(t - 1\right) \cdot a\right)\\ \end{array}\]
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\begin{array}{l}
\mathbf{if}\;b \le -1.0750263452155605 \cdot 10^{117} \lor \neg \left(b \le 4.21205586174965365 \cdot 10^{22}\right):\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(b, \frac{\left(y + t\right) \cdot \left(y + t\right) - 2 \cdot 2}{\left(y + t\right) + 2}, x\right) - \left(t - 1\right) \cdot a\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(b, y, \mathsf{fma}\left(b, t, x\right)\right) - \left(t - 1\right) \cdot a\right)\\

\end{array}
double code(double x, double y, double z, double t, double a, double b) {
	return (((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b));
}
double code(double x, double y, double z, double t, double a, double b) {
	double VAR;
	if (((b <= -1.0750263452155605e+117) || !(b <= 4.212055861749654e+22))) {
		VAR = fma((1.0 - y), z, (fma(b, ((((y + t) * (y + t)) - (2.0 * 2.0)) / ((y + t) + 2.0)), x) - ((t - 1.0) * a)));
	} else {
		VAR = fma((1.0 - y), z, (fma(b, y, fma(b, t, x)) - ((t - 1.0) * a)));
	}
	return VAR;
}

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 b < -1.0750263452155605e+117 or 4.212055861749654e+22 < b

    1. Initial program 0.0

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b\]
    2. Simplified0.0

      \[\leadsto \color{blue}{\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(b, \left(y + t\right) - 2, x\right) - \left(t - 1\right) \cdot a\right)}\]
    3. Using strategy rm
    4. Applied flip--4.7

      \[\leadsto \mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(b, \color{blue}{\frac{\left(y + t\right) \cdot \left(y + t\right) - 2 \cdot 2}{\left(y + t\right) + 2}}, x\right) - \left(t - 1\right) \cdot a\right)\]

    if -1.0750263452155605e+117 < b < 4.212055861749654e+22

    1. Initial program 0.0

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b\]
    2. Simplified0.0

      \[\leadsto \color{blue}{\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(b, \left(y + t\right) - 2, x\right) - \left(t - 1\right) \cdot a\right)}\]
    3. Taylor expanded around inf 1.6

      \[\leadsto \mathsf{fma}\left(1 - y, z, \color{blue}{\left(y \cdot b + \left(x + t \cdot b\right)\right)} - \left(t - 1\right) \cdot a\right)\]
    4. Simplified1.6

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \le -1.0750263452155605 \cdot 10^{117} \lor \neg \left(b \le 4.21205586174965365 \cdot 10^{22}\right):\\ \;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(b, \frac{\left(y + t\right) \cdot \left(y + t\right) - 2 \cdot 2}{\left(y + t\right) + 2}, x\right) - \left(t - 1\right) \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(b, y, \mathsf{fma}\left(b, t, x\right)\right) - \left(t - 1\right) \cdot a\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2020105 +o rules:numerics
(FPCore (x y z t a b)
  :name "Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2"
  :precision binary64
  (+ (- (- x (* (- y 1) z)) (* (- t 1) a)) (* (- (+ y t) 2) b)))