Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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 Archives:
Bug reports: FAQ:
Beginner's list: