Re: computer algebra software



As Richard Fateman said, you may want to learn Scheme or Lisp to be able:
- to use very big exact numbers (integers and rationals p/q)
- to learn a masterpiece of programming :-) whose knowledge is
unvaluable to use other computer algebra software as Mathematica or
Maple...

For example, with a 3 lines function (exptmod a b n) which computes
a^b modulo n, and whose details are given in :
mitpress.mit.edu/sicp/full-text/book/book-Z-H-11.html#%25_sec_1.2.6
I get the following at the DrScheme prompt if I try to raise the number
12345678901236545432 to the power 65434598654321676543234554, working
modulo 59876654655677645. Yes, my old Mac laptop is so slow....

(time (exptmod 12345678901236545432 65434598654321676543234554 59876654655677645))
cpu time: 8 milliseconds
4088604362981014

DrScheme is a very nice environment for programming in Scheme !

JG



In article <A4yGf.10403$2O6.2589@xxxxxxxxxxxxxxxxxxxxxxxxxx>,
"Richard Fateman" <fateman@xxxxxxxxxxxxxxx> wrote:

"curiousblack" <ebhume@xxxxxxxxxxxx> wrote in message
news:6584801.1139435552809.JavaMail.jakarta@xxxxxxxxxxxxxxxxxxxxxxxxx
Does anyone know of any (preferably basic pgm language) downloadable
algorithms for exact calculations with very large integers - such as those
which lose precision in typical computer computation? I was hoping for
freeware, something I could experiment with on a PC....

try
http://www.rain.org/~mkummel/tbvault.html
and look for bignum.

You didn't ask, but I'll add that you would probably benefit from
downloading and learning
scheme or common lisp, each of which uses arbitrary precision integers as
a matter of course. It might also show you that there are rather different
languages than BASIC.

RJF
.



Relevant Pages

  • Re: So completely lost - trying to learn Lisp
    ... David Touretzky's book Common Lisp: ... Learn Scheme (a Lisp ... An Introduction to Computer Science Using ...
    (comp.lang.lisp)
  • Re: Universal Computer Truths
    ... The claim is that most Forth programming is done for hardware control, ... you're such a Lisp fan, you probably understand that what the 95% ... You throw away considerations what is the Ruby ... which somewhat defeats the idea of Scheme. ...
    (comp.lang.forth)
  • Re: Lisp Ruby Scheme
    ... The other side is that Lisp and Scheme: allow you to explore new programming styles for which there are no: dedicated languages available yet. ... with styles for which there is no dedicated language yet. ...
    (comp.lang.scheme)
  • Re: quote semantics
    ... with some useful work on Lisp libraries, if you fall that way GTF ... ask for that one, too, whether it was all that related to the Lambda ... And certainly CL took influence from Scheme, ... claim that this community, which is entirely composed of people who, ...
    (comp.lang.lisp)
  • Re: Why Lisp instead of Scheme?
    ... > choose Scheme over Lisp). ... I follow this thread with interest since I'm new to both languages and ... to a particular Lisp or Scheme implementation seems like a non-trivial ...
    (comp.lang.lisp)