Subject: Re: bug#13031: large numbers

From: Jozef Chraplewski <[email-masked]>
Date: Mon, 3 Dec 2012 17:35:17 +0100

Hey guys,

Sorry for the late response, I was offline during the weekend.

@Mark, you can find output in attachment.

gcc -v

Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~67/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~67/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

brew info gmp

gmp: stable 5.0.5
http://gmplib.org/
/usr/local/Cellar/gmp/5.0.5 (11 files, 2.3M) *
https://github.com/mxcl/homebrew/commits/master/Library/Formula/gmp.rb
==> Options
--32-bit
	Build 32-bit only

Best,
Jozef

On Dec 1, 2012, at 6:22 AM, Mark H Weaver <[email-masked]> wrote:

>  (let ((modulus (expt 10 10)))
>    (define (last10 n) (modulo n modulus))
>    (let loop ((n 1) (sum 0))
>      (if (> n 1000)
>          (last10 sum)
>          (let* ((term (expt n n))
>                 (sum (+ sum term)))
>            (format #t "~4@a ~10@a ~10@a~%" n (last10 term) (last10 sum))
>            (loop (+ n 1) sum)))))