Average Error: 0.0 → 0.3
Time: 5.1s
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\]
\[\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(b, \left(y + t\right) - 2, x\right) - \left(\left(t - 1\right) \cdot \left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right)\right) \cdot \sqrt[3]{a}\right)\]
\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
\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(b, \left(y + t\right) - 2, x\right) - \left(\left(t - 1\right) \cdot \left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right)\right) \cdot \sqrt[3]{a}\right)
double code(double x, double y, double z, double t, double a, double b) {
	return ((double) (((double) (((double) (x - ((double) (((double) (y - 1.0)) * z)))) - ((double) (((double) (t - 1.0)) * a)))) + ((double) (((double) (((double) (y + t)) - 2.0)) * b))));
}
double code(double x, double y, double z, double t, double a, double b) {
	return ((double) fma(((double) (1.0 - y)), z, ((double) (((double) fma(b, ((double) (((double) (y + t)) - 2.0)), x)) - ((double) (((double) (((double) (t - 1.0)) * ((double) (((double) cbrt(a)) * ((double) cbrt(a)))))) * ((double) cbrt(a))))))));
}

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 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 add-cube-cbrt0.3

    \[\leadsto \mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(b, \left(y + t\right) - 2, x\right) - \left(t - 1\right) \cdot \color{blue}{\left(\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \sqrt[3]{a}\right)}\right)\]
  5. Applied associate-*r*0.3

    \[\leadsto \mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(b, \left(y + t\right) - 2, x\right) - \color{blue}{\left(\left(t - 1\right) \cdot \left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right)\right) \cdot \sqrt[3]{a}}\right)\]
  6. Final simplification0.3

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

Reproduce

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