All Questions
Tagged with numbers language-design
3 questions
20
votes
7
answers
3k
views
Why does Java have primitives for different size numbers?
In Java there are primitive types for byte, short, int and long and the same thing for float and double. Why is it necessary to have a person set how many bytes should be used for a primitive value? ...
1
vote
2
answers
193
views
How to implement rounding in an all-purpose stack language using different types?
Disclaimer: If you are not terribly interested in numerics and mathematical processes, this is most likely nothing for you.
I am currently a bit stuck in a development process of a private project I ...
2
votes
2
answers
431
views
Which numeral systems are useful in computer science?
I am wondering which numeral system different programmers are using, or would use if their language has support for them. As an example, in C++ we can use:
Octal by prefixing with 0 (e.g. 0377)
...