"Edward C. Jones" <[EMAIL PROTECTED]> writes:
> Recently I needed some information about the floating point numbers on
> my machine. So I wrote a tiny C99 program with the line
>
> printf("%a\n", DBL_EPSILON);
>
> The answer was "0x1p-52".
>
> A search of comp.lang.python shows that I was not alo
Josiah Carlson <[EMAIL PROTECTED]> wrote:
unsigned
vv
> For 64 bit signed integers:
> struct.pack("Q",...)
> struct.unpack("Q",...)
My fingers were typing too fast (I do much work with unsigned 64 bit
integers, but not much with unsigned ones).
- Josiah
___
"Edward C. Jones" <[EMAIL PROTECTED]> wrote:
> 3. Add full "tostring" and "fromstring" capabilities for Python numeric
> types. "tostring(x)" would return a string containing the binary
> representation of x. For example, if x is a Python float, "tostring(x)"
> would have eight characters. "fr
Edward C. Jones wrote:
> The documentation should discuss portability.
This is the critical issue here. Discussing portability is not
enough; these features really ought to be either available on
a majority of the installations, or not available at all.
In particular, they would need to be availab
Recently I needed some information about the floating point numbers on
my machine. So I wrote a tiny C99 program with the line
printf("%a\n", DBL_EPSILON);
The answer was "0x1p-52".
A search of comp.lang.python shows that I was not alone. Here are some
ideas.
1. Add to Python the constants in