c++ - What is the fastest way to convert very large binary number representation to decimal representation? -


i've got big number stored in binary representation , need output in decimal representation:

struct biginteger {     int *parts; // 1 part stores 12 bits of number, range: 0 0xfff     int parts_n; };  void converttodecstring( biginteger *in, std::string &out ); 

i can't find approach, in linear time.

for demostration can chose order parts. i've got ordered in way, [0] lowest value, , [n-1] highest value.

i afraid cannot done in linear time, because every read bit affects digits of decimal representation. longer digit, longer every new read bit takes.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -