Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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