Page d'accueil
Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Login
ENGLISH
Accueil
ENGLISH
Plateforme Level Extreme
Login
Pratiques d'usage
Témoignages
Fichiers
Articles
Abonnement
Abonnez-vous ou renouveller
Bénéfices
Faites un don de 5$
Faites un don de 10$
Faites un don de 15$
Faites un don de 20$
Faites un don de 25$
Profil corporatif
Aperçu
Portfolio
Produits & Services
Services experts-conseils
Service entreprise
Hébergement Site Web
Infographie
Publication de livres
Support
Troubleshooting
Difficultés pour authentifier
Contactez-nous
Légal
Copyright
Politique de confidentialité
Termes & Conditions
English
Bitcount
Message
De
04/12/2014 01:49:05
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden
,
Allemagne
À
04/12/2014 01:44:48
Gregory Adam
Belgique
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re:
Bitcount
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
SAMBA Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01611745
Message ID:
01611748
Vues:
51
>>Hi all,
>>
>>Problem is I need to do do something as a multipple of the bits set on an integer, the integer is a bit array to store statii.
>>
>>I need to figure out how many bits are set on an integer.
>>
>>I know I can loop / iterate through the number and bittest / divide by 2 etc.
>>
>>for now there are not to much so I can do with an ICASE, but I like it generic :)
>>
>>Any ideas for a fast solution? Something mathematical?
>>
>>Lutz
>
http://stackoverflow.com/questions/109023/how-to-count-the-number-of-set-bits-in-a-32-bit-integer
>
http://en.wikipedia.org/wiki/Hamming_weight
>
http://gurmeet.net/puzzles/fast-bit-counting-routines/
>
>- you may have to bitor(intermediateResults, 0) to force them back into a 32 bit integer
>- Test also negative numbers.
WOW
Thanks
>> shift right or does it rotate?
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
Off
There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement
Click here to load this message in the networking platform
Plateforme Level Extreme
Pratiques d'usage
Témoignages
Fichiers
Articles
Abonnement
Abonnez-vous ou renouveller
Bénéfices
Faites un don de 5$
Faites un don de 10$
Faites un don de 15$
Faites un don de 20$
Faites un don de 25$
Profil corporatif
Aperçu
Portfolio
Produits & Services
Services experts-conseils
Service entreprise
Hébergement Site Web
Infographie
Publication de livres
Support
Troubleshooting
Difficultés pour authentifier
Contactez-nous
Légal
Copyright
Politique de confidentialité
Termes & Conditions
Login
Google
Copyright © 1993-2024 par Level Extreme Inc. Tous droits réservés · Site Web conçu par
levelextreme.com