[Ecls-list] Example of: The Gnu Multiprecision library for fast bignum operations.
Juan Jose Garcia Ripoll
worm at arrakis.es
Sat Dec 14 09:35:02 UTC 2002
On Saturday 14 December 2002 18:27, Armin Roehrl wrote:
> Hi all,
>
> I am new to ecl and don't see the obvious.
>
> Could s.b. email me a 3-line snipplet of how to use the
> multiprecision library?
> S.th. like adding two numbers should be enough to
> get me going.
Ummm, something like this?
ECL (Embeddable Common-Lisp) 0.8
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help. Top level.
> (+ 1231231243585954454 123234498450452412)
1354465742036406866
The three numbers which are presented here exceed the size of integers for a
32-bit architecture, and they are, therefore, implemented using the GMP
library. However, the user needs not know this: you just work with integer
numbers and ECL decides whether to manipulate them as GMP integers or not.
Juanjo
More information about the ecl-devel
mailing list