I am in the process of migrating the awesome c# geocode framework
http://code.google.com/p/geocoordconversion/
to objective-c
however I've noticed a subtle difference.
There is a line in the code which does the following:
int retVal = Math.Abs(allAfterDecimal).ToString().Trim('0').Length - 1;
Now I have written matching test scripts but I've noticed that when I convert to string I get different answers
c# allAfterdeimal.ToString() = "0.5084667"
but in
objc [NSString stringWithFormat:@"%f",allAfterdecimal] = "0.508467"
both are declared as double's in their respective language
How can I get round this issue as it is causing my tests to fail. I need both strings to represent the same method in order to calculate the significant figures