Hacker News new | ask | show | jobs
by juki 2188 days ago
> There are infinite numbers between 4.0 and 6.0 but only one of them is a prime.

Primality only applies to natural numbers, so there can't be primes between 4.0 and 6.0. There is one between 4 and 6, but that's a finite range.

1 comments

The concept holds. Perhaps the example isn't great, I'm not sure - but since when does 'the set of numbers between 4.0 and 6.0' not include the natural number 5?
That's a set of real numbers, and primality is not defined for real numbers, so 5.0 can't be a prime. The whole concept is just not applicable unless were talking about natural numbers, in which case the set is finite.
Who said it's the set of real numbers? I don't remember adding any notation that specified the set must be real numbers.