Hacker News new | past | comments | ask | show | jobs | submit login

It seems bizarre to call the first group of methods "decimal based" when the methods don't ever look at the decimal digits of the number being tested. I would call them "arithmetic" or something like that.



Or "representation independent", although the ones that rely on the number being less than INT_MAX obviously rely on some knowledge of the representation.


It's decimal as in base 10, as opposed to binary.


But they aren't in base 10. The constant mentioned might as well have been put into the code in hex or octal and nothing would have changed. (I don't know whether C support binary constants.)


I didn't write the article; I'm just giving the rationale. You don't need to take it out on me.


No offense intended.




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

Search: