>>>>> "John" == John Doe <[EMAIL PROTECTED]> writes:

John> In those cases, a rounding up- or downwards with a probability of 0.5 
each can 
John> be appropriate, f.e. 
John> 3.45 => sometimes 3.4, sometimes 3.5

And that's exactly what Perl does.

However *also* keep in mind that 0.1 is not precisely 0.1 (in binary),
in the same way that 1/3 is 0.3333333.... and you got to cut it off
somewhere, so it's always inaccurate.

So, 0.1 * 5 is not necessarily precisely 0.5, where the rounding shifts
will occur.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to