Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / ASM

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

2.00/5 (1 vote)
22 May 2011CPOL 8.8K  
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)