Click here to Skip to main content
15,886,026 members
Articles / Programming Languages / ASM
Tip/Trick

Radix-16 Powers of Ten less than 255 * ln(65536) / ln(10)

Rate me:
Please Sign up or sign in to vote.
2.00/5 (1 vote)
22 May 2011CPOL 8.7K   1  
Benchmark for breaking the 64-bit barrier imposed by the ulong data type
C# .NET ToString() hexadecimal conversion for a ulong type only delivers the low 16 hex digits of any numeric value. So if you're trying to break the 64-bit barrier for string conversions to base 16 or base 10, you can use the values from the table (for powers of ten less than 101228) at this link as benchmarks or in constructing a table-driven binary-to-decimal string converter:

http://cqvis.yolasite.com/resources/EXPTEN.TXT[^]

It's a rather large file, so be prepared for a download delay if you're outside the U.S.



May 21, 2011
The aforementioned file has been replaced by one with a fixed record format (still a .txt file, though).

A C# struct layout for the file is found here:

http://cqvis.yolasite.com/resources/EXPTEN-S.CS[^]

If you don't modify the file, you can read it as straight binary in this format.

Here's a quicker download (281K for the .zip file as apposed to 1.2M for the uncompressed .txt file):

http://cqvis.yolasite.com/resources/EXPTEN.zip[^]

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
Writer, designer, inventor, musician, observer, and critic with many years of experience in each of these areas. I can do without the approval of "experts" because I believe candid statements and penetrating analysis bring greater rewards than a "pat on the back". And if I have something to say when you're not listening, I tell someone else about it.

Comments and Discussions

 
-- There are no messages in this forum --