GNU bug report logs - #13031
large numbers

Previous Next

Package: guile;

Reported by: Jozef Chraplewski <jozef <at> applicake.com>

Date: Thu, 29 Nov 2012 17:51:02 UTC

Severity: normal

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 13031 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Jozef Chraplewski <jozef <at> applicake.com>
Cc: 13031 <at> debbugs.gnu.org
Subject: Re: bug#13031: large numbers
Date: Sat, 01 Dec 2012 00:22:41 -0500
Hi Jozef,

Jozef Chraplewski <jozef <at> applicake.com> writes:
> It looks that guile returns incorrect results when it works with really big numbers.

Please disregard my earlier request.  Can you please run the following
code and send us the output?

  (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 <at> a ~10 <at> a ~10 <at> a~%" n (last10 term) (last10 sum))
            (loop (+ n 1) sum)))))

    Thanks,
      Mark




This bug report was last modified 12 years and 164 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.