On Fri, Dec 09, 2022 at 08:58:32PM +0100, Michael Heerdegen wrote: > Gregory Heytings writes: > > > M-: (substring (number-to-string (expt 1001 1000)) 0 3) RET > > > > "271" > > Yes - correct! > > My expectation was that someone would try Emacs Calc. Because it can > compute the number exactly - all digits. These days, Emacs Lisp can, too (that was my mulling about the gmp thingy ;-) So... (let ((n 1) (exp 1000)) (while (> exp 0) (setq n (* n 1001) exp (1- exp))) n) also gives the exact number (guile is a /dash/ faster, but Emacs Lisp ain't bad, either ;-) AFAIK, Emacs uses libgmp for that. Cheers -- t