Kĩnũthia Mũchane wrote:
On 06/12/2011 08:13 PM, Steven D'Aprano wrote:
Unfortunately, many common fractions cannot be written exactly in
binary. You're probably familiar with the fact that fractions like 1/3
cannot be written exactly in decimal:
1/3 = 0.... goes on forever
Does it?
On 06/12/2011 08:13 PM, Steven D'Aprano wrote:
Ryan Strunk wrote:
Hi everyone,
I'm designing a timeline. When the user presses the right arrow, 0.1 is
added to the current position. The user can add events to the
timeline, and
can later scroll back across those events to see what they are. But
2011/6/13 Steven D'Aprano
> Okay fine, so "1024" stored as a number only requires 10 bits (binary
>>> digits) to store,
>>>
>>
>> Actually, 11. :-)
>>
>
>
> I see your smiley, but actually more than that.
OK, this was the math, I just told that 10 bits were not enough for 2^10.
>
> And if you'
Válas Péter wrote:
2011/6/12 Brett Ritter
Okay fine, so "1024" stored as a number only requires 10 bits (binary
digits) to store,
Actually, 11. :-)
I see your smiley, but actually more than that. Due to the way computers
are designed, numbers are stored in fixed bundles of 8 bits making a
Nathan wrote:
who can tell me how to unsubscribe the message.
Look at the bottom of every single message to the mailing list, and you
will see this:
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
--
Steven
_
2011/6/12 Brett Ritter
>
> Okay fine, so "1024" stored as a number only requires 10 bits (binary
> digits) to store,
Actually, 11. :-)
Another point that was still not emphasized enough: that's why Python's
documentation at
http://docs.python.org/dev/library/stdtypes.html#mapping-types-dict say
"Nathan" wrote
Every message tells you:
who can tell me how to unsubscribe the message.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
--
who can tell me how to unsubscribe the message.
At 2011-06-13 01:13:05,"Steven DAprano" wrote:
>Ryan Strunk wrote:
>> Hi everyone,
>> I'm designing a timeline. When the user presses the right arrow, 0.1 is
>> added to the current position. The user can add events to the timeline, and
>> can l
Ryan Strunk wrote:
Hi everyone,
I'm designing a timeline. When the user presses the right arrow, 0.1 is
added to the current position. The user can add events to the timeline, and
can later scroll back across those events to see what they are. But
something I absolutely don't understand is happen
> dictionary = {3.1014: value, 2.1005: value,
> 1.0999: value}
> Why is this happening? The output is telling me 3.1, but the value isn't
It's a quirk of how computers store floating point numbers.
While humans mentally tend to treat everything as characters (a
Hi everyone,
I'm designing a timeline. When the user presses the right arrow, 0.1 is
added to the current position. The user can add events to the timeline, and
can later scroll back across those events to see what they are. But
something I absolutely don't understand is happening:
I used the progr
11 matches
Mail list logo