Here is one of simple methods enum pow of 2 decimal
representation.
In the testing app only final power of two in
decimal is written in to file, yet all off previous
pow of 2 are also being converted and you can easily
figure out how to use the code writing them all like
1
2
4
8
16 etc.
As to the test app - it asks you to write exponant for 2
and then enumarates all decimal representation of pow of 2
upto the given. The final result is written to file Pof2
(it might be quite a size if you ask to convert 2^200000
for example) with absolutly accurate precision.

To look inside file filled with decimal digits is better
using fast editors like Hiew in text mode and word wrap set.

I want to stress again - it's fast for ENUM not for converting
only given 2^x.
The rison why the app doesn't write all of them - that
it's a lot of digits more (after 2^970) than 15*n^2 + 4n where n
is tens in exponats i.e. 2^(n*10)
Also need some simbols to separate them.
Thus the app writes to file only last power of 2 though creates decimals for
all of them.

For converting only given power of 2 into decimal
is better use different method, for convertion big binary into decimals.
For example to convert 100 000 * 32 bits binary number.
If anyone interested I could write example how to convert
1000ths bits bynary number into decimals representation.

Don't know why I decided post it here :)
Just for fun, might one could use the idea, it's very simple one,
for addition big numbers for example without conveting in binary
given result in dec.
The few lines of code that do the job is part in fillfile proc.

You might specify any power of two, though 2^100000 will take a ~ munite -
remember - it will convert in the case all pof2 from 2^0 ... 2^100000
into dec. Creating more than 15*(10000^2)+400000 digits.

Specify exponant.
Press button.
When controls enabled - look into file (remember word wrap!)
Posted on 2004-02-01 07:14:02 by The Svin
Hi

try out my one, it's even faster.

Hagen
Posted on 2004-02-02 05:13:55 by Hagen
Quite big one :) Does it enum powers or only write one spefied?
If it only writes one specified - I can show you more than sqrt faster :) Not just even :)))
Posted on 2004-02-02 05:18:57 by The Svin
I also can not see source and wander why you submit it here, if
don't source what is the purpose :))
Posted on 2004-02-02 05:24:48 by The Svin
Hi Svin,

Yes it's big, because it contains a lot of GUI of Delphi VCL. This VCL requiere about 300Kb.

My Sources are written in Delphi Pascal and need about 80.000 Lines of assembler and PASCAL. Thus posting it here might be an big nightmare. And even, it is not plain assembler such as needed for this forum.

The purpose is to show that such conversion can be a lot, eg. upto 10.000 times, faster as yours.

You can compute any power to any base that can be handled by available memory space. The result can be converted to any number base between 2 upto 64.

The main purpose of posting this is to accquire a discussion about the underlaying algorithms used.

Best Regards, Hagen
Posted on 2004-02-02 05:46:07 by Hagen
Good tool!
I've played some time with it, and must,
though it's not about enums of pow of 2, the
tool itself for it's job performs very well indeed.
My complements.
It beats all known to me math packages like Maple etc.
Posted on 2004-02-02 07:37:28 by The Svin
"The purpose is to show that such conversion can be a lot, eg. upto 10.000 times, faster as yours."

Hagen, I just fill frustrated being incapeble to explain no metter what :/
You app converting ONE power of two. for example 2^x
My converting ALL from 2^0 to 2^x
It's enum them, that is what it was made for.
Testing app writing just last one.
Look at subj. It satets "Power of 2 ENUM"
Posted on 2004-02-02 07:43:27 by The Svin