[R] Funky calculations

Kevin Thorpe
Tue, 01 Feb 2022 16:34:13 -0000

This looks like a version of FAQ 7.31.

> On Feb 1, 2022, at 8:45 AM, Nathan Boeger <nboeger at gmail.com>
wrote:
>
> [You don't often get email from nboeger at gmail.com. Learn why this is
important at http://aka.ms/LearnAboutSenderIdentification.]
>
> Hello,
>
> I found something strange and maybe I am going nuts but this does not make
> sense:
>
>> (0.4 + 0.2 + 0 + 0.3 + 0 + 0.1) > 1
> [1] TRUE
>
> I tried it on my mac M1 (R v4.1.2) and my Linux box (R v4.0.4). If I use
> other values, it does not work (see below). It seems only that combination,
> granted I did not try them all.
>
>> (0.4 + 0.2 + 0 + 0.2 + 0 + 0.2) > 1
> [1] FALSE
>
> Am I missing something?
>
> Cheers
>
> -nb
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.


--
Kevin E. Thorpe
Head of Biostatistics,  Applied Health Research Centre (AHRC)
Li Ka Shing Knowledge Institute of St. Michael?s Hospital
Assistant Professor, Dalla Lana School of Public Health
University of Toronto
email: kevin.thorpe at utoronto.ca  Tel: 416.864.5776  Fax: 416.864.3016