double code(double x, double y, double z) {
return x * (1.0 - (y * z));
}
double code(double x, double y, double z) {
double tmp;
if ((y * z) <= -1.0593544574333041e+293) {
tmp = (x * 1.0) - (z * (y * x));
} else {
tmp = (x * 1.0) - ((y * z) * x);
}
return tmp;
}



Bits error versus x



Bits error versus y



Bits error versus z
Results
if (* y z) < -1.0593544574333041e293Initial program 53.9
rmApplied sub-neg53.9
Applied distribute-lft-in53.9
rmApplied distribute-lft-neg-in53.9
Applied associate-*r*0.3
if -1.0593544574333041e293 < (* y z) Initial program 1.7
rmApplied sub-neg1.7
Applied distribute-lft-in1.7
Final simplification1.7
herbie shell --seed 2020338
(FPCore (x y z)
:name "Data.Colour.RGBSpace.HSV:hsv from colour-2.3.3, I"
:precision binary64
(* x (- 1.0 (* y z))))