Re: How to convert float to sortable integer in Python

2007-04-30 Thread John Machin
On Apr 30, 11:23 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > DEAR SIR, > > I SAW YOUR INTERNET QUESTION AND I HAVE THE SAME TROUBLE. > > CUOLD YOU HELP ME TO MAKE A FLOAT TO INTEGER CONVERTION? > > DO YOU HAVE ANY EXEL FILE THAT CAN DO THAT? > > REGARDS AND THANKS A LO

Re: How to convert float to sortable integer in Python

2007-04-30 Thread Larry Bates
[EMAIL PROTECTED] wrote: > DEAR SIR, > I SAW YOUR INTERNET QUESTION AND I HAVE THE SAME TROUBLE. > CUOLD YOU HELP ME TO MAKE A FLOAT TO INTEGER CONVERTION? > DO YOU HAVE ANY EXEL FILE THAT CAN DO THAT? > REGARDS AND THANKS A LOT > > IVAN REYES > > ___ > > AVISO LE

Re: How to convert float to sortable integer in Python

2007-01-17 Thread Gabriel Genellina
At Wednesday 17/1/2007 03:36, shellon wrote: I'm sorry I mistake the function name, the function is floatToRawIntBits(), it convert ieee 754 floating point number to integer, e.g. if f1>f2 then floatToRawBits(f1) > floatToRawBits(f1) I want convert floating point number to sortable string to in

Re: How to convert float to sortable integer in Python

2007-01-16 Thread Carl Banks
shellon wrote: > I'm sorry I mistake the function name, the function is > floatToRawIntBits(), it convert ieee 754 floating point number to > integer, e.g. if f1>f2 then floatToRawBits(f1) > floatToRawBits(f1) You can get the raw bits of a floating point number by packing into a string then unpac

Re: How to convert float to sortable integer in Python

2007-01-16 Thread shellon
I'm sorry I mistake the function name, the function is floatToRawIntBits(), it convert ieee 754 floating point number to integer, e.g. if f1>f2 then floatToRawBits(f1) > floatToRawBits(f1) I want convert floating point number to sortable string to index in Lucene, so I want first to conver the flo

Re: How to convert float to sortable integer in Python

2007-01-16 Thread Wolfgang Grafen
shellon wrote: > Hi all: > I want to convert the float number to sortable integer, like the > function float2rawInt() in java, but I don't know the internal > expression of float, appreciate your help! > You should know you can sort mixed float/integer values in Python >>> l=[3,2.3,1.45,2,5]

Re: How to convert float to sortable integer in Python

2007-01-16 Thread Duncan Booth
robert <[EMAIL PROTECTED]> wrote: > shellon wrote: >> Hi all: >> I want to convert the float number to sortable integer, like the >> function float2rawInt() in java, but I don't know the internal >> expression of float, appreciate your help! >> > > float comparision works well enough for sor

Re: How to convert float to sortable integer in Python

2007-01-16 Thread robert
shellon wrote: > Hi all: > I want to convert the float number to sortable integer, like the > function float2rawInt() in java, but I don't know the internal > expression of float, appreciate your help! > float comparision works well enough for sorting in Python. What is the actual requiremen

Re: How to convert float to sortable integer in Python

2007-01-16 Thread Steven D'Aprano
On Tue, 16 Jan 2007 01:21:52 -0800, shellon wrote: > Hi all: > I want to convert the float number to sortable integer, like the > function float2rawInt() in java, but I don't know the internal > expression of float, appreciate your help! Google says: Your search - float2rawInt - did not matc