Mombu the Science Forum sponsored links

Go Back   Mombu the Science Forum > Science > rational arithmetic library?
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
11 20th December 20:20
devore
External User
 
Posts: 1
Default rational arithmetic library?



Check out http://www.linalg.org. You can download extensive C++ code there
for the exact solution of matrix problems. Rational arithmetic is
usually not the best thing to use for integer matrix problems, execpt
perhaps that it may be required in the final steps if the answers
themselves are rational.
  Reply With Quote


  sponsored links


12 20th December 20:20
marco antoniotti
External User
 
Posts: 1
Default rational arithmetic library?



But any CL implementation does. A piece of advice: bite the bullet!
Switch to CL

Cheers
--
Marco
  Reply With Quote
13 20th December 20:21
External User
 
Posts: 1
Default rational arithmetic library?


devore@math.udel.edu (Carl Devore) writes:

Why so? I need the answers to be exact, not approximate. My matrix
starts with positive & negative integers between -2 and 2. In the
worst-case, I can imagine a bignum implementation chewing up a lot of
resources. But I imagine that the average case will be acceptable (I
need accuracy, not speed).

--
()
  Reply With Quote
14 20th December 20:21
richard fateman
External User
 
Posts: 1
Default rational arithmetic library?


You don't say what you are doing, or how long you expect
your computation to take.

There are studies that suggest
doing some exact operations can be done more efficiently
by using finite field arithmetic (perhaps several times)
and sticking the pieces together with the Chinese Remainder
Algorithm. e.g. McClellan's work on exact solution of linear
equations using modular arithmetic.

You might also look at papers on "Exact Linear Algebra"
by Ashoff
(try google).
  Reply With Quote
15 21st December 08:49
dscheers
External User
 
Posts: 1
Default rational arithmetic library?


Perhaps i am way out of league here, if so, tell me.

We developed a library for Windows. That is for use under Visual Basic
and C++.

All functions are for big numbers (theoreticly no limit except RAM)
and
they are all based on rational number calculation.

Functions:http://www.big-numbers.com/forum/viewtopic.php?t=12

Download:http://www.big-numbers.com/forum/viewtopic.php?t=27&sid=b5588871941e2916514af64e861825fb

Site: http://www.big-numbers.com

David
  Reply With Quote
16 22nd December 11:47
johan kullstam
External User
 
Posts: 1
Default rational arithmetic library?


"Scott G. Miller" <scgmille@freenetproject.org> writes:

I think your definition of "bignum" differs from mine (I am coming
from common-lisp and terminology will not be the same). I take
"bignum" to mean an arbitrarily large integer (well, there is finite
memory available, but certainly thousands of bits should be viable).

I would assume that an implementation keeps track of how many words
are in the bignum. To add two bignums, it could apply machine code to
"add" followed by a series "add with carry" operations as needed.

From the CLHS
The type bignum is defined to be exactly (and integer (not fixnum)).

Where fixnum is some fixed range of integers (range at least as large
as 16 bit signed integers for common-lisp).

Being limited to a certain number of bits, e.g., 32, is what I consider
the definiting atribute of being a fixnum and, hence, specifically
disallowed by the term bignum.


Johan KULLSTAM <kullstj-nn@comcast.net> sysengr
  Reply With Quote
17 22nd December 11:47
christophe rhodes
External User
 
Posts: 1
Default rational arithmetic library?


Johan Kullstam <kullstj-nn@comcast.net> writes:

A limitation of 32 bits for a bignum might be serious. (I wouldn't be
happy with it :-). A limitation of 2^32 bits is significantly less so
in practical terms.

Christophe
--
http://www-jcsu.jesus.cam.ac.uk/~csr21/ +44 1223 510 299/+44 7729 383 757
(set-pprint-dispatch 'number (lambda (s o) (declare (special b)) (format s b)))
(defvar b "~&Just another Lisp hacker~%") (pprint #36rJesusCollegeCambridge)
  Reply With Quote
18 22nd December 11:47
scott g. miller
External User
 
Posts: 1
Default rational arithmetic library?


Yes. I think he misread. The maximum bignum in SISC would occupy about
270mb of memory (2.1 billion bits) in a single number, which would be
pretty impractical to use in real computations. The limitation, fwiw,
comes out of the Java BigInteger class, which has several methods which
operate on bits indexed by a Java int, which is a signed 32 bit integer.
That means the largest addressable bit by those operators is (-
(expt 2 31) 1)

Scott
  Reply With Quote
19 22nd December 11:47
johan kullstam
External User
 
Posts: 1
Default rational arithmetic library?


Christophe Rhodes <csr21@cam.ac.uk> writes:

D'oh. I totally misread that then. Sorry, my bad.

--
Johan KULLSTAM <kullstj-nn@comcast.net> sysengr
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666