Re: Binary representation of floating point numbers

2005-12-15 Thread Torsten Bronger
Hallöchen! Sorry for the late response, but the subject didn't catch my attention ... Mike Meyer <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] writes: > >> In float mode, the instrument returns a sequence of bits that are >> exactly the ieee754 number in the case of floats, or just the >> flag

Re: Binary representation of floating point numbers

2005-12-07 Thread 63q2o4i02
That looks pretty cool. I'll try it out. thanks Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Binary representation of floating point numbers

2005-12-06 Thread Bengt Richter
On Tue, 06 Dec 2005 22:51:03 -, Grant Edwards <[EMAIL PROTECTED]> wrote: >On 2005-12-06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> The only way to get the flags is as a float, either through an >> ascii string or a true float. > >That's perverse. > >Really. > >Somebody needs to be sl

Re: Binary representation of floating point numbers

2005-12-06 Thread 63q2o4i02
Actually that's probably the easiest way. I may want to use shorter variable names :) thanks michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Binary representation of floating point numbers

2005-12-06 Thread Mike Meyer
[EMAIL PROTECTED] writes: > In float mode, the instrument returns a sequence of bits that are > exactly the ieee754 number in the case of floats, or just the flags in > the case of flags. PyVisa, when set to float mode, will convert > everything to float, because it is unaware apriori that one of

Re: Binary representation of floating point numbers

2005-12-06 Thread Grant Edwards
On 2005-12-06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > The only way to get the flags is as a float, either through an > ascii string or a true float. That's perverse. Really. Somebody needs to be slapped. > The value of the float, however, is representable as 24 bits > of normal binar

Re: Binary representation of floating point numbers

2005-12-06 Thread 63q2o4i02
Ok, I figured it out... The only way to get the flags is as a float, either through an ascii string or a true float. The value of the float, however, is representable as 24 bits of normal binary. So for example, the value returned is +4.608400E+04 which is really an int, 46084, which is more eas

Re: Binary representation of floating point numbers

2005-12-06 Thread 63q2o4i02
Hi, okay, let me be more concise. The lab equipment has two formatting modes, ascii, and float. In ascii mode, it returns strings that represent the numeric value, so e.g. 3.14 is returned as '3.14'. PyVisa, when set to read ascii mode, will convert these strings to float with "visa.read_values

Re: Binary representation of floating point numbers

2005-12-06 Thread Mike Meyer
[EMAIL PROTECTED] writes: > Hi, > I'm using python to run some lab equipment using PyVisa. When I read a > list of values from the equipment, one of the fields is 32 bits of > flags, but the value is returned as a floating point number, either in > ASCII format, or pure binary. Value returned by

Re: Binary representation of floating point numbers

2005-12-06 Thread Grant Edwards
On 2005-12-06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I'm using python to run some lab equipment using PyVisa. When I read a > list of values from the equipment, one of the fields is 32 bits of > flags, but the value is returned as a floating point number, either in > ASCII format, or pur