Re: Lengthy numbers

Liste des GroupesRevenir à cl python 
Sujet : Re: Lengthy numbers
De : no.email (at) *nospam* nospam.invalid (Paul Rubin)
Groupes : comp.lang.python
Date : 24. Dec 2024, 00:03:01
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <875xna9f4q.fsf@nightsong.com>
References : 1 2 3
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Oscar Benjamin <oscar.j.benjamin@gmail.com> writes:
To solve that problem conversions from string->int and
int->string were disallowed.

The obvious conversion algorithms use quadratic time but it seems to me
that O(n log n) is doable with some careful programming.  For example,
people have computed pi to billions or trillions of decimal places.

I believe GMP uses the Toom-Cook algorithm for multiplication once the
numbers are big enough.  I don't know whether that is also used for
decimal conversions.

Page 14 of http://maths-people.anu.edu.au/~brent/pd/rpb032.pdf discusses
base conversion.  That link is from a stackexchange thread that I found
with web search.

Date Sujet#  Auteur
23 Dec 24 * Re: Lengthy numbers5Oscar Benjamin
23 Dec 24 +* Re: Lengthy numbers3Stefan Ram
24 Dec 24 i`* Re: Lengthy numbers2Paul Rubin
24 Dec 24 i `- Re: Lengthy numbers1Stefan Ram
24 Dec 24 `- Re: Lengthy numbers1Paul Rubin

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal