[SciPy-user] Convert int 64bits to float
Thu Feb 26 13:16:31 CST 2009
On Thu, Feb 26, 2009 at 04:23, Ross Williamson <email@example.com> wrote:
> Hi everyone
> I need to convert a set of bits (64) held in an int64 variable to the
> equivalent (bit) float64.
> e.g. number = 5975615269021 - float(number) will not work it will just
> convert it to 5975615269021.00 not whatever it is as a float from the
> raw bits.
In : x = int64(5975615269021)
In : x.view(float64)
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the SciPy-user