It really blew my mind when Steve Harris <[EMAIL PROTECTED]> said: > On Thu, Nov 01, 2001 at 08:26:59PM +1100, Erik de Castro Lopo wrote: > > Hi all, > > > > I have recently written a paper titled "Faster Floating Point to Integer >Conversions" > > which can be read here: > > > > http://mega-nerd.com/FPcast/ > > How do the techniques here compare to the bit mangling version that I > posted earlier? It is portable to all 32bit IEEE float systems.
I tested this early on in the testing process and then discarded your method as it was than pulling the float apart with the integer pipeline. By multiplying with that very large constant I believe you end up with number that cannot be properly represented by the 32 bits. When forces to handle these weird numbers (like de-normailised numbers) the FPU takes longer to do its stuff yhan normal. But the benchmarking code is there if you'd like to prove it :-). Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo [EMAIL PROTECTED] (Yes it's valid) +-----------------------------------------------------------+ "Using Java as a general purpose application development language is like going big game hunting armed with Nerf weapons." -- Author Unknown