Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #197083
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Lengthy numbers |
| Date | 2024-12-23 15:03 -0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <875xna9f4q.fsf@nightsong.com> (permalink) |
| References | <eXx9P.64901$o72.28550@fx01.ams4> <CAHVvXxRQBUhFxdKKUGvR8BAeCmi0p-YZvoD_xdXuusFqcDjdjQ@mail.gmail.com> <mailman.14.1734910364.2912.python-list@python.org> |
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.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar
Lengthy numbers Gilmeh Serda <gilmeh.serda@nothing.here.invalid> - 2024-12-21 11:49 +0000
Re: Lengthy numbers (Posting On Python-List Prohibited) Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-21 21:03 +0000
Re: Lengthy numbers (Posting On Python-List Prohibited) Gilmeh Serda <gilmeh.serda@nothing.here.invalid> - 2024-12-22 09:18 +0000
Re: Lengthy numbers (Posting On Python-List Prohibited) Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-23 23:06 +0000
Re: Lengthy numbers Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2024-12-22 23:32 +0000
Re: Lengthy numbers Paul Rubin <no.email@nospam.invalid> - 2024-12-23 15:03 -0800
Re: Lengthy numbers Paul Rubin <no.email@nospam.invalid> - 2024-12-23 15:38 -0800
csiph-web