Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente |
helloworld:algorithms:numbers [2017/08/02 17:35] – Ajout d'un lien root | helloworld:algorithms:numbers [2019/10/25 11:21] (Version actuelle) – [Pleins d'algorithmes sur les bits] : Dans les sources, on utilise le titre d'origine root |
---|
[[http://graphics.stanford.edu/~seander/bithacks.html|La bible des bits]], {{ :helloworld:algorithms:numbers:bit_twiddling_hacks.maff |Archive}} | ====Pleins d'algorithmes sur les bits==== |
| |
| [[http://graphics.stanford.edu/~seander/bithacks.html|Bit Twiddling Hacks]] {{ :helloworld:algorithms:numbers:bit_twiddling_hacks_2019-10-25_11_12_41_.html |Archive du 04/02/2011 le 25/10/2019}} |
=====Déterminer le nombre de bits levés dans un nombre===== | =====Déterminer le nombre de bits levés dans un nombre===== |
Code C : (dépendant de gcc) | Code C : (dépendant de gcc) |
__builtin_popcount(i); | __builtin_popcount(i); |
</code> | </code> |
[[https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html|Using the GNU Compiler Collection (GCC): Other Builtins]] {{ :helloworld:algorithms:numbers:using_the_gnu_compiler_collection_gcc_other_builtins.maff |Archive}} | [[https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html|Using the GNU Compiler Collection (GCC): Other Builtins]] {{ :helloworld:algorithms:numbers:using_the_gnu_compiler_collection_gcc_other_builtins_2019-10-25_11_12_49_.html |Archive v10.0.0 du 25/10/2019}} |
| |
Code C# : | Code C# : |
</code> | </code> |
| |
[[http://stackoverflow.com/questions/109023/how-to-count-the-number-of-set-bits-in-a-32-bit-integer|Source]], {{:helloworld:algorithms:numbers:algorithm_-_how_to_count_the_number_of_set_bits_in_a_32-bit_integer_-_stack_overflow.maff|Archive}} | [[http://stackoverflow.com/questions/109023/how-to-count-the-number-of-set-bits-in-a-32-bit-integer|How to count the number of set bits in a 32-bit integer?]] {{ :helloworld:algorithms:numbers:algorithm_-_how_to_count_the_number_of_set_bits_in_a_32-bit_integer_-_stack_overflow_2019-10-25_11_12_59_.html |Archive du 20/09/2008 le 25/10/2019}} |