[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The next exercise
From: |
Andy Moreton |
Subject: |
Re: The next exercise |
Date: |
Sun, 11 Dec 2022 19:48:19 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
On Fri 09 Dec 2022, Michael Heerdegen wrote:
> Gregory Heytings <gregory@heytings.org> writes:
>
>> M-: (expt 1001 1000) RET
>
> Wow, Tomas and Gregory, thanks for the hint - I had forgotten that even
> "normal" Emacs Lisp can do it exactly. Wonderful.
>
> (substring (number-to-string (expt 10001 10000)) 0 4) is too much,
> however (Arithmetic overflow error).
>
> Michael.
Emacs can still do that:
(let ((integer-width 200000))
(substring (number-to-string (expt 10001 10000)) 0 4))
=> "2718"
AndyM
- Re: The next exercise, (continued)
- Re: The next exercise, Michael Heerdegen, 2022/12/09
- Re: The next exercise, Emanuel Berg, 2022/12/10
- Re: The next exercise, Michael Heerdegen, 2022/12/11
- Re: The next exercise, Emanuel Berg, 2022/12/15
- Re: The next exercise, Michael Heerdegen, 2022/12/15
- Re: The next exercise, Michael Heerdegen, 2022/12/15
- Re: The next exercise, Michael Heerdegen, 2022/12/15
- Re: The next exercise, Emanuel Berg, 2022/12/17
- Re: The next exercise, Michael Heerdegen, 2022/12/17
- Re: The next exercise, Emanuel Berg, 2022/12/20
- Re: The next exercise,
Andy Moreton <=
- Re: The next exercise, Michael Heerdegen, 2022/12/11
- Re: The next exercise, Emanuel Berg, 2022/12/15
- Re: The next exercise, Emanuel Berg, 2022/12/10
Re: The next exercise, Emanuel Berg, 2022/12/09