10 points · by ColinWright · 10y ago · 14 comments
Opinions vary, and it's certainly possible just to come up with a technical definition and say "That's the most convenient, that's what we'll use." But I'm interested to know what the community here on HN thinks.
Is "-3" a whole number?
That should be enough for you to deduce what I believe whole numbers are.
I should add, for a mathematical audience, I'd be careful, because of possible confusion, and insist on saying positive integers, and non-negative integers in the case of what I'd call the natural numbers.
My feeling now is I don't suppose it really matters how you define them. :)
Note that 'real numbers' include 'whole numbers' as a sub-set.
#include <stdio.h>
int main(int argc, char *argv[]) {
int num = -3;
fprintf(stdout, "%d\n", num);
return 0;}
Some people say whole numbers are not negative, while other people say zero is also not a whole number.