A
Angus Comber
Hello
Sorry this really is a newbie question!
I am doing some floating point arithmetic and calculating the time
difference between two dates. The date values being comparied are actually
double values. I was going to compare the dates by calculating the
difference betwen the two numbers. But sometimes you get a -ve and
sometimes a +ve value. I want to disregard a small variance eg of up to two
minutes but what is best way to compare values.
ie calculate difference and then convert any -ve values to +ve then check if
(diff > x)
or some other way?
AC
Sorry this really is a newbie question!
I am doing some floating point arithmetic and calculating the time
difference between two dates. The date values being comparied are actually
double values. I was going to compare the dates by calculating the
difference betwen the two numbers. But sometimes you get a -ve and
sometimes a +ve value. I want to disregard a small variance eg of up to two
minutes but what is best way to compare values.
ie calculate difference and then convert any -ve values to +ve then check if
(diff > x)
or some other way?
AC