How to convert a negative value to positive
From: Angus Comber (ac_at_NOiteloffice.com.PLEASENOSPAM)
Date: 11/28/04
- Next message: fb: "Re: Nth request of book recommendations"
- Previous message: Merrill & Michele: "Re: [OT] Editors"
- Next in thread: Gordon Burditt: "Re: How to convert a negative value to positive"
- Reply: Gordon Burditt: "Re: How to convert a negative value to positive"
- Reply: glen herrmannsfeldt: "Re: How to convert a negative value to positive"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 27 Nov 2004 23:27:45 -0000
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
- Next message: fb: "Re: Nth request of book recommendations"
- Previous message: Merrill & Michele: "Re: [OT] Editors"
- Next in thread: Gordon Burditt: "Re: How to convert a negative value to positive"
- Reply: Gordon Burditt: "Re: How to convert a negative value to positive"
- Reply: glen herrmannsfeldt: "Re: How to convert a negative value to positive"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|