On Wed, 28 May 2003 15:59:45 +0100 (BST), Prof Brian Ripley
<[EMAIL PROTECTED]> wrote:


>> print(c(0.1 + 0.2, 0.3), digits=20)
>[1] 0.30000000000000004 0.29999999999999999
>
>yet
>
>> print(c(0.1, 0.2, 0.3), digits=20)
>[1] 0.1 0.2 0.3

Is this the way things should work?  Why isn't 0.3 printed as
0.30000000000000000 the first time, or as 0.29999999999999999 the
second time?  Surely its value is the same in both print statements,
and the requested format is the same in both.  

Duncan Murdoch

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to