6 ms·
What can you usefully do with a nominal number, besides input/output and comparing two of them for equality? I don't think you need language support here, libr
by marvy 10y ago
What can you usefully do with a nominal number, besides input/output and comparing two of them for equality? I don't think you need language support here, library support should suffice, unless I'm missing something.
- akkartik 10y agoI was imagining that you could do everything with nominals that you normally do with integers. Arithmetic saving results in nominal numbers would just disable overflow checking. This would allow all operations involving regular numbers to double down and perform extremely strict overflow checking.
- Noseshine 10y agoThe question is (and I think was), what arithmetic do you do with numbers whose values don't matter and what concrete value they happen to have is purely accidental and arbitrary and unimportant.
- akkartik 10y agoFrom the OP, examples of intentional overflow are "..hashing, cryptography, random number generation, and finding the largest representable value for a type."
- Noseshine 10y agoWhich are not categorical variables? Those all are examples using actual numbers, meaning the values matter. > Nominal numbers or categorical numbers are numeric codes, meaning numerals used for identification only. The numerical value is in principle irrelevant, and they do not indicate quantity, rank, or any other measurement. You talked about nominal numbers up to (but excluding) this post. "nominal" means "in name only", so it's a "number", not a number. It just happens to have the same name as a number with a value.
- akkartik 10y agoYes, I'm still calling them nominal numbers, but you can give whatever name you want for "I don't care what the precise results of arithmetic are." I'll stop here because there's nothing I hate more than pedantic arguments about semantics.
- Noseshine 10y agoIt isn't pedantic. You asked about arithmetic of nominal numbers, which makes no sense at all. > "I don't care what the precise results of arithmetic are." This is wrong! That is NOT what "nominal numbers" are! I already quoted it, "nominal numbers" have no value! You are absolutely right though: This conversation has lead nowhere. I'm not sure your identification of who is to blame is correct though. You asked about nominal numbers, and when asked for details your examples all are about actual numbers. When I point that out your reaction is to be offended. How mature. You can't talk about "nominal numbers" and then be miffed that people don't understand that you are not actually talking about nominal numbers at all! I only come to understand that now. Tip: Don't talk about water when you mean sand, and then act confused when someone brings you water instead of sand.
- akkartik 10y agoIf I choose to add my phone number and yours, who's going to stop me? Would the universe explode? Would my phone number not be nominal anymore? It's a sort of "if a tree falls in the forest" question. Regardless of whether you're right or wrong (I just read the wikipedia page and didn't see anything about arithmetic, but maybe you have a phd in math), the essence of pedantry is to continue to insist I used the wrong word even after you understand what I meant.
- Noseshine 10y agoAgain: Nominal numbers have no values. So what "arithmetic" do you want to do? There is no overflow. Because there is no arithmetic with nominal numbers. The examples you quoted above are NOT using nominal numbers. Those are ACTUAL numbers. Those are modulo operations - that is NOT "nominal numbers". Personal attacks won't help, they never do in any discussion. You should seriously consider changing your discussion style. If your question was about modular arithmetic, it confuses two different issues. It would be just a coincidence if the highest number representable with the given amount of bits happens to be the same number you want for your modulo operations. Those are only accidentally related issues.