Re: [R] [External] Funky calculations

2022-02-01 Thread Nathan Boeger
> %s\n", d == 1.0 ? "true" : "false"); > return 0; > } > bill@Bill-T490:~$ gcc a.c > bill@Bill-T490:~$ ./a.out > 0.4+0.3+0.2+0.1 -> 0.99989 > 0.4+0.3+0.2+0.1 == 1.0 -> false > > -Bill > > On Tue, Feb 1, 2022 at 7:01 PM N

[R] Funky calculations

2022-02-01 Thread Nathan Boeger
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