F
Fred W.
I want to compare to double values, as follows:
double max = 1000.0;
double y = 1000.0;
if (y>max) throw new ApplicationException("Value y exceeds the max");
'y' could be anything in my actual application. Is this valid? Or does my
comparison need to be:
if (y> (max + double.Epsilon) ) throw ....
double max = 1000.0;
double y = 1000.0;
if (y>max) throw new ApplicationException("Value y exceeds the max");
'y' could be anything in my actual application. Is this valid? Or does my
comparison need to be:
if (y> (max + double.Epsilon) ) throw ....