bug-kawa
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-kawa] [bug #20123] Can't correctly divide 1307674368000/2874009600


From: anonymous
Subject: [Bug-kawa] [bug #20123] Can't correctly divide 1307674368000/2874009600
Date: Thu, 07 Jun 2007 22:21:38 +0000
User-agent: Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.5 (like Gecko) (Debian)

URL:
  <http://savannah.gnu.org/bugs/?20123>

                 Summary: Can't correctly divide 1307674368000/2874009600
                 Project: Kawa
            Submitted by: None
            Submitted on: Donnerstag 07.06.2007 um 22:21 UTC
                Category: Scheme library
                Severity: 3 - Normal
              Item Group: Bad diagnostic
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

While doing some stochastics with the nice scheme implementation, I tried the
above (i.e. 15!/(12!*3!) ) and get -920/-2 instead of 455.

It seemed a problem with calculating the gcd of the two numbers, because I
got:
#|kawa:31|# (gcd 1307674368000 2874009600)
#|kawa:31|# -1420957696
Which certainly is wrong.

In the end I come two IntNum.java which ignores, if the result will become in
conversation to the 2er complement too big.

I fixed it and it seems two work, see attachment. I also add a simple Test.

Thank You for the great tool!
Helge Dietert



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Donnerstag 07.06.2007 um 22:21 UTC  Name: patchBigInt  Size: 1kB   By:
None

<http://savannah.gnu.org/bugs/download.php?file_id=12985>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?20123>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]