sponsored links 

2
19th December 20:03
External User
Posts: 1

rational arithmetic library?
taltman@noshpam.lbl.government writes:
Most implementations of Scheme already have rationals. From what I gather, scheme doesn't require rationals, but requires certain relationships with other numerical types to hold, if those other types are implemented. Common Lisp requires support for rationals as well as floats and complex numbers. Since Maxima is implemented in Common Lisp, and, as far as I know, uses the arithmetic operators of the host Lisp, it should support your operations automatically. The algebraic operators are implemented internally, of course, but fall back to the arithmetic operators when possible.  Rahul Jain rjain@nyct.net Professional Software Developer, Amateur Quantum Mechanicist 
8
20th December 09:00
External User
Posts: 1

rational arithmetic library?
cstacy@news.dtpq.com (Christopher C. Stacy) writes:
Oh, I'm sure. But all I want is something where integer division is represented as a tuple of bignums "in simplified form", and where it "promotes" to an integer (fixnum or bignum) when appropriate. Is there a single Scheme that can do this? I think Scott said that SISC can do this; am I quoting you correctly? Thanks, ~Tomer 
10
20th December 20:20
External User
Posts: 1

rational arithmetic library?
taltman@noshpam.lbl.government writes:
I made a mistake: Bigloo does not support rationals: 1:=> rationalize *** ERROR:bigloo:eval: Unbound variable  rationalize #unspecified 1:=> numerator *** ERROR:bigloo:eval: Unbound variable  numerator #unspecified 1:=> denominator *** ERROR:bigloo:eval: Unbound variable  denominator #unspecified 1:=> (/ 10 3) 3.3333333333333 1:=> (/ 1111111111111111111 999999999999999999999999) *** ERROR:bigloo:/: not a number  #l1111111111111111111 #unspecified  ~T 