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

> 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.



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.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: