> -----Original Message----- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Giovanni Petris > Sent: Thursday, August 06, 2009 3:00 PM > To: milton.ru...@gmail.com > Cc: r-help@r-project.org; daniel.gerl...@geodecapital.com > Subject: Re: [R] Why is 0 not an integer? > > > I ran an instant experiment... > > > typeof(0) > [1] "double" > > typeof(-0) > [1] "double" > > identical(0, -0) > [1] TRUE > > Best, > Giovanni
But 0.0 and -0.0 have different reciprocals > 1.0/0.0 [1] Inf > 1.0/-0.0 [1] -Inf Bill Dunlap TIBCO Software Inc - Spotfire Division wdunlap tibco.com > > > By the way: > > > > Are there difference between -0 and 0? > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.