[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Re: Binary-Decimal conversion for extremely large integers
Nick Maclaren schrieb:
Thorsten Siebenborn <7_born@xxxxxx> wrote:
I am talking about numbers with thousands or even millions of
binary digits.
I don't see the relevance to this mailing list, but still :-)
True. I was hoping that with the advent of higher precision (64-bit
processors, 128-bit quad precision or staggered precision with IEEE
(Priest) which may have much more bits) there are some algorithms
which can be modified to work with arbitrary precision.
I knew that some people posting here are working with
arbitrary-precision libraries like GMP/MPFR and I hoped that
they know the current best approach.
As discussing normal approaches is hard to defend for IEEE issues,
I am retracting the question and discuss it privately. Sorry.
[...]
But if you use long division, the division must be splitted
into several chunks and the algorithm must correct the bits
accordingly which in fact is prohibitively expensive.
So expensive that in fact nine runs of my algorithm is still faster
than one run with long division; the longer the number, the better
the add/shift algorithm.
Grrk. That doesn't sound like a very good divide instruction.
It certainly USED to be dire, but that was ages ago. You might
try asking Terje Mathisen on comp.arch.arithmetic.
Thank you very much. comp.arch.arithmetic is a good resource;
I have found an interesting papers discussing the different
approaches like Goldschmidt, Byte Division, Restoring Division etc.
Best,
Thorsten