Hi List,
I have been working on some of my own tools and in a equation working with
Lat's and Long's I have found something odd.
What I was trying to do was take a float and give the result of the float
without the preceding integer ie. 145.2 = 0.2 (Remove the 145) Then
multiply the result by 60
ie. 0.2 x 60 = 12
But wait fo it: In mapbasic 12 = 11
Yes you all think I am crazy but here is my proof.
My equation is:
print fix((abs(fltvariable)-fix(abs(fltvariable)))*60)
subtituting fltvariable for 145.2 (makes not different if you use any other
number as long as it has 0.2 as the decimal)
Type this equation into the mapbasic window and even try them on paper
yourself.
print fix((abs(145.2)-fix(abs(145.2)))*60)
Working through the equation we would have
print fix((abs(145.2)-fix(abs(145.2)))*60) = 11 ?
print fix((145.2-fix(145.2))*60) = 11 ?
print fix((145.2-145)*60) = 11 ?
print fix(0.2*60) = 12 Correct
print fix(12) = 12 Correct
The answer should be 12 but mapbasic is giving 11 as the result for the
first 3 equations.
It this a bug that should be fixed or been fixed?
Paul Smith