[Tutor] while loop ends prematurly

Walter Prins wprins at gmail.com
Mon Jan 2 15:02:58 CET 2012

Hi again,

On 2 January 2012 06:28, Steven D'Aprano <steve at pearwood.info> wrote:
>> Another answer is to use Decimal class, which CAN represent decimal values
>> exactly.
> That only applies to decimal values which can be represented using a fixed
> number of decimal places. So 1/5 is fine, and is 0.2 exactly, but 1/3 is
> not, since it would require an infinite number of decimal places.

It's occurred to me that I should've probably used the term "exact
decimal" in my comment, so please read it as such.  (The general class
of decimals include 3 types of decimals: exact, recurring and
non-recurring.  Generally when people use the word decimal they tend
to mean "exact decimals".  Apologies for not being clearer.)


More information about the Tutor mailing list