Average Error: 0.0 → 0.0
Time: 6.8s
Precision: binary64
\[\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(\left(y + t\right) - 2, b, \mathsf{fma}\left(z, 1 - y, \left(a - t \cdot a\right) + x\right)\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(\left(y + t\right) - 2, b, \mathsf{fma}\left(z, 1 - y, \left(a - t \cdot a\right) + x\right)\right)
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
(FPCore (x y z t a b)
 :precision binary64
 (fma (- (+ y t) 2.0) b (fma z (- 1.0 y) (+ (- a (* t a)) x))))
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) {
	return fma(((y + t) - 2.0), b, fma(z, (1.0 - y), ((a - (t * a)) + x)));
}

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

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(\left(y + t\right) - 2, b, \mathsf{fma}\left(z, 1 - y, \mathsf{fma}\left(a, 1 - t, x\right)\right)\right)} \]
  3. Applied fma-udef_binary640.0

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

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

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

Reproduce

herbie shell --seed 2021307 
(FPCore (x y z t a b)
  :name "Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2"
  :precision binary64
  (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))