Average Error: 2.7 → 2.7
Time: 4.8s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[x \cdot \mathsf{fma}\left(\sqrt[3]{1} \cdot \sqrt[3]{1}, \sqrt[3]{1}, -z \cdot y\right) + x \cdot \mathsf{fma}\left(-z, y, z \cdot y\right)\]
x \cdot \left(1 - y \cdot z\right)
x \cdot \mathsf{fma}\left(\sqrt[3]{1} \cdot \sqrt[3]{1}, \sqrt[3]{1}, -z \cdot y\right) + x \cdot \mathsf{fma}\left(-z, y, z \cdot y\right)
double code(double x, double y, double z) {
	return (x * (1.0 - (y * z)));
}
double code(double x, double y, double z) {
	return ((x * fma((cbrt(1.0) * cbrt(1.0)), cbrt(1.0), -(z * y))) + (x * fma(-z, y, (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 2.7

    \[x \cdot \left(1 - y \cdot z\right)\]
  2. Using strategy rm
  3. Applied add-cube-cbrt2.7

    \[\leadsto x \cdot \left(\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}} - y \cdot z\right)\]
  4. Applied prod-diff2.7

    \[\leadsto x \cdot \color{blue}{\left(\mathsf{fma}\left(\sqrt[3]{1} \cdot \sqrt[3]{1}, \sqrt[3]{1}, -z \cdot y\right) + \mathsf{fma}\left(-z, y, z \cdot y\right)\right)}\]
  5. Applied distribute-lft-in2.7

    \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(\sqrt[3]{1} \cdot \sqrt[3]{1}, \sqrt[3]{1}, -z \cdot y\right) + x \cdot \mathsf{fma}\left(-z, y, z \cdot y\right)}\]
  6. Final simplification2.7

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

Reproduce

herbie shell --seed 2020066 +o rules:numerics
(FPCore (x y z)
  :name "Data.Colour.RGBSpace.HSV:hsv from colour-2.3.3, I"
  :precision binary64
  (* x (- 1 (* y z))))