Actually, the statement that .3 repeating == 1/3 is not *entirely* correct. The more you repeat the 3, the closer it gets to actually being 1/3, but it is NEVER EXACTLY 1/3. Try this: divide 9 by 3. The answer is 3. Now multiply 9 by .3. You get 2.7. Multiply by .33 and you get 2.97. Keep adding 3s and you keep adding 9s in the product. What you never get, however, is 3. It may get so close to 3 as to make a distinction meaningless (depending on what you're doing), but 2.99...7 != 3. For the same reason, .33... != 1/3. Apply that to .99... and you get very close to 1, but never quite there. So I chalk the whole thing up to a floating point rounding error. =-)
~Cybercosis
nemo accipere quod non merere
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|