Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

R:

    > 0.1+0.2 == 0.3
    [1] FALSE

?


Why do you compare point to point, it is meaningless? The result for 0.1 + 0.2 shows 0.3. It doesn't show you wrong result. If you print it prints 0.3, nothing else.

Why do you compare point to point? I have never once in my Statistics education compared point to point. You always need to see the probability of the result if it is within 2 points.

But if you want to compare use all.equal(0.1 + 0.2, 0.3)


I thought that's what you mean by "equal". It didn't appear to me that you were merely talking about the default formatting of numbers printed on the REPL, which is utterly inconsequential to developing and porting applications.


R is not used for developing applications. https://www.r-project.org/about.html


This entire subthread is under a comment talking about "productionalizing" code developed in R. If you want to make an argument that R should not be used to make products, but only as an interactive notebook and to make nice plots, maybe make that instead of just mentioning small UI details.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: