Re: converting 64-bit fixed-point to float

2007-07-21 Thread John Machin
On Jul 22, 10:34 am, [EMAIL PROTECTED] (John Fisher) wrote: > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > On Jul 20, 5:59 pm, [EMAIL PROTECTED] (John Fisher) wrote: > > > Hi Group, > > > > troubles with converting signed 32.32, little-endian, 2's complement > > > back to floating point. I have

Re: converting 64-bit fixed-point to float

2007-07-21 Thread John Fisher
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Jul 20, 5:59 pm, [EMAIL PROTECTED] (John Fisher) wrote: > > Hi Group, > > > > troubles with converting signed 32.32, little-endian, 2's complement > > back to floating point. I have been trying to brew it myself. I am > > running Python 2.5 on a Ma

Re: converting 64-bit fixed-point to float

2007-07-21 Thread [EMAIL PROTECTED]
On Jul 20, 5:59 pm, [EMAIL PROTECTED] (John Fisher) wrote: > Hi Group, > > troubles with converting signed 32.32, little-endian, 2's complement > back to floating point. I have been trying to brew it myself. I am > running Python 2.5 on a Mac. Here is the C-code I have been trying to > leverage: >

Re: converting 64-bit fixed-point to float

2007-07-20 Thread Michael Tobis
It appears to be correct for positive numbers. if conval >= 2**16: conval -= 2**32 would appear to patch things up. It's not very pretty, though. You could at least start with input1 = [c_ushort(item) for item in input] instead of your first 9 lines. mt -- http://mail.python.org/mailman/

converting 64-bit fixed-point to float

2007-07-20 Thread John Fisher
Hi Group, troubles with converting signed 32.32, little-endian, 2's complement back to floating point. I have been trying to brew it myself. I am running Python 2.5 on a Mac. Here is the C-code I have been trying to leverage: double FPuint8ArrayToFPDouble(uint8 *buffer, int startIndex) { uin