On Mon, Mar 23, 2009 at 2:44 AM, valpa wrote:
> I have a python float 1.2345678. I know that it is stored as a double
> in C type. And I know it actually is 1010101010101 -like format. Then
> I want to do some bit operation on it. How?
>
> Sure, I want a float output when I finish the operation.
J
On Mar 23, 7:44 pm, valpa wrote:
> On 3月23日, 上午3时18分, John Machin wrote:
>
>
>
> > On Mar 23, 5:44 pm, valpa wrote:
>
> > > I have a python float 1.2345678. I know that it is stored as a double
> > > in C type. And I know it actually is 1010101010101 -like format. Then
> > > I want to do some bi
On Mar 23, 8:44 am, valpa wrote:
> Yes, I want to do a & operation.
Right, but what & operation, and why? Are you trying
to do something that's mathematically meaningful?
If so, there may be a better (more portable/faster/clearer)
way than bit-twiddling.
Mark
--
http://mail.python.org/mailman/l
On 3月23日, 上午3时18分, John Machin wrote:
> On Mar 23, 5:44 pm, valpa wrote:
>
> > I have a python float 1.2345678. I know that it is stored as a double
> > in C type. And I know it actually is 1010101010101 -like format. Then
> > I want to do some bit operation on it. How?
>
> > Sure, I want a float
On Mar 23, 5:44 pm, valpa wrote:
> I have a python float 1.2345678. I know that it is stored as a double
> in C type. And I know it actually is 1010101010101 -like format. Then
> I want to do some bit operation on it. How?
>
> Sure, I want a float output when I finish the operation.
import struct
I have a python float 1.2345678. I know that it is stored as a double
in C type. And I know it actually is 1010101010101 -like format. Then
I want to do some bit operation on it. How?
Sure, I want a float output when I finish the operation.
--
http://mail.python.org/mailman/listinfo/python-list