About the rounding function

Friends: Can you help me clarify why the round function is acting up or is just me?

round(2789.1234893,digits = 4)
[1] 2789.124
round(2789.1234893,digits = 5)
[1] 2789.123
round(2789.1234893,digits = 3)
[1] 2789.123

This is because of the truncated printing in the console.

Enter this and you will see that the result is TRUE:

round(2789.1234893,digits = 4) == 2789.1235

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.