Average Error: 3.4 → 3.4
Time: 7.2s
Precision: binary64
\[x \cdot \left(1 - y \cdot z\right)\]
\[x - x \cdot \left(z \cdot y\right)\]
x \cdot \left(1 - y \cdot z\right)
x - x \cdot \left(z \cdot y\right)
(FPCore (x y z) :precision binary64 (* x (- 1.0 (* y z))))
(FPCore (x y z) :precision binary64 (- x (* x (* z y))))
double code(double x, double y, double z) {
	return x * (1.0 - (y * z));
}
double code(double x, double y, double z) {
	return x - (x * (z * y));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 3.4

    \[x \cdot \left(1 - y \cdot z\right)\]
  2. Taylor expanded around 0 3.4

    \[\leadsto \color{blue}{x - x \cdot \left(z \cdot y\right)}\]
  3. Final simplification3.4

    \[\leadsto x - x \cdot \left(z \cdot y\right)\]

Reproduce

herbie shell --seed 2021093 
(FPCore (x y z)
  :name "Data.Colour.RGBSpace.HSV:hsv from colour-2.3.3, I"
  :precision binary64
  (* x (- 1.0 (* y z))))