English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Counting bits in a big_int
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-05-12 (04:19)
From: Michael Hoisie <hoisie@b...>
Subject: Re: [Caml-list] Counting bits in a big_int
If you have any arbitrary big_int, n, wouldn't the number of bits be equal to 2^x, where x is the number such that 2^x >= n?

So, if you have 100 (1100100), then the number of bits would be 7, because 2^7>=100. 

Is this what you mean?

-Michael Hoisie

To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners