2012-10-11 13:09:44 +02:00
|
|
|
Installation and usage basics
|
|
|
|
===============================================================================
|
|
|
|
|
|
|
|
Arb has the following dependencies:
|
|
|
|
|
2013-05-07 17:44:46 +01:00
|
|
|
* MPIR (http://www.mpir.org) or GMP (http://www.gmplib.org)
|
2012-10-11 13:09:44 +02:00
|
|
|
* MPFR (http://www.mpfr.org)
|
|
|
|
* FLINT (http://www.flintlib.org)
|
|
|
|
|
2013-05-07 17:44:46 +01:00
|
|
|
If MPIR is used instead of GMP, it must be compiled with
|
2013-05-07 17:51:20 +01:00
|
|
|
the :code:`--enable-gmpcompat` option.
|
2013-05-07 17:44:46 +01:00
|
|
|
|
2012-10-11 13:09:44 +02:00
|
|
|
Currently a source checkout of FLINT from
|
|
|
|
https://github.com/fredrik-johansson/flint2 is required.
|
|
|
|
|
|
|
|
To compile, test and install Arb from source, do::
|
|
|
|
|
|
|
|
./configure <options>
|
|
|
|
make
|
|
|
|
make check
|
|
|
|
make install
|
|
|
|
|
2013-05-07 17:44:46 +01:00
|
|
|
If GMP/MPIR, MPFR or FLINT is installed in some other location than
|
2012-10-11 13:09:44 +02:00
|
|
|
the default path /usr/local, pass the
|
2013-05-07 17:51:20 +01:00
|
|
|
flag :code:`--with-gmp=... --with-mpfr=... or --with-flint=...` with
|
|
|
|
the correct path to configure (type :code:`./configure --help` to show
|
2012-10-11 13:09:44 +02:00
|
|
|
more options).
|
|
|
|
|
|
|
|
Here is a simple sample program to get started using Arb:
|
|
|
|
|
|
|
|
.. code-block:: c
|
|
|
|
|
|
|
|
#include "fmprb.h"
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
fmprb_t x;
|
|
|
|
fmprb_init(x);
|
|
|
|
fmprb_const_pi(x, 50 * 3.33);
|
|
|
|
fmprb_printd(x, 50); printf("\n");
|
|
|
|
fmprb_clear(x);
|
|
|
|
}
|
|
|
|
|
|
|
|
The output should be something like the following::
|
|
|
|
|
|
|
|
3.1415926535897932384626433832795028841971693993751 +/- 4.2764e-50
|
|
|
|
|