Follow-up Comment #1, bug #38640 (project gnustep):
More info:
We occasionally see things like this in the fpconfigloader log and in
configuration change confirmation emails:
2012-06-26 16:12:51.402 fpconfigloader[15552] Property "www" changed:
2012-06-26 16:12:51.402 fpconfigloader[15552] loadImbalanceFactor changed:
"1.9" => "1.9"
which is harmless but annoying. This turns out to be because the load
imbalance factor comes from the portal as an integer string, "90", which is
converted as follows:
[self setLoadImbalanceFactor:[NSNumber
numberWithDouble:(((double)[[soap_property
objectForKey:@"loadImbalanceFactor"] unsignedIntValue])/100.0) + 1.0]];
more concisely summarized as, essentially:
x = 90 / 100.0 + 1.0;
which is 1.9, but that can't be represented exactly, and actually results in
1.8999999999999999.
The problem is that -[NSString doubleValue], which is used by FPFile.m when
parsing stored dynamic config files, ends up calling GSScanDouble in
NSScanner.m, which does not use atof or strtod, instead using its own
home-grown parser that returns:
1.9000000000000001
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?38640>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-gnustep