When using R I noticed that dividing a number by zero returns infinity.
From a mathematical prospective that is not very accurate and it should be equal to undefined. Now I understand R is a statistical programming language and is not pure mathematics, but I was wondering if NaN
(Not a Number) should be a better way to describe a/0
where a
is a real number.
In other terms, can someone explain to me in simple terms why in R
> 5/0
[1] Inf
while
> 0/0
[1] NaN
Apologies if this was already discussed somewhere else but I could not find it a satisfactory answer.