               ExtendedArith
               ^^^^^^^^^^^^^
  an arithmetic library for big integers, rationals & complex numbers

This library can only be used with Clean 2.0 or higher. 

Because this library uses the gmp library, you should first install
gmp if it is not already installed on your system.

The ExtendedArith library can then be installed by unpacking the
gzipped tar file, copying the ExtendedArith folder to a suitable
directory (for example the lib directory of Clean), and then running
the make.sh script in the ExtendedArith folder, with this folder
as your working directory.

For documentation of the "BigInt" module see file "BigIntDocumentation.txt". 
The other modules should be self explanatory, so no documentation is provided.

You can ignore all "no inline code for this rule" warnings.

The file "pi.icl" is an example program that calculates a certain number.

To generate an executable you should add the directory to your search path
(with -I), link the gmp.o file in the ExtendedArith directory (with -l)
and the gmp library (with "-l -lgmp").

For example:

  clm -I ExtendedArith -l ExtendedArith/gmp.o -l -lgmp pi -o pi

The ExtendedArith library itself is based on another library, the GNU MP (GMP)
library version 2.0.2 which is written mostly in C but also in assembly. This
library has the advantage of being distributed under conditions of the GNU
General Library Public License (GLPL). This gives users of that library (like
us, the Clean team) freedom to access the source code and modify it. 
 
By using the ExtendedArith library you will become a licensee of the GMP
library as well. The GLPL is quite liberal, but it imposes certain
restrictions. In general, if you redistribute the GMP library (as a part of
something else) you have to ensure that everyone you is still able to apply
changes that part of your code. In particular: If you create an executable
Clean program that uses the ExtendedArith library (and hence the GMP library)
you are _not_ allowed to give the executable to someone else without giving
him the source of the GMP library, including documentation about all applied
modifications (yours and ours). Violation of these rules might be persecuted
like any other software piratery. For further details see the GLPL at
http://www.fsf.org/copyleft/lgpl.html or in the file "Copying.lib" that comes
with this distribution.

In case of problems or questions don't hesitate to mailto:clean@cs.kun.nl

