Tim Rowledge tim at rowledge.org
Tue May 3 03:19:18 UTC 2005

Minor problem with this when 64bitting it.

There is a loop that tries to quickly check for any zero values by extracting
the floats as plain ints and comparing with (int)0. So far as I can work out
from webpages purporting to explain the IEEE float standard this misses out
half the possible 0 values since the S bit can be 0 or 1.

Is there anybody out there with a good grip on the IEEE stuff that can confirm,
deny, explain this? The code in question is (the C code generated, that is):-

	rcvrPtr = ((float *) (interpreterProxy->firstIndexableField(rcvr)));

	/* Check if any of the argument's values is zero */

	argPtr = ((float *) (interpreterProxy->firstIndexableField(arg)));
	for (i = 0; i <= (length - 1); i += 1) {
		if ((longAt(argPtr + i)) == 0) {
			return interpreterProxy->primitiveFail();

Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
World Ends at Ten! Pictures at 11 on Fox News!

More information about the Squeak-dev mailing list