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
[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
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:
>
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/