On Oct 16, 2006, at 6:33 PM, David Balmain wrote:

> Funnily enough the patch reduces the operation to a no-op.

Ah.  Makes sense.

> I guess I
> don't need to worry about endianess here since floats have the same
> endianess as integers.

I believe that the representation is IEEE 754 both on little-endian  
chips like the Intels, and big-endian chips like the PowerPC.  The  
sign bit is indeed the "leftmost" bit in that representation,  
regardless of chip architecture.

Where the float-int union technique (which is also used by KinoSearch  
and CLucene) will fall down is on architectures that don't use IEEE  
754, like VAX.  Then the encode/decode will get all screwed up.

http://www.codeproject.com/tools/libnumber.asp

Fortunately, the 0 .. 255 test will fail, so we'll know about the  
problem when it occurs.  Non-IEEE floats are rare, these days,  
anyhow.  POSH doesn't even support 'em.

> Great. I'm going to swap out POSH for charminizer in Ferret ASAP.

That will be very helpful.  We'll see how soon ASAP is.  :)

> I'll check smoke_test.rb into the base directory
> of the Ferret repo when I'm done.

Grooves.

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/


_______________________________________________
Ferret-talk mailing list
Ferret-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to