New answers tagged integer
2
votes
Simple stack of integers
You’re Throwing Away the Top of the Stack
You increment or decrement your function parameter named top, but that’s just a local temporary variable inside the ...
- 2,781
2
votes
Simple stack of integers
Can I resort to reserving INT_MIN for this?
Yes.
Is this a 'good practice', have unwanted consequences etc?
Not good. This is a poor practice.
The obvious ...
- 26.6k
3
votes
Simple stack of integers
This is a classic example of in-band error signalling, and it's not a good idea (I think you suspect this, having asked about it). You need to separate the data from the error/success status of the ...
- 55.3k
1
vote
Generic Integer Square Root
how one could solve that problem .... (add support for types that are larger than 128 bits)
Found magic number 1257966796 in Implementation of binary floating-point
arithmetic on embedded integer ...
- 26.6k
1
vote
128-bit integer type in GCC/Clang
I don't believe it's necessary to duplicate the the diagnostic pragma sequence. Just ignore those diagnostics once at the beginning of the #if block and pop the ...
- 65.4k
Top 50 recent answers are included
Related Tags
integer × 375c++ × 86
java × 78
c × 76
performance × 48
bitwise × 41
python × 40
strings × 40
beginner × 36
algorithm × 25
formatting × 25
c# × 23
parsing × 22
reinventing-the-wheel × 22
mathematics × 18
converting × 18
assembly × 18
array × 17
javascript × 16
c++11 × 16
number-systems × 15
python-3.x × 14
serialization × 14
floating-point × 13
interview-questions × 11