<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.3013.2600" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Dear all,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> I'm currently use R v0.99 on Windows 98
Second Edition. I have a question on some simple calculations. I wonder
that I've done something wrong with the calculation.</FONT></DIV>
<DIV><FONT face=Arial size=2>Here is the imput commands:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Courier size=2>> a <- 25.01<BR>> b <- 56.08<BR>>
a.trunc <- trunc(a)<BR>> b.trunc <- trunc(b)<BR>> a.tail <- a -
a.trunc<BR>> b.tail <- b - b.trunc<BR>> a.trunc<BR>[1] 25<BR>>
b.trunc<BR>[1] 56<BR>> a.tail<BR>[1] 0.01<BR>> b.tail<BR>[1] 0.08<BR>>
a.tail <- (a - a.trunc) * 100<BR>> b.tail <- (b - b.trunc) *
100<BR>> a.tail<BR>[1] 1<BR>> b.tail<BR>[1] 8<BR>> N <- ( (b.trunc -
a.trunc) * 12 ) + (b.tail - a.tail)<BR>> N<BR>[1] 379<BR>> N == 379<BR>[1]
FALSE</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> According to the above command and output,
the value of N is equal to 379, but when I set the condition 'N ==
379' R gives "FALSE" as the result. How do I avoid this
problem?? I do the same thing in S-plus 4.0 release 3 on Win98 SE and obtained
the same result.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> I look forward to hear your
reply.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Thank you in advance for your time.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Vincent</FONT></DIV></BODY></HTML>